LLVM API Documentation

llvm::MachOWriter::MachOSection Struct Reference

#include <MachOWriter.h>

Collaboration diagram for llvm::MachOWriter::MachOSection:
[legend]

List of all members.

Public Types

enum  {
  S_REGULAR = 0, S_ZEROFILL = 1, S_CSTRING_LITERALS = 2, S_4BYTE_LITERALS = 3,
  S_8BYTE_LITERALS = 4, S_LITERAL_POINTERS = 5, S_NON_LAZY_SYMBOL_POINTERS = 6, S_LAZY_SYMBOL_POINTERS = 7,
  S_SYMBOL_STUBS = 8, S_MOD_INIT_FUNC_POINTERS = 9, S_MOD_TERM_FUNC_POINTERS = 10, S_COALESCED = 11,
  S_GB_ZEROFILL = 12, S_INTERPOSING = 13, S_16BYTE_LITERALS = 14
}
enum  {
  S_ATTR_PURE_INSTRUCTIONS = 1 << 31, S_ATTR_NO_TOC = 1 << 30, S_ATTR_STRIP_STATIC_SYMS = 1 << 29, S_ATTR_NO_DEAD_STRIP = 1 << 28,
  S_ATTR_LIVE_SUPPORT = 1 << 27, S_ATTR_SELF_MODIFYING_CODE = 1 << 26, S_ATTR_DEBUG = 1 << 25, S_ATTR_SOME_INSTRUCTIONS = 1 << 10,
  S_ATTR_EXT_RELOC = 1 << 9, S_ATTR_LOC_RELOC = 1 << 8
}

Public Member Functions

unsigned cmdSize (bool is64Bit) const
 MachOSection (const std::string &seg, const std::string &sect)

Public Attributes

std::string sectname
std::string segname
uint64_t addr
uint64_t size
uint32_t offset
uint32_t align
uint32_t reloff
uint32_t nreloc
uint32_t flags
uint32_t reserved1
uint32_t reserved2
uint32_t reserved3
uint32_t Index
DataBuffer SectionData
DataBuffer RelocBuffer
std::vector< MachineRelocation > Relocations


Detailed Description

MachOSection - This struct contains information about each section in a particular segment that is emitted to the file. This is eventually turned into the SectionCommand in the load command for a particlar segment.

Definition at line 309 of file MachOWriter.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
S_REGULAR 
S_ZEROFILL 
S_CSTRING_LITERALS 
S_4BYTE_LITERALS 
S_8BYTE_LITERALS 
S_LITERAL_POINTERS 
S_NON_LAZY_SYMBOL_POINTERS 
S_LAZY_SYMBOL_POINTERS 
S_SYMBOL_STUBS 
S_MOD_INIT_FUNC_POINTERS 
S_MOD_TERM_FUNC_POINTERS 
S_COALESCED 
S_GB_ZEROFILL 
S_INTERPOSING 
S_16BYTE_LITERALS 

Definition at line 342 of file MachOWriter.h.

anonymous enum

Enumerator:
S_ATTR_PURE_INSTRUCTIONS 
S_ATTR_NO_TOC 
S_ATTR_STRIP_STATIC_SYMS 
S_ATTR_NO_DEAD_STRIP 
S_ATTR_LIVE_SUPPORT 
S_ATTR_SELF_MODIFYING_CODE 
S_ATTR_DEBUG 
S_ATTR_SOME_INSTRUCTIONS 
S_ATTR_EXT_RELOC 
S_ATTR_LOC_RELOC 

Definition at line 377 of file MachOWriter.h.


Constructor & Destructor Documentation

llvm::MachOWriter::MachOSection::MachOSection ( const std::string &  seg,
const std::string &  sect 
) [inline]

Definition at line 410 of file MachOWriter.h.


Member Function Documentation

unsigned llvm::MachOWriter::MachOSection::cmdSize ( bool  is64Bit  )  const [inline]

cmdSize - This routine returns the size of the MachOSection as written to disk, depending on whether the destination is a 64 bit Mach-O file.

Definition at line 403 of file MachOWriter.h.


Member Data Documentation

Definition at line 310 of file MachOWriter.h.

Definition at line 311 of file MachOWriter.h.

Definition at line 312 of file MachOWriter.h.

Definition at line 314 of file MachOWriter.h.

Definition at line 315 of file MachOWriter.h.

Referenced by llvm::MachOCodeEmitter::startFunction().

Definition at line 316 of file MachOWriter.h.

Definition at line 317 of file MachOWriter.h.

Definition at line 318 of file MachOWriter.h.

Definition at line 319 of file MachOWriter.h.

Definition at line 320 of file MachOWriter.h.

Definition at line 321 of file MachOWriter.h.

A unique number for this section, which will be used to match symbols to the correct section.

Definition at line 325 of file MachOWriter.h.

Referenced by llvm::MachOCodeEmitter::emitConstantPool(), and llvm::MachOCodeEmitter::finishFunction().

SectionData - The actual data for this section which we are building up for emission to the file.

Definition at line 329 of file MachOWriter.h.

Referenced by llvm::MachOCodeEmitter::emitConstantPool(), and llvm::MachOCodeEmitter::startFunction().

RelocBuffer - A buffer to hold the mach-o relocations before we write them out at the appropriate location in the file.

Definition at line 333 of file MachOWriter.h.

Relocations - The relocations that we have encountered so far in this section that we will need to convert to MachORelocation entries when the file is written.

Definition at line 338 of file MachOWriter.h.

Referenced by llvm::MachOCodeEmitter::emitConstantPool(), and llvm::MachOCodeEmitter::finishFunction().


The documentation for this struct was generated from the following file: