diff options
author | Nick Clifton <nickc@redhat.com> | 2016-01-21 10:51:25 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-01-21 10:51:25 +0000 |
commit | aebf9be7089c1903581740851ae9ae67ffee2f4b (patch) | |
tree | 85d66645a7d0137aff56bbf481f679bf8a873383 /bfd/elf32-arm.c | |
parent | 305e13e67faaf940ce6eb708847a655a0735a651 (diff) | |
download | gdb-aebf9be7089c1903581740851ae9ae67ffee2f4b.zip gdb-aebf9be7089c1903581740851ae9ae67ffee2f4b.tar.gz gdb-aebf9be7089c1903581740851ae9ae67ffee2f4b.tar.bz2 |
Fix unexpected failures in the linker testsuite for ARM VxWorks targets.
PR ld/19455
* elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
class of the linker stub bfd.
(elf32_arm_check_relocs): Skip check for pic format after
processing a vxWorks R_ARM_ABS12 reloc.
* elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
reporting a class mismatch.
* testsuite/ld-arm/vxworks1-lib.dd: Update for current
disassmebler output.
* testsuite/ld-arm/vxworks1-lib.rd: Likewise.
* testsuite/ld-arm/vxworks1.dd: Likewise.
* testsuite/ld-arm/vxworks1.rd: Likewise.
* testsuite/ld-arm/vxworks1.ld: Set the output format.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r-- | bfd/elf32-arm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 39b6153..81ebf67 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -3575,6 +3575,9 @@ elf32_arm_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) htab->plt_entry_size = 4 * ARRAY_SIZE (elf32_arm_vxworks_exec_plt_entry); } + + if (elf_elfheader (dynobj)) + elf_elfheader (dynobj)->e_ident[EI_CLASS] = ELFCLASS32; } else { @@ -13613,6 +13616,8 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, may_need_local_target_p = TRUE; break; } + else goto jump_over; + /* Fall through. */ case R_ARM_MOVW_ABS_NC: @@ -13632,6 +13637,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, /* Fall through. */ case R_ARM_ABS32: case R_ARM_ABS32_NOI: + jump_over: if (h != NULL && bfd_link_executable (info)) { h->pointer_equality_needed = 1; |