1179404SobrienTEMPLATE_NAME=elf32
2179404SobrienSCRIPT_NAME=elf
3179404SobrienOUTPUT_FORMAT="elf32-bigmips"
4179404SobrienBIG_OUTPUT_FORMAT="elf32-bigmips"
5179404SobrienLITTLE_OUTPUT_FORMAT="elf32-littlemips"
6179404SobrienARCH=mips
7179404SobrienMACHINE=
8179404SobrienEMBEDDED=yes
9179404SobrienMAXPAGESIZE=0x40000
10179404Sobrien
11179404Sobrien# The data below is taken from the windiss.dld linker script that comes with
12179404Sobrien# the Diab linker.
13179404SobrienTEXT_START_ADDR=0x100000
14179404SobrienDATA_START_SYMBOLS='__DATA_ROM = .; __DATA_RAM = .;'
15179404SobrienSDATA_START_SYMBOLS='_SDA_BASE_ = .; _gp = . + 0x7ff0;'
16179404SobrienSDATA2_START_SYMBOLS='_SDA2_BASE_ = .;'
17179404SobrienEXECUTABLE_SYMBOLS='__HEAP_START = .; __SP_INIT = 0x800000; __SP_END = __SP_INIT - 0x20000; __HEAP_END = __SP_END; __DATA_END = _edata; __BSS_START = __bss_start; __BSS_END = _end; __HEAP_START = _end;'
18179404Sobrien
19179404Sobrien# The Diab tools use a different init/fini convention.  Initialization code
20179404Sobrien# is place in sections named ".init$NN".  These sections are then concatenated
21179404Sobrien# into the .init section.  It is important that .init$00 be first and .init$99
22179404Sobrien# be last. The other sections should be sorted, but the current linker script
23179404Sobrien# parse does not seem to allow that with the SORT keyword in this context.
24179404SobrienINIT_START='*(.init$00); *(.init$0[1-9]); *(.init$[1-8][0-9]); *(.init$9[0-8])'
25179404SobrienINIT_END='*(.init$99)'
26179404SobrienFINI_START='*(.fini$00); *(.fini$0[1-9]); *(.fini$[1-8][0-9]); *(.fini$9[0-8])'
27179404SobrienFINI_END='*(.fini$99)'
28