about summary refs log tree commit diff
path: root/scripts/abilist.awk
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/abilist.awk')
-rw-r--r--scripts/abilist.awk10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/abilist.awk b/scripts/abilist.awk
index 6d58f6663b..e81d49a037 100644
--- a/scripts/abilist.awk
+++ b/scripts/abilist.awk
@@ -2,6 +2,7 @@
 # into a simple format that should not change when the ABI is not changing.
 
 BEGIN {
+  installed_prefix_length = length(installed_prefix);
   if (combine_fullname)
     combine = 1;
   if (combine)
@@ -43,6 +44,7 @@ $2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
   type = $3;
   size = $5;
   sub(/^0*/, "", size);
+  hex_size = "0x" size;
   size = " 0x" size;
   version = $6;
   symbol = $NF;
@@ -95,8 +97,14 @@ $2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
 
   # Disabled -- weakness should not matter to shared library ABIs any more.
   #if (weak == "w") type = tolower(type);
-  if (desc == "")
+  if (desc == "") {
+    # Handle _nl_default_dirname which changes with prefix changes
+    if (symbol == "_nl_default_dirname") {
+      size = strtonum(hex_size) - installed_prefix_length;
+      size = sprintf(" 0x%x + sizeof_prefix", size);
+    }
     desc = " " symbol " " type size;
+  }
 
   if (combine)
     version = soname " " version (combine_fullname ? " " sofullname : "");