From patchwork Mon Nov 22 22:40:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 72607 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 23B5BB70FC for ; Tue, 23 Nov 2010 09:40:33 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F2C7728180; Mon, 22 Nov 2010 23:40:29 +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 UzeTfqZj2d3g; Mon, 22 Nov 2010 23:40:29 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E4EEF28122; Mon, 22 Nov 2010 23:40:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4B9BF28122 for ; Mon, 22 Nov 2010 23:40:24 +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 1j3U8Np5TRoj for ; Mon, 22 Nov 2010 23:40:22 +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.9]) by theia.denx.de (Postfix) with ESMTP id 0B69828113 for ; Mon, 22 Nov 2010 23:40:20 +0100 (CET) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 91AF31C08E10; Mon, 22 Nov 2010 23:40:19 +0100 (CET) X-Auth-Info: o0Ws9+7+ckWqYvhLfKz0lDMrKqvVu5pY2+87D6VNrOc= 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 76C731C001D9; Mon, 22 Nov 2010 23:40:19 +0100 (CET) Received: from gemini.denx.de (gemini.denx.de [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id 17C873335217; Mon, 22 Nov 2010 23:40:19 +0100 (CET) Received: by gemini.denx.de (Postfix, from userid 500) id E2686135EA0; Mon, 22 Nov 2010 23:40:18 +0100 (CET) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Mon, 22 Nov 2010 23:40:14 +0100 Message-Id: <1290465614-7526-1-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> Cc: Timur Tabi Subject: [U-Boot] [PATCH] 512x: 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: Anatolij Gustschin Cc: Timur Tabi --- Hello Anatolij & Timur, I'm not happy about the CONFIG_FSL_DIU_FB hacking I had to do in Makefile and arch/powerpc/cpu/mpc512x/Makefile to make the fsl_diu_fb driver usable for boards where VENDOR is not set or != 'freescale'. Can we not move the fsl_diu_fb driver to a place with better global visibility, like drivers/video/ ? Makefile | 5 +++- arch/powerpc/cpu/mpc512x/Makefile | 1 - arch/powerpc/cpu/mpc512x/u-boot.lds | 51 ++++++---------------------------- board/freescale/common/Makefile | 4 +- 4 files changed, 15 insertions(+), 46 deletions(-) diff --git a/Makefile b/Makefile index b4aae89..28028dc 100644 --- a/Makefile +++ b/Makefile @@ -185,6 +185,9 @@ LIBS += lib/lzma/liblzma.o LIBS += lib/lzo/liblzo.o LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ "board/$(VENDOR)/common/lib$(VENDOR).o"; fi) +ifdef CONFIG_FSL_DIU_FB +LIBS += board/freescale/common/libfreescale.o +endif LIBS += $(CPUDIR)/lib$(CPU).o ifdef SOC LIBS += $(CPUDIR)/$(SOC)/lib$(SOC).o @@ -260,7 +263,7 @@ ifeq ($(SOC),s5pc2xx) LIBS += $(CPUDIR)/s5p-common/libs5p-common.o endif -LIBS := $(addprefix $(obj),$(LIBS)) +LIBS := $(addprefix $(obj),$(sort $(LIBS))) .PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE) LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o diff --git a/arch/powerpc/cpu/mpc512x/Makefile b/arch/powerpc/cpu/mpc512x/Makefile index cb1263a..4a4bc0d 100644 --- a/arch/powerpc/cpu/mpc512x/Makefile +++ b/arch/powerpc/cpu/mpc512x/Makefile @@ -37,7 +37,6 @@ COBJS-y += iopin.o COBJS-y += serial.o COBJS-y += speed.o COBJS-$(CONFIG_FSL_DIU_FB) += diu.o -COBJS-$(CONFIG_FSL_DIU_FB) += ../../../../board/freescale/common/fsl_diu_fb.o COBJS-$(CONFIG_CMD_IDE) += ide.o COBJS-$(CONFIG_IIM) += iim.o COBJS-$(CONFIG_PCI) += pci.o diff --git a/arch/powerpc/cpu/mpc512x/u-boot.lds b/arch/powerpc/cpu/mpc512x/u-boot.lds index c716799..6b292a1 100644 --- a/arch/powerpc/cpu/mpc512x/u-boot.lds +++ b/arch/powerpc/cpu/mpc512x/u-boot.lds @@ -23,42 +23,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/mpc512x/start.o (.text) - *(.text) - *(.got1) + arch/powerpc/cpu/mpc512x/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; @@ -66,10 +37,11 @@ SECTIONS PROVIDE (erotext = .); .reloc : { - *(.got) + KEEP(*(.got)) _GOT2_TABLE_ = .; - *(.got2) + KEEP(*(.got2)) _FIXUP_TABLE_ = .; + KEEP(*(.fixup)) *(.fixup) } __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2; @@ -77,12 +49,8 @@ SECTIONS .data : { - *(.data) - *(.data1) - *(.sdata) - *(.sdata2) - *(.dynamic) - CONSTRUCTORS + *(.data*) + *(.sdata*) } _edata = .; PROVIDE (edata = .); @@ -108,9 +76,8 @@ SECTIONS __bss_start = .; .bss (NOLOAD) : { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) + *(.bss*) + *(.sbss*) *(COMMON) . = ALIGN(4); } diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile index 703a347..905dd7a 100644 --- a/board/freescale/common/Makefile +++ b/board/freescale/common/Makefile @@ -24,10 +24,10 @@ include $(TOPDIR)/config.mk ifneq ($(OBJTREE),$(SRCTREE)) -$(shell mkdir -p $(obj)board/$(VENDOR)/common) +$(shell mkdir -p $(obj)board/freescale/common) endif -LIB = $(obj)lib$(VENDOR).o +LIB = $(obj)libfreescale.o COBJS-$(CONFIG_FSL_CADMUS) += cadmus.o COBJS-$(CONFIG_FSL_VIA) += cds_via.o