This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Difference between --oformat binary, and objcopy -O binary of --oformat elf32-i386
- From: linuxyne citadel <linuxyne at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 19 Jul 2016 15:01:01 +0530
- Subject: Difference between --oformat binary, and objcopy -O binary of --oformat elf32-i386
- Authentication-results: sourceware.org; auth=none
Hello,
When a flat, -fPIE, binary is created using two methods:
(1) --oformat binary
(2) --oformat elf32-i386 and then objcopy -O binary,
the resulting code linked and stored within each resultant binary is
different from one another, even though both use the same .o file.
An observation shows (2) creates correct binaries, but (1) does not.
Do we know, beforehand, if this is an error on the part of the user
compiling the code, or if this is a designed or even an unsupported
behaviour.
Thank you,
linuxyne.