From patchwork Thu Nov 25 16:00:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 73093 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 5EF34B70AF for ; Fri, 26 Nov 2010 03:07:09 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9BD0028377; Thu, 25 Nov 2010 17:07:05 +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 VZW6+tNcZTDX; Thu, 25 Nov 2010 17:07:05 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B61AA282E0; Thu, 25 Nov 2010 17:06:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1005F28242 for ; Thu, 25 Nov 2010 17:06:54 +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 dCLV3xLxAwAK for ; Thu, 25 Nov 2010 17:06:52 +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 063B32826F for ; Thu, 25 Nov 2010 17:06:50 +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 38225186DEC3 for ; Thu, 25 Nov 2010 17:06:50 +0100 (CET) X-Auth-Info: tINLxthEQC1BjmF01znQJlcemhRhv4e2IQW+jKS0ha4= 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 A10291C003AD for ; Thu, 25 Nov 2010 17:06:49 +0100 (CET) Received: from gemini.denx.de (gemini.denx.de [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id C769F33469F8 for ; Thu, 25 Nov 2010 17:00:54 +0100 (CET) Received: by gemini.denx.de (Postfix, from userid 500) id ACF96D24561; Thu, 25 Nov 2010 17:00:53 +0100 (CET) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Thu, 25 Nov 2010 17:00:40 +0100 Message-Id: <1290700844-31427-21-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1290373420-3053-1-git-send-email-wd@denx.de> References: <1290373420-3053-1-git-send-email-wd@denx.de> Subject: [U-Boot] [PATCH 20/24 V2] 5xxx: 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 --- arch/powerpc/cpu/mpc5xxx/Makefile | 27 +++++++--- arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds | 61 ++++----------------- arch/powerpc/cpu/mpc5xxx/u-boot.lds | 57 ++++---------------- board/manroland/hmi1001/config.mk | 24 --------- board/matrix_vision/mvsmr/u-boot.lds | 58 ++++----------------- include/configs/TQM5200.h | 2 +- include/configs/mcc200.h | 2 +- 7 files changed, 56 insertions(+), 175 deletions(-) delete mode 100644 board/manroland/hmi1001/config.mk diff --git a/arch/powerpc/cpu/mpc5xxx/Makefile b/arch/powerpc/cpu/mpc5xxx/Makefile index ecaeb22..1a088b7 100644 --- a/arch/powerpc/cpu/mpc5xxx/Makefile +++ b/arch/powerpc/cpu/mpc5xxx/Makefile @@ -25,14 +25,25 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).o -START = start.o -SOBJS = io.o firmware_sc_task_bestcomm.impl.o -COBJS = i2c.o traps.o cpu.o cpu_init.o ide.o interrupts.o \ - loadtask.o pci_mpc5200.o serial.o speed.o usb_ohci.o usb.o - -SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -START := $(addprefix $(obj),$(START)) +SSTART = start.o +CSTART = traps.o +SOBJS += io.o +SOBJS += firmware_sc_task_bestcomm.impl.o +COBJS-y += i2c.o +COBJS-y += cpu.o +COBJS-y += cpu_init.o +COBJS-y += ide.o +COBJS-y += interrupts.o +COBJS-y += loadtask.o +COBJS-y += pci_mpc5200.o +COBJS-y += serial.o +COBJS-y += speed.o +COBJS-$(CONFIG_CMD_USB) += usb_ohci.o +COBJS-$(CONFIG_CMD_USB) += usb.o + +SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) +START := $(addprefix $(obj),$(SSTART) $(CSTART)) all: $(obj).depend $(START) $(LIB) diff --git a/arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds b/arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds index ecffc1b..bbf0f16 100644 --- a/arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds +++ b/arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds @@ -22,57 +22,25 @@ */ OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ + 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 : { /* WARNING - the following is hand-optimized to fit within */ /* the sector layout of our flash chips! XXX FIXME XXX */ - arch/powerpc/cpu/mpc5xxx/start.o (.text) - arch/powerpc/cpu/mpc5xxx/traps.o (.text) - lib/crc32.o (.text) - arch/powerpc/lib/cache.o (.text) - arch/powerpc/lib/time.o (.text) + arch/powerpc/cpu/mpc5xxx/start.o (.text*) + arch/powerpc/cpu/mpc5xxx/traps.o (.text*) . = DEFINED(env_offset) ? env_offset : .; - common/env_embedded.o (.ppcenv) + common/env_embedded.o (.ppcenv*) - *(.text) - *(.got1) + *(.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; @@ -80,23 +48,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 = .); @@ -122,9 +86,8 @@ SECTIONS __bss_start = .; .bss (NOLOAD) : { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) + *(.bss*) + *(.sbss*) *(COMMON) . = ALIGN(4); } diff --git a/arch/powerpc/cpu/mpc5xxx/u-boot.lds b/arch/powerpc/cpu/mpc5xxx/u-boot.lds index ea4060d..eeeff6c 100644 --- a/arch/powerpc/cpu/mpc5xxx/u-boot.lds +++ b/arch/powerpc/cpu/mpc5xxx/u-boot.lds @@ -1,5 +1,5 @@ /* - * (C) Copyright 2003-2007 + * (C) Copyright 2003-2010 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this @@ -22,46 +22,18 @@ */ OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ + 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/mpc5xxx/start.o (.text) - *(.text) - *(.got1) + arch/powerpc/cpu/mpc5xxx/start.o (.text*) + arch/powerpc/cpu/mpc5xxx/traps.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; @@ -69,23 +41,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 = .); @@ -111,10 +79,9 @@ SECTIONS __bss_start = .; .bss (NOLOAD) : { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) *(COMMON) + *(.bss*) + *(.sbss*) . = ALIGN(4); } _end = . ; diff --git a/board/manroland/hmi1001/config.mk b/board/manroland/hmi1001/config.mk deleted file mode 100644 index 54dc1c4..0000000 --- a/board/manroland/hmi1001/config.mk +++ /dev/null @@ -1,24 +0,0 @@ -# -# (C) Copyright 2004 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# See file CREDITS for list of people who contributed to this -# project. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, -# MA 02111-1307 USA -# - -LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds diff --git a/board/matrix_vision/mvsmr/u-boot.lds b/board/matrix_vision/mvsmr/u-boot.lds index f9b103e..074a482 100644 --- a/board/matrix_vision/mvsmr/u-boot.lds +++ b/board/matrix_vision/mvsmr/u-boot.lds @@ -28,38 +28,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 : { /* WARNING - the following is hand-optimized to fit within */ /* the first two sectors (=8KB) of our S29GL flash chip */ - arch/powerpc/cpu/mpc5xxx/start.o (.text) - arch/powerpc/cpu/mpc5xxx/traps.o (.text) - lib/crc32.o (.text) - arch/powerpc/lib/cache.o (.text) - arch/powerpc/lib/time.o (.text) + arch/powerpc/cpu/mpc5xxx/start.o (.text*) + arch/powerpc/cpu/mpc5xxx/traps.o (.text*) + board/matrix_vision/common/libmatrix_vision.o (.text*) /* This is only needed to force failure if size of above code will ever */ /* increase and grow into reserved space. */ @@ -69,15 +44,10 @@ SECTIONS . = env_offset; /* ld error as soon as above ALIGN misplaces lc */ common/env_embedded.o (.ppcenv) - *(.text) - *(.got1) + *(.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; @@ -85,23 +55,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 = .); @@ -127,10 +93,8 @@ SECTIONS __bss_start = .; .bss (NOLOAD) : { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) - *(COMMON) + *(.bss*) + *(.sbss*) . = ALIGN(4); } _end = . ; diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h index c11fe8a..c2f6b8a 100644 --- a/include/configs/TQM5200.h +++ b/include/configs/TQM5200.h @@ -396,6 +396,7 @@ /* use CFI flash driver */ #define CONFIG_SYS_FLASH_CFI 1 /* Flash is CFI conformant */ #define CONFIG_FLASH_CFI_DRIVER 1 /* Use the common driver */ +#define CONFIG_FLASH_CFI_MTD /* with MTD support */ #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_BOOTCS_START } #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max num of flash banks (= chip selects) */ @@ -417,7 +418,6 @@ /* Dynamic MTD partition support */ #define CONFIG_CMD_MTDPARTS #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ -#define CONFIG_FLASH_CFI_MTD #define MTDIDS_DEFAULT "nor0=TQM5200-0" #ifdef CONFIG_STK52XX diff --git a/include/configs/mcc200.h b/include/configs/mcc200.h index f1cdc40..b56b273 100644 --- a/include/configs/mcc200.h +++ b/include/configs/mcc200.h @@ -121,7 +121,7 @@ #define CONFIG_CMD_USB #undef CONFIG_CMD_NET - +#undef CONFIG_CMD_NFS /* * Autobooting