freebsd-skq/lib/libc/sparc64/Symbol.map
markj 9d9fd255d6 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

92 lines
1.1 KiB
Plaintext

/*
* $FreeBSD$
*/
/*
* This only needs to contain symbols that are not listed in
* symbol maps from other parts of libc (i.e., not found in
* stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...).
*/
FBSD_1.0 {
/* PSEUDO syscalls */
_exit;
_mcount;
_setjmp;
_longjmp;
fabs;
__flt_rounds;
fpgetmask;
fpgetround;
fpgetsticky;
fpsetmask;
fpsetround;
__infinity;
__nan;
makecontext;
setjmp;
longjmp;
sigsetjmp;
siglongjmp;
htonl;
htons;
ntohl;
ntohs;
brk;
sbrk;
vfork;
/* SCD libc 64 psABI */
_Qp_sqrt;
_Qp_add;
_Qp_div;
_Qp_mul;
_Qp_sub;
_Qp_dtoq;
_Qp_itoq;
_Qp_stoq;
_Qp_xtoq;
_Qp_uitoq;
_Qp_uxtoq;
_Qp_qtod;
_Qp_qtoi;
_Qp_qtos;
_Qp_qtox;
_Qp_qtoui;
_Qp_qtoux;
_Qp_feq;
_Qp_fge;
_Qp_fgt;
_Qp_fle;
_Qp_flt;
_Qp_fne;
_Qp_cmp;
_Qp_cmpe;
__dtoul;
__sparc_utrap_install;
};
FBSDprivate_1.0 {
/* PSEUDO syscalls */
__sys_getlogin;
_getlogin;
__sys_exit;
_set_tp;
___longjmp;
__makecontext;
__longjmp;
signalcontext;
__signalcontext;
__siglongjmp;
__sys_brk;
_brk;
__sys_sbrk;
_sbrk;
__sys_vfork;
_vfork;
/* used in src/lib/csu/sparc64/crt1.c */
__sparc_utrap_setup;
};