86 lines · yaml
1# RUN: yaml2obj < %s | llvm-nm - | FileCheck -strict-whitespace %s2 3# Check that wasm weak function/global/data symbols are displayed correctly4 5--- !WASM6FileHeader:7 Version: 0x000000018Sections:9 - Type: TYPE10 Signatures:11 - Index: 012 ParamTypes:13 - I3214 ReturnTypes:15 - I3216 - Type: IMPORT17 Imports:18 - Module: env19 Field: weak_import_func20 Kind: FUNCTION21 SigIndex: 022 - Type: FUNCTION23 FunctionTypes: [ 0 ]24 - Type: GLOBAL25 Globals:26 - Index: 027 Type: I3228 Mutable: false29 InitExpr:30 Opcode: I64_CONST31 Value: 3232 - Type: CODE33 Functions:34 - Index: 135 Locals:36 Body: 0037 - Type: DATA38 Segments:39 - SectionOffset: 640 InitFlags: 041 Offset:42 Opcode: I32_CONST43 Value: 044 Content: '616263'45 - Type: CUSTOM46 Name: linking47 Version: 248 SymbolTable:49 - Index: 050 Kind: DATA51 Name: weak_defined_data52 Flags: [ BINDING_WEAK ]53 Segment: 054 Size: 355 - Index: 156 Kind: FUNCTION57 Name: weak_defined_func58 Flags: [ BINDING_WEAK ]59 Function: 160 - Index: 261 Kind: GLOBAL62 Name: weak_defined_global63 Flags: [ BINDING_WEAK ]64 Global: 065 - Index: 366 Kind: DATA67 Name: weak_import_data68 Flags: [ BINDING_WEAK, UNDEFINED ]69 - Index: 470 Kind: FUNCTION71 Name: weak_import_func72 Flags: [ BINDING_WEAK, UNDEFINED ]73 Function: 074 SegmentInfo:75 - Index: 076 Name: .rodata.constantData77 Alignment: 178 Flags: [ ]79 80 81# CHECK: 00000000 W weak_defined_data82# CHECK-NEXT: 00000001 W weak_defined_func83# CHECK-NEXT: 00000001 W weak_defined_global84# CHECK-NEXT: w weak_import_data85# CHECK-NEXT: w weak_import_func86