Skip to content

Commit 17d0ddd

Browse files
dschufftstellar
authored andcommitted
[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 (cherry picked from commit 2504f14)
1 parent 4b2f37b commit 17d0ddd

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
@@ -761,7 +761,6 @@ void MCObjectFileInfo::initWasmMCObjectFileInfo(const Triple &T) {
761761
Ctx->getWasmSection(".debug_ranges", SectionKind::getMetadata());
762762
DwarfMacinfoSection =
763763
Ctx->getWasmSection(".debug_macinfo", SectionKind::getMetadata());
764-
DwarfAddrSection = Ctx->getWasmSection(".debug_addr", SectionKind::getMetadata());
765764
DwarfCUIndexSection = Ctx->getWasmSection(".debug_cu_index", SectionKind::getMetadata());
766765
DwarfTUIndexSection = Ctx->getWasmSection(".debug_tu_index", SectionKind::getMetadata());
767766
DwarfInfoSection =
@@ -770,6 +769,17 @@ void MCObjectFileInfo::initWasmMCObjectFileInfo(const Triple &T) {
770769
DwarfPubNamesSection = Ctx->getWasmSection(".debug_pubnames", SectionKind::getMetadata());
771770
DwarfPubTypesSection = Ctx->getWasmSection(".debug_pubtypes", SectionKind::getMetadata());
772771

772+
DwarfDebugNamesSection =
773+
Ctx->getWasmSection(".debug_names", SectionKind::getMetadata());
774+
DwarfStrOffSection =
775+
Ctx->getWasmSection(".debug_str_offsets", SectionKind::getMetadata());
776+
DwarfAddrSection =
777+
Ctx->getWasmSection(".debug_addr", SectionKind::getMetadata());
778+
DwarfRnglistsSection =
779+
Ctx->getWasmSection(".debug_rnglists", SectionKind::getMetadata());
780+
DwarfLoclistsSection =
781+
Ctx->getWasmSection(".debug_loclists", SectionKind::getMetadata());
782+
773783
// Wasm use data section for LSDA.
774784
// TODO Consider putting each function's exception table in a separate
775785
// section, as in -function-sections, to facilitate lld's --gc-section.

0 commit comments

Comments
 (0)