1*de81196fSthorpej/* $NetBSD: ldscript,v 1.2 2020/02/12 18:11:30 thorpej Exp $ */ 21fb3584bSthorpej 31fb3584bSthorpejOUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", 41fb3584bSthorpej "elf32-littlearm") 51fb3584bSthorpejOUTPUT_ARCH(arm) 61fb3584bSthorpejENTRY(SDRAM) 71fb3584bSthorpejMEMORY 81fb3584bSthorpej{ 91fb3584bSthorpej /* RedBoot will copy the gzboot+compressed kernel image from the 101fb3584bSthorpej FIS partition starting @ 0x50060000 to the SDRAM location starting 111fb3584bSthorpej at 0x01d00000. gzboot will uncompress the kernel to 0x00200000. 121fb3584bSthorpej NOTE: Even though there is room for 3M of gzboot+compressed kernel, 131fb3584bSthorpej there is only room for 1M of this in the FIS partition. So we declare 141fb3584bSthorpej that same limit for "sdram" to simplify the linker script. */ 151fb3584bSthorpej flash : o = 0x50060000, l = 1M 161fb3584bSthorpej sdram : o = 0x01d00000, l = 1M /* kernel loads at 0x00200000 */ 171fb3584bSthorpej} 181fb3584bSthorpejSECTIONS 191fb3584bSthorpej{ 201fb3584bSthorpej SDRAM = 0x01d00000; 211fb3584bSthorpej 221fb3584bSthorpej /DISCARD/ : { *(.ARM.attributes*) *(.ARM.exidx) } 231fb3584bSthorpej 241fb3584bSthorpej /* Read-only sections, merged into text segment: */ 251fb3584bSthorpej __text_store = SDRAM; 261fb3584bSthorpej .text : 271fb3584bSthorpej AT (SDRAM) 281fb3584bSthorpej { 291fb3584bSthorpej *(.text) 301fb3584bSthorpej *(.text.*) 311fb3584bSthorpej *(.stub) 321fb3584bSthorpej *(.glue_7t) *(.glue_7) 331fb3584bSthorpej *(.rodata) *(.rodata.*) 341fb3584bSthorpej } > sdram =0 351fb3584bSthorpej PROVIDE (__etext = .); 361fb3584bSthorpej PROVIDE (_etext = .); 371fb3584bSthorpej PROVIDE (etext = .); 381fb3584bSthorpej __data_store = SDRAM + SIZEOF(.text); 391fb3584bSthorpej .data : 401fb3584bSthorpej AT (LOADADDR(.text) + SIZEOF(.text)) 411fb3584bSthorpej { 421fb3584bSthorpej __data_start = . ; 431fb3584bSthorpej *(.data) 441fb3584bSthorpej *(.data.*) 451fb3584bSthorpej } > sdram 461fb3584bSthorpej .sdata : 471fb3584bSthorpej AT (LOADADDR(.data) + SIZEOF(.data)) 481fb3584bSthorpej { 491fb3584bSthorpej *(.sdata) 501fb3584bSthorpej *(.sdata.*) 511fb3584bSthorpej . = ALIGN(32 / 8); 521fb3584bSthorpej } > sdram 531fb3584bSthorpej _edata = .; 541fb3584bSthorpej PROVIDE (edata = .); 551fb3584bSthorpej __bss_start = .; 561fb3584bSthorpej __bss_start__ = .; 571fb3584bSthorpej .sbss : 58*de81196fSthorpej AT (LOADADDR(.sdata) + SIZEOF(.sdata)) 591fb3584bSthorpej { 601fb3584bSthorpej PROVIDE (__sbss_start = .); 611fb3584bSthorpej PROVIDE (___sbss_start = .); 621fb3584bSthorpej *(.dynsbss) 631fb3584bSthorpej *(.sbss) 641fb3584bSthorpej *(.sbss.*) 651fb3584bSthorpej *(.scommon) 661fb3584bSthorpej PROVIDE (__sbss_end = .); 671fb3584bSthorpej PROVIDE (___sbss_end = .); 681fb3584bSthorpej } > sdram 691fb3584bSthorpej .bss : 70*de81196fSthorpej AT (LOADADDR(.sbss) + SIZEOF(.sbss)) 711fb3584bSthorpej { 721fb3584bSthorpej *(.dynbss) 731fb3584bSthorpej *(.bss) 741fb3584bSthorpej *(.bss.*) 751fb3584bSthorpej *(COMMON) 761fb3584bSthorpej /* Align here to ensure that the .bss section occupies space up to 771fb3584bSthorpej _end. Align after .bss to ensure correct alignment even if the 781fb3584bSthorpej .bss section disappears because there are no input sections. */ 791fb3584bSthorpej . = ALIGN(32 / 8); 801fb3584bSthorpej } > sdram 811fb3584bSthorpej . = ALIGN(32 / 8); 821fb3584bSthorpej _end = .; 831fb3584bSthorpej _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; 841fb3584bSthorpej PROVIDE (end = .); 85*de81196fSthorpej .image : 86*de81196fSthorpej AT (LOADADDR(.bss) + SIZEOF(.bss)) 871fb3584bSthorpej { 881fb3584bSthorpej *(.image) 89*de81196fSthorpej } > sdram 901fb3584bSthorpej} 91