diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-11-03 06:11:31 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-01-17 09:17:26 -0500 |
commit | b1e2c5519a06f9a5841a7a434bf4da4d393f8df5 (patch) | |
tree | 81f47c465438a676c6c88a361a9e6aaf7f8f2969 /lib_blackfin/u-boot.lds.S | |
parent | 446707c90f52e5fcafecd468920cfad685ee9fc7 (diff) |
Blackfin: move section length calculation to linker script
The length of the sections is fixed at link time, so let the linker do the
calculation rather than doing it ourselves at runtime.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'lib_blackfin/u-boot.lds.S')
-rw-r--r-- | lib_blackfin/u-boot.lds.S | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/lib_blackfin/u-boot.lds.S b/lib_blackfin/u-boot.lds.S index 3604b7888d..8a9e8b1c2b 100644 --- a/lib_blackfin/u-boot.lds.S +++ b/lib_blackfin/u-boot.lds.S @@ -65,16 +65,22 @@ MEMORY ENTRY(_start) SECTIONS { - .text : + .text.pre : { cpu/blackfin/start.o (.text .text.*) LDS_BOARD_TEXT + } >ram_code - __initcode_start = .; + .text.init : + { cpu/blackfin/initcode.o (.text .text.*) - __initcode_end = .; + } >ram_code + __initcode_lma = LOADADDR(.text.init); + __initcode_len = SIZEOF(.text.init); + .text : + { *(.text .text.*) } >ram @@ -113,7 +119,9 @@ SECTIONS . = ALIGN(4); __etext_l1 = .; } >l1_code AT>ram - __stext_l1_lma = LOADADDR(.text_l1); + __text_l1_lma = LOADADDR(.text_l1); + __text_l1_len = SIZEOF(.text_l1); + ASSERT (__text_l1_len <= L1_INST_SRAM_SIZE, "L1 text overflow!") .data_l1 : { @@ -124,16 +132,18 @@ SECTIONS . = ALIGN(4); __edata_l1 = .; } >l1_data AT>ram - __sdata_l1_lma = LOADADDR(.data_l1); + __data_l1_lma = LOADADDR(.data_l1); + __data_l1_len = SIZEOF(.data_l1); + ASSERT (__data_l1_len <= L1_DATA_B_SRAM_SIZE, "L1 data B overflow!") .bss : { . = ALIGN(4); - __bss_start = .; *(.sbss) *(.scommon) *(.dynbss) *(.bss .bss.*) *(COMMON) - __bss_end = .; } >ram + __bss_vma = ADDR(.bss); + __bss_len = SIZEOF(.bss); } |