This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Set dynobj to a normal input file if possible
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>, Binutils <binutils at sourceware dot org>
- Date: Fri, 22 Apr 2016 18:25:23 +0930
- Subject: Re: [PATCH] Set dynobj to a normal input file if possible
- Authentication-results: sourceware.org; auth=none
- References: <20160421033150 dot GA24027 at intel dot com> <201604220339 dot u3M3dtEo021701 at ignucius dot se dot axis dot com> <CAMe9rOpX+VFKE6GvwNkUW9xE2UDhczWh=YR3FNjy=Do7Ri0LWA at mail dot gmail dot com>
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