* elf-bfd.h (ELF_COMMON_DEF_P): New.

* elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
common definitions.
* elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
_bfd_elf_symbol_refs_local_p.
* elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
symbols.
This commit is contained in:
Alexandre Oliva
2004-07-21 06:46:20 +00:00
parent f6d87cd6b1
commit 7e2294f937
5 changed files with 28 additions and 17 deletions

View File

@@ -2456,9 +2456,13 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
if (h == NULL)
return TRUE;
/* Common symbols that become definitions don't get the DEF_REGULAR
flag set, so test it first, and don't bail out. */
if (ELF_COMMON_DEF_P (h))
/* Do nothing. */;
/* If we don't have a definition in a regular file, then we can't
resolve locally. The sym is either undefined or dynamic. */
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
else if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
return FALSE;
/* Forced local symbols resolve locally. */