From fb807d4dd49f912313ea2fde4fd3acac271a09cb Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Mon, 7 May 2018 19:40:50 +0000 Subject: [WebAssembly] Ensure all .debug_XXX section has proper symbol names Updated wasm section symbols names to match section name, and ensure all referenced sections will have a symbol (per DWARF spec v3, Figure 43) Patch by Yury Delendik! Differential Revision: https://reviews.llvm.org/D46543 llvm-svn: 331664 --- llvm/lib/MC/MCObjectFileInfo.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp') diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index ce9c3529f4f..e2890172881 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -870,10 +870,13 @@ void MCObjectFileInfo::initWasmMCObjectFileInfo(const Triple &T) { DwarfLineStrSection = Ctx->getWasmSection(".debug_line_str", SectionKind::getMetadata()); DwarfStrSection = Ctx->getWasmSection(".debug_str", SectionKind::getMetadata(), ".debug_str"); - DwarfLocSection = Ctx->getWasmSection(".debug_loc", SectionKind::getMetadata()); - DwarfAbbrevSection = Ctx->getWasmSection(".debug_abbrev", SectionKind::getMetadata(), ".section_abbrev"); + DwarfLocSection = Ctx->getWasmSection( + ".debug_loc", SectionKind::getMetadata(), ".debug_loc"); + DwarfAbbrevSection = Ctx->getWasmSection( + ".debug_abbrev", SectionKind::getMetadata(), ".debug_abbrev"); DwarfARangesSection = Ctx->getWasmSection(".debug_aranges", SectionKind::getMetadata()); - DwarfRangesSection = Ctx->getWasmSection(".debug_ranges", SectionKind::getMetadata(), ".debug_range"); + DwarfRangesSection = Ctx->getWasmSection( + ".debug_ranges", SectionKind::getMetadata(), ".debug_ranges"); DwarfMacinfoSection = Ctx->getWasmSection(".debug_macinfo", SectionKind::getMetadata(), ".debug_macinfo"); DwarfAddrSection = Ctx->getWasmSection(".debug_addr", SectionKind::getMetadata()); DwarfCUIndexSection = Ctx->getWasmSection(".debug_cu_index", SectionKind::getMetadata()); -- cgit v1.2.3