From: H.J. Lu Date: Sat, 19 Jul 2003 06:41:42 +0000 (+0000) Subject: 2003-07-18 H.J. Lu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa37626c9e4c2aa85bb7f48ec6b8fdb6b60041f2;p=binutils-gdb.git 2003-07-18 H.J. Lu * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index de3fd642807..845ae1da23b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2003-07-18 H.J. Lu + + * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change. + 2003-07-18 H.J. Lu * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo. diff --git a/bfd/elflink.c b/bfd/elflink.c index 744641433c8..2fd588ae110 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2494,10 +2494,6 @@ _bfd_elf_dynamic_symbol_p (h, info, ignore_protected) || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; - /* If it isn't defined locally, then clearly it's dynamic. */ - if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) - return TRUE; - /* If it was forced local, then clearly it's not dynamic. */ if (h->dynindx == -1) return FALSE; @@ -2530,6 +2526,10 @@ _bfd_elf_dynamic_symbol_p (h, info, ignore_protected) break; } + /* If it isn't defined locally, then clearly it's dynamic. */ + if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) + return TRUE; + /* Otherwise, the symbol is dynamic if binding rules don't tell us that it remains local. */ return !binding_stays_local_p;