diff options
author | dzwdz | 2022-07-26 00:38:45 +0200 |
---|---|---|
committer | dzwdz | 2022-07-26 00:38:45 +0200 |
commit | 90af8825a41981ce2ee52e0a9ce84f624eb022e6 (patch) | |
tree | aed82a8ca12fdaaa960adac98afecd62a8d81ec8 /src/user/bootstrap/linker.ld | |
parent | 9352abbed0f1266f511f170517a4094c6c4ff917 (diff) |
move user_bootstrap to user/bootstrap for consistency's sake
Diffstat (limited to 'src/user/bootstrap/linker.ld')
-rw-r--r-- | src/user/bootstrap/linker.ld | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/user/bootstrap/linker.ld b/src/user/bootstrap/linker.ld new file mode 100644 index 0000000..917388c --- /dev/null +++ b/src/user/bootstrap/linker.ld @@ -0,0 +1,37 @@ +ENTRY(main) +OUTPUT_FORMAT("binary") + +SECTIONS +{ + /* Not an ELF, but we need this to link with elfreloc.c. + * Not that we need to link with it, it's just easier that way */ + _DYNAMIC = 0; + _image_base = 0; + + . = 2M; + .text BLOCK(4K) : ALIGN(4K) + { + *(.text.startup) + *(.text) + } + .rodata BLOCK(4K) : ALIGN(4K) + { + *(.rodata) + } + .data BLOCK(4K) : ALIGN(4K) + { + *(.data) + } + + . = ALIGN(32); /* seems to be necessary? */ + _initrd = .; /* is just appended onto the end of the binary */ + . += 2M; + + _bss_start = .; + .bss BLOCK(4K) : ALIGN(4K) + { + *(COMMON) + *(.bss) + } + _bss_end = .; +} |