This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: HELP with linker script!!!


----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!)

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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