Török Edwin
2010-Sep-09 19:29 UTC
[LLVMdev] Knowing all possible libcalls in advance and __bzero
Hi, Looks like LLVM inserts a call __bzero even if my code never does so: libclamav JIT: Attempt to call external function __bzero libclamav JIT: *** FATAL error encountered during bytecode generation It turns out this is because Codegen has this: const char *X86Subtarget::getBZeroEntry() const { // Darwin 10 has a __bzero entry point for this purpose. if (getDarwinVers() >= 10) return "__bzero"; That belongs to simplifylibcalls. Is there any reason it has to be in Codegen? Also are there any other special cases like __bzero that is not part of RTLIB::? P.S.: More about the issue with libclamav: libclamav has a strict policy of 0 external calls. So all external calls have to go through a map (and call some local wrappers). This requires knowing in advance all possible libcalls, on all platforms. I knew about RTLIB::, and added the relevant functions to libclamav's wrapper map. But it looks like there are some more functions that pop up randomly. No big problem this time libclamav just falled back to not using LLVM on darwin10. Best regards, --Edwin