2007-04-29 14:05:22 +00:00
|
|
|
/*
|
|
|
|
* $FreeBSD$
|
|
|
|
*/
|
2006-03-13 00:53:21 +00:00
|
|
|
|
|
|
|
FBSD_1.0 {
|
|
|
|
_Exit;
|
|
|
|
a64l;
|
|
|
|
abort;
|
|
|
|
abs;
|
|
|
|
atexit;
|
|
|
|
__cxa_atexit;
|
|
|
|
__cxa_finalize;
|
|
|
|
atof;
|
|
|
|
atoi;
|
|
|
|
atol;
|
|
|
|
atoll;
|
|
|
|
bsearch;
|
|
|
|
div;
|
|
|
|
__isthreaded;
|
|
|
|
exit;
|
|
|
|
getenv;
|
|
|
|
opterr;
|
|
|
|
optind;
|
|
|
|
optopt;
|
|
|
|
optreset;
|
|
|
|
optarg;
|
|
|
|
getopt;
|
|
|
|
getopt_long;
|
|
|
|
getopt_long_only;
|
|
|
|
suboptarg;
|
|
|
|
getsubopt;
|
|
|
|
grantpt;
|
|
|
|
ptsname;
|
|
|
|
unlockpt;
|
|
|
|
hcreate;
|
|
|
|
hdestroy;
|
|
|
|
hsearch;
|
|
|
|
heapsort;
|
|
|
|
imaxabs;
|
|
|
|
imaxdiv;
|
|
|
|
insque;
|
|
|
|
l64a;
|
|
|
|
l64a_r;
|
|
|
|
labs;
|
|
|
|
ldiv;
|
|
|
|
llabs;
|
|
|
|
lldiv;
|
|
|
|
lsearch;
|
|
|
|
lfind;
|
|
|
|
mergesort;
|
|
|
|
putenv;
|
|
|
|
qsort_r;
|
|
|
|
qsort;
|
|
|
|
radixsort;
|
|
|
|
sradixsort;
|
|
|
|
rand_r;
|
|
|
|
srandom;
|
|
|
|
srandomdev;
|
|
|
|
initstate;
|
|
|
|
setstate;
|
|
|
|
random;
|
|
|
|
reallocf;
|
|
|
|
realpath;
|
|
|
|
remque;
|
|
|
|
setenv;
|
|
|
|
unsetenv;
|
|
|
|
strfmon;
|
|
|
|
strtoimax;
|
|
|
|
strtol;
|
|
|
|
strtoll;
|
2006-03-14 16:57:30 +00:00
|
|
|
strtonum;
|
2006-03-13 00:53:21 +00:00
|
|
|
strtoq;
|
|
|
|
strtoul;
|
|
|
|
strtoull;
|
|
|
|
strtoumax;
|
|
|
|
strtouq;
|
|
|
|
system;
|
|
|
|
tdelete;
|
|
|
|
tfind;
|
|
|
|
tsearch;
|
|
|
|
twalk;
|
|
|
|
};
|
|
|
|
|
2011-11-20 14:45:42 +00:00
|
|
|
FBSD_1.3 {
|
2012-01-08 12:04:22 +00:00
|
|
|
at_quick_exit;
|
2011-11-20 14:45:42 +00:00
|
|
|
atof_l;
|
|
|
|
atoi_l;
|
|
|
|
atol_l;
|
|
|
|
atoll_l;
|
2011-12-07 15:25:48 +00:00
|
|
|
quick_exit;
|
2011-11-20 14:45:42 +00:00
|
|
|
strtod_l;
|
|
|
|
strtof_l;
|
|
|
|
strtoimax_l;
|
2012-01-08 12:04:22 +00:00
|
|
|
strtol_l;
|
2011-11-20 14:45:42 +00:00
|
|
|
strtold_l;
|
2012-01-08 12:04:22 +00:00
|
|
|
strtoll_l;
|
2011-11-20 14:45:42 +00:00
|
|
|
strtoq_l;
|
|
|
|
strtoul_l;
|
|
|
|
strtoull_l;
|
|
|
|
strtoumax_l;
|
|
|
|
strtouq_l;
|
|
|
|
};
|
|
|
|
|
2014-04-03 08:16:45 +00:00
|
|
|
FBSD_1.4 {
|
|
|
|
atexit_b;
|
2014-09-01 22:25:42 +00:00
|
|
|
bsearch_b;
|
2014-04-03 08:16:45 +00:00
|
|
|
heapsort_b;
|
|
|
|
mergesort_b;
|
|
|
|
qsort_b;
|
2014-07-21 15:22:48 +00:00
|
|
|
hcreate_r;
|
|
|
|
hdestroy_r;
|
|
|
|
hsearch_r;
|
2015-05-01 18:32:16 +00:00
|
|
|
reallocarray;
|
2014-04-03 08:16:45 +00:00
|
|
|
};
|
|
|
|
|
2016-08-06 13:32:40 +00:00
|
|
|
FBSD_1.5 {
|
|
|
|
__cxa_thread_atexit;
|
2017-01-07 16:05:19 +00:00
|
|
|
__cxa_thread_atexit_impl;
|
2017-03-30 04:57:26 +00:00
|
|
|
abort_handler_s;
|
|
|
|
ignore_handler_s;
|
|
|
|
set_constraint_handler_s;
|
2016-08-06 13:32:40 +00:00
|
|
|
};
|
|
|
|
|
2020-01-20 11:40:07 +00:00
|
|
|
FBSD_1.6 {
|
|
|
|
qsort_s;
|
2020-02-01 20:33:23 +00:00
|
|
|
rand;
|
|
|
|
srand;
|
2020-01-20 11:40:07 +00:00
|
|
|
};
|
|
|
|
|
2007-04-29 14:05:22 +00:00
|
|
|
FBSDprivate_1.0 {
|
2006-03-13 00:53:21 +00:00
|
|
|
__system;
|
|
|
|
_system;
|
2015-01-03 18:38:46 +00:00
|
|
|
__libc_system;
|
2016-08-06 13:32:40 +00:00
|
|
|
__cxa_thread_call_dtors;
|
Fix order of destructors between main binary and libraries.
Since inits for the main binary are run from rtld (for some time), the
rtld_exit atexit(3) handler, which is passed from rtld to the program
entry and installed by csu, is installed after any atexit(3) handlers
installed by main binary constructors. This means that rtld_exit() is
fired before main binary handlers.
Typical C++ static constructors are executed from init (either binary
or libs) but use atexit(3) to ensure that destructors are called in
the right order, independent of the linking order. Also, C++
libraries finalizers call __cxa_finalize(3) to flush library'
atexit(3) entries. Since atexit(3) entry is cleared after being run,
this would be mostly innocent, except that, atexit(rtld_exit) done
after main binary constructors, makes destructors from libraries
executed before destructors for main.
Fix by reordering atexit(rtld_exit) before inits for main binary, same
as it happened when inits were called by csu. Do it using new private
libc symbol with pre-defined ABI.
Reported. tested, and reviewed by: kan
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
2019-04-15 13:03:09 +00:00
|
|
|
__libc_atexit;
|
2006-03-13 00:53:21 +00:00
|
|
|
};
|