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.


        PR symtab/21126
        * solib-svr4.c (svr4_exec_displacment): Ignore PT_GNU_RELRO segment.


        PR symtab/21126
        * gdb.server/stripped-pie.exp: New testcase.

Change-Id: Iac9ce2275084ee4c5a107f3a4ef72dc3ac12f1bd
4 files changed