-
Notifications
You must be signed in to change notification settings - Fork 16
/
factory-elf.lds
45 lines (36 loc) · 1.06 KB
/
factory-elf.lds
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
/*
* Linker script for generating shell-factory targets with -N.
*/
ENTRY(_start);
SECTIONS
{
PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x400000));
. = SEGMENT_START("text-segment", 0x400000) + SIZEOF_HEADERS;
/*
* The executable code.
*/
.text : { *(.text .text.* .gnu.linkonce.t.*) }
PROVIDE(__etext = .);
PROVIDE(_etext = .);
PROVIDE(etext = .);
/*
* Constant data.
* Merge into the text section.
*/
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
/*
* Non-constant data.
* Pushed inside the data segment which should be adjacent to text.
*/
.data : { *(.data .data.* .gnu.linkonce.d.*) }
PROVIDE(edata = .);
/*
* Uninitialized data. Bound to the data segment, should not take any space.
*/
__bss_start = .;
.bss : { *(.bss .bss.* .gnu.linkonce.b.*) *(COMMON) }
PROVIDE (ebss = .);
_end = ALIGN(4096);
PROVIDE (eend = _end);
/DISCARD/ : { *(.note.*) }
}