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: [PATCH] gold: PR gold/21857: Add clear_ch_reserved to 64-bit Chdr_write


> The 64-bit ELF compression header has a reserved field.  It should be
> cleared to avoid random bits in it.
>
> elfcpp/
>
>       PR gold/21857
>       * elfcpp.h (Chdr_write): Add put_ch_reserved.
>       (Chdr_write<64, true>::put_ch_reserved): New.
>       (Chdr_write<64, false>::put_ch_reserved): Likewise.
>
> gold/
>
>       PR gold/21857
>       * compressed_output.cc (Output_compressed_section::set_final_data_size):
>       Call put_ch_reserved to clear the reserved field for 64-bit ELF..

This is OK (but delete that second period in the ChangeLog entry). Thanks!

-cary


On Fri, Jul 28, 2017 at 11:48 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Jul 28, 2017 at 11:29 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Fri, Jul 28, 2017 at 11:20 AM, Cary Coutant <ccoutant@gmail.com> wrote:
>>>>         PR gold/21857
>>>>         * elfcpp.h (Chdr_write): Add clear_ch_reserved.
>>>
>>> I'd prefer an API that just sets the field to a given value (and a
>>> corresponding one to read it). Let's treat it like st_other.
>>
>> Like this?
>>
>
> Move put_ch_reserved to elfcpp.h.
>
>
> --
> H.J.


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