From patchwork Fri Nov 26 19:56:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 73236 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 C0636B70D5 for ; Sat, 27 Nov 2010 06:57:09 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 141E9281C7; Fri, 26 Nov 2010 20:57:08 +0100 (CET) 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 8QZzMwbxy5wX; Fri, 26 Nov 2010 20:57:07 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D333B281DA; Fri, 26 Nov 2010 20:57:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 16412281DA for ; Fri, 26 Nov 2010 20:57:03 +0100 (CET) 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 sstLFoA7lvKZ for ; Fri, 26 Nov 2010 20:57:01 +0100 (CET) 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-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTP id 0BC3D281C7 for ; Fri, 26 Nov 2010 20:56:59 +0100 (CET) Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id BDC5D186DEC7; Fri, 26 Nov 2010 20:56:58 +0100 (CET) X-Auth-Info: NOWf9I4zH04aPJ10RJZ3/xAJibAX+VJ+BhimdqrIqXI= Received: from diddl.denx.de (ppp-93-104-37-180.dynamic.mnet-online.de [93.104.37.180]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 6183D1C00625; Fri, 26 Nov 2010 20:56:58 +0100 (CET) Received: from gemini.denx.de (unknown [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id 345443335217; Fri, 26 Nov 2010 20:56:58 +0100 (CET) Received: by gemini.denx.de (Postfix, from userid 500) id 22B8511D94F7; Fri, 26 Nov 2010 20:56:58 +0100 (CET) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Fri, 26 Nov 2010 20:56:56 +0100 Message-Id: <1290801416-5652-1-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1290700844-31427-16-git-send-email-wd@denx.de> References: <1290700844-31427-16-git-send-email-wd@denx.de> Cc: Haiying Wang , Kim Phillips Subject: [U-Boot] [PATCH 15/25 V3] 83xx: Cleanup for partial linking and --gc-sections X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Signed-off-by: Wolfgang Denk Cc: Kim Phillips Cc: Haiying Wang --- Changes since V2: - fixed nand_spl/*/u-boot.lds as pointed out by Haiying arch/powerpc/cpu/mpc83xx/u-boot.lds | 53 ++++------------------ nand_spl/board/freescale/mpc8313erdb/u-boot.lds | 7 ++- nand_spl/board/freescale/mpc8315erdb/u-boot.lds | 7 ++- 3 files changed, 18 insertions(+), 49 deletions(-) diff --git a/arch/powerpc/cpu/mpc83xx/u-boot.lds b/arch/powerpc/cpu/mpc83xx/u-boot.lds index 0b74a13..81a7ace 100644 --- a/arch/powerpc/cpu/mpc83xx/u-boot.lds +++ b/arch/powerpc/cpu/mpc83xx/u-boot.lds @@ -1,5 +1,5 @@ /* - * (C) Copyright 2006 + * (C) Copyright 2006-2010 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this @@ -25,41 +25,13 @@ OUTPUT_ARCH(powerpc) SECTIONS { /* Read-only sections, merged into text segment: */ - . = + SIZEOF_HEADERS; - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .rel.text : { *(.rel.text) } - .rela.text : { *(.rela.text) } - .rel.data : { *(.rel.data) } - .rela.data : { *(.rela.data) } - .rel.rodata : { *(.rel.rodata) } - .rela.rodata : { *(.rela.rodata) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .init : { *(.init) } - .plt : { *(.plt) } .text : { - arch/powerpc/cpu/mpc83xx/start.o (.text) - *(.text) - *(.got1) + arch/powerpc/cpu/mpc83xx/start.o (.text*) + *(.text*) . = ALIGN(16); - *(.eh_frame) *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } - .fini : { *(.fini) } =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } /* Read-write section, merged into data segment: */ . = (. + 0x0FFF) & 0xFFFFF000; @@ -67,23 +39,19 @@ SECTIONS PROVIDE (erotext = .); .reloc : { - *(.got) + KEEP(*(.got)) _GOT2_TABLE_ = .; - *(.got2) + KEEP(*(.got2)) _FIXUP_TABLE_ = .; - *(.fixup) + KEEP(*(.fixup)) } __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2; __fixup_entries = (. - _FIXUP_TABLE_) >> 2; .data : { - *(.data) - *(.data1) - *(.sdata) - *(.sdata2) - *(.dynamic) - CONSTRUCTORS + *(.data*) + *(.sdata*) } _edata = .; PROVIDE (edata = .); @@ -109,9 +77,8 @@ SECTIONS __bss_start = .; .bss (NOLOAD) : { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) + *(.bss*) + *(.sbss*) *(COMMON) . = ALIGN(4); } diff --git a/nand_spl/board/freescale/mpc8313erdb/u-boot.lds b/nand_spl/board/freescale/mpc8313erdb/u-boot.lds index ad82589..138e427 100644 --- a/nand_spl/board/freescale/mpc8313erdb/u-boot.lds +++ b/nand_spl/board/freescale/mpc8313erdb/u-boot.lds @@ -30,7 +30,6 @@ SECTIONS .text : { *(.text*) . = ALIGN(16); - *(.eh_frame) *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } @@ -39,13 +38,15 @@ SECTIONS *(.data*) *(.sdata*) _GOT2_TABLE_ = .; - *(.got2) + KEEP(*(.got2)) __got2_entries = (. - _GOT2_TABLE_) >> 2; } . = ALIGN(8); __bss_start = .; - .bss (NOLOAD) : { *(.*bss) } + .bss (NOLOAD) : { + *(.*bss) + } _end = .; } ENTRY(_start) diff --git a/nand_spl/board/freescale/mpc8315erdb/u-boot.lds b/nand_spl/board/freescale/mpc8315erdb/u-boot.lds index ad82589..138e427 100644 --- a/nand_spl/board/freescale/mpc8315erdb/u-boot.lds +++ b/nand_spl/board/freescale/mpc8315erdb/u-boot.lds @@ -30,7 +30,6 @@ SECTIONS .text : { *(.text*) . = ALIGN(16); - *(.eh_frame) *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } @@ -39,13 +38,15 @@ SECTIONS *(.data*) *(.sdata*) _GOT2_TABLE_ = .; - *(.got2) + KEEP(*(.got2)) __got2_entries = (. - _GOT2_TABLE_) >> 2; } . = ALIGN(8); __bss_start = .; - .bss (NOLOAD) : { *(.*bss) } + .bss (NOLOAD) : { + *(.*bss) + } _end = .; } ENTRY(_start)