1# The binary blobs in this file were created like this: 2# llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu Inputs/elf-packed-relocs1.s -o - | obj2yaml | grep Content: 3 4# RUN: yaml2obj -docnum 1 %s | llvm-readobj -elf-output-style=LLVM -relocations - | FileCheck --check-prefix=LLVM1 %s 5# LLVM1: Section (1) .rela.dyn { 6# LLVM1-NEXT: 0x1100 R_X86_64_RELATIVE - 0x0 7# LLVM1-NEXT: 0x1180 R_X86_64_RELATIVE - 0x0 8# LLVM1-NEXT: 0x1188 R_X86_64_64 sym1 0x0 9# LLVM1-NEXT: 0x1190 R_X86_64_64 sym2 0x0 10# LLVM1-NEXT: 0x1191 R_X86_64_64 sym1 0x8 11# LLVM1-NEXT: 0x1193 R_X86_64_64 sym2 0xC 12# LLVM1-NEXT: 0x1197 R_X86_64_64 sym1 0xA 13# LLVM1-NEXT: 0x119F R_X86_64_64 sym2 0xA 14# LLVM1-NEXT: } 15 16# RUN: yaml2obj -docnum 1 %s | llvm-readobj -elf-output-style=GNU -relocations - | FileCheck --check-prefix=GNU1 %s 17# GNU1: Relocation section '.rela.dyn' at offset 0x180 contains 8 entries: 18# GNU1: 0000000000001100 0000000000000008 R_X86_64_RELATIVE 0 19# GNU1-NEXT: 0000000000001180 0000000000000008 R_X86_64_RELATIVE 0 20# GNU1-NEXT: 0000000000001188 0000000100000001 R_X86_64_64 0000000000000000 sym1 + 0 21# GNU1-NEXT: 0000000000001190 0000000200000001 R_X86_64_64 0000000000000000 sym2 + 0 22# GNU1-NEXT: 0000000000001191 0000000100000001 R_X86_64_64 0000000000000000 sym1 + 8 23# GNU1-NEXT: 0000000000001193 0000000200000001 R_X86_64_64 0000000000000000 sym2 + c 24# GNU1-NEXT: 0000000000001197 0000000100000001 R_X86_64_64 0000000000000000 sym1 + a 25# GNU1-NEXT: 000000000000119f 0000000200000001 R_X86_64_64 0000000000000000 sym2 + a 26 27# elf-packed-relocs1.s 28--- !ELF 29FileHeader: 30 Class: ELFCLASS64 31 Data: ELFDATA2LSB 32 Type: ET_DYN 33 Machine: EM_X86_64 34 Entry: 0x0000000000001000 35Sections: 36 - Name: .rela.dyn 37 Type: SHT_ANDROID_RELA 38 Flags: [ SHF_ALLOC ] 39 Address: 0x00000000000001C8 40 Link: .symtab 41 AddressAlign: 0x0000000000000001 42 Content: 41505332088020020108800280010202088180808010818080802002080181808080100802818080802004020C7E048180808010088180808020 43Symbols: 44 Global: 45 - Name: sym1 46 - Name: sym2 47... 48 49# RUN: yaml2obj -docnum 2 %s | llvm-readobj -elf-output-style=LLVM -relocations - | FileCheck --check-prefix=LLVM2 %s 50# LLVM2: Section (1) .rel.dyn { 51# LLVM2-NEXT: 0x1008 R_386_32 sym1 0x0 52# LLVM2-NEXT: 0x1010 R_386_GOT32 sym2 0x0 53# LLVM2-NEXT: 0x100C R_386_RELATIVE - 0x0 54# LLVM2-NEXT: 0x1008 R_386_RELATIVE - 0x0 55# LLVM2-NEXT: 0x1004 R_386_RELATIVE - 0x0 56# LLVM2-NEXT: 0x1000 R_386_RELATIVE - 0x0 57# LLVM2-NEXT: 0xFFC R_386_RELATIVE - 0x0 58# LLVM2-NEXT: 0xFF8 R_386_RELATIVE - 0x0 59# LLVM2-NEXT: 0xFF4 R_386_RELATIVE - 0x0 60# LLVM2-NEXT: 0xFF0 R_386_RELATIVE - 0x0 61# LLVM2-NEXT: } 62 63# RUN: yaml2obj -docnum 2 %s | llvm-readobj -elf-output-style=GNU -relocations - | FileCheck --check-prefix=GNU2 %s 64# GNU2: Relocation section '.rel.dyn' at offset 0xfc contains 10 entries: 65# GNU2: 00001008 00000101 R_386_32 00000000 sym1 66# GNU2-NEXT: 00001010 00000203 R_386_GOT32 00000000 sym2 67# GNU2-NEXT: 0000100c 00000008 R_386_RELATIVE 68# GNU2-NEXT: 00001008 00000008 R_386_RELATIVE 69# GNU2-NEXT: 00001004 00000008 R_386_RELATIVE 70# GNU2-NEXT: 00001000 00000008 R_386_RELATIVE 71# GNU2-NEXT: 00000ffc 00000008 R_386_RELATIVE 72# GNU2-NEXT: 00000ff8 00000008 R_386_RELATIVE 73# GNU2-NEXT: 00000ff4 00000008 R_386_RELATIVE 74# GNU2-NEXT: 00000ff0 00000008 R_386_RELATIVE 75 76# elf-packed-relocs2.s 77--- !ELF 78FileHeader: 79 Class: ELFCLASS32 80 Data: ELFDATA2LSB 81 Type: ET_DYN 82 Machine: EM_386 83 Entry: 0x0000000000001000 84Sections: 85 - Name: .rel.dyn 86 Type: SHT_ANDROID_REL 87 Flags: [ SHF_ALLOC ] 88 Address: 0x00000000000001C8 89 Link: .symtab 90 AddressAlign: 0x0000000000000001 91 Content: 415053320A80200202088102830408037C08 92Symbols: 93 Global: 94 - Name: sym1 95 - Name: sym2 96... 97