[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/21038] New: Incorrect unwind info for BND PLT
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/21038] New: Incorrect unwind info for BND PLT |
Date: |
Wed, 11 Jan 2017 16:45:46 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=21038
Bug ID: 21038
Summary: Incorrect unwind info for BND PLT
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 mpx-6]$ cat y.S
.text
.globl foo
.type foo, @function
foo:
.cfi_startproc
call address@hidden
.cfi_endproc
address@hidden mpx-6]$ make LD=ld
gcc -B./ -c -o y.o y.S
ld -z bndplt -shared -o y.so y.o
./objdump -Wf -dw y.so
y.so: file format elf64-x86-64
Contents of the .eh_frame section:
00000000 0000000000000014 00000000 CIE
Version: 1
Augmentation: "zR"
Code alignment factor: 1
Data alignment factor: -8
Return address column: 16
Augmentation data: 1b
DW_CFA_def_cfa: r7 (rsp) ofs 8
DW_CFA_offset: r16 (rip) at cfa-8
DW_CFA_nop
DW_CFA_nop
00000018 0000000000000014 0000001c FDE cie=00000000
pc=0000000000000248..000000000000024d
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
00000030 0000000000000024 00000034 FDE cie=00000000
pc=0000000000000220..0000000000000240
DW_CFA_def_cfa_offset: 16
DW_CFA_advance_loc: 6 to 0000000000000226
DW_CFA_def_cfa_offset: 24
DW_CFA_advance_loc: 10 to 0000000000000230
DW_CFA_def_cfa_expression (DW_OP_breg7 (rsp): 8; DW_OP_breg16 (rip): 0;
DW_OP_lit15; DW_OP_and; DW_OP_lit11; DW_OP_ge; DW_OP_lit3; DW_OP_shl;
DW_OP_plus)
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
Disassembly of section .plt:
0000000000000220 <.plt>:
220: ff 35 e2 0d 20 00 pushq 0x200de2(%rip) # 201008
<_GLOBAL_OFFSET_TABLE_+0x8>
226: f2 ff 25 e3 0d 20 00 bnd jmpq *0x200de3(%rip) # 201010
<_GLOBAL_OFFSET_TABLE_+0x10>
22d: 0f 1f 00 nopl (%rax)
230: 68 00 00 00 00 pushq $0x0
235: f2 e9 e5 ff ff ff bnd jmpq 220 <.plt>
23b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
Disassembly of section .plt.bnd:
0000000000000240 <address@hidden>:
240: f2 ff 25 d1 0d 20 00 bnd jmpq *0x200dd1(%rip) # 201018 <func>
247: 90 nop
Disassembly of section .text:
0000000000000248 <foo>:
248: e8 f3 ff ff ff callq 240 <address@hidden>
address@hidden mpx-6]$
Since the BND PLT has
230: 68 00 00 00 00 pushq $0x0
235: f2 e9 e5 ff ff ff bnd jmpq 220 <.plt>
23b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
instead of
230: ff 25 e2 0d 20 00 jmpq *0x200de2(%rip) # 201018 <func>
236: 68 00 00 00 00 pushq $0x0
23b: e9 e0 ff ff ff jmpq 220 <.plt>
Its unwind info should be
DW_CFA_def_cfa_expression (DW_OP_breg7 (rsp): 8; DW_OP_breg16 (rip): 0;
DW_OP_lit15; DW_OP_and; DW_OP_lit5; DW_OP_ge; DW_OP_lit3; DW_OP_shl;
DW_OP_plus)
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/21038] New: Incorrect unwind info for BND PLT,
hjl.tools at gmail dot com <=