Blame view

arch/cris/kernel/vmlinux.lds.S 2.57 KB
51533b615   Mikael Starvik   [PATCH] CRIS upda...
1
2
3
4
5
6
7
8
9
  /* ld script to make the Linux/CRIS kernel
   * Authors: Bjorn Wesen (bjornw@axis.com)
   *
   * It is VERY DANGEROUS to fiddle around with the symbols in this
   * script. It is for example quite vital that all generated sections
   * that are used are actually named here, otherwise the linker will
   * put them at the end, where the init stuff is which is FREED after
   * the kernel has booted.
   */
51533b615   Mikael Starvik   [PATCH] CRIS upda...
10
  #include <asm-generic/vmlinux.lds.h>
baa69b121   Jesper Nilsson   CRIS v32: Fix sta...
11
12
13
14
15
16
17
  #include <asm/page.h>
  
  #ifdef CONFIG_ETRAX_VMEM_SIZE
  #define __CONFIG_ETRAX_VMEM_SIZE CONFIG_ETRAX_VMEM_SIZE
  #else
  #define __CONFIG_ETRAX_VMEM_SIZE 0
  #endif
51533b615   Mikael Starvik   [PATCH] CRIS upda...
18

c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
19

51533b615   Mikael Starvik   [PATCH] CRIS upda...
20
21
22
23
24
  jiffies = jiffies_64;
  SECTIONS
  {
  	. = DRAM_VIRTUAL_BASE;
  	dram_start = .;
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
25
26
27
  #ifdef CONFIG_ETRAX_ARCH_V10
  	ibr_start = .;
  #else
51533b615   Mikael Starvik   [PATCH] CRIS upda...
28
  	ebp_start = .;
baa69b121   Jesper Nilsson   CRIS v32: Fix sta...
29
30
  	/* The boot section is only necessary until the VCS top */
  	/* level testbench includes both flash and DRAM. */
51533b615   Mikael Starvik   [PATCH] CRIS upda...
31
  	.boot : { *(.boot) }
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
32
  #endif
51533b615   Mikael Starvik   [PATCH] CRIS upda...
33

c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
34
  	/* see head.S and pages reserved at the start */
baa69b121   Jesper Nilsson   CRIS v32: Fix sta...
35
  	. = DRAM_VIRTUAL_BASE + 0x4000;
51533b615   Mikael Starvik   [PATCH] CRIS upda...
36

c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
37
38
  	_text = .;			/* Text and read-only data. */
  	text_start = .;			/* Lots of aliases. */
51533b615   Mikael Starvik   [PATCH] CRIS upda...
39
40
41
  	_stext = .;
  	__stext = .;
  	.text : {
baa69b121   Jesper Nilsson   CRIS v32: Fix sta...
42
  		TEXT_TEXT
51533b615   Mikael Starvik   [PATCH] CRIS upda...
43
44
45
46
47
  		SCHED_TEXT
  		LOCK_TEXT
  		*(.fixup)
  		*(.text.__*)
  	}
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
48
  	_etext = . ;			/* End of text section. */
51533b615   Mikael Starvik   [PATCH] CRIS upda...
49
  	__etext = .;
24924ece4   Jesper Nilsson   CRIS: Cleanup lin...
50
  	EXCEPTION_TABLE(4)
51533b615   Mikael Starvik   [PATCH] CRIS upda...
51

473e162ee   Jesper Nilsson   CRIS: Add _sdata ...
52
  	_sdata = .;
51533b615   Mikael Starvik   [PATCH] CRIS upda...
53
54
55
56
57
  	RODATA
  
  	. = ALIGN (4);
  	___data_start = . ;
  	__Sdata = . ;
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
58
  	.data : {			/* Data */
dcb313c23   Jesper Nilsson   CRIS: Add cache a...
59
60
  		CACHELINE_ALIGNED_DATA(32)
  		READ_MOSTLY_DATA(32)
5c617c6ff   Mathieu Desnoyers   cris: use DATA_DA...
61
  		DATA_DATA
51533b615   Mikael Starvik   [PATCH] CRIS upda...
62
  	}
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
63
  	__edata = . ;			/* End of data section. */
51533b615   Mikael Starvik   [PATCH] CRIS upda...
64
  	_edata = . ;
24924ece4   Jesper Nilsson   CRIS: Cleanup lin...
65
  	INIT_TASK_DATA_SECTION(PAGE_SIZE)
51533b615   Mikael Starvik   [PATCH] CRIS upda...
66

c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
67
  	. = ALIGN(PAGE_SIZE);		/* Init code and data. */
baa69b121   Jesper Nilsson   CRIS v32: Fix sta...
68
  	__init_begin = .;
24924ece4   Jesper Nilsson   CRIS: Cleanup lin...
69
  	INIT_TEXT_SECTION(PAGE_SIZE)
01ba2bdc6   Sam Ravnborg   all archs: consol...
70
  	.init.data : { INIT_DATA }
24924ece4   Jesper Nilsson   CRIS: Cleanup lin...
71
  	.init.setup : { INIT_SETUP(16) }
baa69b121   Jesper Nilsson   CRIS v32: Fix sta...
72
  	.initcall.init : {
24924ece4   Jesper Nilsson   CRIS: Cleanup lin...
73
  		INIT_CALLS
51533b615   Mikael Starvik   [PATCH] CRIS upda...
74
75
76
  	}
  
  	.con_initcall.init : {
24924ece4   Jesper Nilsson   CRIS: Cleanup lin...
77
  		CON_INITCALL
51533b615   Mikael Starvik   [PATCH] CRIS upda...
78
79
  	}
  	SECURITY_INIT
7c8a25b54   Jesper Nilsson   CRIS: Discard exi...
80
81
82
83
84
85
86
87
88
  	/* .exit.text is discarded at runtime, not link time,
  	 * to deal with references from __bug_table
  	 */
  	.exit.text : {
  		EXIT_TEXT
  	}
  	.exit.data : {
  		EXIT_DATA
  	}
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
89
90
91
92
93
94
95
96
97
98
99
  #ifdef CONFIG_ETRAX_ARCH_V10
  #ifdef CONFIG_BLK_DEV_INITRD
  	.init.ramfs : {
  		__initramfs_start = .;
  		*(.init.ramfs)
  		__initramfs_end = .;
  	}
  #endif
  #endif
  	__vmlinux_end = .;		/* Last address of the physical file. */
  #ifdef CONFIG_ETRAX_ARCH_V32
0415b00d1   Tejun Heo   percpu: Always al...
100
  	PERCPU_SECTION(32)
51533b615   Mikael Starvik   [PATCH] CRIS upda...
101
102
  
  	.init.ramfs : {
24924ece4   Jesper Nilsson   CRIS: Cleanup lin...
103
  		INIT_RAM_FS
51533b615   Mikael Starvik   [PATCH] CRIS upda...
104
  	}
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
105
  #endif
51533b615   Mikael Starvik   [PATCH] CRIS upda...
106

baa69b121   Jesper Nilsson   CRIS v32: Fix sta...
107
108
109
110
111
  	/*
  	 * We fill to the next page, so we can discard all init
  	 * pages without needing to consider what payload might be
  	 * appended to the kernel image.
  	 */
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
112
  	. = ALIGN(PAGE_SIZE);
baa69b121   Jesper Nilsson   CRIS v32: Fix sta...
113
114
  
  	__init_end = .;
51533b615   Mikael Starvik   [PATCH] CRIS upda...
115

c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
116
  	__data_end = . ;		/* Move to _edata ? */
85d986572   Jesper Nilsson   CRIS: Fix alignme...
117
  	BSS_SECTION(1, 1, 1)
51533b615   Mikael Starvik   [PATCH] CRIS upda...
118
119
120
121
  
  	. =  ALIGN (0x20);
  	_end = .;
  	__end = .;
baa69b121   Jesper Nilsson   CRIS v32: Fix sta...
122
  	dram_end = dram_start + (CONFIG_ETRAX_DRAM_SIZE - __CONFIG_ETRAX_VMEM_SIZE)*1024*1024;
023bf6f1b   Tejun Heo   linker script: un...
123
124
  
  	DISCARDS
51533b615   Mikael Starvik   [PATCH] CRIS upda...
125
  }