aboutsummaryrefslogtreecommitdiff
path: root/hurd/hurdinit.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-12-28 10:27:06 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-12-28 10:28:22 +0100
commitae49f218daca0b7cab27764da4081e6509bc7345 (patch)
treefef5fa1b87b9bc540c84690c3128c252651f6f34 /hurd/hurdinit.c
parent2ce0481d26066b7d4e2c950da555a7ca20e313fb (diff)
downloadglibc-ae49f218daca0b7cab27764da4081e6509bc7345.zip
glibc-ae49f218daca0b7cab27764da4081e6509bc7345.tar.gz
glibc-ae49f218daca0b7cab27764da4081e6509bc7345.tar.bz2
hurd: Fix static-PIE startup
hurd initialization stages use RUN_HOOK to run various initialization functions. That is however using absolute addresses which need to be relocated, which is done later by csu. We can however easily make the linker compute relative addresses which thus don't need a relocation. The new SET_RELHOOK and RUN_RELHOOK macros implement this.
Diffstat (limited to 'hurd/hurdinit.c')
-rw-r--r--hurd/hurdinit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hurd/hurdinit.c b/hurd/hurdinit.c
index d4d219a..9377d90 100644
--- a/hurd/hurdinit.c
+++ b/hurd/hurdinit.c
@@ -108,7 +108,7 @@ _hurd_init (int flags, char **argv,
/* Call other things which want to do some initialization. These are not
on the __libc_subinit hook because things there like to be able to
assume the availability of the POSIX.1 services we provide. */
- RUN_HOOK (_hurd_subinit, ());
+ RUN_RELHOOK (_hurd_subinit, ());
}
libc_hidden_def (_hurd_init)
@@ -190,7 +190,7 @@ _hurd_new_proc_init (char **argv,
/* Call other things which want to do some initialization. These are not
on the _hurd_subinit hook because things there assume that things done
here, like _hurd_pid, are already initialized. */
- RUN_HOOK (_hurd_proc_subinit, ());
+ RUN_RELHOOK (_hurd_proc_subinit, ());
/* XXX This code should probably be removed entirely at some point. This
conditional should make it reasonably usable with old gdb's for a
@@ -242,7 +242,7 @@ _hurd_setproc (process_t procserver)
/* Call these functions again so they can fetch the
new information from the new proc server. */
- RUN_HOOK (_hurd_proc_subinit, ());
+ RUN_RELHOOK (_hurd_proc_subinit, ());
if (_hurd_pgrp != oldpgrp)
{