binary to elf conversion

Maciej W. Rozycki macro@linux-mips.org
Fri Aug 17 14:08:00 GMT 2007
On Thu, 16 Aug 2007, Mike Frysinger wrote:

> > Why doesn't it default to the default architecture binutils was
> > built for?
> 
> i think a similar question was posed for default -EB/-EL selection and the 
> answer was no one really cared enough to fix it ;)

 One issue is for some architectures you cannot set some ELF file header 
flags that may be needed for some uses of the resulting object file.  For 
example for MIPS/Linux you cannot set the PIC flag which makes the file 
less that useful if you want it to become a part of userland binary.  A 
better solution these days is often to use `gas' (through the `gcc' driver 
and hence accepting all the usual target-specific and less so object 
generation options) and its .incbin directive instead...

> i imagine if you posted a patch, there wouldnt really be objections to the 
> behavior change ...

 ... which may actually be the reason nobody bothered to prepare such a 
patch so far.

  Maciej



More information about the Binutils mailing list