From patchwork Wed Sep 10 04:03:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 387526 X-Patchwork-Delegate: yorksun@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 61D9D140092 for ; Wed, 10 Sep 2014 14:03:48 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6FA10A73F2; Wed, 10 Sep 2014 06:03:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IfQttCvxyKQy; Wed, 10 Sep 2014 06:03:46 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6ACC6A73E5; Wed, 10 Sep 2014 06:03:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7D340A73E5 for ; Wed, 10 Sep 2014 06:03:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LbUcNxXvh-Uk for ; Wed, 10 Sep 2014 06:03:35 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by theia.denx.de (Postfix) with ESMTPS id 837F9A73DC for ; Wed, 10 Sep 2014 06:03:31 +0200 (CEST) Received: by mail-pd0-f176.google.com with SMTP id y13so6603194pdi.7 for ; Tue, 09 Sep 2014 21:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nn6MEM9CNET19ImGieJ6GK7G8M1dp0qO8a4eK8YbYJY=; b=pSzHiNMax5Sw8xUH4fb4PxfCdXVJr98F4pu+Qo+68F+VFfy8bx2+NpHLv8VYG8ak94 Y0CM3abK3b0ZCy26QUpPA9i2AuWEHPBdKr1M9ZDSuAfs/3scw9Injm10AhLazOImtILH TtFDZoErCDVcB9zbuS3qr9lEOABorVkbbAmyIjyaqGLlXnQfB4GfA/mfklMpDVwxG2lh wIJgC0A7GIUvCeOu9dzlt3xuyJp2nJVqPx7gmG0ufEWyIcot/4J/JMO7w747A24SLn6p B+HNIXbPBKH53DvhlSG+c2JUHT0nHE+lxZ+0r+pT6pj1H8CWQBFCDb1YZaqkVYxrYF9e W3fQ== X-Received: by 10.70.42.71 with SMTP id m7mr40418870pdl.72.1410321809979; Tue, 09 Sep 2014 21:03:29 -0700 (PDT) Received: from chrisp3-dl.ws.atlnz.lc (2-163-36-202-static.alliedtelesis.co.nz. [202.36.163.2]) by mx.google.com with ESMTPSA id cx2sm12969847pbb.52.2014.09.09.21.03.25 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Sep 2014 21:03:29 -0700 (PDT) From: Chris Packham To: u-boot@lists.denx.de Date: Wed, 10 Sep 2014 16:03:10 +1200 Message-Id: <1410321790-12914-1-git-send-email-judge.packham@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: Cc: Kim Phillips , Kumar Gala , Joerg Albert , Andy Fleming , Stefan Roese , Chris Packham Subject: [U-Boot] [RFC PATCH v1] powerpc: add --bss-plt to LDFLAGS X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de With some versions of gcc (that we know of 4.6.3 and 4.8.2 are affected) it is necessary to specify --bss-plt to get the final blrl in the _GOT2_TABLE_. Without this the last symbol does not get it's address relocated. For the P2041RDB board this ended up being NetArpWaitTimerStart which caused the ARP packets to timeout immediately. Helped-by: Joakim Tjernlund Signed-off-by: Chris Packham Acked-by: Joakim Tjernlund --- Technically this is v2 of http://lists.denx.de/pipermail/u-boot/2014-September/188365.html but the solution is so different that I'm treating it as a new patch series. arch/powerpc/config.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk index 6329b6c..fec02f2 100644 --- a/arch/powerpc/config.mk +++ b/arch/powerpc/config.mk @@ -11,6 +11,7 @@ endif CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 LDFLAGS_FINAL += --gc-sections +LDFLAGS_FINAL += --bss-plt PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections \ -meabi PLATFORM_CPPFLAGS += -D__powerpc__ -ffixed-r2