hurd: Add enough auxv support for AT_ENTRY for PIE binaries
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 8 Jan 2018 15:30:16 +0000 (10:30 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Mon, 8 Jan 2018 15:33:41 +0000 (10:33 -0500)
commit9c4ac400f0f7d8daa8483dbe73b5699782ae3e22
treeb30c337adda923a12669b23c23b6f9ff7f24eabd
parent704a705d7aaab8041df76e2981e2a1efc014aad0
hurd: Add enough auxv support for AT_ENTRY for PIE binaries

Add PIE support for hurd, by faking an AT_ENTRY auxv entry.  That value
is expected to be read by svr4_exec_displacement, which will propagate
the executable displacement.

gdb/ChangeLog:

* gdb/gnu-nat.c: Include <elf.h> and <link.h>.
(gnu_xfer_auxv): New function.
(gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
TARGET_OBJECT_AUXV.
gdb/ChangeLog
gdb/gnu-nat.c