diff options
Diffstat (limited to 'kernel/fbos.ld.S')
| -rw-r--r-- | kernel/fbos.ld.S | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/fbos.ld.S b/kernel/fbos.ld.S index f288161..f74d90f 100644 --- a/kernel/fbos.ld.S +++ b/kernel/fbos.ld.S @@ -3,15 +3,15 @@ SECTIONS { // Ensure that the image starts at the very exact address SBI expects it to. . = LINK_ADDR; + _start = .; + . = ALIGN(PAGE_SIZE); // You would usually want to separate the head section into its own thing // instead of clumping it into the main `.text` one. Well, I'm no expert on // linker configuration, so patches are welcome :) .text : { - // The very first thing has to be the `_start` function, which is where - // SBI will jump into. Afterwards comes the rest of `.text.head`. - _start = .; - *(.text.head) + _text = .; + *(.head.text) // Aligning it to a full page is maybe a bit too much considering how // small `.text.head` really is. I just saw this same thing on the Linux @@ -23,7 +23,7 @@ SECTIONS { // that large. That is, we put first the very core of the kernel, and // the rest can go wherever. __kernel_text_start = .; - *(.text.kernel) + *(.kernel.text) __kernel_text_end = .; // And the rest. @@ -49,4 +49,6 @@ SECTIONS { .bss : { *(.bss) } + + _end = .; } |
