about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--scripts/versions.awk26
-rw-r--r--sysdeps/unix/sysv/linux/hppa/Versions1
-rw-r--r--sysdeps/unix/sysv/linux/ia64/Versions1
-rw-r--r--sysdeps/unix/sysv/linux/sh/Versions1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/Versions1
5 files changed, 29 insertions, 1 deletions
diff --git a/scripts/versions.awk b/scripts/versions.awk
index a7154480e3..565233e529 100644
--- a/scripts/versions.awk
+++ b/scripts/versions.awk
@@ -93,6 +93,26 @@ function ord(c) {
   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;
@@ -154,7 +174,11 @@ END {
       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) {
diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions
index 9532d207fc..357c68a782 100644
--- a/sysdeps/unix/sysv/linux/hppa/Versions
+++ b/sysdeps/unix/sysv/linux/hppa/Versions
@@ -1,3 +1,4 @@
+!libc_pre_versions
 libc {
   GLIBC_2.1 {
     _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
diff --git a/sysdeps/unix/sysv/linux/ia64/Versions b/sysdeps/unix/sysv/linux/ia64/Versions
index 54e7723ca4..f438b12587 100644
--- a/sysdeps/unix/sysv/linux/ia64/Versions
+++ b/sysdeps/unix/sysv/linux/ia64/Versions
@@ -1,3 +1,4 @@
+!libc_pre_versions
 libc {
   GLIBC_2.2 {
     ioperm; iopl;
diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
index 19ba1d8d91..9c734ff755 100644
--- a/sysdeps/unix/sysv/linux/sh/Versions
+++ b/sysdeps/unix/sysv/linux/sh/Versions
@@ -1,3 +1,4 @@
+!libc_pre_versions
 libc {
   GLIBC_2.2 {
     # functions used in other libraries
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/Versions b/sysdeps/unix/sysv/linux/sparc/sparc64/Versions
index fbea1bb2ef..33b6779ec5 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/Versions
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/Versions
@@ -1,3 +1,4 @@
+!libc_pre_versions
 libc {
   GLIBC_2.0 {
     # Exception handling support functions from libgcc