I'm writing a little OS to learn how it all works, and wanted to develop on my native Mac OS instead of an Ubuntu VM, yet Apple have symlinked 'ld' to the llvm linker, which doesn't take linker scripts like gcc's ld does.
I'm writing a little OS to learn how it all works, and wanted to develop on my native Mac OS instead of an Ubuntu VM, yet Apple have symlinked 'ld' to the llvm linker, which doesn't take linker scripts like gcc's ld does.
edit: just found the Github: https://github.com/MattRyder/Matt-OS
Don't expect very much, mind, it's a side-side-project but I have been starting it up more recently. :)
You can produce standalone binaries with it (adding sections and modifying their attributes with command-line arguments), but it doesn't support linker scripts.
Editted to add: if you're building your OS with someone else's prepackaged toolchain, you're in for a bunch of hurt. The toolchain is, broadly, part of the OS. Writing a handful of custom linker scripts isn't the only spot where you'll need to hack at this stuff.