From patchwork Tue May 21 20:17:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 90634 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 98245385F014 for ; Tue, 21 May 2024 20:18:18 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 9710C3858D1E for ; Tue, 21 May 2024 20:17:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9710C3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9710C3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::629 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716322674; cv=none; b=U1uK1UlUtg+OBEvCrBx6SWJyHzM7+Xl2yhPZzK+JMwSzirQrIyoqSy5WPiI33c1WTLqj1Ax1OGuhcuQrbRhm3fvaBYYN+HlTDSYk7OxSlTqk1QbNqcKFhopj/qxBpEmgwO3ukaRuOMRgHSK5KBjQeMbTP1mdWvWjNNWtrPg0qvM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716322674; c=relaxed/simple; bh=aeq6d6rqzFFGgDREgezTdYskcOmCFrGKBrItrCI27iM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=WACQsUGVzX/T2qVyFke2IbNphKB2Wa/PoxdSo0gm7GqjntfsaPDJJtL3dUq7KWpJoBtYne5+2dyIzwRnTJ54HdOlNXmywsMeAoCBIEdLql/j/IZ5Mz4AX0azWmWHXkT2k6SwmF0iyzle8AQoeJOrapGPoz6ty7/RuJmS8pvjsC8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1f0937479f8so5038765ad.3 for ; Tue, 21 May 2024 13:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716322670; x=1716927470; darn=sourceware.org; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=56LgqmWW9f8pFt7XG1J9w6Og2plPXvorNj7LG9W8Zio=; b=AI18ylA8fWxE4Zy4D/j2ApHXc3DiKS8rvmsIgv00qOmNTzllWSjCenkqhoEhsDYqc1 xqZED2cOh0IVj/febQOEqocurIwAkIkhxsDGZFAfWWNh/ag56FJhj2OvdIopqNh5PRoz hZiVSxVRgV2GIXPsxkGXrznAjXoHQ9ARwLAwxcVf3HbRpU99r/sZYw0n95KMjJQHXKRO zdD4KhpfT4Lcu/4D+3kW1UOiV27Vt4Th7BaJ8AwiHE5T+ngUH5lEuyiMNKSGVtJ3PlDB LNI9MfBIueu+EhI5RLhlyBNvgjO/2AF8zEk1VeW20qJqjQ1XLPauJqXOnsbDPURKIqtc 5qLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716322670; x=1716927470; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=56LgqmWW9f8pFt7XG1J9w6Og2plPXvorNj7LG9W8Zio=; b=RcuiCYyoCgU3HUR7Rnsb8PyYtpG+g3TsHzY9cPKMJFVgVDDXZzYUgkGbTZYLw213MW oG7RNXiyLZU0PCQJUm2werjh4IhQjzo1/BFum/qVIS/eP3lRDVMPPPMa3Z8iHMyr+sjT 6Anu8uqv7uLeXkrsR8SkN+s5Q0fIUYSPgDh1sG1fmKO9dQ4ebeEI321vmZQSB3v7EZic 05xGLnDAFJq1bep02Pl7B7ZQJDOLMeGXNc8IkPM9/wHOZP//EFY8zGTaBQboqFKfZ/V1 WBdqZu40w1YQmobRvMhjXnqHgyacZOW3S/ZXcSbP6I/q5LDIKcWB9ArRqj0pfDk7neb7 5Gfw== X-Gm-Message-State: AOJu0Yyt0XQ4j5I94K3TH+QDQ5DtPgT542qyPb5ZKIHLeojjnnf7JNxl gD1dVbgkA34D/+xNqtZqQLMrbc7Q2JoSGaHk8goRb1JeEmhAdyH9tyLbsA== X-Google-Smtp-Source: AGHT+IHPoYNM3TDi/OU6tnr+B2mjK2nzQc5tQ4t01mWnLHHseEYrZDyKzcc8YOFW4fmF657u2ngCdA== X-Received: by 2002:a17:902:e547:b0:1f3:b9d:87fb with SMTP id d9443c01a7336-1f31c964f9bmr460975ad.1.1716322670071; Tue, 21 May 2024 13:17:50 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.56.168.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f2fcdf87besm45789875ad.105.2024.05.21.13.17.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 13:17:49 -0700 (PDT) Received: by gnu-cfl-3.localdomain (Postfix, from userid 1000) id 9716F74043C; Tue, 21 May 2024 13:17:48 -0700 (PDT) Date: Tue, 21 May 2024 13:17:48 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] Check global symbols in static library against shared library Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3022.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Here is a patch to check global symbols in static library against shared library. The test results aren't clean due to: https://sourceware.org/bugzilla/show_bug.cgi?id=31781 https://sourceware.org/bugzilla/show_bug.cgi?id=31779 https://sourceware.org/bugzilla/show_bug.cgi?id=31778 https://sourceware.org/bugzilla/show_bug.cgi?id=31777 https://sourceware.org/bugzilla/show_bug.cgi?id=31774 https://sourceware.org/bugzilla/show_bug.cgi?id=31760 https://sourceware.org/bugzilla/show_bug.cgi?id=31757 https://sourceware.org/bugzilla/show_bug.cgi?id=31756 H.J. ---- The shared library ABIs are checked against the abilist files. There are 5 non-empty installed static libraries: libc.a, libm.a, libmvec.a, libresolv.a and libBrokenLocale.a. Extract global symbol definitions from static libraries and check them against exported global symbol definitions in shared libraries. Special cases are handled: 1. Some global symbols are available only in libc.so. 2. Some math functions are in libc.a, but not in libc.so. 3. The libgcc symbols are in libc.so only on some targets. 4. Internal symbols have global visibility only in the static library. This check is enabled only if nm displays symbol versions for dynamic symbols. Signed-off-by: H.J. Lu --- Makerules | 67 ++++++++++++++++ configure | 42 ++++++++++ configure.ac | 31 +++++++ elf/Makefile | 15 ++++ locale/Makefile | 1 + math/Makefile | 5 ++ mathvec/Makefile | 1 + resolv/Makefile | 1 + scripts/check-static-abi.sh | 111 ++++++++++++++++++++++++++ sysdeps/alpha/Makefile | 5 ++ sysdeps/generic/Makefile | 11 +++ sysdeps/powerpc/powerpc64/le/Makefile | 5 ++ sysdeps/s390/Makefile | 5 ++ 13 files changed, 300 insertions(+) create mode 100644 scripts/check-static-abi.sh diff --git a/Makerules b/Makerules index 275110dda8..e83d3ee121 100644 --- a/Makerules +++ b/Makerules @@ -1238,6 +1238,21 @@ ifeq ($(build-shared),yes) LC_ALL=C $(OBJDUMP) --dynamic-syms $< > $@T mv -f $@T $@ +# Extract global symbol definitions from shared and static libraries. +NM-FLAGS=--extern-only --defined-only --just-symbols + +%.dynamicsymlist: %.so + LC_ALL=C $(NM) --dynamic $(NM-FLAGS) $< \ + | grep -v "^_.*GLIBC_PRIVATE" | grep @@ | sed -e "s/@@.*//" \ + | sort > $@T + mv -f $@T $@ + +%.staticsymlist: %.a + LC_ALL=C $(NM) $(NM-FLAGS) $< \ + | grep -v DW.ref.__gcc_personality_v0 \ + | sort > $@T + mv -f $@T $@ + vpath %.abilist $(+sysdep_dirs) # The .PRECIOUS rule prevents the files built by an implicit rule whose @@ -1246,6 +1261,13 @@ vpath %.abilist $(+sysdep_dirs) # 'make clean', which is handled by the 'generated' variable. .PRECIOUS: %.symlist generated += $(extra-libs:=.symlist) +ifeq (yes,$(nm-has-symbol-version)) +.PRECIOUS: %.dynamicsymlist %.staticsymlist +generated += \ + $(static-libs:=.dynamicsymlist) \ + $(static-libs:=.staticsymlist) \ +# generated +endif $(objpfx)check-abi-%.out: $(common-objpfx)config.make %.abilist \ $(objpfx)%.symlist @@ -1259,6 +1281,25 @@ define check-abi diff -p -U 0 $(filter %.abilist,$^) $(filter %.symlist,$^) > $@ endef +$(objpfx)check-static-abi-%.out: $(common-objpfx)config.make \ + $(objpfx)%.dynamicsymlist \ + $(objpfx)%.staticsymlist + $(check-static-abi); \ + $(evaluate-test) +$(objpfx)check-static-abi-%.out: $(common-objpfx)config.make \ + $(common-objpfx)%.dynamicsymlist \ + $(common-objpfx)%.staticsymlist + $(check-static-abi); \ + $(evaluate-test) +define check-static-abi + $(SHELL) $(..)scripts/check-static-abi.sh \ + $(patsubst $(objpfx)check-static-abi-%.out,%.a,$@) \ + $(filter %.dynamicsymlist,$^) \ + $(filter %.staticsymlist,$^) \ + "$(shared-only-symbols)" \ + "$(static-only-symbols)" > $@ +endef + update-abi-%: $(objpfx)%.symlist %.abilist $(update-abi) update-abi-%: $(common-objpfx)%.symlist %.abilist @@ -1290,6 +1331,11 @@ update-all-abi: $(patsubst %.so,update-all-abi-%,$(install-lib.so-versioned)) check-abi-list = $(patsubst %.so,$(objpfx)check-abi-%.out, \ $(install-lib.so-versioned)) check-abi: $(check-abi-list) +ifeq (yes,$(nm-has-symbol-version)) +check-static-abi-list = $(patsubst %.a,$(objpfx)check-static-abi-%.out, \ + $(static-libs:=.a)) +check-abi: $(check-static-abi-list) +endif ifdef subdir subdir_check-abi: check-abi subdir_update-abi: update-abi @@ -1298,6 +1344,10 @@ else check-abi: subdir_check-abi if grep -q '^FAIL:' $(objpfx)*/check-abi*.test-result; then \ cat $(objpfx)*/check-abi*.out && exit 1; fi +ifeq (yes,$(nm-has-symbol-version)) + if grep -q '^FAIL:' $(objpfx)*/check-static-abi*.test-result; \ + then cat $(objpfx)*/check-static-abi*.out && exit 1; fi +endif update-abi: subdir_update-abi update-all-abi: subdir_update-all-abi endif @@ -1308,11 +1358,28 @@ tests-special += $(objpfx)check-abi-libc.out update-abi: update-abi-libc update-all-abi: update-all-abi-libc common-generated += libc.symlist +ifeq (yes,$(nm-has-symbol-version)) +check-abi: $(objpfx)check-static-abi-libc.out +tests-special += $(objpfx)check-static-abi-libc.out +common-generated += \ + libc.dynamicsymlist \ + libc.staticsymlist \ + libc_nonshared.staticsymlist \ + # common-generated +# check-static-abi.sh needs libc_nonshared.staticsymlist and +# libm.dynamicsymlist to check the global symbol list in libc.a. +$(objpfx)check-static-abi-libc.out: \ + $(common-objpfx)libc_nonshared.staticsymlist \ + $(common-objpfx)math/libm.dynamicsymlist +endif endif ifeq ($(build-shared),yes) ifdef subdir tests-special += $(check-abi-list) +ifeq (yes,$(nm-has-symbol-version)) +tests-special += $(check-static-abi-list) +endif endif endif diff --git a/configure b/configure index 432e40a592..8328bc59e0 100755 --- a/configure +++ b/configure @@ -7566,6 +7566,48 @@ if test "$libc_cv_symver_needs_alias" = yes; then fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether nm displays symbol versions for dynamic symbols" >&5 +printf %s "checking whether nm displays symbol versions for dynamic symbols... " >&6; } +if test ${libc_cv_nm_has_symbol_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat > conftest.s < conftest.t <&5 + (eval $ac_try) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + if $NM --dynamic --extern-only --defined-only --just-symbols conftest.so 2>&1 \ + | grep -q foo@@VERS_2.0; then + libc_cv_nm_has_symbol_version=yes + fi + fi + rm conftest.* + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_nm_has_symbol_version" >&5 +printf "%s\n" "$libc_cv_nm_has_symbol_version" >&6; } +config_vars="$config_vars +nm-has-symbol-version = $libc_cv_nm_has_symbol_version" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_trap with no external dependencies" >&5 printf %s "checking for __builtin_trap with no external dependencies... " >&6; } if test ${libc_cv_builtin_trap+y} diff --git a/configure.ac b/configure.ac index bdc385d03c..db27a6ce2a 100644 --- a/configure.ac +++ b/configure.ac @@ -1554,6 +1554,37 @@ if test "$libc_cv_symver_needs_alias" = yes; then AC_DEFINE(SYMVER_NEEDS_ALIAS) fi +dnl Starting with binutils 2.35, NM displays symbol versions for dynamic +dnl symbols (PR 25708). +AC_CACHE_CHECK(whether nm displays symbol versions for dynamic symbols, + libc_cv_nm_has_symbol_version, [dnl + cat > conftest.s < conftest.t <&1 \ + | grep -q foo@@VERS_2.0; then + libc_cv_nm_has_symbol_version=yes + fi + fi + rm conftest.* +]) +LIBC_CONFIG_VAR([nm-has-symbol-version], [$libc_cv_nm_has_symbol_version]) + AC_CACHE_CHECK(for __builtin_trap with no external dependencies, libc_cv_builtin_trap, [dnl libc_cv_builtin_trap=no diff --git a/elf/Makefile b/elf/Makefile index 280e777c19..8acfa46c62 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -182,6 +182,21 @@ CFLAGS-rtld.os += $(rtld-early-cflags) ifeq ($(unwind-find-fde),yes) routines += unwind-dw2-fde-glibc shared-only-routines += unwind-dw2-fde-glibc + +# These global symbols are only in libc.so. +shared-only-symbols += \ + _Unwind_Find_FDE \ + __deregister_frame \ + __deregister_frame_info \ + __deregister_frame_info_bases \ + __register_frame \ + __register_frame_info \ + __register_frame_info_bases \ + __register_frame_info_bases \ + __register_frame_info_table \ + __register_frame_info_table_bases \ + __register_frame_table \ +# shared-only-symbols endif before-compile += $(objpfx)trusted-dirs.h diff --git a/locale/Makefile b/locale/Makefile index 2810f28605..7ec985c65e 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -97,6 +97,7 @@ generated += C-translit.h before-compile += $(objpfx)C-translit.h extra-libs = libBrokenLocale +static-libs = libBrokenLocale extra-libs-others = $(extra-libs) libBrokenLocale-routines = broken_cur_max diff --git a/math/Makefile b/math/Makefile index 36024a5039..7a56685772 100644 --- a/math/Makefile +++ b/math/Makefile @@ -55,6 +55,7 @@ aux := \ # Build the -lm library. extra-libs := libm +static-libs := libm extra-libs-others = $(extra-libs) libm-support = \ @@ -1564,3 +1565,7 @@ object-suffixes-left := $(libmvec-tests) include $(o-iterator) $(objpfx)test-fenv-tls: $(shared-thread-library) + +# check-static-abi.sh needs libc.staticsymlist to check the global symbol +# list in libm.a. +$(objpfx)check-static-abi-libm.out: $(common-objpfx)libc.staticsymlist diff --git a/mathvec/Makefile b/mathvec/Makefile index bbedb6de5b..1f60b5b4e1 100644 --- a/mathvec/Makefile +++ b/mathvec/Makefile @@ -23,6 +23,7 @@ include ../Makeconfig ifeq ($(build-mathvec),yes) extra-libs := libmvec +static-libs := libmvec extra-libs-others = $(extra-libs) libmvec-routines = $(strip $(libmvec-support)) diff --git a/resolv/Makefile b/resolv/Makefile index 5f44f5896b..0022982f95 100644 --- a/resolv/Makefile +++ b/resolv/Makefile @@ -82,6 +82,7 @@ tests-internal += tst-inet_aton_exact generate := mtrace-tst-leaks.out tst-leaks.mtrace tst-leaks2.mtrace extra-libs := libresolv libnss_dns +static-libs := libresolv ifeq ($(have-thread-library),yes) routines += gai_sigqueue diff --git a/scripts/check-static-abi.sh b/scripts/check-static-abi.sh new file mode 100644 index 0000000000..3b3cb4357d --- /dev/null +++ b/scripts/check-static-abi.sh @@ -0,0 +1,111 @@ +#!/bin/sh +# Check global symbols in static library against global symbols in shared +# library. +# Copyright (C) 2024 Free Software Foundation, Inc. +# This file is part of the GNU C Library. +# +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# . + +export LC_ALL=C + +lib="$1" +shift +dynamicsymlist="$1" +shift +if test $lib = libc.a; then + libm_dynamicsymlist="$1" + shift +fi +staticsymlist="$1" +shift +if test $lib = libc.a; then + libc_nonshared_staticsymlist="$1" + shift +elif test $lib = libm.a; then + libc_staticsymlist="$1" + shift +fi +shared_only_functions="$1" +shift +static_only_functions="$1" + +staticdiff="$(mktemp)" + +cleanup () { + rm -f -- "$staticdiff" +} + +trap cleanup 0 + +status=0 + +diff -up $dynamicsymlist $staticsymlist > $staticdiff + +# Check missing global symbols, including symbols with a leading +# underscore, in static library. +shared_only="$(grep '^-[^-]' $staticdiff | sed -e 's/^-//')" +if test -n "$shared_only"; then + # Exclude shared only functions. + for f in $shared_only; do + case " $shared_only_functions " in + *" $f "*) + ;; + *) + # Skip the missing function, $f, in libm.a if $f is in libc.a. + if test $lib = libm.a \ + && grep -q "^$f$" $libc_staticsymlist; then + continue + fi + missing="$missing $f" + ;; + esac + done + if test -n "$missing"; then + status=1 + echo Missing functions in $lib: + echo "$missing" + fi +fi + +# Check extra global symbols, excluding symbols with a leading underscore +# which can be internal symbols, in static library. +static_only="$(grep '^+[^_^\+]' $staticdiff | sed -e 's/^+//')" +if test -n "$static_only"; then + # Exclude static only functions. + for f in $static_only; do + case " $static_only_functions " in + *" $f "*) + ;; + *) + # Skip the extra function, $f, in libc.a if $f is in libc_nonshared.a + # or libm.so. + if test $lib = libc.a; then + if grep -q "^$f$" $libc_nonshared_staticsymlist \ + || grep -q "^$f$" $libm_dynamicsymlist; then + continue + fi + fi + extra="$extra $f" + ;; + esac + done + if test -n "$extra"; then + status=1 + echo Extra functions in $lib: + echo "$extra" + fi +fi + +exit $status diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 11d5e65503..9e3486bd23 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -33,6 +33,11 @@ sysdep_routines += stxcpy stxncpy endif ifeq ($(subdir),elf) +# These global symbols are only in libc.so. +shared-only-symbols += \ + __nldbl__IO_vfscanf \ +# shared-only-symbols + # The ld.so startup code cannot use literals until it self-relocates. CFLAGS-rtld.c = -mbuild-constants endif diff --git a/sysdeps/generic/Makefile b/sysdeps/generic/Makefile index 72522d1f0e..fd059582e6 100644 --- a/sysdeps/generic/Makefile +++ b/sysdeps/generic/Makefile @@ -25,7 +25,18 @@ ifeq (yes:yes,$(build-shared):$(unwind-find-fde)) # This is needed to support g++ v2 and v3. sysdep_routines += framestate unwind-pe shared-only-routines += framestate unwind-pe + +# These global symbols are only in libc.so. +shared-only-symbols += __frame_state_for endif + +# These global symbols are only in libc.so. +shared-only-symbols += \ + __xmknod \ + __xmknodat \ + _dl_mcount_wrapper_check \ + re_max_failures \ +# shared-only-symbols endif ifeq ($(subdir),malloc) diff --git a/sysdeps/powerpc/powerpc64/le/Makefile b/sysdeps/powerpc/powerpc64/le/Makefile index 9d568d4f44..0209198bcf 100644 --- a/sysdeps/powerpc/powerpc64/le/Makefile +++ b/sysdeps/powerpc/powerpc64/le/Makefile @@ -208,6 +208,11 @@ CFLAGS-tst-minstack-throw.cc += -mno-float128 endif ifeq ($(subdir),elf) +# These global symbols are only in libc.so. +shared-only-symbols += \ + __nldbl__IO_vfscanf \ +# shared-only-symbols + $(objpfx)tst-glibc-hwcaps: \ $(objpfx)libmarkermod2-1.so $(objpfx)libmarkermod3-1.so $(objpfx)tst-glibc-hwcaps.out: \ diff --git a/sysdeps/s390/Makefile b/sysdeps/s390/Makefile index b793b26112..3d218bfeab 100644 --- a/sysdeps/s390/Makefile +++ b/sysdeps/s390/Makefile @@ -43,6 +43,11 @@ $(modpfx)gconv-modules-s390.conf: ../sysdeps/s390/gconv-modules-s390.conf \ endif ifeq ($(subdir),elf) +# These global symbols are only in libc.so. +shared-only-symbols += \ + __nldbl__IO_vfscanf \ +# shared-only-symbols + sysdep-dl-routines += dl-procinfo-s390 ifeq ($(build-shared),yes)