[lld] r330971 - [WebAssembly] Add version to linking section (to match llvm-side change)
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 26 11:17:21 PDT 2018
Author: sbc
Date: Thu Apr 26 11:17:21 2018
New Revision: 330971
URL: http://llvm.org/viewvc/llvm-project?rev=330971&view=rev
Log:
[WebAssembly] Add version to linking section (to match llvm-side change)
Differential Revision: https://reviews.llvm.org/D46070
Modified:
lld/trunk/test/wasm/Inputs/globals.yaml
lld/trunk/test/wasm/Inputs/undefined-globals.yaml
lld/trunk/test/wasm/data-layout.ll
lld/trunk/test/wasm/init-fini.ll
lld/trunk/test/wasm/locals-duplicate.test
lld/trunk/test/wasm/many-functions.ll
lld/trunk/test/wasm/relocatable.ll
lld/trunk/test/wasm/stack-pointer.ll
lld/trunk/test/wasm/weak-alias.ll
lld/trunk/wasm/Writer.cpp
Modified: lld/trunk/test/wasm/Inputs/globals.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/globals.yaml?rev=330971&r1=330970&r2=330971&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/globals.yaml (original)
+++ lld/trunk/test/wasm/Inputs/globals.yaml Thu Apr 26 11:17:21 2018
@@ -34,6 +34,7 @@ Sections:
Offset: 0x00000004
- Type: CUSTOM
Name: linking
+ Version: 1
SymbolTable:
- Index: 0
Kind: GLOBAL
Modified: lld/trunk/test/wasm/Inputs/undefined-globals.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/Inputs/undefined-globals.yaml?rev=330971&r1=330970&r2=330971&view=diff
==============================================================================
--- lld/trunk/test/wasm/Inputs/undefined-globals.yaml (original)
+++ lld/trunk/test/wasm/Inputs/undefined-globals.yaml Thu Apr 26 11:17:21 2018
@@ -32,6 +32,7 @@ Sections:
Offset: 0x00000004
- Type: CUSTOM
Name: linking
+ Version: 1
SymbolTable:
- Index: 0
Kind: GLOBAL
Modified: lld/trunk/test/wasm/data-layout.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/data-layout.ll?rev=330971&r1=330970&r2=330971&view=diff
==============================================================================
--- lld/trunk/test/wasm/data-layout.ll (original)
+++ lld/trunk/test/wasm/data-layout.ll Thu Apr 26 11:17:21 2018
@@ -119,9 +119,7 @@ target triple = "wasm32-unknown-unknown-
; RELOC-NEXT: Value: 40
; RELOC-NEXT: Content: 68656C6C6F0A00
-; RELOC: - Type: CUSTOM
-; RELOC-NEXT: Name: linking
-; RELOC-NEXT: SymbolTable:
+; RELOC: SymbolTable:
; RELOC-NEXT: - Index: 0
; RELOC-NEXT: Kind: DATA
; RELOC-NEXT: Name: foo
Modified: lld/trunk/test/wasm/init-fini.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/init-fini.ll?rev=330971&r1=330970&r2=330971&view=diff
==============================================================================
--- lld/trunk/test/wasm/init-fini.ll (original)
+++ lld/trunk/test/wasm/init-fini.ll Thu Apr 26 11:17:21 2018
@@ -131,8 +131,7 @@ entry:
; RUN: wasm-ld --check-signatures -r %t.o %t.global-ctor-dtor.o -o %t.reloc.wasm
; RUN: obj2yaml %t.reloc.wasm | FileCheck -check-prefix=RELOC %s
-; RELOC: Name: linking
-; RELOC-NEXT: SymbolTable:
+; RELOC: SymbolTable:
; RELOC-NEXT: - Index: 0
; RELOC-NEXT: Kind: FUNCTION
; RELOC-NEXT: Name: func1
Modified: lld/trunk/test/wasm/locals-duplicate.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/locals-duplicate.test?rev=330971&r1=330970&r2=330971&view=diff
==============================================================================
--- lld/trunk/test/wasm/locals-duplicate.test (original)
+++ lld/trunk/test/wasm/locals-duplicate.test Thu Apr 26 11:17:21 2018
@@ -382,6 +382,7 @@
; RELOC-NEXT: Content: '0000000000000000'
; RELOC-NEXT: - Type: CUSTOM
; RELOC-NEXT: Name: linking
+; RELOC-NEXT: Version: 1
; RELOC-NEXT: SymbolTable:
; RELOC-NEXT: - Index: 0
; RELOC-NEXT: Kind: FUNCTION
Modified: lld/trunk/test/wasm/many-functions.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/many-functions.ll?rev=330971&r1=330970&r2=330971&view=diff
==============================================================================
--- lld/trunk/test/wasm/many-functions.ll (original)
+++ lld/trunk/test/wasm/many-functions.ll Thu Apr 26 11:17:21 2018
@@ -815,6 +815,7 @@ entry:
; CHECK-NEXT: Content: '01000000'
; CHECK-NEXT: - Type: CUSTOM
; CHECK-NEXT: Name: linking
+; CHECK-NEXT: Version: 1
; CHECK-NEXT: SymbolTable:
; CHECK-NEXT: - Index: 0
; CHECK-NEXT: Kind: FUNCTION
Modified: lld/trunk/test/wasm/relocatable.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/relocatable.ll?rev=330971&r1=330970&r2=330971&view=diff
==============================================================================
--- lld/trunk/test/wasm/relocatable.ll (original)
+++ lld/trunk/test/wasm/relocatable.ll Thu Apr 26 11:17:21 2018
@@ -157,6 +157,7 @@ entry:
; CHECK-NEXT: Content: '616263'
; CHECK-NEXT: - Type: CUSTOM
; CHECK-NEXT: Name: linking
+; CHECK-NEXT: Version: 1
; CHECK-NEXT: SymbolTable:
; CHECK-NEXT: - Index: 0
; CHECK-NEXT: Kind: FUNCTION
Modified: lld/trunk/test/wasm/stack-pointer.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/stack-pointer.ll?rev=330971&r1=330970&r2=330971&view=diff
==============================================================================
--- lld/trunk/test/wasm/stack-pointer.ll (original)
+++ lld/trunk/test/wasm/stack-pointer.ll Thu Apr 26 11:17:21 2018
@@ -50,6 +50,7 @@ entry:
; CHECK-NEXT: Body: 23808080800041106B1A41000B
; CHECK-NEXT: - Type: CUSTOM
; CHECK-NEXT: Name: linking
+; CHECK-NEXT: Version: 1
; CHECK-NEXT: SymbolTable:
; CHECK-NEXT: - Index: 0
; CHECK-NEXT: Kind: FUNCTION
Modified: lld/trunk/test/wasm/weak-alias.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/weak-alias.ll?rev=330971&r1=330970&r2=330971&view=diff
==============================================================================
--- lld/trunk/test/wasm/weak-alias.ll (original)
+++ lld/trunk/test/wasm/weak-alias.ll Thu Apr 26 11:17:21 2018
@@ -250,6 +250,7 @@ entry:
; RELOC-NEXT: Body: 23808080800041106B220024808080800020004181808080003602081081808080002101200041106A24808080800020010B
; RELOC-NEXT: - Type: CUSTOM
; RELOC-NEXT: Name: linking
+; RELOC-NEXT: Version: 1
; RELOC-NEXT: SymbolTable:
; RELOC-NEXT: - Index: 0
; RELOC-NEXT: Kind: FUNCTION
Modified: lld/trunk/wasm/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Writer.cpp?rev=330971&r1=330970&r2=330971&view=diff
==============================================================================
--- lld/trunk/wasm/Writer.cpp (original)
+++ lld/trunk/wasm/Writer.cpp Thu Apr 26 11:17:21 2018
@@ -430,8 +430,7 @@ void Writer::createLinkingSection() {
createSyntheticSection(WASM_SEC_CUSTOM, "linking");
raw_ostream &OS = Section->getStream();
- if (!Config->Relocatable)
- return;
+ writeUleb128(OS, WasmMetadataVersion, "Version");
if (!SymtabEntries.empty()) {
SubSection Sub(WASM_SYMBOL_TABLE);
More information about the llvm-commits
mailing list