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: Using binutils with all target enabled


Hi all,

On Wed, Dec 1, 2010 at 6:16 PM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> 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) ?
>
I just sent the patches teaching the --target flag to binutils/ar (and
doing a bit of refactoring). They are certainly not regressions-free,
and certainly not enough commented/documented. Anyway, I leave them
open to comment if anybody cares.

 - Arnaud


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