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

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 09:32:23 PDT 2024


================
@@ -49,6 +49,25 @@
 ; RUN: ld.lld -o %t/foo-fatLTO.archive %t/a.a %t/main-LTO.bc --fat-lto-objects
 ; RUN: cmp %t/foo-fatLTO.archive %t/foo-LTO
 
+;; Test FatLTO works with relocatable links using PIC objects
+;; Currently, with PIC relocatable links, FatLTO sections are treated as
+;; orphan sections and incorrectly concatenated together. This test verifies
+;; the current behavior, but should be fixed to either merge those sections
+;; correctly, or to drop them altogether.
+; RUN: opt < %t/a-LTO.ll -passes="embed-bitcode<thinlto;emit-summary>" | llc --relocation-model=pic --filetype=obj -o %t/a-fat-pic.o
----------------
ilovepi wrote:

sounds good. I'll give that a go.

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


More information about the llvm-commits mailing list