This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed, PATCH] Change ch_type in Elf64_External_Chdr to 4 bytes


On Mon, Sep 21, 2015 at 10:23:09AM -0700, H.J. Lu wrote:
> The ch_type field in Elf64_External_Chdr is 4 bytes, followed by a
> 4-byte padding.  This change doesn't introduce any functional change
> since only the lower 32 bits of the ch_type field are used.
> 
> 	* external.h (Elf64_External_Chdr): Change ch_type to 4 bytes
> 	and add ch_reserved.

Since you are still writing the field using bfd_put_64, big-endian
targets of course will continue to write their low 32-bits into
ch_type[4..7].  You can't change this struct without making changes to
the code.  Which means breaking backwards compatibility, but I guess
we'll need to live with that.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]