Linking: Remove linker scripts from (arm based-) boards and add
a generic linker script to arch/arm/lib/u-boot.lds.S. If a board wants to overwrite a linker script it can do so using CONFIG_BOARD_LINKER_SCRIPT. There is no generic linker script for ppc and blackfin yet, so still use the board specific one.
This commit is contained in:
parent
b36fca0cb8
commit
d59ca7feb3
6
Makefile
6
Makefile
|
@ -494,8 +494,8 @@ common-y := $(patsubst %/, %/built-in.o, $(common-y))
|
||||||
# System.map is generated to document addresses of all kernel symbols
|
# System.map is generated to document addresses of all kernel symbols
|
||||||
|
|
||||||
uboot-common := $(common-y)
|
uboot-common := $(common-y)
|
||||||
uboot-all := $(uboot-common)
|
uboot-all := $(uboot-common)
|
||||||
uboot-lds := $(BOARD)/u-boot.lds
|
uboot-lds := $(lds-y)
|
||||||
|
|
||||||
# Rule to link uboot
|
# Rule to link uboot
|
||||||
# May be overridden by arch/$(ARCH)/Makefile
|
# May be overridden by arch/$(ARCH)/Makefile
|
||||||
|
@ -903,7 +903,7 @@ endif # CONFIG_MODULES
|
||||||
# Directories & files removed with 'make clean'
|
# Directories & files removed with 'make clean'
|
||||||
CLEAN_DIRS += $(MODVERDIR)
|
CLEAN_DIRS += $(MODVERDIR)
|
||||||
CLEAN_FILES += uboot System.map include/uboot_default_env.h \
|
CLEAN_FILES += uboot System.map include/uboot_default_env.h \
|
||||||
.tmp_version .tmp_uboot* uboot.bin uboot.S $(uboot-lds) \
|
.tmp_version .tmp_uboot* uboot.bin uboot.S \
|
||||||
.tmp_kallsyms*
|
.tmp_kallsyms*
|
||||||
|
|
||||||
# Directories & files removed with 'make mrproper'
|
# Directories & files removed with 'make mrproper'
|
||||||
|
|
|
@ -16,6 +16,15 @@ config BOARDINFO
|
||||||
config BOARDINFO
|
config BOARDINFO
|
||||||
default "Phytec Phycore MX27" if MACH_PCM038
|
default "Phytec Phycore MX27" if MACH_PCM038
|
||||||
|
|
||||||
|
config BOARD_LINKER_SCRIPT
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
|
||||||
|
config GENERIC_LINKER_SCRIPT
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on !BOARD_LINKER_SCRIPT
|
||||||
|
|
||||||
config ARM
|
config ARM
|
||||||
bool
|
bool
|
||||||
select HAS_KALLSYMS
|
select HAS_KALLSYMS
|
||||||
|
|
|
@ -77,4 +77,8 @@ endif
|
||||||
common-y += $(BOARD) $(MACH)
|
common-y += $(BOARD) $(MACH)
|
||||||
common-y += arch/arm/lib/ arch/arm/cpu/
|
common-y += arch/arm/lib/ arch/arm/cpu/
|
||||||
|
|
||||||
|
lds-$(CONFIG_GENERIC_LINKER_SCRIPT) := arch/arm/lib/u-boot.lds
|
||||||
|
lds-$(CONFIG_BOARD_LINKER_SCRIPT) := $(BOARD)/u-boot.lds
|
||||||
|
|
||||||
|
CLEAN_FILES += arch/arm/lib/u-boot.lds
|
||||||
MRPROPER_FILES += include/asm-arm/arch include/asm-arm/proc
|
MRPROPER_FILES += include/asm-arm/arch include/asm-arm/proc
|
||||||
|
|
|
@ -10,3 +10,5 @@ obj-y += _umodsi3.o
|
||||||
obj-y += _lshrdi3.o
|
obj-y += _lshrdi3.o
|
||||||
obj-y += arm.o
|
obj-y += arm.o
|
||||||
obj-$(CONFIG_MODULES) += module.o
|
obj-$(CONFIG_MODULES) += module.o
|
||||||
|
extra-$(CONFIG_GENERIC_LINKER_SCRIPT) += u-boot.lds
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,8 @@ CPU :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
common-y += $(BOARD)
|
common-y += $(BOARD)
|
||||||
common-y += arch/blackfin/lib/ $(CPU)
|
common-y += arch/blackfin/lib/ $(CPU)
|
||||||
|
|
||||||
|
lds-y += $(BOARD)/u-boot.lds
|
||||||
|
|
||||||
MRPROPER_FILES += include/asm-arm/arch include/asm-arm/proc
|
MRPROPER_FILES += include/asm-arm/arch include/asm-arm/proc
|
||||||
|
|
|
@ -58,4 +58,6 @@ endif
|
||||||
common-y += $(BOARD) $(CPU)
|
common-y += $(BOARD) $(CPU)
|
||||||
common-y += arch/ppc/lib/
|
common-y += arch/ppc/lib/
|
||||||
|
|
||||||
|
lds-y += $(BOARD)/u-boot.lds
|
||||||
|
|
||||||
MRPROPER_FILES += include/asm-ppc/arch
|
MRPROPER_FILES += include/asm-ppc/arch
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
obj-y += eco920.o
|
obj-y += eco920.o
|
||||||
extra-y += u-boot.lds
|
|
||||||
|
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
/*
|
|
||||||
* (C) Copyright 2002
|
|
||||||
* Gary Jennejohn, DENX Software Engineering, <gj@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
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <asm-generic/u-boot.lds.h>
|
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
|
||||||
/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_start)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
. = 0x00000000;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
*(.text_entry)
|
|
||||||
*(.text)
|
|
||||||
}
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.rodata : { *(.rodata) }
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.data : { *(.data) }
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.got : { *(.got) }
|
|
||||||
|
|
||||||
. = .;
|
|
||||||
__u_boot_cmd_start = .;
|
|
||||||
.u_boot_cmd : { *(.u_boot_cmd) }
|
|
||||||
__u_boot_cmd_end = .;
|
|
||||||
|
|
||||||
__u_boot_initcalls_start = .;
|
|
||||||
.u_boot_initcalls : { INITCALLS }
|
|
||||||
__u_boot_initcalls_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__bss_start = .;
|
|
||||||
.bss : { *(.bss) }
|
|
||||||
_end = .;
|
|
||||||
}
|
|
|
@ -1,2 +1 @@
|
||||||
obj-y += netx.o
|
obj-y += netx.o
|
||||||
extra-y += u-boot.lds
|
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
/*
|
|
||||||
* (C) Copyright 2000-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
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <asm-generic/u-boot.lds.h>
|
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_start)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
. = 0x00000000;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
_stext = .;
|
|
||||||
_text = .;
|
|
||||||
*(.text_entry)
|
|
||||||
*(.text)
|
|
||||||
}
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.rodata : { *(.rodata) }
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.data : { *(.data) }
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.got : { *(.got) }
|
|
||||||
|
|
||||||
. = .;
|
|
||||||
__u_boot_cmd_start = .;
|
|
||||||
.u_boot_cmd : { U_BOOT_CMDS }
|
|
||||||
__u_boot_cmd_end = .;
|
|
||||||
|
|
||||||
__u_boot_initcalls_start = .;
|
|
||||||
.u_boot_initcalls : { INITCALLS }
|
|
||||||
__u_boot_initcalls_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__bss_start = .;
|
|
||||||
.bss : { *(.bss) }
|
|
||||||
_end = .;
|
|
||||||
}
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
obj-y += lowlevel_init.o
|
obj-y += lowlevel_init.o
|
||||||
obj-y += pcm038.o
|
obj-y += pcm038.o
|
||||||
|
|
||||||
extra-y += u-boot.lds
|
|
||||||
|
|
|
@ -1,71 +0,0 @@
|
||||||
/*
|
|
||||||
* (C) Copyright 2000-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
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <asm-generic/u-boot.lds.h>
|
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_start)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
. = TEXT_BASE;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
_stext = .;
|
|
||||||
_text = .;
|
|
||||||
*(.text_entry)
|
|
||||||
*(.text)
|
|
||||||
}
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.rodata : { *(.rodata) }
|
|
||||||
|
|
||||||
_etext = .; /* End of text and rodata section */
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.data : { *(.data) }
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.got : { *(.got) }
|
|
||||||
|
|
||||||
. = .;
|
|
||||||
__u_boot_cmd_start = .;
|
|
||||||
.u_boot_cmd : { U_BOOT_CMDS }
|
|
||||||
__u_boot_cmd_end = .;
|
|
||||||
|
|
||||||
__u_boot_initcalls_start = .;
|
|
||||||
.u_boot_initcalls : { INITCALLS }
|
|
||||||
__u_boot_initcalls_end = .;
|
|
||||||
|
|
||||||
__usymtab_start = .;
|
|
||||||
__usymtab : { U_BOOT_SYMS }
|
|
||||||
__usymtab_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__bss_start = .;
|
|
||||||
.bss : { *(.bss) }
|
|
||||||
_end = .;
|
|
||||||
}
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
obj-y += lowlevel_init.o
|
obj-y += lowlevel_init.o
|
||||||
obj-y += scb9328.o
|
obj-y += scb9328.o
|
||||||
|
|
||||||
extra-y += u-boot.lds
|
|
||||||
|
|
|
@ -1,71 +0,0 @@
|
||||||
/*
|
|
||||||
* (C) Copyright 2000-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
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <asm-generic/u-boot.lds.h>
|
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
|
||||||
OUTPUT_ARCH(arm)
|
|
||||||
ENTRY(_start)
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
. = TEXT_BASE;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
_stext = .;
|
|
||||||
_text = .;
|
|
||||||
*(.text_entry)
|
|
||||||
*(.text)
|
|
||||||
}
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.rodata : { *(.rodata) }
|
|
||||||
|
|
||||||
_etext = .; /* End of text and rodata section */
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.data : { *(.data) }
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.got : { *(.got) }
|
|
||||||
|
|
||||||
. = .;
|
|
||||||
__u_boot_cmd_start = .;
|
|
||||||
.u_boot_cmd : { U_BOOT_CMDS }
|
|
||||||
__u_boot_cmd_end = .;
|
|
||||||
|
|
||||||
__u_boot_initcalls_start = .;
|
|
||||||
.u_boot_initcalls : { INITCALLS }
|
|
||||||
__u_boot_initcalls_end = .;
|
|
||||||
|
|
||||||
__usymtab_start = .;
|
|
||||||
__usymtab : { U_BOOT_SYMS }
|
|
||||||
__usymtab_end = .;
|
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
__bss_start = .;
|
|
||||||
.bss : { *(.bss) }
|
|
||||||
_end = .;
|
|
||||||
}
|
|
Loading…
Reference in New Issue