mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 14:59:31 +08:00
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.
This commit is contained in:
@ -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>
|
2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||||
|
|
||||||
* coffgen.c (make_a_section_from_file): Set the backend long
|
* coffgen.c (make_a_section_from_file): Set the backend long
|
||||||
|
@ -6363,8 +6363,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
|
|||||||
signed_addend >>= howto->rightshift;
|
signed_addend >>= howto->rightshift;
|
||||||
|
|
||||||
/* A branch to an undefined weak symbol is turned into a jump to
|
/* A branch to an undefined weak symbol is turned into a jump to
|
||||||
the next instruction. */
|
the next instruction unless a PLT entry will be created. */
|
||||||
if (h && h->root.type == bfd_link_hash_undefweak)
|
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)
|
value = (bfd_get_32 (input_bfd, hit_data) & 0xf0000000)
|
||||||
| 0x0affffff;
|
| 0x0affffff;
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2009-04-15 Christophe Lyon <christophe.lyon@st.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
|
2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* ld-i386/abs.d: Add --32 for assembler and -melf_i386 for
|
* ld-i386/abs.d: Add --32 for assembler and -melf_i386 for
|
||||||
|
@ -185,6 +185,7 @@ run_dump_test "group-relocs-ldr-bad"
|
|||||||
run_dump_test "group-relocs-ldrs-bad"
|
run_dump_test "group-relocs-ldrs-bad"
|
||||||
run_dump_test "group-relocs-ldc-bad"
|
run_dump_test "group-relocs-ldc-bad"
|
||||||
run_dump_test "thumb2-bl-undefweak"
|
run_dump_test "thumb2-bl-undefweak"
|
||||||
|
run_dump_test "thumb2-bl-undefweak1"
|
||||||
run_dump_test "emit-relocs1"
|
run_dump_test "emit-relocs1"
|
||||||
|
|
||||||
# Exclude non-ARM-EABI targets.
|
# Exclude non-ARM-EABI targets.
|
||||||
|
9
ld/testsuite/ld-arm/thumb2-bl-undefweak1.d
Normal file
9
ld/testsuite/ld-arm/thumb2-bl-undefweak1.d
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#source: thumb2-bl-undefweak1.s
|
||||||
|
#as:
|
||||||
|
#ld: -shared
|
||||||
|
#objdump: -dr
|
||||||
|
#...
|
||||||
|
Disassembly of section .text:
|
||||||
|
|
||||||
|
.* <foo>:
|
||||||
|
.*: ........ bl ... <foo-0x.*>
|
9
ld/testsuite/ld-arm/thumb2-bl-undefweak1.s
Normal file
9
ld/testsuite/ld-arm/thumb2-bl-undefweak1.s
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@ Test that calls to undefined weak functions resolve to call through
|
||||||
|
@ the PLT in shared libraries in ARM mode.
|
||||||
|
|
||||||
|
.arch armv6
|
||||||
|
.syntax unified
|
||||||
|
.text
|
||||||
|
foo:
|
||||||
|
bl bar
|
||||||
|
.weak bar
|
Reference in New Issue
Block a user