|
Revision 1752, 1.0 KB
(checked in by mwhitworth, 3 years ago)
|
|
Link to produce a higher-half kernel.
|
| Line | |
|---|
| 1 | OUTPUT_FORMAT("elf32-i386") |
|---|
| 2 | OUTPUT_ARCH("i386") |
|---|
| 3 | ENTRY(start) |
|---|
| 4 | |
|---|
| 5 | SECTIONS |
|---|
| 6 | { |
|---|
| 7 | . = 0xC0100000; |
|---|
| 8 | |
|---|
| 9 | .text : AT(ADDR(.text) - 0xC0000000) { |
|---|
| 10 | code = .; _code = .; __code = .; |
|---|
| 11 | *(.text) |
|---|
| 12 | *(.rdata) |
|---|
| 13 | . = ALIGN(4096); |
|---|
| 14 | } |
|---|
| 15 | |
|---|
| 16 | endCode = .; |
|---|
| 17 | |
|---|
| 18 | .data : { |
|---|
| 19 | data = .; _data = .; __data = .; |
|---|
| 20 | *(.data) |
|---|
| 21 | . = ALIGN(4096); |
|---|
| 22 | } |
|---|
| 23 | |
|---|
| 24 | endData = .; |
|---|
| 25 | |
|---|
| 26 | symtable_start = .; _symtable_start = .; |
|---|
| 27 | .symtable : { |
|---|
| 28 | *(.symtable) |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | symtable_end = .; _symtable_end = .; |
|---|
| 32 | |
|---|
| 33 | symstrings_start = .; _symstrings_start = .; |
|---|
| 34 | .symstrings : { |
|---|
| 35 | *(.symstrings) |
|---|
| 36 | . = ALIGN(4096); |
|---|
| 37 | } |
|---|
| 38 | |
|---|
| 39 | symstrings_end = .; _symstrings_end = .; |
|---|
| 40 | |
|---|
| 41 | .bss : { |
|---|
| 42 | bss = .; _bss = .; __bss = .; |
|---|
| 43 | *(.bss.page_aligned) |
|---|
| 44 | *(.bss) |
|---|
| 45 | *(COMMON) |
|---|
| 46 | . = ALIGN(4); |
|---|
| 47 | endbss = .; _endbss = .; |
|---|
| 48 | } |
|---|
| 49 | |
|---|
| 50 | . = ALIGN(4096); |
|---|
| 51 | |
|---|
| 52 | initcode_start = .; |
|---|
| 53 | .initcode : { |
|---|
| 54 | *(.initcode) |
|---|
| 55 | . = ALIGN(4096); |
|---|
| 56 | initcode_end = .; |
|---|
| 57 | } |
|---|
| 58 | |
|---|
| 59 | initdata_start = .; |
|---|
| 60 | .initdata : { |
|---|
| 61 | *(.initdata) |
|---|
| 62 | . = ALIGN(4096); |
|---|
| 63 | initdata_end = .; |
|---|
| 64 | } |
|---|
| 65 | |
|---|
| 66 | end = .; _end = .; __end = .; |
|---|
| 67 | } |
|---|