This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Using binutils with all target enabled
Hi,
On Wed, Dec 1, 2010 at 5:01 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Wednesday, December 01, 2010 14:27:10 Arnaud Lacombe wrote:
>> I'd have hoped that specifying the the format explicits would have
>> been possible, but very few program seems to support such options.
>> Actually, only objdump (maybe others) accepts a '-b' flags.
>
> ld has -m, objcopy/strip have -F/-O/-I, readelf doesnt care, addr2line/nm/size
> have --target. ?seems like just as, ar, and ranlib are missing command line
> flags, and --target might be the logical flag to add to them.
thanks... that would have been trivial to add if ar/ranlib's options
parsing did not look so fragile :(
I suspect the following:
if (argc == 2 && strcmp (argv[1], "-M") == 0)
{
mri_emul ();
xexit (0);
}
is already broken when --plugin <plugin> is used.
Is there any interest to see "--target" taught to ar/ranlib in
mainstream's binutils (in which can I can spend some time to write a
patch) or is it not worth it (in which case I'll just do a nasty local
hack) ?
Thanks,
- Arnaud
ps: actually, GNUTARGET did the job, but I'm afraid in a cross
environment where both native and cross-toolchain are used, that might
have non-wanted side effect.