[lld] [lld][NFC] Precommit test for ld -r links FatLTO PIC objects (PR #92817)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 10:33:55 PDT 2024


================
@@ -4,13 +4,23 @@
 ; RUN: rm -rf %t && split-file %s %t
 
 ;; Ensure that input files contain .llvm.lto section.
-; RUN: llc %t/a-LTO.ll --filetype=obj -o %t/a-fatLTO.o
+; RUN: llc %t/a-LTO.ll --filetype=obj -o %t/a-fatLTO.o --relocation-model=pic
 ; RUN: opt < %t/a-LTO.ll --module-summary -o %t/a-fatLTO.bc
-; RUN: llvm-objcopy --add-section=.llvm.lto=%t/a-fatLTO.bc --set-section-flags=.llvm.lto=exclude %t/a-fatLTO.o
+; RUN: llvm-objcopy --add-section=.llvm.lto=%t/a-fatLTO.bc --set-section-flags=.llvm.lto=exclude --set-section-type=.llvm.lto=0x6fff4c0c %t/a-fatLTO.o
----------------
MaskRay wrote:

The number of `%t` occurrences is large now.

Perhaps we should switch to `; RUN: rm -rf %t && split-file %s %t && cd %t` and remove these `%t/`

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


More information about the llvm-commits mailing list