diff options
author | Frans Kaashoek <[email protected]> | 2020-08-10 13:05:17 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-10 13:05:17 -0400 |
commit | c31d35d8031c88b7e1ea8657cc9806dfdd4c3ef9 (patch) | |
tree | a6c903e1c61c08f4cb87700c320752a737081dcb /kernel/kernel.ld | |
parent | 90eb90b5e203299427c3fde8c996a48835fc93cf (diff) | |
parent | d8fe1773b26758c7c7b8f36724cd822555b33612 (diff) | |
download | xv6-labs-c31d35d8031c88b7e1ea8657cc9806dfdd4c3ef9.tar.gz xv6-labs-c31d35d8031c88b7e1ea8657cc9806dfdd4c3ef9.tar.bz2 xv6-labs-c31d35d8031c88b7e1ea8657cc9806dfdd4c3ef9.zip |
Merge branch 'riscv' into riscv
Diffstat (limited to 'kernel/kernel.ld')
-rw-r--r-- | kernel/kernel.ld | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/kernel/kernel.ld b/kernel/kernel.ld index acc3c8e..ee04f22 100644 --- a/kernel/kernel.ld +++ b/kernel/kernel.ld @@ -8,25 +8,37 @@ SECTIONS * where qemu's -kernel jumps. */ . = 0x80000000; - .text : - { - *(.text) + + .text : { + *(.text .text.*) . = ALIGN(0x1000); + _trampoline = .; *(trampsec) + . = ALIGN(0x1000); + ASSERT(. - _trampoline == 0x1000, "error: trampoline larger than one page"); + PROVIDE(etext = .); } - . = ALIGN(0x1000); - PROVIDE(etext = .); + .rodata : { + . = ALIGN(16); + *(.srodata .srodata.*) /* do not need to distinguish this from .rodata */ + . = ALIGN(16); + *(.rodata .rodata.*) + } - /* - * make sure end is after data and bss. - */ .data : { - *(.data) + . = ALIGN(16); + *(.sdata .sdata.*) /* do not need to distinguish this from .data */ + . = ALIGN(16); + *(.data .data.*) } + .bss : { - *(.bss) - *(.sbss*) - PROVIDE(end = .); + . = ALIGN(16); + *(.sbss .sbss.*) /* do not need to distinguish this from .bss */ + . = ALIGN(16); + *(.bss .bss.*) } + + PROVIDE(end = .); } |