11.4Smatt/* $NetBSD: ldscript,v 1.4 2012/08/06 02:14:16 matt Exp $ */ 21.1Sjoff 31.1SjoffOUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", 41.1Sjoff "elf32-littlearm") 51.1SjoffOUTPUT_ARCH(arm) 61.1SjoffENTRY(FLASH) 71.1SjoffMEMORY 81.1Sjoff{ 91.1Sjoff /* We will locate the .text section in flash, and will run directly 101.1Sjoff from there just long enough to relocate our .text and .data into 111.1Sjoff a small chunk of SDRAM starting at (SDRAM + 1M). */ 121.1Sjoff flash : o = 0x60660000, l = 1408K 131.1Sjoff sdram : o = 0x00100000, l = 1M /* kernel loads at 0x00200000 */ 141.1Sjoff} 151.1SjoffSECTIONS 161.1Sjoff{ 171.1Sjoff FLASH = 0x60660000; 181.1Sjoff 191.4Smatt /DISCARD/ : { *(.ARM.attributes*) *(.ARM.exidx) } 201.4Smatt 211.1Sjoff /* Read-only sections, merged into text segment: */ 221.1Sjoff __text_store = FLASH; 231.1Sjoff .text : 241.1Sjoff AT (FLASH) 251.1Sjoff { 261.1Sjoff *(.text) 271.1Sjoff *(.text.*) 281.1Sjoff *(.stub) 291.1Sjoff *(.glue_7t) *(.glue_7) 301.1Sjoff *(.rodata) *(.rodata.*) 311.1Sjoff } > sdram =0 321.1Sjoff PROVIDE (__etext = .); 331.1Sjoff PROVIDE (_etext = .); 341.1Sjoff PROVIDE (etext = .); 351.1Sjoff __data_store = FLASH + SIZEOF(.text); 361.1Sjoff .data : 371.1Sjoff AT (LOADADDR(.text) + SIZEOF(.text)) 381.1Sjoff { 391.1Sjoff __data_start = . ; 401.1Sjoff *(.data) 411.1Sjoff *(.data.*) 421.1Sjoff } > sdram 431.1Sjoff .sdata : 441.1Sjoff AT (LOADADDR(.data) + SIZEOF(.data)) 451.1Sjoff { 461.1Sjoff *(.sdata) 471.1Sjoff *(.sdata.*) 481.1Sjoff . = ALIGN(32 / 8); 491.1Sjoff } > sdram 501.1Sjoff _edata = .; 511.1Sjoff PROVIDE (edata = .); 521.1Sjoff __bss_start = .; 531.1Sjoff __bss_start__ = .; 541.1Sjoff .sbss : 551.3Sskrll AT (ADDR(.sbss)) 561.1Sjoff { 571.1Sjoff PROVIDE (__sbss_start = .); 581.1Sjoff PROVIDE (___sbss_start = .); 591.1Sjoff *(.dynsbss) 601.1Sjoff *(.sbss) 611.1Sjoff *(.sbss.*) 621.1Sjoff *(.scommon) 631.1Sjoff PROVIDE (__sbss_end = .); 641.1Sjoff PROVIDE (___sbss_end = .); 651.1Sjoff } > sdram 661.1Sjoff .bss : 671.3Sskrll AT (ADDR(.bss)) 681.1Sjoff { 691.1Sjoff *(.dynbss) 701.1Sjoff *(.bss) 711.1Sjoff *(.bss.*) 721.1Sjoff *(COMMON) 731.1Sjoff /* Align here to ensure that the .bss section occupies space up to 741.1Sjoff _end. Align after .bss to ensure correct alignment even if the 751.1Sjoff .bss section disappears because there are no input sections. */ 761.1Sjoff . = ALIGN(32 / 8); 771.1Sjoff } > sdram 781.1Sjoff . = ALIGN(32 / 8); 791.1Sjoff _end = .; 801.1Sjoff _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; 811.1Sjoff PROVIDE (end = .); 821.1Sjoff .image (FLASH + SIZEOF(.text) + SIZEOF(.data) + SIZEOF(.sdata)) : 831.1Sjoff AT (LOADADDR(.sdata) + SIZEOF(.sdata)) 841.1Sjoff { 851.1Sjoff *(.image) 861.1Sjoff } 871.1Sjoff} 88