@@ -234,6 +234,7 @@ _dl_sysdep_start (void **start_argptr,
if (GLRO(dl_platform) != NULL)
GLRO(dl_platformlen) = strlen (GLRO(dl_platform));
+#if 0
if (__sbrk (0) == _end)
/* The dynamic linker was run as a program, and so the initial break
starts just after our bss, at &_end. The malloc in dl-minimal.c
@@ -242,6 +243,7 @@ _dl_sysdep_start (void **start_argptr,
will see this new value and not clobber our data. */
__sbrk (GLRO(dl_pagesize)
- ((_end - (char *) 0) & (GLRO(dl_pagesize) - 1)));
+#endif
/* If this is a SUID program we make sure that FDs 0, 1, and 2 are
allocated. If necessary we are doing it ourself. If it is not
@@ -33,7 +33,9 @@
static inline void
frob_brk (void)
{
+#if 0
__brk (0); /* Initialize the break. */
+#endif
}
# include <elf/dl-sysdep.c>
Since sbrk() is not used for memory allocations, there's no need to initialize the break anymore. RFC: how to do this properly? Removing frob_brk() entirely causes build to break with strange link problems. Signed-off-by: Topi Miettinen <toiwoton@gmail.com> --- elf/dl-sysdep.c | 2 ++ sysdeps/unix/sysv/linux/dl-sysdep.c | 2 ++ 2 files changed, 4 insertions(+)