From patchwork Thu Jan 8 13:56:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 4569 Received: (qmail 23071 invoked by alias); 8 Jan 2015 13:57:04 -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 23059 invoked by uid 89); 8 Jan 2015 13:57:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Thu, 8 Jan 2015 19:26:56 +0530 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [PATCH] [s390] Define a __tls_get_addr macro to avoid declaring it again Message-ID: <20150108135656.GA26244@spoyarek.pnq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) commit 050f7298e1ecc39887c329037575ccd972071255 added an extern declaration for __tls_get_addr that conflicts with the one in s390 dl-tls.h, based on whether __tls_get_addr is defined as a macro. The rationale seems to be based on the assumption that __tls_get_addr is exported for every architecture and hence an internal non-plt alias is needed. This is not true for s390 though, since it exports __tls_get_offset and not __tls_get_addr. This results in tst-audit9 being stuck in an infinite loop. This patch fixes this by defining a __tls_get_addr macro to itself so as to not use the conflicting declaration. Tested on Fedora rawhide. Siddhesh * sysdeps/s390/dl-tls.h [IS_IN (rtld)]: Define __tls_get_addr macro. --- sysdeps/s390/dl-tls.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sysdeps/s390/dl-tls.h b/sysdeps/s390/dl-tls.h index 0fa8045..8132b10 100644 --- a/sysdeps/s390/dl-tls.h +++ b/sysdeps/s390/dl-tls.h @@ -33,6 +33,13 @@ extern unsigned long __tls_get_offset (unsigned long got_offset); # include +/* dl-tls.c declares __tls_get_addr as an exported symbol if it is not defined + as a macro. It seems suitable to do that in the generic code because all + architectures other than s390 export __tls_get_addr. The declaration causes + problems in s390 though, so we define __tls_get_addr here to avoid declaring + __tls_get_addr again. */ +# define __tls_get_addr __tls_get_addr + extern void *__tls_get_addr (tls_index *ti) attribute_hidden; /* Make a temporary alias of __tls_get_addr to remove the hidden attribute. Then export __tls_get_addr as __tls_get_addr_internal