[WebAssembly] Add Object and ObjectWriter support for wasm COMDAT sections
authorDerek Schuff <dschuff@chromium.org>
Fri, 4 Dec 2020 21:45:42 +0000 (13:45 -0800)
committerDerek Schuff <dschuff@chromium.org>
Mon, 7 Dec 2020 20:12:44 +0000 (12:12 -0800)
commit0a391060f16dc3e10bcb0b02036073021c414006
treee614e3665e5cda86cc772eaebc2cd5183a31584a
parent5fe1a49f961d7e6a064addf6373288d5e3697e68
[WebAssembly] Add Object and ObjectWriter support for wasm COMDAT sections

Allow sections to be placed into COMDAT groups, in addtion to functions and data
segments.

Also make section symbols unnamed, which allows sections with identical names
(section names are independent of their section symbols, but previously we
gave the symbols the same name as their sections, which results in collisions
when sections are identically-named).

Differential Revision: https://reviews.llvm.org/D92691
llvm/include/llvm/BinaryFormat/Wasm.h
llvm/include/llvm/Object/Wasm.h
llvm/lib/MC/MCContext.cpp
llvm/lib/MC/MCObjectFileInfo.cpp
llvm/lib/MC/WasmObjectWriter.cpp
llvm/lib/Object/WasmObjectFile.cpp
llvm/lib/ObjectYAML/WasmYAML.cpp
llvm/test/DebugInfo/WebAssembly/dwarf-headers.ll
llvm/test/MC/WebAssembly/comdat-sections.ll [new file with mode: 0644]
llvm/tools/obj2yaml/wasm2yaml.cpp