.eh_frame
Jakub Jelinek
jj@sunsite.ms.mff.cuni.cz
Fri Oct 10 08:51:00 GMT 1997
Hi!
As I don't have any specs on .eh_frame section format, I'd like to ask:
On sparc64-sun-linux-glibc2, egcs generates the following .eh_frame section:
.section ".eh_frame",#alloc,#write
__FRAME_BEGIN__:
.uaword .LLECIE1-.LLSCIE1 ! Length of Common Information Entry
.LLSCIE1:
.uaword 0xffffffff ! CIE Identifier Tag
.uaword 0xffffffff
.byte 0x1 ! CIE Version
.byte 0x0 ! CIE Augmentation (none)
.byte 0x1 ! ULEB128 0x1 (CIE Code Alignment Factor)
.byte 0x78 ! SLEB128 -8 (CIE Data Alignment Factor)
.byte 0x65 ! CIE RA Column
.byte 0xc ! DW_CFA_def_cfa
.byte 0xe ! ULEB128 0xe
.byte 0xff,0xf ! ULEB128 0x7ff
.byte 0x9 ! DW_CFA_register
.byte 0x65 ! ULEB128 0x65
.byte 0xf ! ULEB128 0xf
.align 8
.LLECIE1:
.uaword .LLEFDE1-.LLSFDE1 ! FDE Length
.LLSFDE1:
.uaxword __FRAME_BEGIN__ ! FDE CIE offset
.uaxword .LLFB1 ! FDE initial location
.uaxword .LLFE1-.LLFB1 ! FDE address range
.byte 0x4 ! DW_CFA_advance_loc4
.uaword .LLCFI0-.LLFB1
.byte 0xd ! DW_CFA_def_cfa_register
.byte 0x1e ! ULEB128 0x1e
.byte 0x2d ! DW_CFA_GNU_window_save
.byte 0x9 ! DW_CFA_register
.byte 0x65 ! ULEB128 0x65
.byte 0x1f ! ULEB128 0x1f
.align 8
.LLEFDE1:
Now, this is clearly wrong - .LLSFDE1 is for sure not 8 aligned and thus the
64bit relocation at that address bumps. Also, I'm not sure if not aligning
.LLCFI0-.LLFB1 is the intention, but it will work, as that is a constant,
unlike __FRAME_BEGIN__ and .LLFB1.
Is it fault in sp64-elf.h and I need to redefine ASM_OUTPUT_DWARF_DELTA
(won't it break something?) or should dwarf2out align it itself?
Or is it a bug in the linker in that it should have some special
relocation type for unaligned 64bit relocations (don't have the ABI specs
yet).
Also, may I wonder why FDE CIE offset is repeated in every FDE, eventhough
it could be just a relative offset and thus not 'cause any relocation?
If someone knows how to read that value, he can for sure add that to the
offset where he found it and get to the same place.
Is that section actually going to be READ-ONLY any time soon?
Or couldn't the dynamic linker special-case .eh_frame section and delay
resolving it till the first exception would be thrown?
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
Ultralinux - first 64bit OS to take full power of the UltraSparc
Linux version 2.0.30 on a sparc machine (291.64 BogoMips).
___________________________________________________________________
More information about the Gcc
mailing list