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: org directive


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


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