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: ld --print-output-format switch


Roland McGrath <roland@hack.frob.com> writes:

> This adds an ld option --print-output-format.  The intent is to provide
> some technique better than ld --verbose and matching the OUTPUT_FORMAT
> command at the beginning of the linker script.  (Library packages building
> a trivial input-only linker script need to give it the right OUTPUT_FORMAT
> command to ensure it gets accepted or skipped appropriately for the current
> target in biarch installations.)
>
> This emits just one target, never a triple as OUTPUT_FORMAT could take
> for endian-switchable targets.  I think it will emit the right one when
> used with -EB or -EL on configurations where those are meaningful, but I
> haven't tested such a target.
>
> Ok for trunk?
>
> If this goes in, someone should implement it for gold as well.
> It was not very obvious to me how to go about it there.

In general I like this idea and I would like somebody to approve it (I
don't approve many binutils patches these days outside of gold).

However, I don't see why this will do the right thing when used with -EB
or -EL, and it seems to me that this matters.  Your patch prints
default_target, but as far as I can see -EB/-EL only affect
output_target.  I think this does need to be tested to ensure that
-EL/-EB work correctly.

Ian


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