brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · b671095 Raw
46 lines · plain
1# Show that llvm-readobj can handle no relocations when --relocations is2# requested, both for LLVM and GNU output, both for no relocation sections and3# for empty relocation sections.4 5# RUN: yaml2obj %s -o %t.no_relocs6# RUN: llvm-readobj %t.no_relocs --relocations | FileCheck %s --check-prefix NO-RELOCS-LLVM7# RUN: llvm-readelf %t.no_relocs --relocations | FileCheck %s --check-prefix NO-RELOCS-GNU8 9# RUN: llvm-objcopy -R .rela.text -R .rel.text %t.no_relocs %t.no_sec10# RUN: llvm-readobj %t.no_sec --relocations | FileCheck %s --check-prefix NO-SEC-LLVM11# RUN: llvm-readelf %t.no_sec --relocations | FileCheck %s --check-prefix NO-SEC-GNU12 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: ]19 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 + Addend22# 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 Name25# NO-RELOCS-GNU-EMPTY:26 27# NO-SEC-LLVM:      Relocations [28# NO-SEC-LLVM-NEXT: ]29 30# NO-SEC-GNU: There are no relocations in this file.31 32--- !ELF33FileHeader:34  Class: ELFCLASS6435  Data:  ELFDATA2LSB36  Type:  ET_REL37Sections:38  - Name: .text39    Type: SHT_PROGBITS40  - Name: .rela.text41    Type: SHT_RELA42    Info: .text43  - Name: .rel.text44    Type: SHT_REL45    Info: .text46