aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-09-26 17:33:04 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-09-26 17:33:04 +0000
commit93ae1ebaa6df1a0c188614bd0a601ab6e26711c5 (patch)
treee543fa6eab60c5185faa67374fd5983268c157d8
parent68870f1253b781960da0f8bf9d8e6fbe6cf2ff3d (diff)
downloadglibc-93ae1ebaa6df1a0c188614bd0a601ab6e26711c5.tar
glibc-93ae1ebaa6df1a0c188614bd0a601ab6e26711c5.tar.gz
glibc-93ae1ebaa6df1a0c188614bd0a601ab6e26711c5.tar.bz2
glibc-93ae1ebaa6df1a0c188614bd0a601ab6e26711c5.zip
Clean up gnu/lib-names.h generation (bug 14171).
This patch eliminates the mixture of SONAME information in shlib-versions files and SONAME information used to generate gnu/lib-names.h in makefiles, with the information in the makefiles being removed so all this information comes from the shlib-versions files. So that gnu/lib-names.h supports multiple ABIs, it is changed to be generated on the same basis as gnu/stubs.h: when there are multiple ABIs, gnu/lib-names.h is a wrapper header (the same header installed whatever ABI is being built) and separate headers such as gnu/lib-names-64.h contain the substantive contents (only one such header being installed by any glibc build). The rules for building gnu/lib-names.h were moved from Makeconfig to Makerules because they need to come after sysdeps makefiles are included (now that "ifndef abi-variants" is a toplevel conditional on the rules rather than $(abi-variants) being evaluated later inside the commands for a rule). Tested for x86_64 and x86 that the installed shared libraries are unchanged by this patch, and examined the installed gnu/lib-names*.h headers by hand. Also tested the case of a single ABI (where there is just a single header installed, again like stubs.h) by hacking abi-variants to empty for x86_64. [BZ #14171] * Makeconfig [$(build-shared) = yes] ($(common-objpfx)soversions.mk): Don't handle SONAMEs specified in makefiles. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)gnu/lib-names.h): Remove rule. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)gnu/lib-names.stmp): Likewise. Split and moved to Makerules. [$(build-shared) = yes && $(soversions.mk-done) = t] (before-compile): Don't append $(common-objpfx)gnu/lib-names.h here. [$(build-shared) = yes && $(soversions.mk-done) = t] (common-generated): Don't append gnu/lib-names.h and gnu/lib-names.stmp here. * Makerules [$(build-shared) = yes && $(soversions.mk-done) = t] (lib-names-h-abi): New variable. [$(build-shared) = yes && $(soversions.mk-done) = t] (lib-names-stmp-abi): Likewise. [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] (before-compile): Append $(common-objpfx)$(lib-names-h-abi). [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] (common-generated): Append gnu/lib-names.h. [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] (install-others-nosubdir): Depend on $(inst_includedir)/$(lib-names-h-abi). [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] ($(common-objpfx)gnu/lib-names.h): New rule. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)$(lib-names-h-abi)): New rule. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)$(lib-names-stmp-abi)): Likewise. [$(build-shared) = yes && $(soversions.mk-done) = t] (common-generated): Append $(lib-names-h-abi) and $(lib-names-stmp-abi). * scripts/lib-names.awk: Do not handle multi being set. * sysdeps/unix/sysv/linux/aarch64/Makefile (abi-lp64-ld-soname): Remove variable. (abi-lp64_be-ld-soname): Likewise. * sysdeps/unix/sysv/linux/arm/Makefile (abi-soft-ld-soname): Likewise. (abi-hard-ld-soname): Likewise. * sysdeps/unix/sysv/linux/i386/shlib-versions: New file. * sysdeps/unix/sysv/linux/mips/Makefile (abi-o32_soft-ld-soname): Remove variable. (abi-o32_hard-ld-soname): Likewise. (abi-o32_soft_2008-ld-soname): Likewise. (abi-o32_hard_2008-ld-soname): Likewise. (abi-n32_soft-ld-soname): Likewise. (abi-n32_hard-ld-soname): Likewise. (abi-n32_soft_2008-ld-soname): Likewise. (abi-n32_hard_2008-ld-soname): Likewise. (abi-n64_soft-ld-soname): Likewise. (abi-n64_hard-ld-soname): Likewise. (abi-n64_soft_2008-ld-soname): Likewise. (abi-n64_hard_2008-ld-soname): Likewise. * sysdeps/unix/sysv/linux/powerpc/Makefile (abi-64-v1-ld-soname): Likewise. (abi-64-v2-ld-soname): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: Add ld.so entries. * sysdeps/unix/sysv/linux/s390/Makefile (abi-64-ld-soname): Remove variable. * sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Add ld.so entry. * sysdeps/unix/sysv/linux/x86/Makefile (abi-32-ld-soname): Remove variable. (abi-64-ld-soname): Likewise. (abi-x32-ld-soname): Likewise. * sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Add ld.so entry. * sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Likewise.
-rw-r--r--ChangeLog76
-rw-r--r--Makeconfig41
-rw-r--r--Makerules63
-rw-r--r--NEWS2
-rw-r--r--scripts/lib-names.awk3
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/arm/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/i386/shlib-versions1
-rw-r--r--sysdeps/unix/sysv/linux/mips/Makefile12
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions2
-rw-r--r--sysdeps/unix/sysv/linux/s390/Makefile1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions1
-rw-r--r--sysdeps/unix/sysv/linux/x86/Makefile3
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/shlib-versions1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions1
16 files changed, 148 insertions, 65 deletions
diff --git a/ChangeLog b/ChangeLog
index 2761d9a023..241cdf52ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,79 @@
+2014-09-26 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14171]
+ * Makeconfig [$(build-shared) = yes]
+ ($(common-objpfx)soversions.mk): Don't handle SONAMEs specified in
+ makefiles.
+ [$(build-shared) = yes && $(soversions.mk-done) = t]
+ ($(common-objpfx)gnu/lib-names.h): Remove rule.
+ [$(build-shared) = yes && $(soversions.mk-done) = t]
+ ($(common-objpfx)gnu/lib-names.stmp): Likewise. Split and moved
+ to Makerules.
+ [$(build-shared) = yes && $(soversions.mk-done) = t]
+ (before-compile): Don't append $(common-objpfx)gnu/lib-names.h
+ here.
+ [$(build-shared) = yes && $(soversions.mk-done) = t]
+ (common-generated): Don't append gnu/lib-names.h and
+ gnu/lib-names.stmp here.
+ * Makerules [$(build-shared) = yes && $(soversions.mk-done) = t]
+ (lib-names-h-abi): New variable.
+ [$(build-shared) = yes && $(soversions.mk-done) = t]
+ (lib-names-stmp-abi): Likewise.
+ [$(build-shared) = yes && $(soversions.mk-done) = t &&
+ abi-variants] (before-compile): Append
+ $(common-objpfx)$(lib-names-h-abi).
+ [$(build-shared) = yes && $(soversions.mk-done) = t &&
+ abi-variants] (common-generated): Append gnu/lib-names.h.
+ [$(build-shared) = yes && $(soversions.mk-done) = t &&
+ abi-variants] (install-others-nosubdir): Depend on
+ $(inst_includedir)/$(lib-names-h-abi).
+ [$(build-shared) = yes && $(soversions.mk-done) = t &&
+ abi-variants] ($(common-objpfx)gnu/lib-names.h): New rule.
+ [$(build-shared) = yes && $(soversions.mk-done) = t]
+ ($(common-objpfx)$(lib-names-h-abi)): New rule.
+ [$(build-shared) = yes && $(soversions.mk-done) = t]
+ ($(common-objpfx)$(lib-names-stmp-abi)): Likewise.
+ [$(build-shared) = yes && $(soversions.mk-done) = t]
+ (common-generated): Append $(lib-names-h-abi) and
+ $(lib-names-stmp-abi).
+ * scripts/lib-names.awk: Do not handle multi being set.
+ * sysdeps/unix/sysv/linux/aarch64/Makefile (abi-lp64-ld-soname):
+ Remove variable.
+ (abi-lp64_be-ld-soname): Likewise.
+ * sysdeps/unix/sysv/linux/arm/Makefile (abi-soft-ld-soname):
+ Likewise.
+ (abi-hard-ld-soname): Likewise.
+ * sysdeps/unix/sysv/linux/i386/shlib-versions: New file.
+ * sysdeps/unix/sysv/linux/mips/Makefile (abi-o32_soft-ld-soname):
+ Remove variable.
+ (abi-o32_hard-ld-soname): Likewise.
+ (abi-o32_soft_2008-ld-soname): Likewise.
+ (abi-o32_hard_2008-ld-soname): Likewise.
+ (abi-n32_soft-ld-soname): Likewise.
+ (abi-n32_hard-ld-soname): Likewise.
+ (abi-n32_soft_2008-ld-soname): Likewise.
+ (abi-n32_hard_2008-ld-soname): Likewise.
+ (abi-n64_soft-ld-soname): Likewise.
+ (abi-n64_hard-ld-soname): Likewise.
+ (abi-n64_soft_2008-ld-soname): Likewise.
+ (abi-n64_hard_2008-ld-soname): Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/Makefile (abi-64-v1-ld-soname):
+ Likewise.
+ (abi-64-v2-ld-soname): Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: Add
+ ld.so entries.
+ * sysdeps/unix/sysv/linux/s390/Makefile (abi-64-ld-soname): Remove
+ variable.
+ * sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Add ld.so
+ entry.
+ * sysdeps/unix/sysv/linux/x86/Makefile (abi-32-ld-soname): Remove
+ variable.
+ (abi-64-ld-soname): Likewise.
+ (abi-x32-ld-soname): Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Add ld.so
+ entry.
+ * sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Likewise.
+
2014-09-23 Joseph Myers <joseph@codesourcery.com>
[BZ #14138]
diff --git a/Makeconfig b/Makeconfig
index fad29715b6..24a3b82c78 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -969,7 +969,7 @@ $(common-objpfx)soversions.mk: $(common-objpfx)soversions.i $(..)Makeconfig
case $$number in \
[0-9]*) echo "$$lib.so-version=.$$number"; \
echo "all-sonames+=$$lib=$$lib.so\$$($$lib.so-version)";;\
- *) echo "$$lib.so-version=\$$(if \$$(abi-$(default-abi)-$$lib-soname),\$$(abi-$(default-abi)-$$lib-soname),$$number)"; \
+ *) echo "$$lib.so-version=$$number"; \
echo "all-sonames+=$$lib=\$$($$lib.so-version)";;\
esac; \
done; \
@@ -981,45 +981,6 @@ endif
postclean-generated += soversions.mk soversions.i \
shlib-versions.v shlib-versions.v.i
-# Generate the header containing the names of all shared libraries.
-# We use a stamp file to avoid unnecessary recompilations.
-before-compile += $(common-objpfx)gnu/lib-names.h
-ifeq ($(soversions.mk-done),t)
-$(common-objpfx)gnu/lib-names.h: $(common-objpfx)gnu/lib-names.stmp; @:
-$(common-objpfx)gnu/lib-names.stmp: $(..)scripts/lib-names.awk \
- $(common-objpfx)soversions.i
- $(make-target-directory)
- { \
- echo '/* This file is automatically generated.';\
- echo ' It defines macros to allow user program to find the shared'; \
- echo ' library files which come as part of GNU libc. */'; \
- echo '#ifndef __GNU_LIB_NAMES_H'; \
- echo '#define __GNU_LIB_NAMES_H 1'; \
- echo ''; \
- $(if $(abi-includes), \
- $(foreach h,$(abi-includes), echo '#include <$(h)>';) \
- echo '';) \
- $(if $(abi-variants), \
- $(foreach v,$(abi-variants),\
- $(if $(abi-$(v)-condition),\
- echo '#if $(abi-$(v)-condition)'; \
- ($(foreach s,$(all-sonames), \
- $(if $(abi-$(v)-$(firstword $(subst =, ,$(s)))-soname),\
- echo $(firstword $(subst =, ,$(s)))=$(abi-$(v)-$(firstword $(subst =, ,$(s)))-soname);, \
- echo $(s);))) \
- | LC_ALL=C $(AWK) -v multi=1 -f $(firstword $^) | LC_ALL=C sort;) \
- $(if $(abi-$(v)-condition),echo '#endif';)), \
- ($(foreach s,$(all-sonames), echo $(s);)) \
- | LC_ALL=C $(AWK) -f $(firstword $^) | LC_ALL=C sort;) \
- echo ''; \
- echo '#endif /* gnu/lib-names.h */'; \
- } > ${@:stmp=T}
- $(move-if-change) ${@:stmp=T} ${@:stmp=h}
- touch $@
-endif
-
-common-generated += gnu/lib-names.h gnu/lib-names.stmp
-
# The name under which the run-time dynamic linker is installed.
# We are currently going for the convention that `/lib/ld.so.1'
# names the SVR4/ELF ABI-compliant dynamic linker.
diff --git a/Makerules b/Makerules
index 12d01eed7c..3951bb185b 100644
--- a/Makerules
+++ b/Makerules
@@ -1324,6 +1324,69 @@ ifndef no_deps
-include $(stdio_lim:h=d)
endif
common-generated += bits/stdio_lim.h bits/stdio_lim.d bits/stdio_lim.st
+
+ifeq (yes,$(build-shared))
+# Generate the header containing the names of all shared libraries.
+# We use a stamp file to avoid unnecessary recompilations.
+before-compile += $(common-objpfx)gnu/lib-names.h
+ifeq ($(soversions.mk-done),t)
+ifndef abi-variants
+lib-names-h-abi = gnu/lib-names.h
+lib-names-stmp-abi = gnu/lib-names.stmp
+else
+lib-names-h-abi = gnu/lib-names-$(default-abi).h
+lib-names-stmp-abi = gnu/lib-names-$(default-abi).stmp
+before-compile += $(common-objpfx)$(lib-names-h-abi)
+common-generated += gnu/lib-names.h
+install-others-nosubdir: $(inst_includedir)/$(lib-names-h-abi)
+$(common-objpfx)gnu/lib-names.h:
+ $(make-target-directory)
+ { \
+ echo '/* This file is automatically generated.';\
+ echo ' It defines macros to allow user program to find the shared'; \
+ echo ' library files which come as part of GNU libc. */'; \
+ echo '#ifndef __GNU_LIB_NAMES_H'; \
+ echo '#define __GNU_LIB_NAMES_H 1'; \
+ echo ''; \
+ $(if $(abi-includes), \
+ $(foreach h,$(abi-includes), echo '#include <$(h)>';) \
+ echo '';) \
+ $(foreach v,$(abi-variants),\
+ $(if $(abi-$(v)-condition),\
+ echo '#if $(abi-$(v)-condition)'; \
+ echo '# include <gnu/lib-names-$(v).h>'); \
+ $(if $(abi-$(v)-condition),echo '#endif';)) \
+ echo ''; \
+ echo '#endif /* gnu/lib-names.h */'; \
+ } > $@
+endif
+$(common-objpfx)$(lib-names-h-abi): $(common-objpfx)$(lib-names-stmp-abi); @:
+$(common-objpfx)$(lib-names-stmp-abi): $(..)scripts/lib-names.awk \
+ $(common-objpfx)soversions.i
+ $(make-target-directory)
+ { \
+ $(if $(abi-variants), \
+ echo '/* This file is automatically generated. */';\
+ echo '#ifndef __GNU_LIB_NAMES_H'; \
+ echo '# error "Never use <$(lib-names-h-abi)> directly; include <gnu/lib-names.h> instead."'; \
+ echo '#endif';, \
+ echo '/* This file is automatically generated.';\
+ echo ' It defines macros to allow user program to find the shared'; \
+ echo ' library files which come as part of GNU libc. */'; \
+ echo '#ifndef __GNU_LIB_NAMES_H'; \
+ echo '#define __GNU_LIB_NAMES_H 1';) \
+ echo ''; \
+ ($(foreach s,$(all-sonames), echo $(s);)) \
+ | LC_ALL=C $(AWK) -f $(firstword $^) | LC_ALL=C sort; \
+ $(if $(abi-variants),, \
+ echo ''; \
+ echo '#endif /* gnu/lib-names.h */';) \
+ } > ${@:stmp=T}
+ $(move-if-change) ${@:stmp=T} ${@:stmp=h}
+ touch $@
+endif
+common-generated += $(lib-names-h-abi) $(lib-names-stmp-abi)
+endif
FORCE:
diff --git a/NEWS b/NEWS
index 19ece5a79e..94c065686a 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.21
* The following bugs are resolved with this release:
- 6652, 17266, 17363, 17370, 17371.
+ 6652, 14171, 17266, 17363, 17370, 17371.
Version 2.20
diff --git a/scripts/lib-names.awk b/scripts/lib-names.awk
index ccb7b7f431..a9e018bba1 100644
--- a/scripts/lib-names.awk
+++ b/scripts/lib-names.awk
@@ -27,7 +27,6 @@
END {
for (elt in macros) {
split(elt, x);
- pfx = multi ? "# define " : "#define ";
- printf("%-40s%s\n", pfx x[2], macros[elt]);
+ printf("%-40s%s\n", "#define " x[2], macros[elt]);
}
}
diff --git a/sysdeps/unix/sysv/linux/aarch64/Makefile b/sysdeps/unix/sysv/linux/aarch64/Makefile
index 88250dd87d..f2f28eeda9 100644
--- a/sysdeps/unix/sysv/linux/aarch64/Makefile
+++ b/sysdeps/unix/sysv/linux/aarch64/Makefile
@@ -32,8 +32,6 @@ endif
abi-lp64-options := -U__AARCH64EB__
abi-lp64-condition := !defined __AARCH64EB__
-abi-lp64-ld-soname := ld-linux-aarch64.so.1
abi-lp64_be-options := -D__AARCH64EB__
abi-lp64_be-condition := defined __AARCH64EB__
-abi-lp64_be-ld-soname := ld-linux-aarch64_be.so.1
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 80c112bc18..50410b67b5 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -68,7 +68,5 @@ endif
abi-includes :=
abi-soft-options := -U__ARM_PCS_VFP
abi-soft-condition := !defined __ARM_PCS_VFP
-abi-soft-ld-soname := ld-linux.so.3
abi-hard-options := -D__ARM_PCS_VFP
abi-hard-condition := defined __ARM_PCS_VFP
-abi-hard-ld-soname := ld-linux-armhf.so.3
diff --git a/sysdeps/unix/sysv/linux/i386/shlib-versions b/sysdeps/unix/sysv/linux/i386/shlib-versions
new file mode 100644
index 0000000000..ca5d15b1df
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/i386/shlib-versions
@@ -0,0 +1 @@
+ld=ld-linux.so.2
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 9070b775c4..25fb18b3dd 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -25,84 +25,72 @@ abi-o32_soft-options := -U_MIPS_SIM -D_MIPS_SIM=1 \
abi-o32_soft-condition := !defined(__mips_nan2008) \
&& defined(__mips_soft_float) \
&& (_MIPS_SIM == _MIPS_SIM_ABI32)
-abi-o32_soft-ld-soname := ld.so.1
abi-o32_hard-options := -U_MIPS_SIM -D_MIPS_SIM=1 \
-D__mips_hard_float -U__mips_soft_float \
-U__mips_nan2008
abi-o32_hard-condition := !defined(__mips_nan2008) \
&& defined(__mips_hard_float) \
&& (_MIPS_SIM == _MIPS_SIM_ABI32)
-abi-o32_hard-ld-soname := ld.so.1
abi-o32_soft_2008-options := -U_MIPS_SIM -D_MIPS_SIM=1 \
-D__mips_soft_float -U__mips_hard_float \
-D__mips_nan2008
abi-o32_soft_2008-condition := defined(__mips_nan2008) \
&& defined(__mips_soft_float) \
&& (_MIPS_SIM == _MIPS_SIM_ABI32)
-abi-o32_soft_2008-ld-soname := ld-linux-mipsn8.so.1
abi-o32_hard_2008-options := -U_MIPS_SIM -D_MIPS_SIM=1 \
-D__mips_hard_float -U__mips_soft_float \
-D__mips_nan2008
abi-o32_hard_2008-condition := defined(__mips_nan2008) \
&& defined(__mips_hard_float) \
&& (_MIPS_SIM == _MIPS_SIM_ABI32)
-abi-o32_hard_2008-ld-soname := ld-linux-mipsn8.so.1
abi-n32_soft-options := -U_MIPS_SIM -D_MIPS_SIM=2 \
-D__mips_soft_float -U__mips_hard_float \
-U__mips_nan2008
abi-n32_soft-condition := !defined(__mips_nan2008) \
&& defined(__mips_soft_float) \
&& (_MIPS_SIM == _MIPS_SIM_NABI32)
-abi-n32_soft-ld-soname := ld.so.1
abi-n32_hard-options := -U_MIPS_SIM -D_MIPS_SIM=2 \
-D__mips_hard_float -U__mips_soft_float \
-U__mips_nan2008
abi-n32_hard-condition := !defined(__mips_nan2008) \
&& defined(__mips_hard_float) \
&& (_MIPS_SIM == _MIPS_SIM_NABI32)
-abi-n32_hard-ld-soname := ld.so.1
abi-n32_soft_2008-options := -U_MIPS_SIM -D_MIPS_SIM=2 \
-D__mips_soft_float -U__mips_hard_float \
-D__mips_nan2008
abi-n32_soft_2008-condition := defined(__mips_nan2008) \
&& defined(__mips_soft_float) \
&& (_MIPS_SIM == _MIPS_SIM_NABI32)
-abi-n32_soft_2008-ld-soname := ld-linux-mipsn8.so.1
abi-n32_hard_2008-options := -U_MIPS_SIM -D_MIPS_SIM=2 \
-D__mips_hard_float -U__mips_soft_float \
-D__mips_nan2008
abi-n32_hard_2008-condition := defined(__mips_nan2008) \
&& defined(__mips_hard_float) \
&& (_MIPS_SIM == _MIPS_SIM_NABI32)
-abi-n32_hard_2008-ld-soname := ld-linux-mipsn8.so.1
abi-n64_soft-options := -U_MIPS_SIM -D_MIPS_SIM=3 \
-D__mips_soft_float -U__mips_hard_float \
-U__mips_nan2008
abi-n64_soft-condition := !defined(__mips_nan2008) \
&& defined(__mips_soft_float) \
&& (_MIPS_SIM == _MIPS_SIM_ABI64)
-abi-n64_soft-ld-soname := ld.so.1
abi-n64_hard-options := -U_MIPS_SIM -D_MIPS_SIM=3 \
-D__mips_hard_float -U__mips_soft_float \
-U__mips_nan2008
abi-n64_hard-condition := !defined(__mips_nan2008) \
&& defined(__mips_hard_float) \
&& (_MIPS_SIM == _MIPS_SIM_ABI64)
-abi-n64_hard-ld-soname := ld.so.1
abi-n64_soft_2008-options := -U_MIPS_SIM -D_MIPS_SIM=3 \
-D__mips_soft_float -U__mips_hard_float \
-D__mips_nan2008
abi-n64_soft_2008-condition := defined(__mips_nan2008) \
&& defined(__mips_soft_float) \
&& (_MIPS_SIM == _MIPS_SIM_ABI64)
-abi-n64_soft_2008-ld-soname := ld-linux-mipsn8.so.1
abi-n64_hard_2008-options := -U_MIPS_SIM -D_MIPS_SIM=3 \
-D__mips_hard_float -U__mips_soft_float \
-D__mips_nan2008
abi-n64_hard_2008-condition := defined(__mips_nan2008) \
&& defined(__mips_hard_float) \
&& (_MIPS_SIM == _MIPS_SIM_ABI64)
-abi-n64_hard_2008-ld-soname := ld-linux-mipsn8.so.1
ifeq ($(subdir),elf)
ifeq ($(build-shared),yes)
diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile
index 28f7165815..e66073639a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Makefile
+++ b/sysdeps/unix/sysv/linux/powerpc/Makefile
@@ -3,10 +3,8 @@ abi-32-options := -U__powerpc64__
abi-32-condition := __WORDSIZE == 32
abi-64-v1-options := -D__powerpc64__ -U_CALL_ELF -D_CALL_ELF=1
abi-64-v1-condition := __WORDSIZE == 64 && _CALL_ELF != 2
-abi-64-v1-ld-soname := ld64.so.1
abi-64-v2-options := -D__powerpc64__ -U_CALL_ELF -D_CALL_ELF=2
abi-64-v2-condition := __WORDSIZE == 64 && _CALL_ELF == 2
-abi-64-v2-ld-soname := ld64.so.2
ifeq ($(subdir),rt)
librt-routines += rt-sysdep
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
index 0b83af114e..1f5493babc 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
@@ -1,7 +1,9 @@
%ifdef HAVE_ELFV2_ABI
DEFAULT GLIBC_2.17
+ld=ld64.so.2 GLIBC_2.17
libpthread=0 GLIBC_2.17
%else
DEFAULT GLIBC_2.3
+ld=ld64.so.1 GLIBC_2.3
libpthread=0 GLIBC_2.3
%endif
diff --git a/sysdeps/unix/sysv/linux/s390/Makefile b/sysdeps/unix/sysv/linux/s390/Makefile
index 5c3ca69e71..497ffd566c 100644
--- a/sysdeps/unix/sysv/linux/s390/Makefile
+++ b/sysdeps/unix/sysv/linux/s390/Makefile
@@ -3,7 +3,6 @@ abi-32-options := -U__s390x__
abi-32-condition := __WORDSIZE == 32
abi-64-options := -D__s390x__
abi-64-condition := __WORDSIZE == 64
-abi-64-ld-soname := ld64.so.1
ifeq ($(subdir),rt)
librt-routines += rt-sysdep
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions b/sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions
index 31edcfc4e1..9de0608fbc 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions
@@ -1,2 +1,3 @@
DEFAULT GLIBC_2.2
+ld=ld64.so.1 GLIBC_2.2
libpthread=0 GLIBC_2.2
diff --git a/sysdeps/unix/sysv/linux/x86/Makefile b/sysdeps/unix/sysv/linux/x86/Makefile
index 012125f30c..0281f87e03 100644
--- a/sysdeps/unix/sysv/linux/x86/Makefile
+++ b/sysdeps/unix/sysv/linux/x86/Makefile
@@ -5,13 +5,10 @@ abi-variants := 32 64 x32
abi-32-options := -D__i386__ -U__x86_64__
abi-32-condition := !defined __x86_64__
-abi-32-ld-soname := ld-linux.so.2
abi-64-options := -U__i386__ -D__x86_64__ -U__ILP32__ -D__LP64__
abi-64-condition := defined __x86_64__ && defined __LP64__
-abi-64-ld-soname := ld-linux-x86-64.so.2
abi-x32-options := -U__i386__ -D__x86_64__ -D__ILP32__ -U__LP64__
abi-x32-condition := defined __x86_64__ && defined __ILP32__
-abi-x32-ld-soname := ld-linux-x32.so.2
ifeq ($(subdir),misc)
sysdep_headers += sys/elf.h sys/perm.h sys/reg.h sys/vm86.h sys/debugreg.h sys/io.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/shlib-versions b/sysdeps/unix/sysv/linux/x86_64/64/shlib-versions
index 3d28722178..897b7e0e1b 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/shlib-versions
+++ b/sysdeps/unix/sysv/linux/x86_64/64/shlib-versions
@@ -1,4 +1,5 @@
# DEFAULT Earliest symbol set
# --------------- ------------------------------
DEFAULT GLIBC_2.2.5
+ld=ld-linux-x86-64.so.2 GLIBC_2.2.5
libpthread=0 GLIBC_2.2.5
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions b/sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions
index e4db8b92ef..df96afab38 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions
@@ -1,4 +1,5 @@
# DEFAULT Earliest symbol set
# --------------- ------------------------------
DEFAULT GLIBC_2.16
+ld=ld-linux-x32.so.2 GLIBC_2.16
libpthread=0 GLIBC_2.16