diff options
author | Sam Clegg <sbc@chromium.org> | 2018-05-10 17:38:35 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2018-05-10 17:38:35 +0000 |
commit | b210c64b281baad0ac705d62e6c298a1629449eb (patch) | |
tree | 3dee50a416b4658eeee8eee301002450e34b897b /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | baf045fb284c8d1c263478b5bad99b737b905e4b (diff) | |
download | bcm5719-llvm-b210c64b281baad0ac705d62e6c298a1629449eb.tar.gz bcm5719-llvm-b210c64b281baad0ac705d62e6c298a1629449eb.zip |
[WebAssembly] Create section start symbols automatically for all sections
These symbols only get included in the output symbols table if
they are used in a relocation.
This behaviour matches more closely the ELF object writer.
Differential Revision: https://reviews.llvm.org/D46561
llvm-svn: 332005
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index e2890172881..b075f225ed2 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -861,27 +861,29 @@ void MCObjectFileInfo::initCOFFMCObjectFileInfo(const Triple &T) { } void MCObjectFileInfo::initWasmMCObjectFileInfo(const Triple &T) { - // TODO: Set the section types and flags. TextSection = Ctx->getWasmSection(".text", SectionKind::getText()); DataSection = Ctx->getWasmSection(".data", SectionKind::getData()); - // TODO: Set the section types and flags. - DwarfLineSection = Ctx->getWasmSection(".debug_line", SectionKind::getMetadata(), ".debug_line"); + DwarfLineSection = + Ctx->getWasmSection(".debug_line", SectionKind::getMetadata()); DwarfLineStrSection = Ctx->getWasmSection(".debug_line_str", SectionKind::getMetadata()); - DwarfStrSection = Ctx->getWasmSection(".debug_str", SectionKind::getMetadata(), ".debug_str"); - DwarfLocSection = Ctx->getWasmSection( - ".debug_loc", SectionKind::getMetadata(), ".debug_loc"); - DwarfAbbrevSection = Ctx->getWasmSection( - ".debug_abbrev", SectionKind::getMetadata(), ".debug_abbrev"); + DwarfStrSection = + Ctx->getWasmSection(".debug_str", SectionKind::getMetadata()); + DwarfLocSection = + Ctx->getWasmSection(".debug_loc", SectionKind::getMetadata()); + DwarfAbbrevSection = + Ctx->getWasmSection(".debug_abbrev", SectionKind::getMetadata()); DwarfARangesSection = Ctx->getWasmSection(".debug_aranges", SectionKind::getMetadata()); - DwarfRangesSection = Ctx->getWasmSection( - ".debug_ranges", SectionKind::getMetadata(), ".debug_ranges"); - DwarfMacinfoSection = Ctx->getWasmSection(".debug_macinfo", SectionKind::getMetadata(), ".debug_macinfo"); + DwarfRangesSection = + Ctx->getWasmSection(".debug_ranges", SectionKind::getMetadata()); + DwarfMacinfoSection = + Ctx->getWasmSection(".debug_macinfo", SectionKind::getMetadata()); DwarfAddrSection = Ctx->getWasmSection(".debug_addr", SectionKind::getMetadata()); DwarfCUIndexSection = Ctx->getWasmSection(".debug_cu_index", SectionKind::getMetadata()); DwarfTUIndexSection = Ctx->getWasmSection(".debug_tu_index", SectionKind::getMetadata()); - DwarfInfoSection = Ctx->getWasmSection(".debug_info", SectionKind::getMetadata(), ".debug_info"); + DwarfInfoSection = + Ctx->getWasmSection(".debug_info", SectionKind::getMetadata()); DwarfFrameSection = Ctx->getWasmSection(".debug_frame", SectionKind::getMetadata()); DwarfPubNamesSection = Ctx->getWasmSection(".debug_pubnames", SectionKind::getMetadata()); DwarfPubTypesSection = Ctx->getWasmSection(".debug_pubtypes", SectionKind::getMetadata()); |