| www.delorie.com/gnu/docs/binutils/bfd_208.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Contents is entered as 32-bit words, xor:ed over previous contents, always zero-initialized. A word that starts with the byte `0x98' forms a command called a `lopcode', where the next byte distinguished between the thirteen lopcodes. The two remaining bytes, called the `Y' and `Z' fields, or the `YZ' field (a 16-bit big-endian number), are used for various purposes different for each lopcode. As documented in http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz, the lopcodes are:
There is provision for specifying "special data" of 65536
different types. We use type 80 (decimal), arbitrarily chosen the
same as the ELF e_machine number for MMIX, filling it with
section information normally found in ELF objects. See section 3.3.3 mmo section mapping.
lop_quote
lop_loc
lop_skip
lop_fixo
lop_fixr
lop_fixrx
lop_file
lop_line
lop_spec
Other types than 80, (or type 80 with a content that does not
parse) is stored in sections named .MMIX.spec_data.n
where n is the `YZ'-type. The flags for such a
sections say not to allocate or load the data. The vma is 0.
Contents of multiple occurrences of special data n is
concatenated to the data of the previous lop_spec ns. The
location in data or code at which the lop_spec occurred is lost.
lop_pre
lop_post
lop_stab
lop_end
Note that the lopcode "fixups"; lop_fixr, lop_fixrx and
lop_fixo are not generated by BFD, but are handled. They are
generated by mmixal.
This trivial one-label, one-instruction file:
:Main TRAP 1,2,3 |
can be represented this way in mmo:
0x98090101 - lop_pre, one 32-bit word with timestamp.
<timestamp>
0x98010002 - lop_loc, text segment, using a 64-bit address.
Note that mmixal does not emit this for the file above.
0x00000000 - Address, high 32 bits.
0x00000000 - Address, low 32 bits.
0x98060002 - lop_file, 2 32-bit words for file-name.
0x74657374 - "test"
0x2e730000 - ".s\0\0"
0x98070001 - lop_line, line 1.
0x00010203 - TRAP 1,2,3
0x980a00ff - lop_post, setting $255 to 0.
0x00000000
0x00000000
0x980b0000 - lop_stab for ":Main" = 0, serial 1.
0x203a4040 See section 3.3.2 Symbol table format.
0x10404020
0x4d206120
0x69016e00
0x81000000
0x980c0005 - lop_end; symbol table contained five 32-bit words.
|
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |