This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: BZ #14664: changing prefix breaks "make check-abi-libc"
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sun, 9 Dec 2012 17:00:33 -0800
- Subject: PATCH: BZ #14664: changing prefix breaks "make check-abi-libc"
Hi,
Size of _nl_default_dirname depends on the size of prefix. This patch
updates libc.abilist from
_nl_default_dirname D 0x12
where the size of prefix (/usr) is 4, to
_nl_default_dirname D 0xe + sizeof_prefix
and changes scripts/abilist.awk to compute _nl_default_dirname size as
[size of _nl_default_dirname symbol - length of prefix] + sizeof_prefix
Any comments?
H.J.
---
2012-12-09 H.J. Lu <hongjiu.lu@intel.com>
[BZ #14664]
* Makerules (%.symlist): Pass installed_prefix='$(prefix)' to
scripts/abilist.awk.
* scripts/abilist.awk: Handle _nl_default_dirname which changes
with prefix changes.
* sysdeps/unix/sysv/linux/i386/nptl/libc.abilist: Replace
0x12 with "0xe + sizeof_prefix".
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist:
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist: Likewise.
ports/
2012-12-09 H.J. Lu <hongjiu.lu@intel.com>
[BZ #14664]
* sysdeps/unix/sysv/linux/aarch64/nptl/libc.abilist: Replace
0x12 with "0xe + sizeof_prefix".
* sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist:
Likewise.
* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist:
Likewise.
* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist:
Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist: Likewise.
diff --git a/Makerules b/Makerules
index 56dc60b..061bb2c 100644
--- a/Makerules
+++ b/Makerules
@@ -1145,7 +1145,7 @@ ifeq ($(versioning),yes)
# This is handy for checking against existing library binaries.
%.symlist: $(..)scripts/abilist.awk %.dynsym
- LC_ALL=C $(AWK) -f $^ > $@T
+ LC_ALL=C $(AWK) -v installed_prefix='$(prefix)' -f $^ > $@T
mv -f $@T $@
%.dynsym: %.so
diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libc.abilist
index f83e880..8a671a2 100644
--- a/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libc.abilist
@@ -529,7 +529,7 @@ GLIBC_2.17
_libc_intl_domainname D 0x5
_longjmp F
_mcleanup F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x8
_nl_msg_cat_cntr D 0x4
_null_auth D 0x18
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist
index 1d0cc7e..ed3ecf5 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist
@@ -267,7 +267,7 @@ GLIBC_2.0
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x8
_nl_msg_cat_cntr D 0x4
_null_auth D 0x18
diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist
index ceab6b2..42d3472 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist
@@ -601,7 +601,7 @@ GLIBC_2.4
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist
index b3510fe..b228bbf 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist
@@ -516,7 +516,7 @@ GLIBC_2.2
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x8
_nl_msg_cat_cntr D 0x4
_null_auth D 0x18
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist
index 3c40379..5796b07 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist
@@ -589,7 +589,7 @@ GLIBC_2.4
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist
index f998b1b..23175fc 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist
@@ -258,7 +258,7 @@ GLIBC_2.0
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist
index 7378869..4ff44a9 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist
@@ -255,7 +255,7 @@ GLIBC_2.0
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist
index df2e637..9420346 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libc.abilist
@@ -255,7 +255,7 @@ GLIBC_2.0
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist
index 22b3068..1fd70a6 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist
@@ -253,7 +253,7 @@ GLIBC_2.0
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x8
_nl_msg_cat_cntr D 0x4
_null_auth D 0x18
diff --git a/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist
index 0efc6b5..7d4615d 100644
--- a/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist
@@ -268,7 +268,7 @@ GLIBC_2.0
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist
index d79b2df..23bf1e5 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist
@@ -524,7 +524,7 @@ GLIBC_2.12
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist
index f617405..dadb645 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist
@@ -524,7 +524,7 @@ GLIBC_2.12
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x8
_nl_msg_cat_cntr D 0x4
_null_auth D 0x18
diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist
index d79b2df..23bf1e5 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist
@@ -524,7 +524,7 @@ GLIBC_2.12
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/scripts/abilist.awk b/scripts/abilist.awk
index 6d58f66..e81d49a 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 : "");
diff --git a/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist b/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist
index 67d5929..e07d39b 100644
--- a/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist
@@ -258,7 +258,7 @@ GLIBC_2.0
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
index 8e45958..f0f2889 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
@@ -268,7 +268,7 @@ GLIBC_2.0
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
index 8eaaccd..bf1a68a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
@@ -512,7 +512,7 @@ GLIBC_2.3
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x8
_nl_msg_cat_cntr D 0x4
_null_auth D 0x18
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist
index d9914ff..f551651 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist
@@ -258,7 +258,7 @@ GLIBC_2.0
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
index ef1ead3..61ce8a8 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
@@ -518,7 +518,7 @@ GLIBC_2.2
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x8
_nl_msg_cat_cntr D 0x4
_null_auth D 0x18
diff --git a/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist
index 733b550..e575e18 100644
--- a/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist
@@ -512,7 +512,7 @@ GLIBC_2.2
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist
index 3a96ea8..cbb1145 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist
@@ -260,7 +260,7 @@ GLIBC_2.0
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist
index aa892b8..6a9d72b 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist
@@ -554,7 +554,7 @@ GLIBC_2.2
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x8
_nl_msg_cat_cntr D 0x4
_null_auth D 0x18
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist
index a42d424..0568b06 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist
@@ -513,7 +513,7 @@ GLIBC_2.2.5
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x8
_nl_msg_cat_cntr D 0x4
_null_auth D 0x18
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist
index 108b80f..8b8c450 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist
@@ -533,7 +533,7 @@ GLIBC_2.16
_longjmp F
_mcleanup F
_mcount F
- _nl_default_dirname D 0x12
+ _nl_default_dirname D 0xe + sizeof_prefix
_nl_domain_bindings D 0x4
_nl_msg_cat_cntr D 0x4
_null_auth D 0xc