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;
|
|
|
|
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
|
|
|
strtoul_l;
|
|
|
|
strtoull_l;
|
|
|
|
strtoumax_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 {
|
2020-10-20 01:29:45 +00:00
|
|
|
ptsname_r;
|
2020-01-20 11:40:07 +00:00
|
|
|
qsort_s;
|
2020-02-01 20:33:23 +00:00
|
|
|
rand;
|
|
|
|
srand;
|
2020-01-20 11:40:07 +00:00
|
|
|
};
|
|
|
|
|
2021-11-07 15:15:28 +00:00
|
|
|
FBSD_1.7 {
|
|
|
|
clearenv;
|
Alter the prototype of qsort_r(3) to match POSIX, which adopted the
glibc-based interface.
Unfortunately, the glibc maintainers, despite knowing the existence
of the FreeBSD qsort_r(3) interface in 2004 and refused to add the
same interface to glibc based on grounds of the lack of standardization
and portability concerns, has decided it was a good idea to introduce
their own qsort_r(3) interface in 2007 as a GNU extension with a
slightly different and incompatible interface.
With the adoption of their interface as POSIX standard, let's switch
to the same prototype, there is no need to remain incompatible.
C++ and C applications written for the historical FreeBSD interface
get source level compatibility when building in C++ mode, or when
building with a C compiler with C11 generics support, provided that
the caller passes a fifth parameter of qsort_r() that exactly matches
the historical FreeBSD comparator function pointer type and does not
redefine the historical qsort_r(3) prototype in their source code.
Symbol versioning is used to keep old binaries working.
MFC: never
Relnotes: yes
Reviewed by: cem, imp, hps, pauamma
Differential revision: https://reviews.freebsd.org/D17083
2022-09-30 22:26:30 +00:00
|
|
|
qsort_r;
|
2023-03-13 22:01:12 +00:00
|
|
|
secure_getenv;
|
2021-11-07 15:15:28 +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
|
|
|
};
|