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

Alan Modra amodra@gmail.com
Mon Sep 21 22:51:00 GMT 2015


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



More information about the Binutils mailing list