freebsd-dev/lib/libc/arm
Mark Johnston 9f9c9b22ec Reimplement brk() and sbrk() to avoid the use of _end.
Previously, libc.so would initialize its notion of the break address
using _end, a special symbol emitted by the static linker following
the bss section.  Compatibility issues between lld and ld.bfd could
cause the wrong definition of _end (libc.so's definition rather than
that of the executable) to be used, breaking the brk()/sbrk()
interface.

Avoid this problem and future interoperability issues by simply not
relying on _end.  Instead, modify the break() system call to return
the kernel's view of the current break address, and have libc
initialize its state using an extra syscall upon the first use of the
interface.  As a side effect, this appears to fix brk()/sbrk() usage
in executables run with rtld direct exec, since the kernel and libc.so
no longer maintain separate views of the process' break address.

PR:		228574
Reviewed by:	kib (previous version)
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D15663
2018-06-04 19:35:15 +00:00
..
aeabi libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
gen libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
softfloat On ARM EABI double precision floating point values are stored in the 2013-09-07 14:04:10 +00:00
string Correct MDSRCS use in <arch>/string/Makefile.inc. 2017-03-02 17:05:52 +00:00
sys Reimplement brk() and sbrk() to avoid the use of _end. 2018-06-04 19:35:15 +00:00
_fpmath.h libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
arith.h On ARM EABI double precision floating point values are stored in the 2013-09-07 14:04:10 +00:00
gd_qnan.h
Makefile.inc Support armv7 builds for userland 2017-10-05 23:01:33 +00:00
Symbol_vfp.map Publish fp[get][set]sticky() for ARMv6. 2017-02-17 13:49:46 +00:00
Symbol.map Reimplement brk() and sbrk() to avoid the use of _end. 2018-06-04 19:35:15 +00:00
SYS.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00