[lld] [LLD][ELF] ignore ".so" in search path when relocatable set (PR #94965)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 10:00:15 PDT 2024


================
@@ -49,6 +49,12 @@
 // RUN: ld.lld -o %t3 %t.o -L%t.dir -lls
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
 
+// Should use static when dynamic exists in search path
+// RUN: ld.lld --relocatable -o %t3 %t.o -L%t.dir -lls
+// RUN: llvm-readelf -s -h %t3 | FileCheck --check-prefix=RELOCATABLE %s
+// RELOCATABLE: Type: REL (Relocatable file)
+// RELOCATABLE: _static
----------------
MaskRay wrote:

`[[#]] _static`

`[[#]]` matches a decimal and shows that the symbol is defined 

https://github.com/llvm/llvm-project/pull/94965


More information about the llvm-commits mailing list