(DL_ADDR_SYM_MATCH): For undefined symbol require exact match (these are PLTs).
authordrepper <drepper>
Thu, 24 Aug 2006 20:27:05 +0000 (20:27 +0000)
committerdrepper <drepper>
Thu, 24 Aug 2006 20:27:05 +0000 (20:27 +0000)
sysdeps/generic/ldsodefs.h

index 2c3ce81..b7d0f9b 100644 (file)
@@ -76,7 +76,7 @@ typedef struct link_map *lookup_t;
 /* On some architectures dladdr can't use st_size of all symbols this way.  */
 #define DL_ADDR_SYM_MATCH(L, SYM, MATCHSYM, ADDR) \
   ((ADDR) >= (L)->l_addr + (SYM)->st_value                             \
-   && (((SYM)->st_size == 0                                            \
+   && ((((SYM)->st_shndx == SHN_UNDEF || (SYM)->st_size == 0)          \
        && (ADDR) == (L)->l_addr + (SYM)->st_value)                     \
        || (ADDR) < (L)->l_addr + (SYM)->st_value + (SYM)->st_size)     \
    && ((MATCHSYM) == NULL || (MATCHSYM)->st_value < (SYM)->st_value))