1; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s 2 3target triple = "wasm32-unknown-unknown" 4 5; Verify relocations are correctly generated for addresses of externals 6; in the data section. 7 8@myimport = external global i32, align 4 9 10@foo = global i64 7, align 4 11@bar = hidden global i32* @myimport, align 4 12 13; CHECK: - Type: DATA 14; CHECK-NEXT: Relocations: 15; CHECK-NEXT: - Type: R_WEBASSEMBLY_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: MemoryIndex: 0 21; CHECK-NEXT: Offset: 22; CHECK-NEXT: Opcode: I32_CONST 23; CHECK-NEXT: Value: 0 24; CHECK-NEXT: Content: '0700000000000000' 25; CHECK-NEXT: - SectionOffset: 19 26; CHECK-NEXT: MemoryIndex: 0 27; CHECK-NEXT: Offset: 28; CHECK-NEXT: Opcode: I32_CONST 29; CHECK-NEXT: Value: 8 30; CHECK-NEXT: Content: '00000000' 31