summaryrefslogtreecommitdiff
path: root/elf/dl-lookup.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-04-05 05:20:37 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-05 05:20:37 -0400
commitff9f1c5f324eb53adc23bfb80f3c932760c94149 (patch)
tree73afa06f8bb7a0f5268e7aeb8be0a60b0278ab0a /elf/dl-lookup.c
parente80d6f94e19d17b91e3cd3ada7193cc88f621feb (diff)
Fix DL_DEBUG_UNUSED to elide the VDSO and handle PLT references properly.
* elf/rtld.c (dl_main): If DL_DEBUG_UNUSED is enabled, turn off lazy binding. * elf/dl-lookup (_dl_lookup_symbol_x): If DL_DEBUG_UNUSED, ignore undefined symbol errors. * elf/rtlc.c (dl_main): Skip VDSO when checking for unused DT_NEEDED entries.
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r--elf/dl-lookup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 839dd3a4fc..a2a699b48f 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -769,7 +769,8 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
if (__builtin_expect (current_value.s == NULL, 0))
{
if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
- && skip_map == NULL)
+ && skip_map == NULL
+ && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
{
/* We could find no value for a strong reference. */
const char *reference_name = undef_map ? undef_map->l_name : "";