Skip to content

Implement crti.o and crtn.o

Jeremy Soller requested to merge boomshroom:crt into master

Created by: boomshroom

With these 2 files, compilers should be free to use relibc as the standard library. They're currently fairly hacky crates with nothing but global_asm, but I was able to successfully compile a no-op c program using a custom GCC build.

Of course the lack of completeness means most programs won't compile anyways, but it's a step forward.

One thing I noticed was that my GCC was looking for crt1.o instead of crt0.o. That was easily remedied by symlinking it. I didn't not include the symlink because that could be done as a post-install step.

Currently, they're only implemented for x86_64. If you wish, I could try implementing aarch64 versions, but I'm less familiar with that architecture.

Resolves 70

Merge request reports