[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/21481] New: -z bndplt doesn't work with IFUNC
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/21481] New: -z bndplt doesn't work with IFUNC |
Date: |
Wed, 10 May 2017 15:23:27 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=21481
Bug ID: 21481
Summary: -z bndplt doesn't work with IFUNC
Product: binutils
Version: 2.29 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
Target: x86-64
address@hidden xxx]$ cat x.c
extern void check (void);
int
main ()
{
check ();
return 0;
}
address@hidden xxx]$ cat func1.S
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "PASS"
.text
.globl check
.type check, @function
check:
subq $8, %rsp
call address@hidden(%rip)
cmpl $func1, %eax
jne .L3
movq address@hidden(%rip), %rdx
cmpq %rax, (%rdx)
jne .L3
call address@hidden(%rip)
cmpl $1, %eax
jne .L3
call address@hidden(%rip)
cmpl $1, %eax
jne .L3
leaq .LC0(%rip), %rdi
addq $8, %rsp
jmp address@hidden(%rip)
.L3:
call address@hidden(%rip)
.size check, .-check
.globl get_func1
.type get_func1, @function
get_func1:
movq address@hidden(%rip), %rax
ret
.size get_func1, .-get_func1
.globl call_func1
.type call_func1, @function
call_func1:
jmp address@hidden(%rip)
.size call_func1, .-call_func1
.globl func1_p
.section .rodata,"a",@progbits
.align 8
.size func1_p, 8
.type func1_p, @object
func1_p:
.dc.a func1
implementation1:
movl $1, %eax
ret
.size implementation1, .-implementation1
.globl func1
.type func1, @gnu_indirect_function
func1:
leaq implementation1(%rip), %rax
ret
.size func1, .-func1
.section .note.GNU-stack,"",@progbits
address@hidden xxx]$ make
gcc -B./ -g -c -o x.o x.c
gcc -B./ -c -g func1.S -o func1.o
gcc -B./ -Wl,-z,bndplt -o x x.o func1.o
./x
Makefile:13: recipe for target 'all' failed
make: *** [all] Aborted
address@hidden xxx]$
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/21481] New: -z bndplt doesn't work with IFUNC,
hjl.tools at gmail dot com <=