45 lines · plain
1# RUN: llvm-mc -triple=i386-pc-linux-musl %s | FileCheck --check-prefix=PRINT %s2 3# RUN: llvm-mc -filetype=obj -triple=i386-pc-linux-musl %s -o %t4# RUN: llvm-readobj -r %t | FileCheck %s5# RUN: llvm-readelf -x .data %t | FileCheck --check-prefix=HEX %s6 7# PRINT: .reloc {{.*}}+2, R_386_NONE, .data8 9# X86 relocations use the Elf32_Rel format. Addends are neither stored in the10# relocation entries nor applied in the referenced locations.11# CHECK: 0x2 R_386_NONE .data12# CHECK-NEXT: 0x1 R_386_NONE foo13# CHECK-NEXT: 0x0 R_386_NONE -14# CHECK-NEXT: 0x0 R_386_32 .data15# CHECK-NEXT: 0x0 R_386_IRELATIVE foo16# CHECK-NEXT: 0x0 R_386_GOT32X -17# CHECK-NEXT: 0x0 R_386_NONE -18# CHECK-NEXT: 0x0 R_386_8 -19# CHECK-NEXT: 0x0 R_386_16 -20# CHECK-NEXT: 0x0 R_386_32 -21 22# HEX: 0x00000000 00000000 0000000023 24.text25 .reloc .+2, R_386_NONE, .data26 .reloc .+1, R_386_NONE, foo+427 .reloc .+0, R_386_NONE, 828 .reloc .+0, R_386_32, .data+229 .reloc .+0, R_386_IRELATIVE, foo+330 .reloc .+0, R_386_GOT32X, 531 32 .reloc .+0, BFD_RELOC_NONE, 933 .reloc .+0, BFD_RELOC_8, 934 .reloc .+0, BFD_RELOC_16, 935 .reloc .+0, BFD_RELOC_32, 936 ret37 nop38 nop39 40.data41.globl foo42foo:43 .long 044 .long 045