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

H.J. Lu hjl.tools@gmail.com
Tue Sep 22 02:41:00 GMT 2015


On Mon, Sep 21, 2015 at 3:51 PM, Alan Modra <amodra@gmail.com> wrote:
> 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.
>

Oops.  I checked in this patch to fix it.

Sorry for that.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-bfd_get_32-and-bfd_put_32-to-access-ch_type.patch
Type: text/x-patch
Size: 2912 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150922/bce3830c/attachment.bin>


More information about the Binutils mailing list