]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(RESOLVE): Don't try to resolve local symbols.
authorUlrich Drepper <drepper@redhat.com>
Thu, 20 Mar 1997 03:39:46 +0000 (03:39 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 20 Mar 1997 03:39:46 +0000 (03:39 +0000)
elf/dl-reloc.c

index e299e523ee2fb9ef721cc16add28afda1487475d..51afaee011af4320ccf583ee5df4e5a431d78e55 100644 (file)
@@ -1,5 +1,5 @@
 /* Relocate a shared object and resolve its references to other loaded objects.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -58,8 +58,11 @@ _dl_relocate_object (struct link_map *l, struct link_map *scope[], int lazy)
 
     /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code.  */
 #define RESOLVE(ref, flags) \
-    (_dl_lookup_symbol (strtab + (*ref)->st_name, ref, scope, \
-                       l->l_name, flags))
+    (((*ref)->st_shndx != SHN_UNDEF &&                                       \
+      ELFW(ST_BIND) ((*ref)->st_info) == STB_LOCAL)                          \
+     ? l->l_addr                                                             \
+     : _dl_lookup_symbol (strtab + (*ref)->st_name, ref, scope,                      \
+                         l->l_name, flags))
 
 #include "dynamic-link.h"
     ELF_DYNAMIC_RELOCATE (l, lazy);