root/Whitix/branches/keobject/link.ld

Revision 1615, 0.9 KB (checked in by mwhitworth, 3 years ago)

Add initcode and initdata sections.

Line 
1OUTPUT_FORMAT("elf32-i386")
2OUTPUT_ARCH("i386")
3ENTRY(start)
4
5SECTIONS
6{
7  .text 0x100000 : {
8    code = .; _code = .; __code = .;
9    *(.text)
10    *(.rdata)
11     . = ALIGN(4096);
12  }
13
14  endCode = .;
15
16  .data  : {
17    data = .; _data = .; __data = .;
18    *(.data)
19     . = ALIGN(4096);
20  }
21
22  endData = .;
23
24  symtable_start = .; _symtable_start = .;
25  .symtable : {
26        *(.symtable)
27  }
28
29  symtable_end = .; _symtable_end = .;
30
31  symstrings_start = .; _symstrings_start = .;
32  .symstrings : {
33        *(.symstrings)
34        . = ALIGN(4096);
35  }
36
37  symstrings_end = .; _symstrings_end = .;
38
39  .bss  : {
40   bss = .; _bss = .; __bss = .;
41        *(.bss.page_aligned)
42    *(.bss)
43        *(COMMON)
44        . = ALIGN(4);
45        endbss = .; _endbss = .;
46  }
47
48  . = ALIGN(4096);
49
50  initcode_start = .;
51  .initcode : {
52    *(.initcode)
53    . = ALIGN(4096);
54    initcode_end = .;
55  }
56
57  initdata_start = .;
58  .initdata : {
59        *(.initdata)
60        . = ALIGN(4096);
61        initdata_end = .;
62  }
63
64  end = .; _end = .; __end = .;
65}
Note: See TracBrowser for help on using the browser.