mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 07:39:31 +00:00
[llvm-readelf/llvm-readobj][test] - Convert elf-linker-options.ll to use YAML.
This converts elf-linker-options.ll to use yaml2obj instead of llc, improves and cleanups it a bit. This opens a road to add an additional tests for checking the broken cases. Differential revision: https://reviews.llvm.org/D70004
This commit is contained in:
parent
edf395d3e2
commit
6350ceb0f2
@ -1,12 +0,0 @@
|
||||
; RUN: llc -mtriple x86_64-elf -filetype obj -o - %s | llvm-readobj --elf-linker-options - | FileCheck %s
|
||||
; REQUIRES: x86-registered-target
|
||||
|
||||
!llvm.linker.options = !{!0, !1}
|
||||
|
||||
!0 = !{!"option 0", !"value 0"}
|
||||
!1 = !{!"option 1", !"value 1"}
|
||||
|
||||
; CHECK: LinkerOptions [
|
||||
; CHECK: option 0: value 0
|
||||
; CHECK: option 1: value 1
|
||||
; CHECK: ]
|
30
test/tools/llvm-readobj/elf-linker-options.test
Normal file
30
test/tools/llvm-readobj/elf-linker-options.test
Normal file
@ -0,0 +1,30 @@
|
||||
## Check that we can use the --elf-linker-options option
|
||||
## to dump SHT_LLVM_LINKER_OPTIONS sections.
|
||||
|
||||
# RUN: yaml2obj %s -o %t1
|
||||
# RUN: llvm-readobj --elf-linker-options %t1 | FileCheck %s
|
||||
|
||||
# CHECK: LinkerOptions [
|
||||
# CHECK-NEXT: option 0: value 0
|
||||
# CHECK-NEXT: option 1: value 1
|
||||
# CHECK-NEXT: ]
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_REL
|
||||
Machine: EM_X86_64
|
||||
Sections:
|
||||
- Name: .linker-options
|
||||
Type: SHT_LLVM_LINKER_OPTIONS
|
||||
Options:
|
||||
- Name: option 0
|
||||
Value: value 0
|
||||
- Name: option 1
|
||||
Value: value 1
|
||||
|
||||
## llvm-readelf doesn't support --elf-linker-options yet.
|
||||
# RUN: llvm-readelf --elf-linker-options %t1 2>&1 | FileCheck %s --check-prefix=READELF
|
||||
|
||||
# READELF: printELFLinkerOptions not implemented!
|
Loading…
Reference in New Issue
Block a user