This is the mail archive of the
mailing list for the binutils project.
Re: [gold][PATCH] PR gold/19119: Gold accepts bogus target emulation
- From: Cary Coutant <ccoutant at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Fri, 16 Oct 2015 08:01:14 -0700
- Subject: Re: [gold][PATCH] PR gold/19119: Gold accepts bogus target emulation
- Authentication-results: sourceware.org; auth=none
- References: <20151014160535 dot GA9804 at intel dot com> <CAJimCsGDNCogqXPOvLHXw=5SrCZpHes7EmSqjtqhadJXgZbwhQ at mail dot gmail dot com> <CAMe9rOru-W07FvyDej0hqbz19hn_sBr3v1xKOxz+cXRtSM-w=A at mail dot gmail dot com>
>>> PR gold/19119
>>> * options.h (General_options): Remove "obsolete" from -m.
>> I'm a little reluctant to remove "obsolete" from the description --
>> maybe "deprecated" instead?
> It shows that -m elf32ppc is required. Saying it is obsolete or deprecated
> isn't correct.
The option is only needed for the very limited case where the inputs
are empty and we produce an empty object file. In the LTO case, it
could also be solved by adding a plugin interface so that the plugin
could tell the linker what the target is (which, again, is only needed
when building a shared library with no startup files in the link). In
the kernel case, I don't see a good alternative, but I don't really
understand why the linker even needs to run when the only input is an
empty archive. (Maybe we could instead produce a completely empty
output file for a -r link with no inputs, which would be interpreted
as an empty script when used in a final link.)
Anyway, I'll hold my "deprecated" argument for another day when these
two cases can be handled better.
> Is my original patch OK?