Download Variable-Length Encoding (VLE) extension
Transcript
Application Binary Interface (ABI) UM0438 Example - Object file b.o 0 0x00000008 # 8 bytes in "APUinfo\0" 4 0x00000008 # 8 bytes (2 words) of APU information 8 0x00000002 # NOTE type 2 12 0x41505569 # ASCII for "APUi" 16 0x6e666f00 # ASCII for "nfo\0" 20 0x00010002 # APU #1, revision 2 24 0x00040001 # APU #4, revision 1 Linkers merge all .PPC.EMB.apuinfo sections in individual object files into one, with merging of per-APU information. For example, after linking file a.o and b.o, the merged .PPC.EMB.apuinfo is as shown in example below. Example - PPC.EMB.apuinfo 0 0x00000008 # 8 bytes in "APUinfo\0" 4 0x0000000C # 12 bytes (3 words) of APU information 8 0x00000002 # NOTE type 2 12 0x41505569 # ASCII for "APUi" 16 0x6e666f00 # ASCII for "nfo\0" 20 0x00010002 # APU #1, revision 2 24 0x01040001 # VLE, revision 1 28 0x00040001 # APU #4, revision 1 Note that it is assumed that a later revision of any APU or extension is compatible with an earlier one, but not vice versa. Thus, the resultant .PPC.EMB.apuinfo section requires APU #1 revision 2 or greater to work, and does not work on APU #1 revision 1. If a revision breaks backwards compatibility, it must be given a new unique identifier. A linker may optionally warn when different objects require different revisions, because moving the revision up may make the executable no longer work on processors with the older revision. In this example, the linker could emit a warning like “Warning: bumping APU #1 revision number to 2, required by b.o.” 2.2.2 VLE identification The executable and linking format (ELF) allows processor-specific section header and program header flag attributes to be defined. The following section header and program header flag attribute definitions are used to mark ELF sections containing VLE instruction encodings. 14/50