aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2003-07-19 04:12:22 +0000
committerH.J. Lu <hjl.tools@gmail.com>2003-07-19 04:12:22 +0000
commit1e364ec981cd5bb9a0349cebe7af2068f4c8236c (patch)
tree2b4722c5fe32c6b5a9b3414a291ed4ef8439f694 /bfd/elflink.c
parent34b60dc34ac9db7aee48d3213503dd645ab41254 (diff)
downloadgdb-1e364ec981cd5bb9a0349cebe7af2068f4c8236c.zip
gdb-1e364ec981cd5bb9a0349cebe7af2068f4c8236c.tar.gz
gdb-1e364ec981cd5bb9a0349cebe7af2068f4c8236c.tar.bz2
2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo. (SYMBOL_CALLS_LOCAL): Likewise. * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE immediately if symbol isn't defined locally.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 2fd588a..7446414 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -2494,6 +2494,10 @@ _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;
@@ -2526,10 +2530,6 @@ _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;