|
8 | 8 | ; RUN: opt < a-LTO.ll --module-summary -o a-fatLTO.bc
|
9 | 9 | ; RUN: llvm-objcopy --add-section=.llvm.lto=a-fatLTO.bc --set-section-flags=.llvm.lto=exclude --set-section-type=.llvm.lto=0x6fff4c0c a-fatLTO.o
|
10 | 10 |
|
11 |
| - |
12 | 11 | ; RUN: llc main-LTO.ll --filetype=obj -o main-fatLTO.o --relocation-model=pic
|
13 | 12 | ; RUN: opt < main-LTO.ll --module-summary -o main-fatLTO.bc
|
14 | 13 | ; RUN: llvm-objcopy --add-section=.llvm.lto=main-fatLTO.bc --set-section-flags=.llvm.lto=exclude --set-section-type=.llvm.lto=0x6fff4c0c main-fatLTO.o
|
|
17 | 16 | ; RUN: llvm-readelf -S main-fatLTO.o | FileCheck --check-prefix=HAS_LLVM_LTO %s
|
18 | 17 |
|
19 | 18 | ;; Make sure that the section flags are set correctly
|
20 |
| -; HA_LLVM_LTO: Name: .llvm.lto |
21 |
| -; HA_LLVM_LTO-NEXT: Type: SHT_LLVM_LTO |
22 |
| -; HA_LLVM_LTO-NEXT: Flags |
23 |
| -; HA_LLVM_LTO-NEXT: SHF_EXCLUDE |
24 |
| - |
25 | 19 | ; HAS_LLVM_LTO: Name Type Address Off Size ES Flg Lk Inf Al
|
26 | 20 | ; HAS_LLVM_LTO: .llvm.lto LLVM_LTO {{.*}} 00 WE 0 0 1
|
27 | 21 |
|
|
64 | 58 | ; RUN: ld.lld -o foo-fatLTO.archive a.a main-LTO.bc --fat-lto-objects
|
65 | 59 | ; RUN: cmp foo-fatLTO.archive foo-LTO
|
66 | 60 |
|
67 |
| -;; Test FatLTO works with relocatable links using PIC objects |
68 |
| -;; Currently, with PIC relocatable links, FatLTO sections are treated as |
69 |
| -;; orphan sections and incorrectly concatenated together. This test verifies |
70 |
| -;; the current behavior, but should be fixed to either merge those sections |
71 |
| -;; correctly, or to drop them altogether. |
| 61 | +;; Test FatLTO works with relocatable links using PIC objects, and that |
| 62 | +;; SHT_LLVM_LTO sections are discarded. |
72 | 63 | ; RUN: llvm-ar rcs fatLTO-pic.a a-fatLTO.o main-fatLTO.o
|
73 | 64 | ; RUN: llvm-readelf -S fatLTO-pic.a | FileCheck --check-prefix=HAS_LLVM_LTO %s
|
74 | 65 |
|
75 |
| -; RUN: ld.lld --whole-archive fatLTO-pic.a -r -o fatLTO-pic-reolcatable.o |
76 |
| -; RUN: llvm-readelf -S fatLTO-pic-reolcatable.o | FileCheck --check-prefix=HAS_LLVM_LTO %s |
| 66 | +; RUN: ld.lld --whole-archive fatLTO-pic.a -r -o fatLTO-pic-relocatable.o |
| 67 | +; RUN: llvm-readelf -S fatLTO-pic-relocatable.o | FileCheck --check-prefix=CHECK-NON-LTO-TARGET %s |
77 | 68 |
|
78 | 69 | ;--- a-LTO.ll
|
79 | 70 | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
0 commit comments