Fix sbrk in PIE binaries
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 15 Mar 2022 22:48:49 +0000 (22:48 +0000)
committerAurelien Jarno <aurel32@debian.org>
Tue, 15 Mar 2022 22:48:49 +0000 (22:48 +0000)
commit9f7946e771a37a97cc2cc57218524d559292e1e0
tree01e8aa7426064ec263ac91a108a64ed5d0c5dbd5
parent0bfd11f2354ea87b2e35f2aae1fb56709f123fb5
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