diff options
author | Daniel Jacobowitz <drow@false.org> | 2009-09-09 18:36:11 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2009-09-09 18:36:11 +0000 |
commit | 67d74e430ea9b97d9c0f09f48473a7fe81010d08 (patch) | |
tree | aacf57aeb0b3992036685fb26d8d7daea45f7baa /bfd/elf32-arm.c | |
parent | 397dbc8b2baed9b1e46841eca63f1d05c7ac32e4 (diff) | |
download | gdb-67d74e430ea9b97d9c0f09f48473a7fe81010d08.zip gdb-67d74e430ea9b97d9c0f09f48473a7fe81010d08.tar.gz gdb-67d74e430ea9b97d9c0f09f48473a7fe81010d08.tar.bz2 |
bfd/
* elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags
for the mode of target PLT entries.
(allocate_dynrelocs): Only adjust symbol type if setting its
value.
ld/testsuite/
* ld-arm/farcall-mixed-lib.d: Update.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r-- | bfd/elf32-arm.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 2dbf23cf..157024c 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -7036,6 +7036,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, + splt->output_offset + h->plt.offset); *unresolved_reloc_p = FALSE; + /* The PLT entry is in ARM mode, regardless of the + target function. */ + sym_flags = STT_FUNC; } from = (input_section->output_section->vma @@ -7452,10 +7455,14 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, /* If the Thumb BLX instruction is available, convert the BL to a BLX instruction to call the ARM-mode PLT entry. */ lower_insn = (lower_insn & ~0x1000) | 0x0800; + sym_flags = STT_FUNC; } else - /* Target the Thumb stub before the ARM PLT entry. */ - value -= PLT_THUMB_STUB_SIZE; + { + /* Target the Thumb stub before the ARM PLT entry. */ + value -= PLT_THUMB_STUB_SIZE; + sym_flags = STT_ARM_TFUNC; + } *unresolved_reloc_p = FALSE; } @@ -11449,13 +11456,13 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) { h->root.u.def.section = s; h->root.u.def.value = h->plt.offset; - } - /* Make sure the function is not marked as Thumb, in case - it is the target of an ABS32 relocation, which will - point to the PLT entry. */ - if (ELF_ST_TYPE (h->type) == STT_ARM_TFUNC) - h->type = ELF_ST_INFO (ELF_ST_BIND (h->type), STT_FUNC); + /* Make sure the function is not marked as Thumb, in case + it is the target of an ABS32 relocation, which will + point to the PLT entry. */ + if (ELF_ST_TYPE (h->type) == STT_ARM_TFUNC) + h->type = ELF_ST_INFO (ELF_ST_BIND (h->type), STT_FUNC); + } /* Make room for this entry. */ s->size += htab->plt_entry_size; |