search for: dbuild_shared

Displaying 3 results from an estimated 3 matches for "dbuild_shared".

Did you mean: build_shared
2015 Jan 12
2
[LLVMdev] MCJIT handling of linkonce_odr
...printf("Wrong address, %ld in shared lib, %ld in mcjit!\n", (long)&StaticStuff<int>::s_data, (long)mcjit); return 1; } return 0; } #else int main(int, char**) { return compareAddr(&StaticStuff<int>::s_data); } #endif $ clang++ -fPIC -shared -DBUILD_SHARED -o liblinkonceodr.so linkonceodr.cxx $ clang++ -emit-llvm -c linkonceodr.cxx -o - | LD_PRELOAD=./liblinkonceodr.so lli - Wrong address, 140449908087496 in shared lib, 140449908076544 in mcjit! I.e. while compareAddr is resolved from the dylib, this: @_ZN11StaticStuffIiE6s_dataE = linkonce_odr gl...
2016 Apr 29
3
(Orc)JIT and weak symbol resolution
...taticStuff<int>::s_data, (long)interp); // CHECK-NOT: Wrong address return 1; } return 0; } #else # ifdef __CLING__ int Symbols() { # else int main() # endif { return compareAddr(&StaticStuff<int>::s_data);} #endif // ! BUILD_SHARED $ clang++ -shared -fPIC -DBUILD_SHARED symbols.cxx -o libSymbols.so $ clang++ -cc1 -emit-llvm symbols.cxx -o - | lli -load ./libSymbols.so - or $ clang++ -lSymbols symbols.cxx && ./a.out Compiled it's happy: the weak symbol used in main gets resolved to be the one in the binary for both references. That's the behavior...
2015 Jan 13
2
[LLVMdev] MCJIT handling of linkonce_odr
...ticStuff<int>::s_data, (long)mcjit); > return 1; > } > return 0; > } > #else > int main(int, char**) { > return compareAddr(&StaticStuff<int>::s_data); > } > #endif > > > $ clang++ -fPIC -shared -DBUILD_SHARED -o liblinkonceodr.so > linkonceodr.cxx > $ clang++ -emit-llvm -c linkonceodr.cxx -o - | > LD_PRELOAD=./liblinkonceodr.so lli - > Wrong address, 140449908087496 in shared lib, 140449908076544 in mcjit! > > > I.e. while compareAddr is resolved from the dylib...