From patchwork Tue Mar 25 01:39:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 255 X-Patchwork-Delegate: azanella@linux.vnet.ibm.com Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (caibbdcaaahb.dreamhost.com [208.113.200.71]) by wilcox.dreamhost.com (Postfix) with ESMTP id CB5E3360178 for ; Mon, 24 Mar 2014 18:39:18 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 6D438DB1B06; Mon, 24 Mar 2014 18:39:18 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 4206AD22A7F for ; Mon, 24 Mar 2014 18:39:18 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=irxfhk72wwVRWVg/zRsUdbJhHYrRA mYD3Qa0Q3r/RtlqpoEzNj7fW49OySs5R8n7hphRbXP3tPq4tN3OA7Zpi/qfnPvWd oukLCVYWdJZsROmciMJpbMUsWk3kNPe2N2HBK7qXDdJdAsjPhvhP1q8xToHQoQeL GqBqbyg4iyvcis= 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:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=lxHdTOjwRm41RG4lyWd2MRYEtR4=; b=U6s UBOvrCwWYz+rm4VddaSGpZRkF6F+UhSSOXwol2EKa9adOWaflQUWsmuEVQz2hR52 e/FXr9KW6RTM8Fi4KgMKYnUeyl+ru3j/0nXL++Fy0cWRsimetQSGUErfy1Fa8k8d VqiGZwvnLSjziVCl1ExVLmH+rQ21M+pa58SS+21s= Received: (qmail 32238 invoked by alias); 25 Mar 2014 01:39:15 -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 32221 invoked by uid 89); 25 Mar 2014 01:39:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pb0-f48.google.com X-Received: by 10.68.139.2 with SMTP id qu2mr6205108pbb.164.1395711551026; Mon, 24 Mar 2014 18:39:11 -0700 (PDT) Date: Tue, 25 Mar 2014 12:09:06 +1030 From: Alan Modra To: libc-alpha@sourceware.org Subject: [PowerPC64] Fix reference to toc symbol Message-ID: <20140325013906.GD18201@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-DH-Original-To: glibc@patchwork.siddhesh.in https://sourceware.org/ml/binutils/2014-03/msg00033.html removes the "magic" treatment of symbols defined in a .toc section. This results in glibc failing to build correctly on powerpc64. Fixed as follows. This change is compatible with older binutils. (Discovering this glibc bug led me to revert the binutils change since it's a bit rude to prevent older glibc from building, but glibc still ought to be fixed.) * sysdeps/powerpc/powerpc64/start.S: Add @toc to toc symbol reference. diff --git a/sysdeps/powerpc/powerpc64/start.S b/sysdeps/powerpc/powerpc64/start.S index 15e29d9..934c558 100644 --- a/sysdeps/powerpc/powerpc64/start.S +++ b/sysdeps/powerpc/powerpc64/start.S @@ -74,7 +74,7 @@ ENTRY(_start) /* put the address of start_addresses in r8... ** ** PPC64 ABI uses R13 for thread local, so we leave it alone */ - ld r8,.L01(r2) + ld r8,.L01@toc(r2) /* and continue in libc-start, in glibc. */ b JUMPTARGET(__libc_start_main)