From 8c6beab4e1c03ac57150241015486e3f497c17cc Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 5 Aug 2020 23:48:58 +0200 Subject: hurd: Rework sbrk Making the brk start exactly at the end of the main application binary was requiring to get it through the _end symbol, which does not work any more with recent toolchains, and actually produces in libc.so a confusing external _end symbol that produces odd results, see https://sourceware.org/bugzilla/show_bug.cgi?id=23499 Trying to do so is quite outdated anyway with the tendency for address randomization. Using _end was also allowing to include the main binary data within the RLIMIT_DATA, but this also seems outdated with dynamic library loading, and nowadays' memory consumption via malloc and mmap rather than statically-allocated data. This adds a BRK_START macro in that just tells where we want to start the brk, and thus removes the _end symbol. * sysdeps/mach/hurd/i386/vm_param.h: New file. * sysdeps/mach/hurd/brk.c: Use BRK_START as brk start instead of _end. Also ignore __data_start. * hurd/Versions: Remove _end symbol. * sysdeps/mach/hurd/i386/libc.abilist: Remove _end symbol. --- hurd/Versions | 3 --- 1 file changed, 3 deletions(-) (limited to 'hurd') diff --git a/hurd/Versions b/hurd/Versions index f5e8b8c..9b5448a 100644 --- a/hurd/Versions +++ b/hurd/Versions @@ -1,8 +1,5 @@ libc { GLIBC_2.0 { - # necessary for the Hurd brk implementation - _end; - # variables used in macros & inline functions __hurd_threadvar_stack_mask; __hurd_threadvar_stack_offset; -- cgit v1.1