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: ./configure --target seems to be ignored.


On Mon, Jun 04, 2012 at 07:57:20AM -0400, Hans-Peter Nilsson wrote:
     
     Yes, because MMO is not a linkable format.  The GNU assembler
     produces objects that must be further processed by the linker,
     unlike for example nasm (for flat binary .COM) and mmixal. 

I see.   In other words the assembler cannot produce MMO, but the linker can.

     have to ask - do you know what these formats are (as opposed to
     e.g. trying to see what object formats can be produced)?
     Knowing what you try to achieve might help improving the
     answers.

No.  I am experimenting, in order to become (more) familiar with binutils.
     
     It's admittedly a bit unclear in the ld documentation that
     "emulation" can mean "output format" (one might be tempted to
     use "-b", but that'd be wrong), but I think the rest of the
     information you seek is there.  I really much prefer improving
     the linker documentation over clarifying it on a mailing list,
     so please have a look and tell the first question that comes to
     mind.
     
I was a little surprised to find that the default output filename from the 
assembler was "a.out", since I am used to that being an executable file.
I was then  initially confused, when I tried passing that file to the linker
and got the error:

./ld/ld-new -m mmo a.out
a.out: file not recognized: File truncated

until I realised that it was overwriting the input file with its output.

Why does the assembler produce a file which cannot be passed to the linker
without renaming?

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


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