LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::MCSectionMachO Class Reference

#include <MCSectionMachO.h>

Inheritance diagram for llvm::MCSectionMachO:
Inheritance graph
[legend]
Collaboration diagram for llvm::MCSectionMachO:
Collaboration graph
[legend]

Public Member Functions

enum LLVM_ENUM_INT_TYPE (uint32_t)
 
StringRef getSegmentName () const
 
StringRef getSectionName () const
 
virtual std::string getLabelBeginName () const
 
virtual std::string getLabelEndName () const
 
unsigned getTypeAndAttributes () const
 
unsigned getStubSize () const
 
unsigned getType () const
 
bool hasAttribute (unsigned Value) const
 
virtual void PrintSwitchToSection (const MCAsmInfo &MAI, raw_ostream &OS, const MCExpr *Subsection) const
 
virtual bool UseCodeAlign () const
 
virtual bool isVirtualSection () const
 
- Public Member Functions inherited from llvm::MCSection
virtual ~MCSection ()
 
SectionKind getKind () const
 
SectionVariant getVariant () const
 
virtual bool isBaseAddressKnownZero () const
 

Static Public Member Functions

static std::string ParseSectionSpecifier (StringRef Spec, StringRef &Segment, StringRef &Section, unsigned &TAA, bool &TAAParsed, unsigned &StubSize)
 
static bool classof (const MCSection *S)
 

Friends

class MCContext
 

Additional Inherited Members

- Public Types inherited from llvm::MCSection
enum  SectionVariant { SV_COFF = 0, SV_ELF, SV_MachO }
 
- Protected Member Functions inherited from llvm::MCSection
 MCSection (SectionVariant V, SectionKind K)
 
- Protected Attributes inherited from llvm::MCSection
SectionVariant Variant
 
SectionKind Kind
 

Detailed Description

MCSectionMachO - This represents a section on a Mach-O system (used by Mac OS X). On a Mac system, these are also described in /usr/include/mach-o/loader.h.

Definition at line 25 of file MCSectionMachO.h.

Member Function Documentation

static bool llvm::MCSectionMachO::classof ( const MCSection S)
inlinestatic

Definition at line 183 of file MCSectionMachO.h.

References llvm::MCSection::getVariant(), and llvm::MCSection::SV_MachO.

virtual std::string llvm::MCSectionMachO::getLabelBeginName ( ) const
inlinevirtual

Implements llvm::MCSection.

Definition at line 148 of file MCSectionMachO.h.

References getSectionName(), and getSegmentName().

virtual std::string llvm::MCSectionMachO::getLabelEndName ( ) const
inlinevirtual

Implements llvm::MCSection.

Definition at line 152 of file MCSectionMachO.h.

References getSectionName(), and getSegmentName().

StringRef llvm::MCSectionMachO::getSectionName ( ) const
inline
StringRef llvm::MCSectionMachO::getSegmentName ( ) const
inline
unsigned llvm::MCSectionMachO::getStubSize ( ) const
inline
unsigned llvm::MCSectionMachO::getType ( ) const
inline
unsigned llvm::MCSectionMachO::getTypeAndAttributes ( ) const
inline
bool llvm::MCSectionMachO::hasAttribute ( unsigned  Value) const
inline

Definition at line 160 of file MCSectionMachO.h.

Referenced by UseCodeAlign().

bool MCSectionMachO::isVirtualSection ( ) const
virtual

isVirtualSection - Check whether this section is "virtual", that is has no actual object file contents.

Implements llvm::MCSection.

Definition at line 161 of file MCSectionMachO.cpp.

References getType(), llvm::MachO::S_GB_ZEROFILL, llvm::MachO::S_THREAD_LOCAL_ZEROFILL, and llvm::MachO::S_ZEROFILL.

enum llvm::MCSectionMachO::LLVM_ENUM_INT_TYPE ( uint32_t  )
inline

These are the section type and attributes fields. A MachO section can have only one Type, but can have any of the attributes specified.

S_REGULAR - Regular section.

S_ZEROFILL - Zero fill on demand section.

S_CSTRING_LITERALS - Section with literal C strings.

S_4BYTE_LITERALS - Section with 4 byte literals.

S_8BYTE_LITERALS - Section with 8 byte literals.

S_LITERAL_POINTERS - Section with pointers to literals.

S_NON_LAZY_SYMBOL_POINTERS - Section with non-lazy symbol pointers.

S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.

S_SYMBOL_STUBS - Section with symbol stubs, byte size of stub in the Reserved2 field.

S_MOD_INIT_FUNC_POINTERS - Section with only function pointers for initialization.

S_MOD_TERM_FUNC_POINTERS - Section with only function pointers for termination.

S_COALESCED - Section contains symbols that are to be coalesced.

S_GB_ZEROFILL - Zero fill on demand section (that can be larger than 4 gigabytes).

