Skip to content

Commit 2504f14

Browse files
committed
[WebAssembly] Add section names for some DWARF5 sections
Summary: Addresses PR44728 but no tests because I've not yet made any attempt to verify correctness of the debug info. Reviewers: sbc100, aardappel Differential Revision: https://reviews.llvm.org/D74656
1 parent 1a93285 commit 2504f14

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

llvm/lib/MC/MCObjectFileInfo.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,6 @@ void MCObjectFileInfo::initWasmMCObjectFileInfo(const Triple &T) {
771771
Ctx->getWasmSection(".debug_ranges", SectionKind::getMetadata());
772772
DwarfMacinfoSection =
773773
Ctx->getWasmSection(".debug_macinfo", SectionKind::getMetadata());
774-
DwarfAddrSection = Ctx->getWasmSection(".debug_addr", SectionKind::getMetadata());
775774
DwarfCUIndexSection = Ctx->getWasmSection(".debug_cu_index", SectionKind::getMetadata());
776775
DwarfTUIndexSection = Ctx->getWasmSection(".debug_tu_index", SectionKind::getMetadata());
777776
DwarfInfoSection =
@@ -780,6 +779,17 @@ void MCObjectFileInfo::initWasmMCObjectFileInfo(const Triple &T) {
780779
DwarfPubNamesSection = Ctx->getWasmSection(".debug_pubnames", SectionKind::getMetadata());
781780
DwarfPubTypesSection = Ctx->getWasmSection(".debug_pubtypes", SectionKind::getMetadata());
782781

782+
DwarfDebugNamesSection =
783+
Ctx->getWasmSection(".debug_names", SectionKind::getMetadata());
784+
DwarfStrOffSection =
785+
Ctx->getWasmSection(".debug_str_offsets", SectionKind::getMetadata());
786+
DwarfAddrSection =
787+
Ctx->getWasmSection(".debug_addr", SectionKind::getMetadata());
788+
DwarfRnglistsSection =
789+
Ctx->getWasmSection(".debug_rnglists", SectionKind::getMetadata());
790+
DwarfLoclistsSection =
791+
Ctx->getWasmSection(".debug_loclists", SectionKind::getMetadata());
792+
783793
// Wasm use data section for LSDA.
784794
// TODO Consider putting each function's exception table in a separate
785795
// section, as in -function-sections, to facilitate lld's --gc-section.

0 commit comments

Comments
 (0)