[LLVMdev] How to get llvm bitcode executed
Ashok Nalkund
ashoknn at qualcomm.com
Tue May 22 12:45:32 PDT 2012
I've used '-load=<libname>' to load undefined references in the bitcode.
Though I'm still stuck with '__dso_handle' now :(
On 5/22/2012 12:32 PM, Xiaolong Tang wrote:
>
> Guess I have found some clues. Some necessary libraries have to be
> loaded while trying to generate native code or do interpretation. Then
> another question emerges: Is there a way to determine the necessary
> libraries in need? And where to locate these necessary libraries?
>
> Xiaolong
>
>> Hi All,
>>
>> I have a program that uses C++ STL a lot. To have the source code for
>> STL functions, I undefined "_GLIBCXX_EXTERN_TEMPLATE" in
>> c++config.h. In spite of this, after compilation (via clang) and
>> linking (via llvm-ld), the resulting bitcode contains a few declared
>> functions (with no definitions).
>>
>> My question is: In the scenario where some function definitions are
>> missing in a llvm bitcode, can we get a way to run this module via llc
>> or lli? Or is there any way to make these function definitions
>> available in the llvm bitcode?
>>
>> Specifically, these missing functions are as below:
>>
>> declare i8* @llvm.eh.exception() nounwind readonly
>> declare i32 @__gxx_personality_v0(...)
>> declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
>> declare void @llvm.eh.resume(i8*, i32)
>> declare void @_ZSt9terminatev()
>> declare i32 @memcmp(i8*, i8*, i64)
>> declare i64 @llvm.expect.i64(i64, i64) nounwind readnone
>> declare void @_ZSt19__throw_logic_errorPKc(i8*) noreturn
>> declare i8* @__cxa_begin_catch(i8*)
>> declare void @__cxa_rethrow()
>> declare void @__cxa_end_catch()
>> declare void @__cxa_call_unexpected(i8*)
>> declare void @_ZdlPv(i8*) nounwind
>> declare void @_ZSt20__throw_length_errorPKc(i8*) noreturn
>> declare void @_ZSt17__throw_bad_allocv() noreturn
>> declare noalias i8* @_Znwm(i64)
>> declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
>> declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
>> declare i32 @llvm.atomic.load.add.i32.p0i32(i32* nocapture, i32) nounwind
>> declare void @llvm.memory.barrier(i1, i1, i1, i1, i1) nounwind
>> declare void @_ZSt20__throw_out_of_rangePKc(i8*) noreturn
>> declare i64 @strlen(i8*)
>> declare void @abort()
>>
>>
>> Xiaolong
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list