This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: --gc-sections and -r
- From: Alan Modra <amodra at gmail dot com>
- To: Tristan Gingold <gingold at adacore dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Fri, 2 Sep 2016 08:44:30 +0930
- Subject: Re: --gc-sections and -r
- Authentication-results: sourceware.org; auth=none
- References: <360F3796-D33E-4CCC-84AB-B5229AC8E2AF@adacore.com>
On Thu, Sep 01, 2016 at 02:34:46PM +0200, Tristan Gingold wrote:
> Alan,
>
> on Thursday, 28 October 2010 you committed this patch:
>
> v850-elf fails "--gc-sections -r without -e" because the v850 linker
> script contains EXTERN(). We don't distinguish these from symbols
> given with -u on the command line, but the intention was to require a
> command line -u or -e with --gc-sections -r. Like so.
>
> However, the doc still contains:
>
> This option can be set when doing a partial link (enabled with option
> @samp{-r}). In this case the root of symbols kept must be explicitly
> specified either by an @samp{--entry} or @samp{--undefined} option or by
> a @code{ENTRY} command in the linker script.
>
> So there is a mismatch.
> Is there any reason not to accept anymore ENTRY from linker script ?
> (in particular from an explicit linker script).
Hi Tristan. Most likely I was on a mission to reduce testsuite fails
and decided that the people who wrote the testcase really did intend
that --gc-sections -r require -e. Since you had a hand in writing
that testcase, I guess you're telling me that assumption was wrong. :)
If you want to revert the patch, I have no objection.
--
Alan Modra
Australia Development Lab, IBM