diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-11-01 20:00:25 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-11-01 20:00:25 +0000 |
commit | 74b08499dd5b951c06846bda4767f5f456912576 (patch) | |
tree | b215fcc2c094a6e0d44cf8b1933c42fb3106d1c8 /bfd | |
parent | 3110dbc9c3bf4ce8688747811e871e48819bd09b (diff) | |
download | gdb-74b08499dd5b951c06846bda4767f5f456912576.zip gdb-74b08499dd5b951c06846bda4767f5f456912576.tar.gz gdb-74b08499dd5b951c06846bda4767f5f456912576.tar.bz2 |
* elf32-arm.c (bfd_elf32_arm_process_before_allocation): Correct
check for PLT usage.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 16 |
2 files changed, 18 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b3ad7d6..2b3394a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2006-11-01 Alan Modra <amodra@bigpond.net.au> + + * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Correct + check for PLT usage. + 2006-11-01 Daniel Jacobowitz <dan@codesourcery.com> * elfxx-mips.c (mips_elf_merge_gots): Always use maxcnt. diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 06adaef..2faac89 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -2934,9 +2934,19 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, if (h == NULL) continue; - /* If the call will go through a PLT entry then we do not need - glue. */ - if (globals->splt != NULL && h->plt.offset != (bfd_vma) -1) + /* If the call will go through a PLT entry then we do not + need glue. We have to do a fairly complicated check + here, since we don't determine this finally (by setting + plt.offset) until later; this test should be kept in sync + with elf32_arm_adjust_dynamic_symbol. */ + if (globals->splt != NULL + && h->plt.refcount > 0 + && (h->type == STT_FUNC + || h->type == STT_ARM_TFUNC + || h->needs_plt) + && !SYMBOL_CALLS_LOCAL (link_info, h) + && !(ELF_ST_VISIBILITY (h->other) != STV_DEFAULT + && h->root.type == bfd_link_hash_undefweak)) continue; switch (r_type) |