diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-03-14 19:28:51 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-03-14 19:28:51 +0000 |
commit | 43dcf4d330452605faf895f00732f5414127fd61 (patch) | |
tree | f7dc554d5d12ab1936ba9db94ba02e66b44e26d5 /llvm/lib/MC/MCSectionELF.cpp | |
parent | caea769f11d937c63fa2741ed834e129171007bd (diff) | |
download | bcm5719-llvm-43dcf4d330452605faf895f00732f5414127fd61.tar.gz bcm5719-llvm-43dcf4d330452605faf895f00732f5414127fd61.zip |
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
Diffstat (limited to 'llvm/lib/MC/MCSectionELF.cpp')
-rw-r--r-- | llvm/lib/MC/MCSectionELF.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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; |