This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Compat symbols in abilist files


I've come up with the attached patch to mark compat symbols as such in the abilist files.

Do we want to do this? The downside is that when building glibc in certain non-standard configurations, some symbols are not compat symbols anymore (the prime example is probably --enable-obsolete-rpc). On the other hand, the additional verification is valuable.

Thanks,
Florian
ABI checks: Mark compat symbols with "<compat>"

2017-04-13  Florian Weimer  <fweimer@redhat.com>

	* scripts/abilist.awk: Mark compat symbols with "<compat>."

diff --git a/scripts/abilist.awk b/scripts/abilist.awk
index bd740d4..cb17373 100644
--- a/scripts/abilist.awk
+++ b/scripts/abilist.awk
@@ -46,7 +46,10 @@ $2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
   size = " 0x" size;
   version = $6;
   symbol = $NF;
-  gsub(/[()]/, "", version);
+  weak = version ~ /^\(.*\)$/;
+  if (weak) {
+    gsub(/[()]/, "", version);
+  }
 
   # binutils versions up through at least 2.23 have some bugs that
   # caused STV_HIDDEN symbols to appear in .dynsym, though that is useless.
@@ -102,6 +105,10 @@ $2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
   if (desc == "")
     desc = symbol " " type size;
 
+  if (weak) {
+    desc = desc " <compat>";
+  }
+
   if (combine)
     version = soname " " version (combine_fullname ? " " sofullname : "");
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]