This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Further improved native as support on Solaris/x86
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Mark Mitchell <mark at codesourcery dot com>
- Date: Sat, 5 Aug 2006 10:33:24 +0200
- Subject: Re: [PATCH] Further improved native as support on Solaris/x86
- References: <Pine.LNX.4.44.0607211357320.15174-100000@www.eyesopen.com>
> I'm unsure how many places in the compiler assume that we can take
> the difference between symbols in different sections. My previous
> patch for JUMP_TABLES_IN_TEXT_SECTION cures one source, dwarf-2
> debugging above is another one that breaks C++, but I've no idea
> how many places in the compiler are affected.
Here's how the SPARC/Solaris port deals with both problems (it fully supports
both the Sun assembler/linker and the GNU assembler/linker):
- it doesn't formally define JUMP_TABLES_IN_TEXT_SECTION but it does put the
jump tables in the .text section via sparc_output_deferred_case_vectors.
.file "switch.c"
.section ".text"
[...]
ld [%fp-20], %g1
mov %g1, %i0
return %i7+8
nop
.align 4
.align 4
.LL9:
.word .LL3-.LL9
.word .LL4-.LL9
.word .LL5-.LL9
.word .LL6-.LL9
.word .LL7-.LL9
.word .LL8-.LL9
- unless the GNU assembler is detected, ASM_PREFERRED_EH_DATA_FORMAT is
/* Some Solaris dynamic linkers don't handle unaligned section relative
relocs properly, so force them to be aligned. */
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
so in particular no DW_EH_PE_pcrel:
.section ".eh_frame",#alloc,#write
.LLframe1:
.uaword .LLECIE1-.LLSCIE1 ! Length of Common Information Entry
.LLSCIE1:
.uaword 0x0 ! CIE Identifier Tag
.byte 0x1 ! CIE Version
.ascii "zPLR\0" ! CIE Augmentation
.byte 0x1 ! uleb128 0x1; CIE Code Alignment Factor
.byte 0x7c ! sleb128 -4; CIE Data Alignment Factor
.byte 0xf ! CIE RA Column
.byte 0x8 ! uleb128 0x8; Augmentation size
.byte 0x50 ! Personality (aligned absolute)
.align 4
.long __gxx_personality_v0
--
Eric Botcazou