llvm/llvm/test/tools/llvm-objdump/ELF/relocations-in-nonreloc.test

## Check that llvm-objdump -r prints non-SHF_ALLOC relocations.

## Non-SHF_ALLOC relocations may be due to ld --emit-relocs.
# RUN: yaml2obj -DTYPE=ET_EXEC %s -o %t1
# RUN: llvm-objdump -r %t1 | FileCheck %s -DFILE=%t1
# RUN: yaml2obj -DTYPE=ET_DYN %s -o %t2
# RUN: llvm-objdump -r %t2 | FileCheck %s -DFILE=%t2
## Non-SHF_ALLOC relocations are usually generated by compilers.
# RUN: yaml2obj -DTYPE=ET_REL %s -o %t3
# RUN: llvm-objdump -r %t3 | FileCheck %s -DFILE=%t3

# CHECK:      [[FILE]]: file format elf64-x86-64
# CHECK-EMPTY:
# CHECK-NEXT: RELOCATION RECORDS FOR [.text]:
# CHECK-NEXT: OFFSET           TYPE                     VALUE
# CHECK-NEXT: 0000000000000123 R_X86_64_NONE            *ABS*+0x141

--- !ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2LSB
  Type:    [[TYPE]]
  Machine: EM_X86_64
Sections:
  - Name:  .text
    Type:  SHT_PROGBITS
    Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
  - Name:  .rela.text
    Type:  SHT_RELA
    Link:  .symtab
    Info:  .text
    Relocations:
      - Offset: 0x123
        Type:   R_X86_64_NONE
        Addend: 321
Symbols:
  - Name:    .text
    Type:    STT_SECTION
    Section: .text