diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-15 05:56:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-15 05:56:11 +0000 |
commit | 7d996d907f593d9d1a4c9d79805b2b7adee63f24 (patch) | |
tree | fcdc9ee08f11e76b5ebb8b5c522a305dd9f84625 /include/llvm/MC/MCSectionELF.h | |
parent | bd51c677390d8e13560cbf3ea972b95a5fbc1f9a (diff) | |
download | llvm-7d996d907f593d9d1a4c9d79805b2b7adee63f24.tar.gz llvm-7d996d907f593d9d1a4c9d79805b2b7adee63f24.tar.bz2 llvm-7d996d907f593d9d1a4c9d79805b2b7adee63f24.tar.xz |
add support for target-specific ELF section flags, add a new MCSectionXCore
class which represents the XCore cp/dp section flags. No functionality
change yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCSectionELF.h')
-rw-r--r-- | include/llvm/MC/MCSectionELF.h | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/include/llvm/MC/MCSectionELF.h b/include/llvm/MC/MCSectionELF.h index 1c2943a909..8e70e36961 100644 --- a/include/llvm/MC/MCSectionELF.h +++ b/include/llvm/MC/MCSectionELF.h @@ -34,9 +34,10 @@ class MCSectionELF : public MCSection { /// explicit section specfied. bool IsExplicit; - MCSectionELF(const StringRef &Section, unsigned T, unsigned F, +protected: + MCSectionELF(const StringRef &Section, unsigned type, unsigned flags, SectionKind K, bool isExplicit) - : MCSection(K), SectionName(Section.str()), Type(T), Flags(F), + : MCSection(K), SectionName(Section.str()), Type(type), Flags(flags), IsExplicit(isExplicit) {} public: @@ -93,16 +94,16 @@ public: SHT_REL = 0x09U, // This section type is reserved but has unspecified semantics. - SHT_SHLIB = 0x0aU, + SHT_SHLIB = 0x0AU, // This section holds a symbol table. - SHT_DYNSYM = 0x0bU, + SHT_DYNSYM = 0x0BU, // This section contains an array of pointers to initialization functions. - SHT_INIT_ARRAY = 0x0eU, + SHT_INIT_ARRAY = 0x0EU, // This section contains an array of pointers to termination functions. - SHT_FINI_ARRAY = 0x0fU, + SHT_FINI_ARRAY = 0x0FU, // This section contains an array of pointers to functions that are invoked // before all other initialization functions. @@ -150,7 +151,17 @@ public: SHF_GROUP = 0x200U, // This section holds Thread-Local Storage. - SHF_TLS = 0x400U + SHF_TLS = 0x400U, + + /// FIRST_TARGET_DEP_FLAG - This is the first flag that subclasses are + /// allowed to specify. + FIRST_TARGET_DEP_FLAG = 0x800U, + + /// TARGET_INDEP_SHF - This is the bitmask for all the target independent + /// section flags. Targets can define their own target flags above these. + /// If they do that, they should implement their own MCSectionELF subclasses + /// and implement the virtual method hooks below to handle printing needs. + TARGET_INDEP_SHF = FIRST_TARGET_DEP_FLAG-1U }; StringRef getSectionName() const { @@ -162,6 +173,17 @@ public: virtual void PrintSwitchToSection(const TargetAsmInfo &TAI, raw_ostream &OS) const; + + + /// PrintTargetSpecificSectionFlags - Targets that define their own + /// MCSectionELF subclasses with target specific section flags should + /// implement this method if they end up adding letters to the attributes + /// list. + virtual void PrintTargetSpecificSectionFlags(const TargetAsmInfo &TAI, + raw_ostream &OS) const { + } + + }; } // end namespace llvm |