File: custom-section-name.ll

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (61 lines) | stat: -rw-r--r-- 2,614 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
; RUN: llc -filetype=obj %s -o %t.o
; RUN: wasm-ld -no-gc-sections --no-entry -o %t.wasm %t.o
; RUN: obj2yaml %t.wasm | FileCheck %s --check-prefixes=CHECK,NO-BSS
; RUN: wasm-ld -no-gc-sections --no-entry --import-memory -o %t.bss.wasm %t.o
; RUN: obj2yaml %t.bss.wasm | FileCheck %s --check-prefixes=CHECK,BSS
; RUN: wasm-ld -no-gc-sections --no-entry -o %t_reloc.o %t.o --relocatable
; RUN: obj2yaml %t_reloc.o | FileCheck -check-prefix RELOC %s

target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown"

@bss = hidden global i32 zeroinitializer, align 4
@foo = hidden global i32 zeroinitializer, section "WowZero!", align 4
@bar = hidden constant i32 42, section "MyAwesomeSection", align 4
@baz = hidden global i32 7, section "AnotherGreatSection", align 4

; CHECK-LABEL: - Type:            DATA
; CHECK-NEXT:    Segments:
; CHECK-NEXT:      - SectionOffset:   7
; CHECK-NEXT:        InitFlags:       0
; CHECK-NEXT:        Offset:
; CHECK-NEXT:          Opcode:          I32_CONST
; CHECK-NEXT:          Value:           1024
; CHECK-NEXT:        Content:         '00000000'
; CHECK-NEXT:      - SectionOffset:   17
; CHECK-NEXT:        InitFlags:       0
; CHECK-NEXT:        Offset:
; CHECK-NEXT:          Opcode:          I32_CONST
; CHECK-NEXT:          Value:           1028
; CHECK-NEXT:        Content:         2A000000
; CHECK-NEXT:      - SectionOffset:   27
; CHECK-NEXT:        InitFlags:       0
; CHECK-NEXT:        Offset:
; CHECK-NEXT:          Opcode:          I32_CONST
; CHECK-NEXT:          Value:           1032
; CHECK-NEXT:        Content:         '07000000'
; BSS-NEXT:        - SectionOffset:   37
; BSS-NEXT:          InitFlags:       0
; BSS-NEXT:          Offset:
; BSS-NEXT:            Opcode:          I32_CONST
; BSS-NEXT:            Value:           1036
; BSS-NEXT:          Content:         '00000000'
; NO-BSS-NOT:      - SectionOffset:

; RELOC-LABEL: SegmentInfo:
; RELOC-NEXT:    - Index:           0
; RELOC-NEXT:      Name:            'WowZero!'
; RELOC-NEXT:      Alignment:       2
; RELOC-NEXT:      Flags:           [  ]
; RELOC-NEXT:    - Index:           1
; RELOC-NEXT:      Name:            MyAwesomeSection
; RELOC-NEXT:      Alignment:       2
; RELOC-NEXT:      Flags:           [  ]
; RELOC-NEXT:    - Index:           2
; RELOC-NEXT:      Name:            AnotherGreatSection
; RELOC-NEXT:      Alignment:       2
; RELOC-NEXT:      Flags:           [  ]
; RELOC-NEXT:    - Index:           3
; RELOC-NEXT:      Name:            .bss.bss
; RELOC-NEXT:      Alignment:       2
; RELOC-NEXT:      Flags:           [  ]