2007-04-29 10:05:22 -04:00
|
|
|
/*
|
|
|
|
|
* $FreeBSD$
|
|
|
|
|
*/
|
2006-03-12 19:53:21 -05: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 11:57:30 -05:00
|
|
|
strtonum;
|
2006-03-12 19:53:21 -05:00
|
|
|
strtoq;
|
|
|
|
|
strtoul;
|
|
|
|
|
strtoull;
|
|
|
|
|
strtoumax;
|
|
|
|
|
strtouq;
|
|
|
|
|
system;
|
|
|
|
|
tdelete;
|
|
|
|
|
tfind;
|
|
|
|
|
tsearch;
|
|
|
|
|
twalk;
|
|
|
|
|
};
|
|
|
|
|
|
2011-11-20 09:45:42 -05:00
|
|
|
FBSD_1.3 {
|
2012-01-08 07:04:22 -05:00
|
|
|
at_quick_exit;
|
2011-11-20 09:45:42 -05:00
|
|
|
atof_l;
|
|
|
|
|
atoi_l;
|
|
|
|
|
atol_l;
|
|
|
|
|
atoll_l;
|
2011-12-07 10:25:48 -05:00
|
|
|
quick_exit;
|
2011-11-20 09:45:42 -05:00
|
|
|
strtod_l;
|
|
|
|
|
strtof_l;
|
|
|
|
|
strtoimax_l;
|
2012-01-08 07:04:22 -05:00
|
|
|
strtol_l;
|
2011-11-20 09:45:42 -05:00
|
|
|
strtold_l;
|
2012-01-08 07:04:22 -05:00
|
|
|
strtoll_l;
|
2011-11-20 09:45:42 -05:00
|
|
|
strtoul_l;
|
|
|
|
|
strtoull_l;
|
|
|
|
|
strtoumax_l;
|
|
|
|
|
};
|
|
|
|
|
|
2014-04-03 04:16:45 -04:00
|
|
|
FBSD_1.4 {
|
|
|
|
|
atexit_b;
|
2014-09-01 18:25:42 -04:00
|
|
|
bsearch_b;
|
2014-04-03 04:16:45 -04:00
|
|
|
heapsort_b;
|
|
|
|
|
mergesort_b;
|
|
|
|
|
qsort_b;
|
2014-07-21 11:22:48 -04:00
|
|
|
hcreate_r;
|
|
|
|
|
hdestroy_r;
|
|
|
|
|
hsearch_r;
|
2015-05-01 14:32:16 -04:00
|
|
|
reallocarray;
|
2014-04-03 04:16:45 -04:00
|
|
|
};
|
|
|
|
|
|
2016-08-06 09:32:40 -04:00
|
|
|
FBSD_1.5 {
|
|
|
|
|
__cxa_thread_atexit;
|
2017-01-07 11:05:19 -05:00
|
|
|
__cxa_thread_atexit_impl;
|
2017-03-30 00:57:26 -04:00
|
|
|
abort_handler_s;
|
|
|
|
|
ignore_handler_s;
|
|
|
|
|
set_constraint_handler_s;
|
2016-08-06 09:32:40 -04:00
|
|
|
};
|
|
|
|
|
|
2020-01-20 06:40:07 -05:00
|
|
|
FBSD_1.6 {
|
2020-10-19 21:29:45 -04:00
|
|
|
ptsname_r;
|
2020-01-20 06:40:07 -05:00
|
|
|
qsort_s;
|
2020-02-01 15:33:23 -05:00
|
|
|
rand;
|
|
|
|
|
srand;
|
2020-01-20 06:40:07 -05:00
|
|
|
};
|
|
|
|
|
|
2021-11-07 10:15:28 -05: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 18:26:30 -04:00
|
|
|
qsort_r;
|
2023-03-13 18:01:12 -04:00
|
|
|
secure_getenv;
|
2021-11-07 10:15:28 -05:00
|
|
|
};
|
|
|
|
|
|
2007-04-29 10:05:22 -04:00
|
|
|
FBSDprivate_1.0 {
|
2006-03-12 19:53:21 -05:00
|
|
|
__system;
|
|
|
|
|
_system;
|
2015-01-03 13:38:46 -05:00
|
|
|
__libc_system;
|
2016-08-06 09:32:40 -04: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 09:03:09 -04:00
|
|
|
__libc_atexit;
|
2006-03-12 19:53:21 -05:00
|
|
|
};
|