1*be78e799SBastian Koppelmann/* Default linker script, for normal executables */ 2*be78e799SBastian KoppelmannOUTPUT_FORMAT("elf32-tricore") 3*be78e799SBastian KoppelmannOUTPUT_ARCH(tricore) 4*be78e799SBastian KoppelmannENTRY(_start) 5*be78e799SBastian Koppelmann 6*be78e799SBastian Koppelmann/* the internal ram description */ 7*be78e799SBastian KoppelmannMEMORY 8*be78e799SBastian Koppelmann{ 9*be78e799SBastian Koppelmann text_ram (rx!p): org = 0x80000000, len = 15K 10*be78e799SBastian Koppelmann data_ram (w!xp): org = 0xd0000000, len = 130K 11*be78e799SBastian Koppelmann} 12*be78e799SBastian Koppelmann/* 13*be78e799SBastian Koppelmann * Define the sizes of the user and system stacks. 14*be78e799SBastian Koppelmann */ 15*be78e799SBastian Koppelmann__USTACK_SIZE = DEFINED (__USTACK_SIZE) ? __USTACK_SIZE : 1K ; 16*be78e799SBastian Koppelmann/* 17*be78e799SBastian Koppelmann * Define the start address and the size of the context save area. 18*be78e799SBastian Koppelmann */ 19*be78e799SBastian Koppelmann__CSA_BEGIN = 0xd0000000 ; 20*be78e799SBastian Koppelmann__CSA_SIZE = 8k ; 21*be78e799SBastian Koppelmann__CSA_END = __CSA_BEGIN + __CSA_SIZE ; 22*be78e799SBastian Koppelmann 23*be78e799SBastian KoppelmannSECTIONS 24*be78e799SBastian Koppelmann{ 25*be78e799SBastian Koppelmann .text : 26*be78e799SBastian Koppelmann { 27*be78e799SBastian Koppelmann *(.text) 28*be78e799SBastian Koppelmann . = ALIGN(8); 29*be78e799SBastian Koppelmann } > text_ram 30*be78e799SBastian Koppelmann 31*be78e799SBastian Koppelmann .rodata : 32*be78e799SBastian Koppelmann { 33*be78e799SBastian Koppelmann *(.rodata) 34*be78e799SBastian Koppelmann *(.rodata1) 35*be78e799SBastian Koppelmann } > data_ram 36*be78e799SBastian Koppelmann 37*be78e799SBastian Koppelmann .data : 38*be78e799SBastian Koppelmann { 39*be78e799SBastian Koppelmann . = ALIGN(8) ; 40*be78e799SBastian Koppelmann *(.data) 41*be78e799SBastian Koppelmann *(.data.*) 42*be78e799SBastian Koppelmann . = ALIGN(8) ; 43*be78e799SBastian Koppelmann __USTACK = . + __USTACK_SIZE -768; 44*be78e799SBastian Koppelmann 45*be78e799SBastian Koppelmann } > data_ram 46*be78e799SBastian Koppelmann /* 47*be78e799SBastian Koppelmann * Allocate space for BSS sections. 48*be78e799SBastian Koppelmann */ 49*be78e799SBastian Koppelmann .bss : 50*be78e799SBastian Koppelmann { 51*be78e799SBastian Koppelmann BSS_BASE = . ; 52*be78e799SBastian Koppelmann *(.bss) 53*be78e799SBastian Koppelmann *(COMMON) 54*be78e799SBastian Koppelmann . = ALIGN(8) ; 55*be78e799SBastian Koppelmann } > data_ram 56*be78e799SBastian Koppelmann /* Make sure CSA, stack and heap addresses are properly aligned. */ 57*be78e799SBastian Koppelmann _. = ASSERT ((__CSA_BEGIN & 0x3f) == 0 , "illegal CSA start address") ; 58*be78e799SBastian Koppelmann _. = ASSERT ((__CSA_SIZE & 0x3f) == 0 , "illegal CSA size") ; 59*be78e799SBastian Koppelmann 60*be78e799SBastian Koppelmann} 61