[WebAssembly][lld] Exclude COMDAT sections
authorDerek Schuff <dschuff@chromium.org>
Wed, 9 Dec 2020 18:57:27 +0000 (10:57 -0800)
committerDerek Schuff <dschuff@chromium.org>
Fri, 11 Dec 2020 01:47:41 +0000 (17:47 -0800)
commitdd6412c05c1039e582a970da1aee62cdde75c892
tree65ff6eff17e5a9221565337c1842547b2c7c4c0e
parent6b1bf905d01e6b459d6afde424c8fe76741d865c
[WebAssembly][lld] Exclude COMDAT sections

Allow exclusion/discarding of custom sections with COMDAT groups.
It piggybacks on the existing COMDAT-handling code, but applies to custom sections as well.

Differential Revision: https://reviews.llvm.org/D92950
lld/test/wasm/Inputs/comdat1.s [new file with mode: 0644]
lld/test/wasm/Inputs/comdat2.s [new file with mode: 0644]
lld/test/wasm/comdat-sections.s [new file with mode: 0644]
lld/wasm/InputChunks.h
lld/wasm/InputFiles.cpp
lld/wasm/OutputSections.cpp
lld/wasm/Writer.cpp