linux: Consolidate brk implementation
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 26 Jun 2020 19:06:49 +0000 (16:06 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 10 Dec 2020 20:42:37 +0000 (17:42 -0300)
commit720480934ab9107714f1ffc29222dfb5d3bc5b1d
tree3851a6f8fe50b3548e667651805dadb7c242f43b
parent880433de13fa31e52587720f81b762a6c7797e4e
linux: Consolidate brk implementation

It removes all the arch-specific assembly implementation.  The
outliers are alpha, where its kernel ABI explict return -ENOMEM
in case of failure; and i686, where it can't use
"call *%gs:SYSINFO_OFFSET" during statup in static PIE.

Also some ABIs exports an additional ___brk_addr symbol and to
handle it an internal HAVE_INTERNAL_BRK_ADDR_SYMBOL is added.

Checked on x86_64-linux-gnu, i686-linux-gnu, adn with builsd for
the affected ABIs.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
36 files changed:
sysdeps/unix/sysv/linux/aarch64/sysdep.h
sysdeps/unix/sysv/linux/alpha/brk.S [deleted file]
sysdeps/unix/sysv/linux/alpha/brk.c [moved from sysdeps/unix/sysv/linux/arm/brk.c with 77% similarity]
sysdeps/unix/sysv/linux/alpha/dl-brk.S [deleted file]
sysdeps/unix/sysv/linux/arc/sysdep.h
sysdeps/unix/sysv/linux/brk.c [moved from sysdeps/unix/sysv/linux/generic/brk.c with 90% similarity]
sysdeps/unix/sysv/linux/csky/sysdep.h
sysdeps/unix/sysv/linux/dl-brk.c [deleted file]
sysdeps/unix/sysv/linux/hppa/brk.c [deleted file]
sysdeps/unix/sysv/linux/i386/brk.c
sysdeps/unix/sysv/linux/i386/sysdep.h
sysdeps/unix/sysv/linux/ia64/brk.S [deleted file]
sysdeps/unix/sysv/linux/ia64/dl-brk.S [deleted file]
sysdeps/unix/sysv/linux/ia64/sysdep.h
sysdeps/unix/sysv/linux/m68k/brk.c [deleted file]
sysdeps/unix/sysv/linux/m68k/sysdep.h
sysdeps/unix/sysv/linux/microblaze/brk.c [deleted file]
sysdeps/unix/sysv/linux/microblaze/sysdep.h
sysdeps/unix/sysv/linux/mips/brk.c [deleted file]
sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
sysdeps/unix/sysv/linux/mips/mips64/sysdep.h
sysdeps/unix/sysv/linux/nios2/sysdep.h
sysdeps/unix/sysv/linux/powerpc/dl-brk.S [deleted file]
sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S [deleted file]
sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S [deleted file]
sysdeps/unix/sysv/linux/riscv/sysdep.h
sysdeps/unix/sysv/linux/s390/brk.c [deleted file]
sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
sysdeps/unix/sysv/linux/sh/brk.c [deleted file]
sysdeps/unix/sysv/linux/sparc/sparc32/brk.c [deleted file]
sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
sysdeps/unix/sysv/linux/sparc/sparc64/brk.S [deleted file]
sysdeps/unix/sysv/linux/sparc/sparc64/dl-brk.S [deleted file]
sysdeps/unix/sysv/linux/sysdep.h
sysdeps/unix/sysv/linux/x86_64/brk.c [deleted file]