mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
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:
@@ -39,6 +39,8 @@ class MCSectionELF : public MCSection {
|
||||
/// below.
|
||||
unsigned Flags;
|
||||
|
||||
bool Unique;
|
||||
|
||||
/// EntrySize - The size of each entry in this section. This size only
|
||||
/// makes sense for sections that contain fixed-sized entries. If a
|
||||
/// section does not contain fixed-sized entries 'EntrySize' will be 0.
|
||||
@@ -48,10 +50,10 @@ class MCSectionELF : public MCSection {
|
||||
|
||||
private:
|
||||
friend class MCContext;
|
||||
MCSectionELF(StringRef Section, unsigned type, unsigned flags,
|
||||
SectionKind K, unsigned entrySize, const MCSymbol *group)
|
||||
: MCSection(SV_ELF, K), SectionName(Section), Type(type), Flags(flags),
|
||||
EntrySize(entrySize), Group(group) {}
|
||||
MCSectionELF(StringRef Section, unsigned type, unsigned flags, SectionKind K,
|
||||
unsigned entrySize, const MCSymbol *group, bool Unique)
|
||||
: MCSection(SV_ELF, K), SectionName(Section), Type(type), Flags(flags),
|
||||
Unique(Unique), EntrySize(entrySize), Group(group) {}
|
||||
~MCSectionELF();
|
||||
|
||||
void setSectionName(StringRef Name) { SectionName = Name; }
|
||||
|
Reference in New Issue
Block a user