mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
712ec27916
Add the GOT base for R_386_GOT32/R_386_GOT32X relocations against IFUNC symbols if there is no base register and disallow them for PIC. bfd/ PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt section address for R_386_GOT32/R_386_GOT32X relocations against IFUNC symbols if there is no base register and return error for PIC. ld/ PR ld/20244 * testsuite/ld-i386/i386.exp: Run pr20244-2a, pr20244-2b, pr20244-2c and pr20244-2d. * testsuite/ld-i386/no-plt.exp: Run pr20244-3a and pr20244-3b. * testsuite/ld-i386/pr20244-2.s: New file. * testsuite/ld-i386/pr20244-2a.d: Likewise. * testsuite/ld-i386/pr20244-2b.d: Likewise. * testsuite/ld-i386/pr20244-2c.d: Likewise. * testsuite/ld-i386/pr20244-2d.d: Likewise. * testsuite/ld-i386/pr20244-3a.c: Likewise. * testsuite/ld-i386/pr20244-3b.S: Likewise. * testsuite/ld-i386/pr20244-3c.S: Likewise. * testsuite/ld-i386/pr20244-3d.S: Likewise.
31 lines
480 B
ArmAsm
31 lines
480 B
ArmAsm
.section .rodata.str1.1,"aMS",@progbits,1
|
|
.LC0:
|
|
.string "PASS"
|
|
.text
|
|
.p2align 4,,15
|
|
.globl check
|
|
.type check, @function
|
|
check:
|
|
subl $12, %esp
|
|
call *get_func1@GOT
|
|
cmpl $func1, %eax
|
|
jne .L3
|
|
call *func1@GOT
|
|
cmpl $1, %eax
|
|
jne .L3
|
|
call *call_func1@GOT
|
|
cmpl $1, %eax
|
|
jne .L3
|
|
call *call_func2@GOT
|
|
cmpl $2, %eax
|
|
jne .L3
|
|
subl $12, %esp
|
|
pushl $.LC0
|
|
call *puts@GOT
|
|
addl $28, %esp
|
|
ret
|
|
.L3:
|
|
call *abort@GOT
|
|
.size check, .-check
|
|
.section .note.GNU-stack,"",@progbits
|