From 43dcf4d330452605faf895f00732f5414127fd61 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Tue, 14 Mar 2017 19:28:51 +0000 Subject: Fix asm printing of associated sections. Make MCSectionELF::AssociatedSection be a link to a symbol, because that's how it works in the assembly, and use it in the asm printer. llvm-svn: 297769 --- llvm/lib/MC/MCSectionELF.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'llvm/lib/MC/MCSectionELF.cpp') diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp index a352f84cfe9..56c51d7539e 100644 --- a/llvm/lib/MC/MCSectionELF.cpp +++ b/llvm/lib/MC/MCSectionELF.cpp @@ -103,6 +103,8 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T, OS << 'S'; if (Flags & ELF::SHF_TLS) OS << 'T'; + if (Flags & ELF::SHF_LINK_ORDER) + OS << 'm'; // If there are target-specific flags, print them. Triple::ArchType Arch = T.getArch(); @@ -160,6 +162,12 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T, OS << ",comdat"; } + if (Flags & ELF::SHF_LINK_ORDER) { + assert(AssociatedSymbol); + OS << ","; + printName(OS, AssociatedSymbol->getName()); + } + if (isUnique()) OS << ",unique," << UniqueID; -- cgit v1.2.3