brintos

brintos / llvm-project-archived public Read only

0
0
Text · 998 B · 90429f4 Raw
36 lines · yaml
1## Test that a relocation's symbol can be an integer (symbol index).2 3# RUN: yaml2obj %s -o %t4## LLVM tools (both llvm-readobj and llvm-objdump) reject relocations with5## invalid symbol indexes, so inspect the hex contents instead.6# RUN: llvm-readobj -x .rela.text %t | FileCheck %s7 8# CHECK:      Hex dump of section '.rela.text':9# CHECK-NEXT: 0x00000000 00000000 00000000 02000000 4200000010#                               Symbol index 0x42 --^11# CHECK-NEXT: 0x00000010 00000000 00000000 00000000 0000000012# CHECK-NEXT: 0x00000020 02000000 01000000 00000000 0000000013#             Symbol index 0x01 --^14 15--- !ELF16FileHeader:17  Class:   ELFCLASS6418  Data:    ELFDATA2LSB19  Type:    ET_REL20  Machine: EM_X86_6421Sections:22  - Name: .text23    Type: SHT_PROGBITS24  - Name: .rela.text25    Type: SHT_RELA26    Info: .text27    Link: .symtab28    Relocations:29      - Type: R_X86_64_PC3230        Symbol: 0x4231      - Type: R_X86_64_PC3232        Symbol: 0x133Symbols:34  - Name: foo35    Binding: STB_GLOBAL36