brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · a24fbc7 Raw
65 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s2# RUN: wasm-ld --export=_Z3fooi --demangle -o %t_demangle.wasm %t.o3# RUN: obj2yaml %t_demangle.wasm | FileCheck --check-prefixes=CHECK,DEMANGLE %s4# RUN: wasm-ld --export=_Z3fooi --no-demangle -o %t_nodemangle.wasm %t.o5# RUN: obj2yaml %t_nodemangle.wasm | FileCheck --check-prefixes=CHECK,MANGLE %s6 7# Check that the EXPORT name is still mangled, but that the "name" custom8# section contains the unmangled name.9 10.globl _start11.globl _Z3fooi12.weak _Z3bari13 14.functype _Z3bari (i32) -> ()15 16_Z3fooi:17  .functype _Z3fooi (i32) -> ()18  end_function19 20_start:21  .functype _start () -> ()22  i32.const 123  call _Z3fooi24  i32.const 125  call _Z3bari26  end_function27 28# CHECK:        - Type:            EXPORT29# CHECK-NEXT:     Exports:30# CHECK-NEXT:       - Name:            memory31# CHECK-NEXT:         Kind:            MEMORY32# CHECK-NEXT:         Index:           033# CHECK-NEXT:       - Name:            _start34# CHECK-NEXT:         Kind:            FUNCTION35# CHECK-NEXT:         Index:           136# CHECK-NEXT:       - Name:            _Z3fooi37# CHECK-NEXT:         Kind:            FUNCTION38# CHECK-NEXT:         Index:           239# CHECK-NEXT:   - Type:            CODE40# CHECK-NEXT:     Functions:41# CHECK-NEXT:       - Index:           042# CHECK-NEXT:         Locals:43# CHECK-NEXT:         Body:            000B44# CHECK-NEXT:       - Index:           145# CHECK-NEXT:         Locals:46# CHECK-NEXT:         Body:            410110828080800041011080808080000B47# CHECK-NEXT:       - Index:           248# CHECK-NEXT:         Locals:49# CHECK-NEXT:         Body:            0B50# CHECK-NEXT:   - Type:            CUSTOM51# CHECK-NEXT:     Name:            name52# CHECK-NEXT:     FunctionNames:53# CHECK-NEXT:       - Index:           054# DEMANGLE-NEXT:      Name:            'undefined_weak:bar(int)'55# MANGLE-NEXT:        Name:            'undefined_weak:_Z3bari'56# CHECK-NEXT:       - Index:           157# CHECK-NEXT:         Name:            _start58# CHECK-NEXT:       - Index:           259# DEMANGLE-NEXT:      Name:            'foo(int)'60# MANGLE-NEXT:        Name:            _Z3fooi61# CHECK-NEXT:     GlobalNames:62# CHECK-NEXT:       - Index:           063# CHECK-NEXT:         Name:            __stack_pointer64# CHECK-NEXT: ...65