diff options
author | George Rimar <grimar@accesssoftek.com> | 2016-05-19 15:58:05 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2016-05-19 15:58:05 +0000 |
commit | cf2bf9d0153cc866db59cca95ae7d03944f8c170 (patch) | |
tree | 6170d434cb7e4970acbeee4b91e20d9fb591b38b /llvm/lib/MC/MCContext.cpp | |
parent | 46f249b4cd565b4844bf769de94a4106997ac4e2 (diff) | |
download | bcm5719-llvm-cf2bf9d0153cc866db59cca95ae7d03944f8c170.tar.gz bcm5719-llvm-cf2bf9d0153cc866db59cca95ae7d03944f8c170.zip |
Temporarily revert r270070
It broke buildbot:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/4817/steps/ninja%20check%201/logs/stdio
Actually it is just because D20273 not yet commited, but these 2 were crossing with each other,
and I`ll better find the way to land them separatelly soon.
Initial commit message:
[llvm-mc] - Teach llvm-mc to generate compressed debug sections in zlib style.
Before this patch llvm-mc generated zlib-gnu styled sections.
That means no SHF_COMPRESSED flag was set, magic 'zlib' signature
was used in combination with full size field. Sections were renamed to "*.z*".
This patch reimplements the compression style to zlib one as zlib-gnu looks
to be depricated everywhere.
Differential revision: http://reviews.llvm.org/D20331
llvm-svn: 270075
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index aa15ff69904..67463e583d7 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -285,6 +285,22 @@ MCSectionMachO *MCContext::getMachOSection(StringRef Segment, StringRef Section, Segment, Section, TypeAndAttributes, Reserved2, Kind, Begin); } +void MCContext::renameELFSection(MCSectionELF *Section, StringRef Name) { + StringRef GroupName; + if (const MCSymbol *Group = Section->getGroup()) + GroupName = Group->getName(); + + unsigned UniqueID = Section->getUniqueID(); + ELFUniquingMap.erase( + ELFSectionKey{Section->getSectionName(), GroupName, UniqueID}); + auto I = ELFUniquingMap.insert(std::make_pair( + ELFSectionKey{Name, GroupName, UniqueID}, + Section)) + .first; + StringRef CachedName = I->first.SectionName; + const_cast<MCSectionELF *>(Section)->setSectionName(CachedName); +} + MCSectionELF *MCContext::createELFRelSection(StringRef Name, unsigned Type, unsigned Flags, unsigned EntrySize, const MCSymbolELF *Group, |