Fix sbrk in PIE binaries
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 23 Apr 2024 16:23:00 +0000 (19:23 +0300)
committerAdrian Bunk <bunk@debian.org>
Tue, 23 Apr 2024 16:23:00 +0000 (19:23 +0300)
commitf604a647bedd6b95cbcbd09c9cc49d19f88823a2
tree175d73e89b4f2694b91cd068e4ed8426eb0a09e3
parentda065eeff7233c25dcf9de0e73e83a8d58611877
Fix sbrk in PIE binaries

In PIE mode, the program gets loaded at very low address, and thus _end is very
low, just before libraries, and thus initializing the brk to it does not make
sense, since there is no room left there. Hardcode the brk to 0x8000000 for now
as a workaround.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-pie-sbrk.diff
sysdeps/mach/hurd/brk.c