This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: dw2gencfi rewrite
- From: Andreas Jaeger <aj at suse dot de>
- To: Richard Henderson <rth at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 30 May 2003 16:51:06 +0200
- Subject: Re: dw2gencfi rewrite
- References: <20030527164813.GA10402@redhat.com>
Compiling glibc with that patch seems to give wrong results, I get now
for example on x86-64:
$ readelf -wf signal/kill.os
The section .eh_frame contains:
00000000 00000014 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 ofs 8
DW_CFA_offset: r16 at cfa-8
DW_CFA_nop
DW_CFA_nop
00000018 00000014 0000001c FDE cie=00000000 pc=00000020..00000047
DW_CFA_advance_loc: 25 to 00000039
DW_CFA_def_cfa_offset: 16
DW_CFA_advance_loc: 6 to 0000003f
DW_CFA_def_cfa_offset: 8
DW_CFA_nop
mahler:/abuild/aj/builds/libc:[0]$ objdump -d signal/kill.os
signal/kill.os: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <__GI___kill>:
0: 48 c7 c0 3e 00 00 00 mov $0x3e,%rax
7: 0f 05 syscall
9: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
f: 73 01 jae 12 <__GI___kill+0x12>
11: c3 retq
12: 48 31 d2 xor %rdx,%rdx
15: 48 29 c2 sub %rax,%rdx
18: 52 push %rdx
19: e8 00 00 00 00 callq 1e <__GI___kill+0x1e>
1e: 5a pop %rdx
1f: 89 10 mov %edx,(%rax)
21: 48 83 c8 ff or $0xffffffffffffffff,%rax
25: eb ea jmp 11 <__GI___kill+0x11>
Shouldn't the addresses be 18 and 1e instead of 39 and 3f?
Andreas
The input file is:
.text;
.globl __kill;
.type __kill,@function;
.align 1<<4;
__kill:
.cfi_startproc;
movq $62, %rax;
syscall;;
cmpq $-4095, %rax;
jae 0f;
.Lpseudo_end:
ret
0:
xorq %rdx, %rdx;
subq %rax, %rdx;
pushq %rdx;
.cfi_adjust_cfa_offset 8;
call __errno_location@PLT;
popq %rdx;
.cfi_adjust_cfa_offset -8;
movl %edx, (%rax);
orq $-1, %rax;
jmp .Lpseudo_end;
.cfi_endproc;
.size __kill,.-__kill;
.globl __GI___kill ;
.set __GI___kill,__kill
.weak kill ; kill = __kill
.globl __GI_kill ; .set __GI_kill,kill
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj