]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PR31667, objcopy/strip corrupts solaris binaries
authorAlan Modra <amodra@gmail.com>
Mon, 22 Apr 2024 09:38:51 +0000 (19:08 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 23 Apr 2024 12:37:04 +0000 (22:07 +0930)
commite79ee36b5ae4b60853e91896758bade48e804030
tree63bcee0c97129cfe9ac0084d009a06f8504a5406
parentef1c830f003acaf149bb9ee230be0d0067e1855c
PR31667, objcopy/strip corrupts solaris binaries

Using want_p_paddr_set_to_zero in commit 45d92439aebd was wrong.  Even
solaris targets don't have want_p_paddr_set_to_zero, but we should
handle them at least somewhat reasonably.

PR 31667
* elf.c (IS_SECTION_IN_INPUT_SEGMENT): Remove bed arg, add
paddr_valid.  Don't use bed->want_p_paddr_set_to_zero.
(INCLUDE_SECTION_IN_SEGMENT): Likewise.
(rewrite_elf_program_header): Adjust to suit.
bfd/elf.c