This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] GOLD: emit STT_FILE symbols when more than 64k sections
- From: Tristan Gingold <gingold at adacore dot com>
- To: Cary Coutant <ccoutant at gmail dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Tue, 6 Dec 2016 17:11:15 +0100
- Subject: Re: [PATCH] GOLD: emit STT_FILE symbols when more than 64k sections
- Authentication-results: sourceware.org; auth=none
- References: <7393387A-83CB-4D00-9CC1-308A8CAA9A20@adacore.com> <CAJimCsEMc0msL_DRaqZSM_p8Gif7bAoxrB=Hy_jxxEeW_PMhHQ@mail.gmail.com>
> On 05 Dec 2016, at 19:44, Cary Coutant <ccoutant@gmail.com> wrote:
>
>> a simple thinko in object.cc prevents from emitting STT_FILE symbols when --gc-sections is used and when the file contains more than 64K symbols. See the testcase.
>>
>> No regression on x86-64 linux.
>>
>> Ok to commit ?
>
> Not quite. The real problem was that the is_ordinary flag wasn't being
> checked before we use shndx, and the effect was that any SHN_ABS
> symbol may have been incorrectly omitted. I've applied the attached
> patch.
>
> Thanks for finding the problem, and for providing a test case!
Thanks for the correct fix.