[llvm-dev] A libc in LLVM

Jean-Daniel via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 28 14:31:22 PDT 2019



> Le 28 juin 2019 à 02:30, Saleem Abdulrasool via llvm-dev <llvm-dev at lists.llvm.org> a écrit :
> 
> 
> I feel like I have an even stronger “claim”: independent of any OS/architecture, unless you are developing a freestanding libc for an embedded device, you will need this at some point and you cannot borrow them from another source

They are not required if your kernel and dynamic linker are smart enough to perform the required initialisations / termination.

On macOS, there was a time where each binary include a crt.o file that define the _start symbols which was the software entry point and perform the required initialisation before calling main, but for some times now, dyld calls « main »  directly and no longer «  _start », and the compiler no longer have to include crt.o file in each binaries.



More information about the llvm-dev mailing list