commit | 9bd56e9c06218734024e8f3583ffd271e0d07b59 | [log] [tgz] |
---|---|---|
author | Pirama Arumuga Nainar <pirama@google.com> | Thu Aug 08 08:42:20 2019 -0700 |
committer | Pirama Arumuga Nainar <pirama@google.com> | Thu Aug 08 17:52:21 2019 +0000 |
tree | 731735e3e09adae8ca30b5dc6153de936e8ea1ed | |
parent | 71b0f9d8c88783f15c51dbb4ebeed38744adbdab [diff] |
Ignore degenerate PT_LOAD segments Fixes a failure triggered by -z separate-code. p_memsz is tested rather than p_filesz for objcopy --only-keep-debug where p_filesz is set to zero. PR 22845 * elf.c (assign_file_positions_for_non_load_sections): Ignore degenerate zero size PT_LOAD segments when finding one overlapping the PT_GNU_RELRO segment. This change is backport of commit 325ba6fb34be799c885fad9287d883e86b835c84 - https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f2731e0c374e5323ce4cdae2bcc7b7fe22da1a6f to binutils-2.27. It is needed to cleanly cherry-pick dbc88fc14992c556b94e77de563a8f7abcb0b653. Bug: http://b/135627985 Change-Id: Ic860cd5fa2992214b45b3bd0c8c5f1a222973533