Specifying section type as SHT_NOBITS

Nick Clifton nickc@redhat.com
Fri Feb 17 14:47:00 GMT 2006


Hi Prasad,

> Is it possible to specify the type of a section as SHT_NOBITS, so as to 
> push that section into a segment with zero file size but 'x' memsize ?

Yes.

For COFF you would use:

   .section <name>, "b"

For ELF you would use:

   .section <name>, "aw", @nobits

Cheers
   Nick



More information about the Binutils mailing list