summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i960/rxgen960/startup/linkcmds
blob: 80bdba1f19735eb7222bf4c8dfb93a562fe1f43e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
 *  This is not the real linkcmds for this target.  See
 *  linkcmds.real and make those work for you.  That linkcmds
 *  goes to great lengths to handplace certain object files
 *  in very specific locations.  
 *
 *  $Id$
 */

/*
 * Declare some sizes.
 */
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;

SECTIONS
{ 
    . = 0x0;
    .text : 
    { 
	 CREATE_OBJECT_SYMBOLS
	*(.text) 
        _rodata_start = . ;
        *(.rodata*)
        *(.gnu.linkonce.r*)
        _erodata = ALIGN( 0x10 ) ;
	 _etext = .;
	
	/*
	 * Special FreeBSD sysctl sections.
	 */
	. = ALIGN (16);
	__start_set_sysctl_set = .;
	*(set_sysctl_*);
	__stop_set_sysctl_set = ABSOLUTE(.);
	*(set_domain_*);
	*(set_pseudo_*);

	___CTOR_LIST__ = .;
	LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
	*(.ctors)
	LONG(0)
	___CTOR_END__ = .;
	___DTOR_LIST__ = .;
	LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
	*(.dtors)
	LONG(0)
	___DTOR_END__ = .;
    }  
    .data SIZEOF(.text) + ADDR(.text):
    { 
 	*(.data) 
	CONSTRUCTORS
	 _edata = .;
    }  
    .bss SIZEOF(.data) + ADDR(.data):
    { 
	 _bss_start = .;
	*(.bss)	 
	*(COMMON) 
	. = ALIGN (64);
	_stack_init = .;
	. += _StackSize;
	_clear_end = .;
	_WorkspaceBase = .;
	. += 512K;	/* reserve some memory for workspace */
	_HeapBase = .;
	. += _HeapSize;	/* reserve some memory for heap */
	 _end = .;
	 __end = .;
    } 
}