This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Test DWARF2_UNWIND_INFO value for sjlj exceptions
Richard Henderson writes:
> In this case you should fall all the way back to the Tru64 solution,
> where we emit .byte stuff into the .data section, and have collect2
> pull together all the fragments.
Ok, I'm following this path.
> Briefly, it looks like TARGET_ASM_EH_FRAME_SECTION should be able to
> switch for you on demand. Feel free to break up default_eh_frame_section
> into separate fragments so that you can call back into the bit that
> does the data_section emission.
So far, it's coming along nicely, with one exception: I've rediscovering
the problem which prompted me to go for sjlj exceptions initially.
Compiling the O32 libgcc produces assembler errors. When I compile
_divdi3.o like this:
./xgcc -B./ -B/.vol/gcc/share/mips-sgi-irix6.5/bin/ -isystem /.vol/gcc/share/mips-sgi-irix6.5/include -isystem /.vol/gcc/share/mips-sgi-irix6.5/sys-include -L/.vol/gcc/obj/gcc-3.4-20030916/6.5-cc+o32/gcc/../ld -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I/.vol/gcc/src/gcc/gcc -I/.vol/gcc/src/gcc/gcc/. -I/.vol/gcc/src/gcc/gcc/../include -mabi=32 -DL_divdi3 -c /.vol/gcc/src/gcc/gcc/libgcc2.c -fexceptions -fnon-call-exceptions -o libgcc/mabi=32/_divdi3.o -save-temps -fverbose-asm -dA
I get the following end of _divdi3.s:
$LFE3:
#APP
.data
.align 2
.globl _GLOBAL__F___divdi3
_GLOBAL__F___divdi3:
$Lframe1:
.align 0
.word $LECIE1-$LSCIE1 # Length of Common Information Entry
$LSCIE1:
.align 0
.word 0x0 # CIE Identifier Tag
.byte 0x1 # CIE Version
.ascii "\0" # CIE Augmentation
.byte 0x1 # uleb128 0x1; CIE Code Alignment Factor
.byte 0x4 # sleb128 4; CIE Data Alignment Factor
.byte 0x40 # CIE RA Column
.byte 0xc # DW_CFA_def_cfa
.byte 0x1d # uleb128 0x1d
.byte 0x0 # uleb128 0x0
.align 2
$LECIE1:
$LSFDE1:
.align 0
.word $LEFDE1-$LASFDE1 # FDE Length
$LASFDE1:
.align 0
.word $LASFDE1-$Lframe1 # FDE CIE offset
.align 0
.word $LFB3 # FDE initial location
.align 0
.word $LFE3-$LFB3 # FDE address range
.byte 0x4 # DW_CFA_advance_loc4
.align 0
.word $LCFI0-$LFB3
.byte 0xe # DW_CFA_def_cfa_offset
.byte 0x8 # uleb128 0x8
.byte 0x4 # DW_CFA_advance_loc4
.align 0
.word $LCFI2-$LCFI0
.byte 0x11 # DW_CFA_offset_extended_sf
.byte 0x10 # uleb128 0x10
.byte 0x7e # sleb128 -2
.byte 0x11 # DW_CFA_offset_extended_sf
.byte 0x11 # uleb128 0x11
.byte 0x7f # sleb128 -1
.align 2
$LEFDE1:
.align 0
.word 0x0 # End of Table
.align 0
#NO_APP
Unfortunately, as -32 -mips2 complains:
as0: Error: _divdi3.s, line 880:undefined symbol in expression
.word $LECIE1-$LSCIE1
as0: Error: _divdi3.s, line 896:undefined symbol in expression
.word $LEFDE1-$LASFDE1
as0: Error: _divdi3.s, line 896:Symbol must have absolute value: $LECIE1
.word $LEFDE1-$LECIE1
as0: Error: _divdi3.s, line 899:Symbol must have absolute value: $Lframe1
.word $LASFDE1-$Lframe1
as0: Error: _divdi3.s, line 903:Symbol must have absolute value: $LFB3
.word $LFE3-$LFB3
as0: Error: _divdi3.s, line 906:Symbol must have absolute value: $LFB3
.word $LCFI0-$LFB3
as0: Error: _divdi3.s, line 911:Symbol must have absolute value: $LCFI0
.word $LCFI2-$LCFI0
I.e. none of the label differences can be computed. I'll see if I can come
up with a different solution with some implementation of
ASM_OUTPUT_DWARF_DELTA instead of the generic dw2_asm_output_delta in
dwarf2asm.c.
Rainer