[PATCH] D28791: [compiler-rt][crt] Simple crtbegin and crtend implementation

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 16 20:59:22 PST 2017

phosek added a comment.

On Linux, compiler supplies `crtbegin.o` and `crtend.o` (in case of GCC, they're part of libgcc), while the C library supplies `crti.o` and `crtn.o`. In case of existing Linux distributions, `crtbegin.o` and `crtend.o` always come from libgcc, but if we wanted to build a Clang based distribution, we need get `crtbegin.o` and `crtend.o` from somewhere else. Given the structure of LLVM project, compiler-rt seems like the right place. On other systems like Darwin where `crtbegin.o` and `crtend.o` are not used at all or NetBSD or OpenBSD where `crtbegin.o` and `crtend.o` are supplied by the C library these aren't needed which is why restricted this component to Linux for now.



More information about the llvm-commits mailing list