-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrpi.ld
executable file
·56 lines (49 loc) · 1.1 KB
/
rpi.ld
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
/******************************************************************************
* kernel.ld
* by Alex Chadwick
* see http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/
*
* A linker script for generation of raspberry pi kernel images.
******************************************************************************/
SECTIONS {
/*
* First and formost we need the .init section, containing the code to
* be run first. We allow room for the ATAGs and stack and conform to
* the bootloader's expectation by putting this code at 0x8000.
*/
.init 0x8000 : {
*(.init)
*(.init.*)
}
/*
* Next we put the rest of the code.
*/
.text : {
*(.text)
*(.text.*)
}
/*
* Next we put the data.
*/
.data : {
*(.data)
*(.data.*)
}
.rodata : {
*(.rodata)
*(.rodata.*)
}
.COMMON : {
*(COMMON)
}
.bss : {
*(.bss)
}
/*
* Finally comes everything else. A fun trick here is to put all other
* sections into this section, which will be discarded by default.
*/
/DISCARD/ : {
*(*)
}
}