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

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 08:03:02 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
----------------
ilovepi wrote:

@MaskRay , just double checking that you're OK with this as is before I land this.

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


More information about the llvm-commits mailing list