Add r228980 back.

Add support for having multiple sections with the same name and comdat.

Using this in combination with -ffunction-sections allows LLVM to output a .o
file with mulitple sections named .text. This saves space by avoiding long
unique names of the form .text.<C++ mangled name>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229541 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-02-17 20:48:01 +00:00
parent 84f0507260
commit e0a2541eb7
10 changed files with 72 additions and 29 deletions

View File

@@ -277,6 +277,10 @@ namespace llvm {
unsigned Flags, unsigned EntrySize,
StringRef Group);
const MCSectionELF *getELFSection(StringRef Section, unsigned Type,
unsigned Flags, unsigned EntrySize,
StringRef Group, bool Unique);
void renameELFSection(const MCSectionELF *Section, StringRef Name);
const MCSectionELF *CreateELFGroupSection();