From 8c977b5cea3f2e76205bd0ed666db06a84e05f6a Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 26 Jul 2022 00:14:30 +0200 Subject: user_bootstrap: link against user/lib I have no idea why I didn't do this right from the start, it makes this whole thing much easier. --- src/user_bootstrap/linker.ld | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/user_bootstrap/linker.ld') diff --git a/src/user_bootstrap/linker.ld b/src/user_bootstrap/linker.ld index f2c9d24..917388c 100644 --- a/src/user_bootstrap/linker.ld +++ b/src/user_bootstrap/linker.ld @@ -3,6 +3,11 @@ 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) { @@ -18,6 +23,7 @@ SECTIONS *(.data) } + . = ALIGN(32); /* seems to be necessary? */ _initrd = .; /* is just appended onto the end of the binary */ . += 2M; -- cgit v1.2.3