1 #------------------------------------------------------------------------------
2 # mach file description
4 # Since Java bytecode and Mach-O fat-files have the same magic number the test
5 # must be preformed in the same "magic" sequence to get both right. The long
6 # at offset 4 in a fat file tells the number of architectures. The short at
7 # offset 4 in a Java bytecode file is the compiler minor version and the
8 # short at offset 6 is the compiler major version. Since the minor version is
9 # never to be non-zero then the hack of testing for the number of architectures
10 # to be less that the maximum short is done here.
13 >4 belong 0x0003002d Java bytecode
14 >4 belong 1 Mach-O fat file with 1 architecture
16 >>4 belong <0xffff Mach-O fat file with %ld architectures
18 0 lelong 0xfeedface Mach-O
20 >12 lelong 2 executable
21 >12 lelong 3 fixed virtual memory shared library
23 >12 lelong 5 preload executable
24 >12 lelong 6 dynamically linked shared library
25 >12 lelong 7 dynamic linker
28 >>12 lelong x filetype=%ld
30 >>4 lelong x architecture=%ld
33 >4 lelong 3 architecture=3
40 >4 lelong 10 architecture=10
50 >>4 lelong x architecture=%ld
52 0 belong 0xfeedface Mach-O
54 >12 belong 2 executable
55 >12 belong 3 fixed virtual memory shared library
57 >12 belong 5 preload executable
58 >12 belong 6 dynamically linked shared library
59 >12 belong 7 dynamic linker
62 >>12 belong x filetype=%ld
64 >>4 belong x architecture=%ld
67 >4 belong 3 architecture=3
74 >4 belong 10 architecture=10
84 >>4 belong x architecture=%ld