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
1 file changed
tree: 731735e3e09adae8ca30b5dc6153de936e8ea1ed
  1. binutils-2.27/
  2. build.py
  3. do_build.py
  5. pylintrc