Object
:
Header
:Parameters
:Opcode size
- the number of bits in an opcodeText byte
- the number of bits in a byte of textData byte
- the number of bits in a byte of dataText address
- the number of bits in a text addressData address
- the number of bits in a data address
Section table size
- the number of sections in the segment
Section table
:Section table entries
, each:Section type
- data, text, symbol table or relocation tableSection size
- the number of bytes in a section (for text or data) or the number of symbols (for Symbol table or Relocation table)
Sections
(Text, Data, Symbol table or Relocation table)
Text
, Data
:
- Just a sequence of bytes
Symbol table
:
- Each
symbol
(a symbol is basically a label):Section id
- in which section the symbol is locatedOffset
- the offset (in bytes) in the section to the symbolName address
- the location (in bits), where to find the name of the symbol in theString
String
- concatinated names of the symbols (in format:name1\0name2\0name3\0
)
Relocation table
:
- Each
relocation
:Location
:Section
- the id of section in which the relocation is locatedOffset
- the offset (in bytes) in the section to byt of the relocation
Name address
- the location (in bits), where to find the name of the symbol in theString
o theSymbol table
Symbol size
- how many bits should be replacedSymbol offset
- the offset inside the byte, where the bits should be replacedRelative
- if the relocation is relative or absolute (if relative, it will make the relocation position independently)