diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-08-08 21:00:04 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-08-08 21:00:18 -0700 |
commit | 6404ab993797d1d6cd3d9e97cc281e3cb6226c12 (patch) | |
tree | eee63602c3e8fdeca481656be671146ad4bbbaf1 /bfd/ChangeLog | |
parent | f40f4a11d12025d18be2b0f9072f6ddcc94d3cdb (diff) | |
download | gdb-6404ab993797d1d6cd3d9e97cc281e3cb6226c12.zip gdb-6404ab993797d1d6cd3d9e97cc281e3cb6226c12.tar.gz gdb-6404ab993797d1d6cd3d9e97cc281e3cb6226c12.tar.bz2 |
Convert .note.gnu.property section between ELF32 and ELF64
.note.gnu.property section has different alignments and section
sizes for 32-bit and 64-bit ELF binaries. This patch updated
bfd_convert_section_size and bfd_convert_section_contents to
properly convert .note.gnu.property section between 32-bit and
64-bit ELF binaries.
bfd/
PR binutils/23494
* bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
calling _bfd_elf_convert_gnu_property_size to convert
.note.gnu.property section size.
(bfd_convert_section_contents): Check BFD_DECOMPRESS after
calling _bfd_elf_convert_gnu_properties to convert
.note.gnu.property section.
* elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
(_bfd_elf_convert_gnu_properties): Likewise.
* elf-properties.c (elf_get_gnu_property_section_size): New
function.
(elf_write_gnu_properties): Likewise.
(_bfd_elf_convert_gnu_property_size): Likewise.
(_bfd_elf_convert_gnu_properties): Likewise.
(_bfd_elf_link_setup_gnu_properties): Use
elf_get_gnu_property_section_size and elf_write_gnu_properties.
binutils/
PR binutils/23494
* testsuite/binutils-all/x86-64/pr23494a-x32.d: New file.
* testsuite/binutils-all/x86-64/pr23494a.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494a.s: Likewise.
* testsuite/binutils-all/x86-64/pr23494b-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494b.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494b.s: Likewise.
* testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494c.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494d.d: Likewise.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dfa305d..d4bed23 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,24 @@ 2018-08-08 H.J. Lu <hongjiu.lu@intel.com> + PR binutils/23494 + * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after + calling _bfd_elf_convert_gnu_property_size to convert + .note.gnu.property section size. + (bfd_convert_section_contents): Check BFD_DECOMPRESS after + calling _bfd_elf_convert_gnu_properties to convert + .note.gnu.property section. + * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype. + (_bfd_elf_convert_gnu_properties): Likewise. + * elf-properties.c (elf_get_gnu_property_section_size): New + function. + (elf_write_gnu_properties): Likewise. + (_bfd_elf_convert_gnu_property_size): Likewise. + (_bfd_elf_convert_gnu_properties): Likewise. + (_bfd_elf_link_setup_gnu_properties): Use + elf_get_gnu_property_section_size and elf_write_gnu_properties. + +2018-08-08 H.J. Lu <hongjiu.lu@intel.com> + PR ld/23486 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it. |