Fix handling of fully zeroed PT_GNU_RELRO
From PR 21126:
strip can now fully zero out PT_GNU_RELRO segments
(as in even the segment type is changed to PT_NULL).
The bug has been seen with recent versions of strip on clang-built binaries
when used with gdbserver.
gdb's exec_bfd needs to be the non-stripped version and the program running
needs to be the stripped version in order to see the bug.
* solib-svr4.c (svr4_exec_displacment): Ignore PT_GNU_RELRO segment.
* gdb.server/stripped-pie.exp: New testcase.
4 files changed