This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Difference between --oformat binary, and objcopy -O binary of --oformat elf32-i386
- From: Alan Modra <amodra at gmail dot com>
- To: linuxyne citadel <linuxyne at gmail dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, binutils at sourceware dot org
- Date: Tue, 19 Jul 2016 23:17:37 +0930
- Subject: Re: Difference between --oformat binary, and objcopy -O binary of --oformat elf32-i386
- Authentication-results: sourceware.org; auth=none
- References: <CAFGAZ1WFoOd238Nwwck1sqr2vGcwzPUC2sxOSNHQH8tpFYz=5w@mail.gmail.com> <c39e8ab7-e6e2-408c-26e3-b9c9df2d50f3@redhat.com> <CAFGAZ1UrLNkE6Yz9KKnUxUSTd4_zKCA9rtEM6XAqmDo83cV3Ow@mail.gmail.com>
On Tue, Jul 19, 2016 at 05:54:38PM +0530, linuxyne citadel wrote:
> The errors, to which I referred in my previous email, are related to
> the PIE addressing using GOT.
This is not surprising. When you use --oformat binary, you're using
a generic linker backend rather than the x86 specific ELF linker. The
generic linker doesn't know how to handle GOT relocs, and a lot of
other cases.
HJ, it would be nice if x86 implemented something like elf32-ppc.c
ppc_elf_unhandled_reloc to give an error at link time for all the
relocs that the generic linker can't handle.
--
Alan Modra
Australia Development Lab, IBM