Browse Source
* elf32-arm.c (elf32_arm_final_link_relocate): Do not turn branches to undefine weak symbols into branches to the next instruction if creating PLT entries for those symbols. ld/testsuite: * ld-arm/thumb2-bl-undefweak.d, ld-arm/thumb2-bl-undefweak.s: New. * ld-arm/arm-elf.exp: Run thumb2-bl-undefweak test.cgen-1_1-branch
6 changed files with 34 additions and 2 deletions
@ -0,0 +1,9 @@ |
|||
#source: thumb2-bl-undefweak.s |
|||
#as: |
|||
#ld: -shared |
|||
#objdump: -dr |
|||
#... |
|||
Disassembly of section .text: |
|||
|
|||
.* <foo>: |
|||
.*: .... .... blx ... <foo-0x.*> |
|||
@ -0,0 +1,10 @@ |
|||
@ Test that calls to undefined weak functions resolve to call through |
|||
@ the PLT in shared libraries. |
|||
|
|||
.arch armv7 |
|||
.syntax unified |
|||
.text |
|||
.thumb_func |
|||
foo: |
|||
bl bar |
|||
.weak bar |
|||
Loading…
Reference in new issue