diff options
author | Sam Clegg <sbc@chromium.org> | 2021-05-12 16:48:34 -0700 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2021-05-18 12:25:39 -0700 |
commit | 45b7cf995551a0c0743e5d69f611bba7e4072ddf (patch) | |
tree | a3e77a7f765f2170e74e6f304ac4c4e1b2306dd7 /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 8dd5ef01ef13e402784bba47f7a24175f5f00325 (diff) | |
download | llvm-45b7cf995551a0c0743e5d69f611bba7e4072ddf.zip llvm-45b7cf995551a0c0743e5d69f611bba7e4072ddf.tar.gz llvm-45b7cf995551a0c0743e5d69f611bba7e4072ddf.tar.bz2 |
[lld][WebAssembly] Enable string tail merging in debug sections
This is a followup to https://reviews.llvm.org/D97657 which
applied string tail merging to data segments.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=48828
Differential Revision: https://reviews.llvm.org/D102436
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 92091ff..1a448f0 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -11,6 +11,7 @@ #include "llvm/ADT/Triple.h" #include "llvm/BinaryFormat/COFF.h" #include "llvm/BinaryFormat/ELF.h" +#include "llvm/BinaryFormat/Wasm.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCSection.h" @@ -791,9 +792,10 @@ void MCObjectFileInfo::initWasmMCObjectFileInfo(const Triple &T) { DwarfLineSection = Ctx->getWasmSection(".debug_line", SectionKind::getMetadata()); DwarfLineStrSection = - Ctx->getWasmSection(".debug_line_str", SectionKind::getMetadata()); - DwarfStrSection = - Ctx->getWasmSection(".debug_str", SectionKind::getMetadata()); + Ctx->getWasmSection(".debug_line_str", SectionKind::getMetadata(), + wasm::WASM_SEG_FLAG_STRINGS); + DwarfStrSection = Ctx->getWasmSection( + ".debug_str", SectionKind::getMetadata(), wasm::WASM_SEG_FLAG_STRINGS); DwarfLocSection = Ctx->getWasmSection(".debug_loc", SectionKind::getMetadata()); DwarfAbbrevSection = @@ -836,7 +838,8 @@ void MCObjectFileInfo::initWasmMCObjectFileInfo(const Triple &T) { DwarfAbbrevDWOSection = Ctx->getWasmSection(".debug_abbrev.dwo", SectionKind::getMetadata()); DwarfStrDWOSection = - Ctx->getWasmSection(".debug_str.dwo", SectionKind::getMetadata()); + Ctx->getWasmSection(".debug_str.dwo", SectionKind::getMetadata(), + wasm::WASM_SEG_FLAG_STRINGS); DwarfLineDWOSection = Ctx->getWasmSection(".debug_line.dwo", SectionKind::getMetadata()); DwarfLocDWOSection = |