1 ; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
3 target triple = "wasm32-unknown-unknown"
5 ; Verify relocations are correctly generated for addresses of externals
8 @myimport = external global i32, align 4
10 @foo = global i64 7, align 4
11 @bar = hidden global i32* @myimport, align 4
13 ; CHECK: - Type: DATA{{$}}
14 ; CHECK-NEXT: Relocations:
15 ; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
16 ; CHECK-NEXT: Index: 2
17 ; CHECK-NEXT: Offset: 0x00000013
18 ; CHECK-NEXT: Segments:
19 ; CHECK-NEXT: - SectionOffset: 6
20 ; CHECK-NEXT: InitFlags: 0
22 ; CHECK-NEXT: Opcode: I32_CONST
23 ; CHECK-NEXT: Value: 0
24 ; CHECK-NEXT: Content: '0700000000000000'
25 ; CHECK-NEXT: - SectionOffset: 19
26 ; CHECK-NEXT: InitFlags: 0
28 ; CHECK-NEXT: Opcode: I32_CONST
29 ; CHECK-NEXT: Value: 8
30 ; CHECK-NEXT: Content: '00000000'