Hi, I want to do static code analysis of c/c++ code in an enclave. I am trying to see if I can use Libclang in my enclave.
I have installed libclang-dev in my Dockerfile and added
-I/usr/lib/llvm-6.0/include to Enclave_Include_Paths
-L/usr/lib/llvm-6.0/lib/ -lclang to Enclave_Link_Flags between --start-group and --end-group flags
I am getting the errors
LINK => enclave.so -Wl,-z,relro,-z,now,-z,noexecstack -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L/opt/intel/sgxsdk/lib64 -Wl,--whole-archive -lsgx_trts -Wl,--no-whole-archive -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -lsgx_tcrypto -lsgx_tservice -lsgx_tprotected_fs -L/usr/lib/llvm-6.0/lib/ -lclang -Wl,--end-group -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-pie,-eenclave_entry -Wl,--export-dynamic -Wl,--defsym,__ImageBase=0 -Wl,--gc-sections -Wl,--version-script=Enclave/Enclave.lds
[check_symbol_table elfparser.cpp:253] symbol 'clang_createIndex' is undefined
Symbol table incorrect
The input enclave file is not correct.
Error happened while signing the enclave.
I was expecting errors since it is not ported for sgx but the function it is talking about is just the libclang api function. Any advice is appreciated.
Hi, I want to do static code analysis of c/c++ code in an enclave. I am trying to see if I can use Libclang in my enclave.
I have installed
libclang-dev
in my Dockerfile and added-I/usr/lib/llvm-6.0/include
toEnclave_Include_Paths
-L/usr/lib/llvm-6.0/lib/ -lclang
toEnclave_Link_Flags
between--start-group
and--end-group
flagsI am getting the errors
I was expecting errors since it is not ported for sgx but the function it is talking about is just the libclang api function. Any advice is appreciated.