From 9e1ade93a83635da90ff93586a1b9f503be8b8e8 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 27 Jun 2017 20:27:59 +0000 Subject: [WebAssembly] Add data size and alignement to linking section The overal size of the data section (including BSS) is otherwise not included in the wasm binary. Differential Revision: https://reviews.llvm.org/D34657 llvm-svn: 306459 --- llvm/test/ObjectYAML/wasm/weak_symbols.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'llvm/test/ObjectYAML/wasm') diff --git a/llvm/test/ObjectYAML/wasm/weak_symbols.yaml b/llvm/test/ObjectYAML/wasm/weak_symbols.yaml index 0ae8c9bec2a..ab80c1e5029 100644 --- a/llvm/test/ObjectYAML/wasm/weak_symbols.yaml +++ b/llvm/test/ObjectYAML/wasm/weak_symbols.yaml @@ -3,6 +3,19 @@ FileHeader: Version: 0x00000001 Sections: + - Type: TYPE + Signatures: + - ReturnType: I32 + ParamTypes: + - Type: FUNCTION + FunctionTypes: [ 0, 0 ] + - Type: GLOBAL + Globals: + - Type: I32 + Mutable: false + InitExpr: + Opcode: I32_CONST + Value: 1 - Type: EXPORT Exports: - Name: function_export @@ -10,9 +23,11 @@ Sections: Index: 1 - Name: global_export Kind: GLOBAL - Index: 2 + Index: 0 - Type: CUSTOM Name: linking + DataSize: 10 + DataAlignment: 2 SymbolInfo: - Name: function_export Flags: 1 @@ -30,9 +45,11 @@ Sections: # CHECK: Index: 1 # CHECK: - Name: global_export # CHECK: Kind: GLOBAL -# CHECK: Index: 2 +# CHECK: Index: 0 # CHECK: - Type: CUSTOM # CHECK: Name: linking +# CHECK: DataSize: 10 +# CHECK: DataAlignment: 2 # CHECK: SymbolInfo: # CHECK: - Name: function_export # CHECK: Flags: 1 -- cgit v1.2.3