55using ReferenceManager::SectionKey;
56using ReferenceManager::SectionOffsetKey;
57using ReferenceManager::SafePointer;
102 codeASpace_(NULL), dataASpace_(NULL) {
271 textRelocSection->
setLink(symbolTable);
276 dataRelocSection->
setLink(symbolTable);
#define assert(condition)
static const HalfWord OMAGIC
Move a.out format identifier.
static Header header_
Header of a.out file.
virtual Binary * readData(BinaryStream &stream) const
static const Word FIRST_INT_REGISTER
Index of the first integer register in a.out.
static const Byte AOUT_WORD_ALIGN
Aligment of address space.
static const Byte AOUT_WORD_SIZE
Word size of address space.
static ResourceSection * resourceTable_
void addOrDeleteSection(Section *section, Binary *binary) const
static const char * AOUT_CODE_ASPACE_NAME
Name of universal machines code address space.
void readHeader(BinaryStream &stream) const
virtual bool isMyStreamType(BinaryStream &stream) const
static const Word INT_REGISTERS
Number of integer registers.
@ ST_UDATA
Uninitialized data section.
static const char * AOUT_DATA_ASPACE_NAME
Name of universal machines data address space.
static NullSection * nullSection_
ASpaceElement * codeASpace_
Address space of text section.
ASpaceElement * undefASpace_
Undefined address space.
static CodeSection * textSection_
static const Word FP_REGISTERS
Number of floating-point registers.
void readSection(BinaryStream &stream, FileOffset startPosition, Section *section, Length length) const
ASpaceElement * dataASpace_
Address space of data sections.
static StringSection * stringSection_
static const Byte FILE_HEADER_SIZE
Size of file header.
static DebugSection * debugSection_
static const Word FIRST_BOOL_REGISTER
Index of the first Boolean register.
static const Word BOOL_REGISTERS
Number of Boolean registers.
static const Byte AOUT_INSTRUCTION_SIZE
Size of one instruction in a.out file.
static const Word FIRST_FU_REGISTER
Index of the first function unit register.
static const Word FIRST_FP_REGISTER
Index of the first floating-point register.
static AOutReader * proto_
Prototype instance of AOutReader registered into BinaryReader.
static const Byte AOUT_BITS_PER_MAU
Minimum addressable word of address space.
void setName(const ReferenceManager::SafePointer *aName)
void setAlign(Byte aAlign)
void setWordSize(Byte aWordSize)
void setUndefinedASpace(ASpaceElement *aSpace)
static void registerBinaryReader(BinaryReader *reader)
void setReadPosition(unsigned int position)
unsigned int readPosition()
unsigned int sizeOfFile()
void addSection(Section *section)
void setArch(FileArchitecture arch)
@ FT_OBJSEQ
Sequential TTA object code.
@ FA_TTA_TUT
New TTA template.
void setType(FileType type)
void setStrings(StringSection *strTable)
virtual Word length() const
virtual void setDataLength(Word length)
static void addObjectReference(SectionIndexKey key, const SafePointable *obj)
void setReferencedSection(Section *section)
static Section * createSection(SectionType type)
virtual void addElement(SectionElement *element)
@ ST_DATA
Initialized data section.
@ ST_ADDRSP
Address space section.
@ ST_UDATA
Uninitialized data section.
@ ST_RELOC
Relocation section.
@ ST_MR
Machine resources section.
void setStartingAddress(AddressImage address)
void setLink(const ReferenceManager::SafePointer *aLink)
void setASpace(const ReferenceManager::SafePointer *addrSpace)
void setName(const ReferenceManager::SafePointer *sectionName)
Chunk * string2Chunk(const std::string &str)
Word SectionOffset
Type for storing offsets relative to a given base offset value.
Word FileOffset
Type for storing absolute file offsets.