Compare commits
2 Commits
e3705a5d5c
...
7ad6a3d3b6
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ad6a3d3b6 | |||
| a6497217a3 |
20
link.ld
20
link.ld
|
|
@ -1,18 +1,10 @@
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
|
|
||||||
SECTIONS {
|
SECTIONS {
|
||||||
. = 4M;
|
. = 4M + SIZEOF_HEADERS;
|
||||||
. = . + SIZEOF_HEADERS;
|
.text ALIGN(16) : { *(.text) }
|
||||||
.text : { *(.text) } :text
|
.rodata ALIGN(16) : { *(.rodata) }
|
||||||
.rodata : { *(.rodata) } :text
|
. += 4K; /* put .data in the next page in memory while not actually moving it in the file */
|
||||||
. += 4K;
|
.data ALIGN(16) : { *(.data) }
|
||||||
.data : { *(.data) } :data
|
.bss ALIGN(4K) : { *(COMMON) *(.bss) }
|
||||||
. = ALIGN(4K);
|
|
||||||
.bss : { *(COMMON) *(.bss) } :bss
|
|
||||||
}
|
|
||||||
|
|
||||||
PHDRS {
|
|
||||||
text PT_LOAD FILEHDR PHDRS FLAGS(5);
|
|
||||||
data PT_LOAD FLAGS(6);
|
|
||||||
bss PT_LOAD;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user