diff options
author | Alan Modra <amodra@gmail.com> | 2018-02-17 09:21:17 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-02-17 10:15:55 +1030 |
commit | 325ba6fb34be799c885fad9287d883e86b835c84 (patch) | |
tree | 239c69de6d08aaec5c4c5081c29fee441e8db83f /bfd/elf.c | |
parent | c2596c4a72213391e5badda35b73f00d0e6aba76 (diff) | |
download | gdb-325ba6fb34be799c885fad9287d883e86b835c84.zip gdb-325ba6fb34be799c885fad9287d883e86b835c84.tar.gz gdb-325ba6fb34be799c885fad9287d883e86b835c84.tar.bz2 |
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.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -5897,6 +5897,7 @@ assign_file_positions_for_non_load_sections (bfd *abfd, lm = lm->next, lp++) { if (lp->p_type == PT_LOAD + && lp->p_memsz != 0 && lm->count != 0 && lm->sections[lm->count - 1]->vma >= start && lm->sections[0]->vma < end) |