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: Andreas Schwab <schwab at suse dot de>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 21 Jul 2006 23:10:16 +0200
- Subject: Re: [PATCH] Further improved native as support on Solaris/x86
- References: <Pine.LNX.4.44.0607211357320.15174-100000@www.eyesopen.com>
Roger Sayle <roger@eyesopen.com> writes:
> when compiled with -fPIC. For example, on x86_64-unknown-linux-gnu
> this generates:
>
> .section .eh_frame,"a",@progbits
> .Lframe1:
> ...
> .long DW.ref.__gxx_personality_v0-.
>
> where the symbol DW.ref.__gxx_personality_v0 appears in a different
> section:
>
> .section
> .gnu.linkonce.d.DW.ref.__gxx_personality_v0,"aw",@progbits
> .align 8
> .type DW.ref.__gxx_personality_v0, @object
> .size DW.ref.__gxx_personality_v0, 8
> DW.ref.__gxx_personality_v0:
> .quad __gxx_personality_v0
>
> It turns out that gas doesn't warn about taking the difference between
> two symbols in different sections even with the --warn command line
> option, though clearly this is a problem for SUN's as. And the opinion
> of both Andrew Pinskia and Ian Lance Taylor was that this is invalid
> assembler, gas probably shouldn't be accepting it and we/GCC probably
> shouldn't be generating it.
Isn't that just a pc-relative reference? On x86_64 this is representable
with a R_X86_64_PC32 relocation.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."