This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: HELP with linker script!!!
- From: Andreas Schwab <schwab at suse dot de>
- To: "Dave Korn" <dave dot korn at artimi dot com>
- Cc: "'Nick Clifton'" <nickc at redhat dot com>,"'Vincent Rubiolo'" <vincent dot rubiolo at windriver dot com>,"'Pieter Arnout'" <pieter at powerescape dot com>,<grigory dot zagorodnev at intel dot com>, <binutils at sources dot redhat dot com>
- Date: Fri, 01 Apr 2005 16:34:35 +0200
- Subject: Re: HELP with linker script!!!
- References: <SERRANOp9O2zVzcQnmA00000016@SERRANO.CAM.ARTIMI.COM>
"Dave Korn" <dave.korn@artimi.com> writes:
> ----Original Message----
>>From: Nick Clifton
>>Sent: 01 April 2005 15:02
>
>
>> The other way is hackier, but it avoids the warnings:
>>
>> int foo __attribute__((section (".cached_bss,\"w\",@nobits#")));
>>
>> This assumes that the hash character (#) is the start-of-line-comment
>> character for the particular instruction set you are using. If you have
>> a look at the assembler emitted by GCC you can see why:
>>
>> .section .cached_bss,"w",@nobits#,"aw",@progbits
>>
>> The hash stops GAS from interpreting the
>>
>> ,"aw",@probits
>>
>> which gcc has appended to the name of the section...
>
> <koff> *start*-of-line comment character ......... <g>
>
> You could either add a \n before the # or use a ';' or whatever the port
> uses for the mid-line comment character.......
>
> And boy, is that _ever_ a gross hack! (I quite like it!)
This will fail within #NO_APP.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."