[PATCH] Set dynobj to a normal input file if possible
Alan Modra
amodra@gmail.com
Fri Apr 22 08:55:00 GMT 2016
On Thu, Apr 21, 2016 at 09:49:50PM -0700, H.J. Lu wrote:
> On Thu, Apr 21, 2016 at 8:39 PM, Hans-Peter Nilsson
> <hans-peter.nilsson@axis.com> wrote:
> >> Date: Wed, 20 Apr 2016 20:31:50 -0700
> >> From: "H.J. Lu" <hongjiu.lu@intel.com>
> >
> >> * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
> >> normal input file if possible.
> >
> > Looks like this caused, for a cross -m32 build to arm-unknown-eabi:
> >
> > Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-arm/arm-elf.exp ...
> > FAIL: Indirect cross-library function reference
> > FAIL: TLS dynamic application
> > FAIL: GOT relocations in executables
> > FAIL: Thumb and -gc-sections
> > FAIL: Simple dynamic application
> > FAIL: Simple dynamic application without .rel.plt in linker script
> > FAIL: Non-pcrel function reference
> > FAIL: Mixed ARM/Thumb dynamic application
> > FAIL: Mixed ARM/Thumb arch5 dynamic application
> > FAIL: Using Thumb lib by another lib
> > FAIL: MOVW/MOVT against shared libraries
> > FAIL: Mixed ARM/Thumb dynamic application with farcalls
> > FAIL: Mixed ARM/Thumb arch5 dynamic application with farcalls
> > FAIL: TLS long plt
> > FAIL: IFUNC test 7
> > FAIL: IFUNC test 8
> > FAIL: IFUNC test 9
> > FAIL: IFUNC test 10
> > FAIL: IFUNC test 13
> > FAIL: IFUNC test 14
> > FAIL: IFUNC test 15
> > FAIL: IFUNC test 16
> > FAIL: Preempt Thumb symbol
> > FAIL: ld-arm/unresolved-1-dyn
Sounds like something should be fixed in the arm backend. Powerpc64
deliberately sets dynobj to the linker created "stub bfd", so there
isn't some underlying generic problem with attaching the linker
sections to a linker created bfd. In fact, it's a good idea.
Hmm.
ld-new: linker stubs: file class ELFCLASSNONE incompatible with ELFCLASS32
ld-new: final link failed: File in wrong format
Yes, looks like there needs to be a small tweak. See bfd/elf64-ppc.c
ppc64_elf_init_stub_bfd
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list