printf("%s %s %s\n", actlib, sortver, $0) | sort;
}
+# Some targets do not set the ABI baseline for libdl. As a result,
+# symbols originally in libdl need to be moved under historic symbol
+# versions, without altering the baseline version for libc itself.
+/^ *!libc_pre_versions/ {
+ libc_pre_versions_active = 1;
+}
+
+function libc_pre_versions() {
+ # No local: * here, so that we do not have to update this script
+ # if symbols are moved into libc. The abilist files and the other
+ # targets (with a real GLIBC_2.0 baseline) provide testing
+ # coverage.
+ printf("\
+GLIBC_2.0 {\n\
+};\n\
+GLIBC_2.1 {\n\
+} GLIBC_2.0;\n\
+") > outfile;
+ return "GLIBC_2.1";
+}
function closeversion(name, oldname) {
printf(" local:\n *;\n") > outfile;
oldlib = $1;
real_outfile = buildroot oldlib ".map";
outfile = real_outfile "T";
- veryoldver = "";
+ if ($1 == "libc" && libc_pre_versions_active) {
+ veryoldver = libc_pre_versions();
+ } else {
+ veryoldver = "";
+ }
printf(" %s.map", oldlib);
}
if ($2 != oldver) {