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]

RFA: ELF: Call check_relocs after opening all inputs


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.

-- 
H.J.


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