S_INTERPOSING - Section with only pairs of function pointers for interposing.

S_16BYTE_LITERALS - Section with only 16 byte literals.

S_DTRACE_DOF - Section contains DTrace Object Format.

S_LAZY_DYLIB_SYMBOL_POINTERS - Section with lazy symbol pointers to lazy loaded dylibs.

S_THREAD_LOCAL_REGULAR - Section with ....

S_THREAD_LOCAL_ZEROFILL - Thread local zerofill section.

S_THREAD_LOCAL_VARIABLES - Section with thread local variable structure data.

S_THREAD_LOCAL_VARIABLE_POINTERS - Section with ....

S_THREAD_LOCAL_INIT_FUNCTION_POINTERS - Section with thread local variable initialization pointers to functions.

S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine instructions.

S_ATTR_NO_TOC - Section contains coalesced symbols that are not to be in a ranlib table of contents.

S_ATTR_STRIP_STATIC_SYMS - Ok to strip static symbols in this section in files with the MY_DYLDLINK flag.

S_ATTR_NO_DEAD_STRIP - No dead stripping.

S_ATTR_LIVE_SUPPORT - Blocks are live if they reference live blocks.

S_ATTR_SELF_MODIFYING_CODE - Used with i386 code stubs written on by dyld.

S_ATTR_DEBUG - A debug section.

S_ATTR_SOME_INSTRUCTIONS - Section contains some machine instructions.

S_ATTR_EXT_RELOC - Section has external relocation entries.

S_ATTR_LOC_RELOC - Section has local relocation entries.

Definition at line 44 of file MCSectionMachO.h.

References llvm::MachO::S_16BYTE_LITERALS, llvm::MachO::S_4BYTE_LITERALS, llvm::MachO::S_8BYTE_LITERALS, llvm::MachO::S_COALESCED, llvm::MachO::S_CSTRING_LITERALS, llvm::MachO::S_DTRACE_DOF, llvm::MachO::S_GB_ZEROFILL, llvm::MachO::S_INTERPOSING, llvm::MachO::S_LAZY_DYLIB_SYMBOL_POINTERS, llvm::MachO::S_LAZY_SYMBOL_POINTERS, llvm::MachO::S_LITERAL_POINTERS, llvm::MachO::S_MOD_INIT_FUNC_POINTERS, llvm::MachO::S_MOD_TERM_FUNC_POINTERS, llvm::MachO::S_NON_LAZY_SYMBOL_POINTERS, llvm::MachO::S_REGULAR, llvm::MachO::S_SYMBOL_STUBS, llvm::MachO::S_THREAD_LOCAL_INIT_FUNCTION_POINTERS, llvm::MachO::S_THREAD_LOCAL_REGULAR, llvm::MachO::S_THREAD_LOCAL_VARIABLE_POINTERS, llvm::MachO::S_THREAD_LOCAL_VARIABLES, llvm::MachO::S_THREAD_LOCAL_ZEROFILL, and llvm::MachO::S_ZEROFILL.

std::string MCSectionMachO::ParseSectionSpecifier ( StringRef  Spec,
StringRef Segment,
StringRef Section,
unsigned TAA,
bool TAAParsed,
unsigned StubSize 
)
static

ParseSectionSpecifier - Parse the section specifier indicated by "Spec". This is a string that can appear after a .section directive in a mach-o flavored .s file. If successful, this fills in the specified Out parameters and returns an empty string. When an invalid section specifier is present, this returns a string indicating the problem. If no TAA was parsed, TAA is not altered, and TAAWasSet becomes false.

ParseSectionSpecifier - Parse the section specifier indicated by "Spec". This is a string that can appear after a .section directive in a mach-o flavored .s file. If successful, this fills in the specified Out parameters and returns an empty string. When an invalid section specifier is present, this returns a string indicating the problem.

Definition at line 180 of file MCSectionMachO.cpp.

References AssemblerName, AttrFlag, AttrFlagEnd, llvm::StringRef::empty(), llvm::StringRef::getAsInteger(), llvm::MachO::S_SYMBOL_STUBS, SectionAttrDescriptors, SectionTypeDescriptors, llvm::StringRef::size(), llvm::StringRef::split(), and StripSpaces().

Referenced by llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), and llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal().

void MCSectionMachO::PrintSwitchToSection ( const MCAsmInfo MAI,
raw_ostream OS,
const MCExpr Subsection 
) const
virtual
bool MCSectionMachO::UseCodeAlign ( ) const
virtual

Implements llvm::MCSection.

Definition at line 157 of file MCSectionMachO.cpp.

References hasAttribute().

Friends And Related Function Documentation

friend class MCContext
friend

Definition at line 39 of file MCSectionMachO.h.


The documentation for this class was generated from the following files: