hurd: Fix starting static binaries with stack protection enabled
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 22 Aug 2022 20:34:31 +0000 (22:34 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 22 Aug 2022 20:34:31 +0000 (22:34 +0200)
commitaf6b1cce9812273c7f597be6536d28eaec6fb89b
treea4e6e3eaa478ec9435a4669fed252a543dc466ab
parent4565083abc972bffe810e4151f8f3cb48531e526
hurd: Fix starting static binaries with stack protection enabled

gcc introduces gs:0x14 accesses in most functions, so we need some tcbhead
to be ready very early during initialization.  This configures a static area
which can be referenced by various protected functions, until proper TLS is
set up.
sysdeps/mach/hurd/i386/init-first.c
sysdeps/mach/hurd/i386/tls.h