Mail Archives: djgpp-workers/2000/11/26/17:50:55
> Binutils will probably need some changes. One of the bigger changes will be
> that binutils know how to set the right alignment for dwarf2 sections. The
After taking a look at the assembly generated by 'gcc -gdwarf-2', I wonder
just how important alignment for these sections is. The assembly has no
alignment directives, so perhaps alignment is that big a deal. However, I
still believe storing section alignment data is still a good idea.
main.c:
int main()
{
return 0;
}
.file "main.c"
gcc2_compiled.:
___gnu_compiled_c:
.section .debug_abbrev
Ldebug_abbrev0:
.section .text
Ltext0:
.section .debug_info
Ldebug_info0:
.section .debug_line
Ldebug_line0:
.section .text
.p2align 2
.globl _main
_main:
LFB1:
LM1:
pushl %ebp
LCFI0:
movl %esp,%ebp
LCFI1:
LM2:
xorl %eax,%eax
jmp L2
LM3:
.p2align 4,,7
L2:
movl %ebp,%esp
popl %ebp
ret
LFE1:
.section .eh_frame
___FRAME_BEGIN__:
.long LLCIE1
LSCIE1:
.long 0x0
.byte 0x1
.byte 0x0
.byte 0x1
.byte 0x7c
.byte 0x8
.byte 0xc
.byte 0x5
.byte 0x4
.byte 0x88
.byte 0x1
.p2align 2,0
LECIE1:
.set LLCIE1,LECIE1-LSCIE1
.long LLFDE1
LSFDE1:
.long LSFDE1-___FRAME_BEGIN__
.long LFB1
.long LFE1-LFB1
.byte 0x4
.long LCFI0-LFB1
.byte 0xe
.byte 0x8
.byte 0x84
.byte 0x2
.byte 0x4
.long LCFI1-LCFI0
.byte 0xd
.byte 0x4
.p2align 2,0
LEFDE1:
.set LLFDE1,LEFDE1-LSFDE1
.section .text
Letext0:
.section .debug_line
.long 0x42
.short 0x2
.long 0x1a
.byte 0x4
.byte 0x1
.byte -10
.byte 245
.byte 10
.byte 0x0
.byte 0x1
.byte 0x1
.byte 0x1
.byte 0x1
.byte 0x0
.byte 0x0
.byte 0x0
.byte 0x1
.byte 0x0
.ascii "main.c\0"
.byte 0x0
.byte 0x0
.byte 0x0
.byte 0x0
.byte 0x0
.byte 0x5
.byte 0x2
.long LM1
.byte 0x15
.byte 0x0
.byte 0x5
.byte 0x2
.long LM2
.byte 0x15
.byte 0x0
.byte 0x5
.byte 0x2
.long LM3
.byte 0x15
.byte 0x0
.byte 0x5
.byte 0x2
.long Letext0
.byte 0x0
.byte 0x1
.byte 0x1
.section .debug_abbrev
.byte 0x1
.byte 0x11
.byte 0x1
.byte 0x3
.byte 0x8
.byte 0x1b
.byte 0x8
.byte 0x25
.byte 0x8
.byte 0x13
.byte 0xb
.byte 0x11
.byte 0x1
.byte 0x12
.byte 0x1
.byte 0x10
.byte 0x6
.byte 0,0
.byte 0x2
.byte 0x2e
.byte 0x0
.byte 0x3f
.byte 0xc
.byte 0x3
.byte 0x8
.byte 0x3a
.byte 0xb
.byte 0x3b
.byte 0xb
.byte 0x49
.byte 0x13
.byte 0x11
.byte 0x1
.byte 0x12
.byte 0x1
.byte 0x40
.byte 0xa
.byte 0,0
.byte 0x3
.byte 0x24
.byte 0x0
.byte 0x3
.byte 0x8
.byte 0xb
.byte 0xb
.byte 0x3e
.byte 0xb
.byte 0,0
.byte 0
.section .debug_info
.long 0x74
.short 0x2
.long Ldebug_abbrev0
.byte 0x4
.byte 0x1
.ascii "main.c\0"
.ascii "c:/djgpp/projects/dwarf2\0"
.ascii "GNU C 2.95.2 19991024 (release)\0"
.byte 0x1
.long Ltext0
.long Letext0
.long Ldebug_line0
.byte 0x2
.byte 0x1
.ascii "main\0"
.byte 0x1
.byte 0x2
.long 0x70
.long LFB1
.long LFE1
.byte 0x1
.byte 0x54
.byte 0x3
.ascii "int\0"
.byte 0x4
.byte 0x5
.byte 0x0
.section .debug_pubnames
.long 0x17
.short 0x2
.long Ldebug_info0
.long 0x78
.long 0x59
.ascii "main\0"
.long 0x0
.section .debug_aranges
.long 0x1c
.short 0x2
.long Ldebug_info0
.byte 0x4
.byte 0x0
.long 0x4
.long Ltext0
.long Letext0-Ltext0
.long 0x0
.long 0x0
- Raw text -