diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2004-11-07 10:51:45 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2004-11-07 10:51:45 +0000 |
commit | 9dfe873851b6ddd850a713874a2f34970c5c0e95 (patch) | |
tree | fb2524bdd5d8ad69a9829b89cae5d2376ecc10eb /bfd | |
parent | 66aa377dced1d3155acb5a590db0cc1d7dcbbae2 (diff) | |
download | gdb-9dfe873851b6ddd850a713874a2f34970c5c0e95.zip gdb-9dfe873851b6ddd850a713874a2f34970c5c0e95.tar.gz gdb-9dfe873851b6ddd850a713874a2f34970c5c0e95.tar.bz2 |
* elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
SYMBOL_CALLS_LOCAL and check for undefweak symbols with
non-default visibility.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-m68k.c | 21 |
2 files changed, 13 insertions, 14 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d411ed7..849761e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2004-11-07 Andreas Schwab <schwab@suse.de> + + * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use + SYMBOL_CALLS_LOCAL and check for undefweak symbols with + non-default visibility. + 2004-11-01 Mark Mitchell <mark@codesourcery.com> * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c index 42a3764..44863f2 100644 --- a/bfd/elf32-m68k.c +++ b/bfd/elf32-m68k.c @@ -936,9 +936,10 @@ elf_m68k_adjust_dynamic_symbol (info, h) if (h->type == STT_FUNC || h->needs_plt) { - if (! info->shared - && !h->def_dynamic - && !h->ref_dynamic + if ((h->plt.refcount <= 0 + || SYMBOL_CALLS_LOCAL (info, h) + || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT + && h->root.type == bfd_link_hash_undefweak)) /* We must always create the plt entry if it was referenced by a PLTxxO relocation. In this case we already recorded it as a dynamic symbol. */ @@ -946,19 +947,11 @@ elf_m68k_adjust_dynamic_symbol (info, h) { /* This case can occur if we saw a PLTxx reloc in an input file, but the symbol was never referred to by a dynamic - object. In such a case, we don't actually need to build - a procedure linkage table, and we can just do a PCxx - reloc instead. */ - BFD_ASSERT (h->needs_plt); + object, or if all references were garbage collected. In + such a case, we don't actually need to build a procedure + linkage table, and we can just do a PCxx reloc instead. */ h->plt.offset = (bfd_vma) -1; - return TRUE; - } - - /* GC may have rendered this entry unused. */ - if (h->plt.refcount <= 0) - { h->needs_plt = 0; - h->plt.offset = (bfd_vma) -1; return TRUE; } |