This is the mail archive of the binutils@sourceware.org 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: How to config GAS to generate 'clean' objects?


On Sat, Jan 21, 2006 at 09:44:49AM +0000, Nick Clifton wrote:
> Hi Clainst,
Hi, Nick. 
Sorry, I forgot to tag my name last time.
 
> Not without modifying the sources of the assembler no.  But of course 
> you do have access to these sources so you can always do this.

Yes, you're right. If I had time, I'll do it. No wonder the strip -R
would save me some time :)

> >My next question is:
> >How to make GAS generate plain binary file like other assemblers such as
> >nasm or fasm. 
> 
> They do ?  This seems odd to me.  What use is a plain binary file ?  You 
> cannot link it with other files, it has lost too much information.  I 
> can understand your wanting the linker to generate a plain binary file 
> rather than say an ELF or PE format executable, but I do not understand 
> why you want the assembler to produce plain binary object files.

Yes, they do. AFAIK, nasm has an '-f bin' option and fasm has 'format
binary' directive, which could help their users generate binary files.

I often use this kind of feature of assemblers to produce executables
directly, not for _object_ files to be linked. IMHO, the problem of this
feature is how to generate plain binary for multi-section code. Nasm
simply concentrates its assembled sections, while fasm will report an
error of conflict between 'binary' and 'section' directives. Hmm..
considering this, gas has more flexibility.


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