RFA: ELF: Call check_relocs after opening all inputs
Thomas Preudhomme
thomas.preudhomme@foss.arm.com
Mon Nov 27 13:31:00 GMT 2017
We've found a regression on arm-none-eabi targets with the commit
5c3261b0e834647cf9eb555320e20871b7854f98. I've filed a PR:
https://sourceware.org/bugzilla/show_bug.cgi?id=22502
Let me know if you need anything else.
Best regards,
Thomas
On 10/10/17 00:41, H.J. Lu wrote:
> On 10/9/17, Alan Modra <amodra@gmail.com> wrote:
>> On Mon, Oct 09, 2017 at 05:17:39AM -0700, H.J. Lu wrote:
>>> On 10/9/17, Alan Modra <amodra@gmail.com> wrote:
>>>> powerpc64-linux +FAIL: PR ld/13195
>>>> powerpc64-linux +FAIL: Build rdynamic-1
>>>> powerpc64-linux +FAIL: Build dynamic-1
>>>
>>> How can I reproduce it on x86? powerpc64-linux is clean on
>>> users/hjl/check_relocs branch.
>>
>> You would need a powerpc64-linux cross-compiler installed since the
>> testcases are in C. Don't worry about it. I'll fix the powerpc64
>> --gc-sections problem, which is that gc_mark_hook uses opd->func_sec
>> to look through .opd relocs but opd->func_sec is set up by
>> check_relocs.
>
> I updated users/hjl/check_relocs branch to call check_relocs after opening
> all inputs. Also garbage collection doesn't need to undo what check_relocs
> has done for symbols which have been garbage collected. Since ELF
> targets never see the removed sections, there is no need for gc_sweep_hook.
> I removed gc_sweep_hook from elf_backend_data.
>
> There are no regressions on all ELF targets I tested.
>
> Please test this branch on your favorite native targets and let me know
> if you run into any regressions.
>
> Thanks.
>
More information about the Binutils
mailing list