https://sourceware.org/bugzilla/show_bug.cgi?id=28918
Bug ID: 28918 Summary: ld can find the a function reference Product: binutils Version: 2.38 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: qiaopengcheng at loongson dot cn Target Milestone: --- here is the source code `file:runtime.tar.bz2 down-link:http://yun.loongson.cn/s/ZeT9soDnTHE password:ave6 expiration time:2022-03-02 10:47:27` After extract files, under the directory `runtime/src/coreclr` running the command `./build-runtime.sh -debug -skipmanaged -nopgooptimize -skipcrossarchnative -cmakeargs "-DCMAKE_LINKER=/usr/bin/ld -DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=ld -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=l d -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=ld " ` which using the clang compiler. or the command ` ./build-runtime.sh gcc -debug -skipmanaged -nopgooptimize -skipcrossarchnative ` which using the gcc compiler. If compiling with `gcc8 + ld-2.31` or `gcc8 + ld-2.38` or `clang-11 + ld-2.31/38` will fail liking [ 97%] Linking CXX executable createdump /usr/local/bin/ld: ../../dlls/mscordac/libmscordaccore.so: undefined reference to `NativeFieldDescriptor::GetNestedNativeMethodTable() const' collect2: error: ld returned 1 exit status make[2]: *** [debug/createdump/CMakeFiles/createdump.dir/build.make:279: debug/createdump/createdump] Error 1 make[1]: *** [CMakeFiles/Makefile2:3187: debug/createdump/CMakeFiles/createdump.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs... But if using the defaut `clang11 + lld` is OK by the command ` ./build-runtime.sh -debug -skipmanaged -nopgooptimize -skipcrossarchnative ` -- You are receiving this mail because: You are on the CC list for the bug.