diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-06-12 12:55:11 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-06-12 12:55:11 +0000 |
commit | 8981c88a1e028446400c393b82fc415481cc07c3 (patch) | |
tree | 10163bc54bc36feb19f6c226119c02af03020baa /bfd/elf.c | |
parent | 3832a4d892b209ca17c5320a506c5902da63e025 (diff) | |
download | gdb-8981c88a1e028446400c393b82fc415481cc07c3.zip gdb-8981c88a1e028446400c393b82fc415481cc07c3.tar.gz gdb-8981c88a1e028446400c393b82fc415481cc07c3.tar.bz2 |
Abort if PT_GNU_RELRO segment doesn't fit in PT_LOAD segment
bfd/
PR bfd/14207
* elf.c (assign_file_positions_for_non_load_sections): Abort if
PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.
ld/testsuite/
PR ld/14207
* ld-x86-64/x86-64.exp: Run pr14207.
* ld-x86-64/pr14207.d: New file.
* ld-x86-64/pr14207.s: Likewise.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4931,6 +4931,11 @@ assign_file_positions_for_non_load_sections (bfd *abfd, && lp->p_vaddr + lp->p_filesz >= link_info->relro_end) break; } + + /* PR ld/14207. If the RELRO segment doesn't fit in the + LOAD segment, it should be removed. */ + if (lp == (phdrs + count)) + abort (); } else { |