org directive

Nick Clifton nickc@redhat.com
Wed Oct 22 09:37:00 GMT 2003


Hi Vineet,

> First is .org in between a text section valid or logical ?

Yes.  There are good reasons why an assembler programmer might want to
do this.  It is assumed that if you are programming in assembler you
know what you are doing.

> Second Isn't it more logical that default fill value in text section
> be NOP?

No - the documentation explicitly states that the .org directive will
fill with zero-valued bytes unless it is given a second parameter of
the byte value to use.  Also .org always fills with byte values,
nothing larger.  If you want to fill space with NOP instructions that
are not bytes you should not use .org directive, but some other
method.  (eg a macro loop).

Cheers
        Nick



More information about the Binutils mailing list