From patchwork Thu Apr 25 17:40:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 239574 X-Patchwork-Delegate: albert.aribaud@free.fr 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 8704C2C00B5 for ; Fri, 26 Apr 2013 03:40:39 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 94A444A028; Thu, 25 Apr 2013 19:40:35 +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 fzSQCeoizqew; Thu, 25 Apr 2013 19:40:35 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F13294A051; Thu, 25 Apr 2013 19:40:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 03A614A051 for ; Thu, 25 Apr 2013 19:40:32 +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 PN55oJ19AzZx for ; Thu, 25 Apr 2013 19:40:30 +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-gh0-f177.google.com (mail-gh0-f177.google.com [209.85.160.177]) by theia.denx.de (Postfix) with ESMTPS id 512274A028 for ; Thu, 25 Apr 2013 19:40:29 +0200 (CEST) Received: by mail-gh0-f177.google.com with SMTP id g22so473801ghb.22 for ; Thu, 25 Apr 2013 10:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer; bh=vh41+3ZRuckyCIQCeA632RAiqjntRZK7DqW4hfx2K6s=; b=Jz6oBXMHqtV1SVrC110du2FcE8Lpf8eTiiGBqpQIEHU5smzSnvttYaOAqcjlu67X6K GyB47ftMn2ZS1NvFhyRLqdqQST76tlF0wAEbdI7nA7tzMXjISFfFsRJUqt8MM6mLE5b0 zq6SKrgZ8FO5Wuob/iPpctWldrRoE0DLG4rsNWxm2PrhmfxwOm+3JRiGP6kxZ0AZxAai TKpqf8k7slU8UA/Zg74u0JSmmsiJpNTvVHXfF1AV8Depn+P5JAzgE62A+C3HigMM/+Kx xUq7OAtw9DznvMZ4S2bAapcVwQScVCLI0/ETBd298y1K9XstbsGxVtKwV6t0oihaCibx iW9Q== X-Received: by 10.236.71.74 with SMTP id q50mr25283954yhd.188.1366911627494; Thu, 25 Apr 2013 10:40:27 -0700 (PDT) Received: from localhost.localdomain (cpe-065-184-250-089.ec.res.rr.com. [65.184.250.89]) by mx.google.com with ESMTPSA id o31sm10855212yhh.21.2013.04.25.10.40.26 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Apr 2013 10:40:26 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Thu, 25 Apr 2013 13:40:22 -0400 Message-Id: <1366911622-6566-1-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 Subject: [U-Boot] [PATCH] arm: Enable -ffunction-sections / -fdata-sections / --gc-sections 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 While other architectures have enabled these gcc / ld options for some time on U-Boot itself, ARM has only been doing this on SPL. Enable this on full U-Boot as well now. Cc: Albert ARIBAUD Signed-off-by: Tom Rini --- arch/arm/config.mk | 3 +++ arch/arm/cpu/ixp/config.mk | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 461899e..dc64160 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 endif endif +LDFLAGS_FINAL += --gc-sections +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections + # Support generic board on ARM __HAVE_ARCH_GENERIC_BOARD := y diff --git a/arch/arm/cpu/ixp/config.mk b/arch/arm/cpu/ixp/config.mk index b02e8af..fd3c29f 100644 --- a/arch/arm/cpu/ixp/config.mk +++ b/arch/arm/cpu/ixp/config.mk @@ -31,10 +31,6 @@ PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100 PLATFORM_LDFLAGS += -EB USE_PRIVATE_LIBGCC = yes -# -fdata-sections triggers "section .bss overlaps section .rel.dyn" linker error -PLATFORM_RELFLAGS += -ffunction-sections -LDFLAGS_u-boot += --gc-sections - # ========================================================================= # # Supply options according to compiler version