I went forward and compiled an existing c code via llvm-gcc -emit-llvm -c
to llvm bitcode. The c program consisted of four modules which I built to one big bitcode each via llvm-ld
. Then I tried to merge these 4 bitcode files to one via llvm-ld GE.bc GA.bc SD.bc SH.bc -o prog
which works without complaint.
Trying to execute the bitcode though it complains:
LLVM ERROR: Program used external function myFunction which could not be resolved!
The thing is myFunction should be defined in SD.bc and used also in GA.bc. But it s not to find in SD.bc - does llvm-ld skip all definitions that are not used!?
我的非洲顾问办是林丹,我使用1.5万版本2.6。