From patchwork Tue Nov 22 16:43:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 83443 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp2246611obn; Tue, 22 Nov 2016 08:43:16 -0800 (PST) X-Received: by 10.99.119.71 with SMTP id s68mr45730305pgc.11.1479832996044; Tue, 22 Nov 2016 08:43:16 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id c32si598841plj.288.2016.11.22.08.43.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 08:43:16 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-75041-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-75041-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-75041-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; q=dns; s=default; b=GoMYQAQGzjjU29cxUNB32p+yQeeU8 nH7PQP5MK5wV8fluMifGtZtEU/ESEuBWrX0TXgU/ehDos7/rcXroY4QK4W8viyU4 ngVWZGyC2xLg1ql034sVW+E370JNRGM1sVWsFiIlUuAQpEySi0zhG8uE1FDGQJSa Spd0+cmrbfwIdI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; s=default; bh=/Tmv8uhof6g7KytBvrHWOizlF+Y=; b=bFn fbg+duWWrg27PNuVHPBgsctbO9G3FVuUsSvhnPxRK+MyRNeYD+ULa5K9/TNnNFLV iePWjkmhGyK2OZAaP/ylokiZDPH4ycKO72LXYwXuhWH6Xc1NB4MDRLNB3vNjNIa8 NnmI9VNKHIonLL32tYv+YbwJg5VerYX/fM4BzClQ= Received: (qmail 119740 invoked by alias); 22 Nov 2016 16:43:06 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 119701 invoked by uid 89); 22 Nov 2016 16:43:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=libcso, libc.so, UD:libc.so, __memcpy_chk X-HELO: mx1.redhat.com To: GNU C Library From: Florian Weimer Subject: [PATCH] powerpc: Remove unintended __longjmp export Message-ID: <771d4c34-534f-228a-3041-2610145c8baa@redhat.com> Date: Tue, 22 Nov 2016 17:43:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Due to an accident, we export __longjmp under a public symbol version for the powerpc32/fpu configuration. __longjmp is declared as hidden for internal use. This means that any reference to this symbol (of which there aren't any right now in libc.so) will cause the symbol to turn unexported. The reason is that the linker does not distinguish between hidden definitions and references. GCC emits a .hidden directive in the __longjmp-referencing translation unit, and this kills the .symver-based export. I propose the removal of the __longjmp export as the simplest fix. __longjmp is in the implementation namespace and is not used in a public header. As a result, nothing out there should reference it. If this is not acceptable, I'll come up with different approach to address this. But I prefer to address this issue in this way. Tested on a powerpc32/fpu configuration with no regressions. Florian powerpc: Remove unintended __longjmp symbol from ABI 2016-11-22 Florian Weimer * sysdeps/powerpc/powerpc32/fpu/__longjmp.S (__longjmp): Remove version and turn into strong alias. Remove compat symbol. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist (__longjmp): Remove. diff --git a/sysdeps/powerpc/powerpc32/fpu/__longjmp.S b/sysdeps/powerpc/powerpc32/fpu/__longjmp.S index 529e095..c233b88 100644 --- a/sysdeps/powerpc/powerpc32/fpu/__longjmp.S +++ b/sysdeps/powerpc/powerpc32/fpu/__longjmp.S @@ -26,15 +26,13 @@ # include "__longjmp-common.S" #else /* IS_IN (libc) */ -/* Build a versioned object for libc. */ -versioned_symbol (libc, __vmx__longjmp, __longjmp, GLIBC_2_3_4); +strong_alias (__vmx__longjmp, __longjmp) # define __longjmp_symbol __vmx__longjmp # include "__longjmp-common.S" # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) # define __NO_VMX__ # undef JB_SIZE -compat_symbol (libc, __novmx__longjmp, __longjmp, GLIBC_2_0); # undef __longjmp_symbol # define __longjmp_symbol __novmx__longjmp # include "__longjmp-common.S" diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 4b0cde8..4ba3146 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2112,7 +2112,6 @@ GLIBC_2.3.4 GLIBC_2.3.4 A GLIBC_2.3.4 __chk_fail F GLIBC_2.3.4 __fprintf_chk F GLIBC_2.3.4 __gets_chk F -GLIBC_2.3.4 __longjmp F GLIBC_2.3.4 __memcpy_chk F GLIBC_2.3.4 __memmove_chk F GLIBC_2.3.4 __mempcpy_chk F