This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFA: ELF: Call check_relocs after opening all inputs
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 10 Oct 2017 14:06:05 +1030
- Subject: Re: RFA: ELF: Call check_relocs after opening all inputs
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOqBFZwwBi7tY8prubrTTpKvcoM_2Eu7N_S1-HAhXwhU=g@mail.gmail.com> <CAMe9rOp582E6h6Fm9MBpL_5uZ1p9xN2QBhDiU3-UffvXyJsk+w@mail.gmail.com>
On Mon, Oct 09, 2017 at 06:57:19PM -0700, H.J. Lu wrote:
> On 10/9/17, H.J. Lu <hjl.tools@gmail.com> 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.
> >
>
> FYI,
>
> Tested natively without regressions on i686, x86-64 and x32. Tested
> cross binutils on x86-64 without regressions for aarch64-linux,
> alpha-linux, arm-linux, bfin-elf, cr16-elf, cris-elf, crx-elf, frv-linux,
> hppa64-linux, hppa-linux, ia64-linux, lm32-elf, m32r-elf, m68k-linux,
> mcore-elf, metag-elf, microblaze-linux, mips-linux, mmix, mn10300-elf,
> nds32le-linux, nios2-linux, or1k-elf, powerpc64-linux, powerpc-linux,
> riscv32-linux, riscv64-linux, s390-linux, s390x-linux, score-elf,
> sh3-linux, sparc64-linux, sparc-linux, tic6x-elf, tilegx-linux,
> tilepro-linux, vax-linux, x86_64-mingw32 and xtensa-linux.
On an x86_64-linux to arm-linuxeabi cross build I see these:
FAIL: Default group size
FAIL: Group size=2
FAIL: Cortex-A8 erratum fix, relocate bl.w and far call
They look to be all due to hash traversals changing with different
symbol table contents, so really a testsuite problem.
Other than that, your branch looks good after I apply the ppc64 fixes.
Give people a week to do some native testing then commit it.
--
Alan Modra
Australia Development Lab, IBM