54 lines · plain
1## Test that linking, reloc, and name sections are stripped by --strip-all.2 3## These get a separate test because ObjectYaml understands relocs and names,4## so the test needs to be a valid object with relocs and names.5 6# RUN: yaml2obj %s -o %t7# RUN: llvm-objcopy --strip-all %t %t28# RUN: obj2yaml %t2 | FileCheck %s9 10## Check that the known sections are still present.11# CHECK: Sections:12# CHECK: - Type: TYPE13# CHECK: - Type: FUNCTION14# CHECK: - Type: CODE15# CHECK-NOT: Relocations16# CHECK-NOT: linking17## Check that there are still functions in the code section.18# CHECK: Functions:19 20--- !WASM21FileHeader:22 Version: 0x0000000123Sections:24 - Type: TYPE25 Signatures:26 - Index: 027 ParamTypes: []28 ReturnTypes: []29 - Type: FUNCTION30 FunctionTypes: [ 0 ]31 - Type: CODE32 Relocations:33 - Type: R_WASM_FUNCTION_INDEX_LEB34 Index: 035 Offset: 0x436 Functions:37 - Index: 038 Locals: []39 Body: 1080808080000B40 - Type: CUSTOM41 Name: linking42 Version: 243 SymbolTable:44 - Index: 045 Kind: FUNCTION46 Name: foo47 Flags: [ BINDING_LOCAL ]48 Function: 049 - Type: CUSTOM50 Name: name51 FunctionNames:52 - Index: 053 Name: foo54