This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Further improved native as support on Solaris/x86


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]