[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/17619] New: Gold fails to check PC-relative offset overflow in
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug gold/17619] New: Gold fails to check PC-relative offset overflow in PLT entry |
Date: |
Tue, 18 Nov 2014 19:17:53 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=17619
Bug ID: 17619
Summary: Gold fails to check PC-relative offset overflow in PLT
entry
Product: binutils
Version: 2.26 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at google dot com
Reporter: hjl.tools at gmail dot com
CC: ian at airs dot com
On Linux/x86-64, gold fails to check PC-relative offset overflow in PLT entry:
address@hidden pr17618]$ cat main.c
extern void foo (void);
extern void bar (void);
int
main ()
{
foo ();
bar ();
return 0;
}
address@hidden pr17618]$ cat foo.S
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "PASS"
.text
.p2align 4,,15
.globl foo
.type foo, @function
foo:
leal .LC0(%rip), %edi
jmp address@hidden
.size foo, .-foo
.p2align 4,,15
.globl bar
.type bar, @function
bar:
jmp .L0
.space 0x40000000, 0x90
.L0:
jmp .L2
.space 0x4fdfff14, 0x90
.L2:
.size bar, .-bar
.section .note.GNU-stack,"",@progbits
address@hidden pr17618]$ make
gcc -mx32 -O2 -c -o main.o main.c
gcc -mx32 -O2 -fpic -c -o foo.o foo.S
./ld -m elf32_x86_64 -shared -o libfoo.so foo.o
./ld: warning: overflow in PLT unwind data; unwinding through PLT may fail
gcc -mx32 -O2 -o foo main.o libfoo.so -Wl,-R,.
./foo
make: *** [all] Segmentation fault
address@hidden pr17618]$
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gold/17619] New: Gold fails to check PC-relative offset overflow in PLT entry,
hjl.tools at gmail dot com <=