Browse Source
bfd/ PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC symbol name when reporting R_386_GOT32/R_386_GOT32X relocation error against local IFUNC symbol without a base register for PIC. ld/ PR ld/20244 * testsuite/ld-i386/i386.exp: Run pr20244-4a, pr20244-4b and pr20244-4c. * testsuite/ld-i386/pr20244-4.s: New file. * testsuite/ld-i386/pr20244-4a.d: Likewise. * testsuite/ld-i386/pr20244-4b.d: Likewise. * testsuite/ld-i386/pr20244-4c.d: Likewise.gdb-8.0-branch
8 changed files with 65 additions and 1 deletions
@ -0,0 +1,10 @@ |
|||
.text |
|||
.globl _start |
|||
.type _start, @function |
|||
_start: |
|||
mov ifunc@GOT, %eax |
|||
ret |
|||
.type ifunc, @gnu_indirect_function |
|||
ifunc: |
|||
mov $0xbadbeef, %eax |
|||
ret |
|||
@ -0,0 +1,18 @@ |
|||
#source: pr20244-4.s |
|||
#as: --32 |
|||
#ld: -m elf_i386 |
|||
#objdump: -dw |
|||
#notarget: i?86-*-nacl* x86_64-*-nacl* |
|||
|
|||
.*: +file format .* |
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+804807c <_start>: |
|||
+[a-f0-9]+: 8b 05 8c 90 04 08 mov 0x804908c,%eax |
|||
+[a-f0-9]+: c3 ret |
|||
|
|||
0+8048083 <ifunc>: |
|||
+[a-f0-9]+: b8 ef be ad 0b mov \$0xbadbeef,%eax |
|||
+[a-f0-9]+: c3 ret |
|||
#pass |
|||
@ -0,0 +1,11 @@ |
|||
#source: pr20244-4.s |
|||
#as: --32 |
|||
#ld: -m elf_i386 |
|||
#objdump: -s -j .got |
|||
#notarget: i?86-*-nacl* x86_64-*-nacl* |
|||
|
|||
.*: +file format .* |
|||
|
|||
Contents of section .got: |
|||
804908c 83800408 +.... + |
|||
#pass |
|||
@ -0,0 +1,4 @@ |
|||
#source: pr20244-4.s |
|||
#as: --32 |
|||
#ld: -pie -m elf_i386 |
|||
#error: direct GOT relocation R_386_GOT32X against `ifunc' without base register can not be used when making a shared object |
|||
Loading…
Reference in new issue