/* * dm35x.lds - DM35x linker script file * * Copyright (C) 2008 Hugo Villeneuve * * Based on TI DaVinci Flash and Boot Utilities, original copyright follows: * Copyright 2008 Texas Instruments, Inc. * * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ ENTRY(boot) SECTIONS { /* Common definitions */ __EMIF_START = 0x02000000; __EMIF_SIZE = 0x02000000; __IRAM_START = 0x00000000; __DDR_START = 0x80000000; STACKStart = __DRAM_START + __DRAM_SIZE; __topstack = (__DRAM_START + __DRAM_SIZE) - 0x4; . = __EMIF_START; __CS2start = .; __NORFlash = .; __NANDFlash = .; .selfcopy : AT (0x0) { *(.selfcopy) . = ALIGN(256); } __selfcopysrc = .; __IVT = __DRAM_START; __selfcopydest = __DRAM_START + 0x00000020; . = 0x20; .fakeentry : AT ( LOADADDR(.selfcopy) + SIZEOF(.selfcopy)) { *(.fakeentry) . = ALIGN(4); } .text : AT ( LOADADDR(.fakeentry) + SIZEOF(.fakeentry) ) { *(.text) . = ALIGN(4); } .boot : AT ( LOADADDR(.text) + SIZEOF(.text)) { *(.boot) . = ALIGN(4); } /* Move into DRAM for placing const and data sections */ . += (__DRAM_START - __IRAM_START); .rodata : AT ( LOADADDR(.boot) + SIZEOF(.boot) ) { *(.rodata*) *(.rodata) . = ALIGN(4); } .data : AT ( LOADADDR(.rodata) + SIZEOF(.rodata) ) { *(.data) . = ALIGN(4); } __selfcopydestend = __selfcopydest + SIZEOF(.fakeentry) + SIZEOF(.text) + SIZEOF(.boot) + SIZEOF(.data) + SIZEOF(.rodata); .bss : { *(.bss) *(COMMON) . = ALIGN(4); } /* DDR2 */ . = __DDR_START; .ddrram (NOLOAD) : { *(.ddrram) } __DDR_FREE = .; /*__DDR_END = __DDR_START + __DDR_SIZE - 1;*/ }