]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gold: Add put_ch_reserved to 64-bit Chdr_write
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 28 Jul 2017 20:39:42 +0000 (13:39 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 28 Jul 2017 20:48:08 +0000 (13:48 -0700)
commita595e022494154dcc2472784252394a035c16cb7
tree3d63efc07cc56015c0ceaae5354891f67b378ec5
parent04a3789c7b49d4566d180e55e203859b4555890e
gold: Add put_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.

(cherry picked from commit 49ba15a23a9d3d8a109ce2fd5053822eee7f1fdf)
elfcpp/ChangeLog
elfcpp/elfcpp.h
gold/ChangeLog
gold/compressed_output.cc