diff options
author | clyon <clyon> | 2009-02-18 16:56:36 +0000 |
---|---|---|
committer | clyon <clyon> | 2009-02-18 16:56:36 +0000 |
commit | 2504a910747bad8ae1076430a07b0acdaf6d2613 (patch) | |
tree | 43cfdf63c8387419b525831e621a6c07809df8c6 | |
parent | 3a289b5e696442abc63ccde975ded195c94f70a1 (diff) | |
download | gdb-2504a910747bad8ae1076430a07b0acdaf6d2613.tar.gz |
2009-02-18 Christophe Lyon <christophe.lyon@st.com>
bfd/
* elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
stub. Catch default case error.
(arm_map_one_stub): Add missing Thumb mapping symbol.
testsuite/
* ld-arm/farcall-arm-arm-pic-veneer.d,
ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
ld-arm/farcall-arm-thumb-pic-veneer.d,
ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
ld-arm/farcall-thumb-thumb-blx-pic-veneer.d: Fix expected stub
target.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 977c9ab962d..81115920e92 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2009-02-18 Christophe Lyon <christophe.lyon@st.com> + + * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic + stub. Catch default case error. + (arm_map_one_stub): Add missing Thumb mapping symbol. + 2009-02-18 Bjoern Haase <bjoern.m.haase@web.de> PR 9841 diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index b1129d8b465..04f54054915 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -2069,7 +2069,7 @@ static const bfd_vma elf32_arm_stub_long_branch_any_any_pic[] = { 0xe59fc000, /* ldr r12, [pc] */ 0xe08ff00c, /* add pc, pc, ip */ - 0x00000000, /* dcd R_ARM_REL32(X) */ + 0x00000000, /* dcd R_ARM_REL32(X-4) */ }; /* Section name for stubs is the associated section name plus this @@ -3208,9 +3208,10 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry, start of the stub. */ _bfd_final_link_relocate (elf32_arm_howto_from_type (R_ARM_REL32), stub_bfd, stub_sec, stub_sec->contents, - stub_entry->stub_offset + 8, sym_value, 0); + stub_entry->stub_offset + 8, sym_value, -4); break; default: + BFD_FAIL(); break; } @@ -11704,6 +11705,8 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry, case arm_stub_short_branch_v4t_thumb_arm: if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1, 8)) return FALSE; + if (!elf32_arm_output_map_sym (osi, ARM_MAP_THUMB, addr)) + return FALSE; if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr + 4)) return FALSE; break; |