1 # Show that llvm-readobj can handle no relocations when --relocations is
2 # requested, both for LLVM and GNU output, both for no relocation sections and
3 # for empty relocation sections.
5 # RUN: yaml2obj %s -o %t.no_relocs
6 # RUN: llvm-readobj %t.no_relocs --relocations | FileCheck %s --check-prefix NO-RELOCS-LLVM
7 # RUN: llvm-readelf %t.no_relocs --relocations | FileCheck %s --check-prefix NO-RELOCS-GNU
9 # RUN: llvm-objcopy -R .rela.text -R .rel.text %t.no_relocs %t.no_sec
10 # RUN: llvm-readobj %t.no_sec --relocations | FileCheck %s --check-prefix NO-SEC-LLVM
11 # RUN: llvm-readelf %t.no_sec --relocations | FileCheck %s --check-prefix NO-SEC-GNU
13 # NO-RELOCS-LLVM: Relocations [
14 # NO-RELOCS-LLVM-NEXT: Section (2) .rela.text {
15 # NO-RELOCS-LLVM-NEXT: }
16 # NO-RELOCS-LLVM-NEXT: Section (3) .rel.text {
17 # NO-RELOCS-LLVM-NEXT: }
18 # NO-RELOCS-LLVM-NEXT: ]
20 # NO-RELOCS-GNU: Relocation section '.rela.text' at offset {{.*}} contains 0 entries:
21 # NO-RELOCS-GNU-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend
22 # NO-RELOCS-GNU-EMPTY:
23 # NO-RELOCS-GNU-NEXT: Relocation section '.rel.text' at offset {{.*}} contains 0 entries:
24 # NO-RELOCS-GNU-NEXT: Offset Info Type Symbol's Value Symbol's Name
25 # NO-RELOCS-GNU-EMPTY:
27 # NO-SEC-LLVM: Relocations [
30 # NO-SEC-GNU: There are no relocations in this file.