From c22bfb6b4b37042897f7253f90e84c645b3e8562 Mon Sep 17 00:00:00 2001 From: Nicholas Wilson Date: Mon, 5 Mar 2018 12:59:03 +0000 Subject: [WebAssembly] Reorder reloc sections to come between symtab and name This is required in order to enable relocs to be validated as they are read in. Also update tests with new section ordering. Differential Revision: https://reviews.llvm.org/D43940 llvm-svn: 326694 --- llvm/lib/MC/WasmObjectWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/MC/WasmObjectWriter.cpp') diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp index 3c86ca47e48..87ef0d927ee 100644 --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -1307,9 +1307,9 @@ void WasmObjectWriter::writeObject(MCAssembler &Asm, writeElemSection(TableElems); writeCodeSection(Asm, Layout, Functions); writeDataSection(); + writeLinkingMetaDataSection(SymbolInfos, InitFuncs, Comdats); writeCodeRelocSection(); writeDataRelocSection(); - writeLinkingMetaDataSection(SymbolInfos, InitFuncs, Comdats); // TODO: Translate the .comment section to the output. // TODO: Translate debug sections to the output. -- cgit v1.2.3