diff options
author | Christophe Lyon <christophe.lyon@st.com> | 2009-04-15 13:49:54 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@st.com> | 2009-04-15 13:49:54 +0000 |
commit | 82b5c97a793698d0b27480bbfbf7f56f9dfe741a (patch) | |
tree | 29d993a8292188815c758bdaef6f45b0b0b79e8d /bfd | |
parent | d8a1b51e44c811cb8d20570f497d80e278049ee2 (diff) | |
download | gdb-82b5c97a793698d0b27480bbfbf7f56f9dfe741a.zip gdb-82b5c97a793698d0b27480bbfbf7f56f9dfe741a.tar.gz gdb-82b5c97a793698d0b27480bbfbf7f56f9dfe741a.tar.bz2 |
2009-04-15 Christophe Lyon <christophe.lyon@st.com>
bfd/
* elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
branch to an undef weak symbol into a jump to next instruction if
a PLT entry will be created.
testsuite/
* ld-arm/arm-elf.exp: Add 1 more test to check undef weak
reference with PLT in ARM mode.
* ld-arm/thumb2-bl-undefweak1.d, ld-arm/thumb2-bl-undefweak1.s:
New files.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bcd2179..6e4b535 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2009-04-15 Christophe Lyon <christophe.lyon@st.com> + + * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM + branch to an undef weak symbol into a jump to next instruction if + a PLT entry will be created. + 2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com> * coffgen.c (make_a_section_from_file): Set the backend long diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index a47d02c..99beb9e 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -6363,8 +6363,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, signed_addend >>= howto->rightshift; /* A branch to an undefined weak symbol is turned into a jump to - the next instruction. */ - if (h && h->root.type == bfd_link_hash_undefweak) + the next instruction unless a PLT entry will be created. */ + if (h && h->root.type == bfd_link_hash_undefweak + && !(splt != NULL && h->plt.offset != (bfd_vma) -1)) { value = (bfd_get_32 (input_bfd, hit_data) & 0xf0000000) | 0x0affffff; |