xref: /llvm-project/llvm/test/MC/WebAssembly/sections.ll (revision b36a3e61400aed89d6abe4bd30b35af40805d4cb)
1*b36a3e61SElvina Yakubova; RUN: llc -filetype=obj %s -o - | llvm-readobj -S - | FileCheck %s
28cbfbd6dSSam Clegg
3a5908009SSam Cleggtarget triple = "wasm32-unknown-unknown"
410545c9cSSam Clegg
510545c9cSSam Clegg; external function
610545c9cSSam Cleggdeclare i32 @a()
710545c9cSSam Clegg
810545c9cSSam Clegg; global data
910545c9cSSam Clegg@b = global i32 3, align 4
1010545c9cSSam Clegg
1110545c9cSSam Clegg; local function
1210545c9cSSam Cleggdefine i32 @f1() {
1310545c9cSSam Cleggentry:
1410545c9cSSam Clegg    %tmp1 = call i32 @a()
1510545c9cSSam Clegg    ret i32 %tmp1
1610545c9cSSam Clegg}
1710545c9cSSam Clegg
1810545c9cSSam Clegg; CHECK: Format: WASM
1910545c9cSSam Clegg; CHECK: Arch: wasm32
2010545c9cSSam Clegg; CHECK: AddressSize: 32bit
2110545c9cSSam Clegg; CHECK: Sections [
2210545c9cSSam Clegg; CHECK:   Section {
2310545c9cSSam Clegg; CHECK:     Type: TYPE (0x1)
2410545c9cSSam Clegg; CHECK:   }
2510545c9cSSam Clegg; CHECK:  Section {
2610545c9cSSam Clegg; CHECK:    Type: IMPORT (0x2)
2710545c9cSSam Clegg; CHECK:  }
2810545c9cSSam Clegg; CHECK:  Section {
2910545c9cSSam Clegg; CHECK:    Type: FUNCTION (0x3)
3010545c9cSSam Clegg; CHECK:  }
3110545c9cSSam Clegg; CHECK:  Section {
3210545c9cSSam Clegg; CHECK:    Type: CODE (0xA)
3310545c9cSSam Clegg; CHECK:  }
3410545c9cSSam Clegg; CHECK:  Section {
3510545c9cSSam Clegg; CHECK:    Type: DATA (0xB)
3610545c9cSSam Clegg; CHECK:  }
3710545c9cSSam Clegg; CHECK:  Section {
3810545c9cSSam Clegg; CHECK:    Type: CUSTOM (0x0)
3910545c9cSSam Clegg; CHECK:    Name: reloc.CODE
4010545c9cSSam Clegg; CHECK:  }
4110545c9cSSam Clegg; CHECK:]
4210545c9cSSam Clegg
43