ELF entry size support.
authorMatt Fleming <matt@console-pimps.org>
Mon, 16 Aug 2010 18:33:46 +0000 (18:33 +0000)
committerMatt Fleming <matt@console-pimps.org>
Mon, 16 Aug 2010 18:33:46 +0000 (18:33 +0000)
Some ELF sections contain fixed-sized entries. Provide a way to record
the entry size of a section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111169 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCContext.h
include/llvm/MC/MCSectionELF.h

index 4db0491972800cecd9bfa8a96fe3f043626fb244..17e79fb1e9eb8670c2d8aa94d2a8997ec4b78191 100644 (file)
@@ -129,7 +129,8 @@ namespace llvm {
     
     const MCSection *getELFSection(StringRef Section, unsigned Type,
                                    unsigned Flags, SectionKind Kind,
-                                   bool IsExplicit = false);
+                                   bool IsExplicit = false,
+                                   unsigned EntrySize = 0);
 
     const MCSection *getCOFFSection(StringRef Section, unsigned Characteristics,
                                     int Selection, SectionKind Kind);
index 5fe81718069158fac13b9b9972eb3fd9bca38dd7..a90aa38156ab25d42a1e68402990646789d1c578 100644 (file)
@@ -35,6 +35,11 @@ class MCSectionELF : public MCSection {
   /// IsExplicit - Indicates that this section comes from globals with an
   /// explicit section specified.
   bool IsExplicit;
+
+  /// 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.
+  unsigned EntrySize;
   
 private:
   friend class MCContext;