]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Import patch to fix PR23919 from the mainline.
authorNick Clifton <nickc@redhat.com>
Tue, 26 Feb 2019 19:57:46 +0000 (19:57 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 26 Feb 2019 19:57:46 +0000 (19:57 +0000)
commit6d33d996167a33552b68c036f1b1571a208ace42
treee5caf3010bd9a09949344d25eed5e9ee8124b698
parent8c5071ec8fffb40ad5b008462f93ac2d43aaa1a2
Import patch to fix PR23919 from the mainline.

PR binutils/23919
bfd * bfd.c (bfd_update_compression_header): Explicitly set alignment.
(bfd_check_compression_header): Add uncompressed_alignment_power
argument. Check ch_addralign is a power of 2.
* bfd-in2.h: Regenerated.
* compress.c (bfd_compress_section_contents): Get and set
orig_uncompressed_alignment_pow if section is decompressed.
(bfd_is_section_compressed_with_header): Add and get
uncompressed_align_pow_p argument.
(bfd_is_section_compressed): Add uncompressed_align_power argument
to bfd_is_section_compressed_with_header call.
(bfd_init_section_decompress_status): Get and set
uncompressed_alignment_power.
* elf.c (_bfd_elf_make_section_from_shdr): Add
uncompressed_align_power argument to
bfd_is_section_compressed_with_header call.

* compress.c (bfd_is_section_compressed_with_header): Initialize
* uncompressed_align_pow_p to 0.

binutils* readelf.c (dump_sections_as_strings): Remove bogus addralign check.
(dump_sections_as_bytes): Likewise.
(load_specific_debug_sections): Likewise.
* testsuite/binutils-all/dw2-3.rS: Adjust alignment.
* testsuite/binutils-all/dw2-3.rt: Likewise.

gold * merge.cc (Output_merge_string<Char_type>::do_add_input_section):
Get addralign from decompressed_section_contents.
* object.cc (build_compressed_section_map): Set info.addralign.
(Object::decompressed_section_contents): Add a palign
argument and store p->second.addralign in *palign if it isn't
NULL.
* object.h (Compressed_section_info): Add addralign.
(section_is_compressed): Add a palign argument, default it
to NULL, store p->second.addralign in *palign if it isn't NULL.
(Object::decompressed_section_contents): Likewise.
* output.cc (Output_section::add_input_section): Get addralign
from section_is_compressed.
14 files changed:
bfd/ChangeLog
bfd/bfd-in2.h
bfd/bfd.c
bfd/compress.c
bfd/elf.c
binutils/ChangeLog
binutils/readelf.c
binutils/testsuite/binutils-all/dw2-3.rS
binutils/testsuite/binutils-all/dw2-3.rt
gold/ChangeLog
gold/merge.cc
gold/object.cc
gold/object.h
gold/output.cc