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