diff options
author | Florian Weimer <fweimer@redhat.com> | 2019-11-08 15:48:51 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2019-11-27 20:19:22 +0100 |
commit | 4a2ab5843a5cc4a5db1b3b79916a520ea8b115dc (patch) | |
tree | e9c467390cdb691d4cca83a10cc9a072a7f38bfe /resolv/resolv.h | |
parent | cb61630ed712d033f54295f776967532d3f4b46a (diff) | |
download | glibc-4a2ab5843a5cc4a5db1b3b79916a520ea8b115dc.tar.gz glibc-4a2ab5843a5cc4a5db1b3b79916a520ea8b115dc.tar.xz glibc-4a2ab5843a5cc4a5db1b3b79916a520ea8b115dc.zip |
dlsym: Do not determine caller link map if not needed
Obtaining the link map is potentially very slow because it requires iterating over all loaded objects in the current implementation. If the caller supplied an explicit handle (i.e., not one of the RTLD_* constants), the dlsym implementation does not need the identity of the caller (except in the special case of auditing), so this change avoids computing it in that case. Even in the minimal case (dlsym called from a main program linked with -dl), this shows a small speedup, perhaps around five percent. The performance improvement can be arbitrarily large in principle (if _dl_find_dso_for_object has to iterate over many link maps). Change-Id: Ide5d9e2cc7ac25a0ffae8fb4c26def0c898efa29
Diffstat (limited to 'resolv/resolv.h')
0 files changed, 0 insertions, 0 deletions