src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/macho/MachO.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File
*** old/src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/macho/MachO.java	Tue Aug 22 11:46:30 2017
--- new/src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/macho/MachO.java	Tue Aug 22 11:46:29 2017

*** 21,34 **** --- 21,34 ---- * questions. */ package jdk.tools.jaotc.binformat.macho; + //@formatter:off /** * ! * Support for the creation of Mach-o Object files. Current support is limited to 64 bit x86_64. * Current support is limited to 64 bit x86_64. * * File Format Overview: * * mach_header * load_commands
*** 36,103 **** --- 36,103 ---- * (LC_SEGMENT_64, LC_SYMTAB, LC_VERSIN_MIN_MACOSX, LC_DYSYMTAB) * Segments corresponding to load_commands * (which each include multiple Sections) */ ! public class MachO { ! final class MachO { /** * mach_header_64 structure defines */ - public enum mach_header_64 { magic( 0, 4), cputype( 4, 4), cpusubtype( 8, 4), filetype(12, 4), ncmds(16, 4), sizeofcmds(20, 4), flags(24, 4), reserved(28, 4); - public final int off; - public final int sz; mach_header_64(int offset, int size) { this.off = offset; this.sz = size; } - public static int totalsize = 32; /** * mach_header_64 defines */ - public static final int MH_MAGIC = 0xfeedface; - public static final int MH_MAGIC_64 = 0xfeedfacf; - public static final int MH_SUBSECTIONS_VIA_SYMBOLS = 0x2000; /** * filetype */ - public static final int MH_OBJECT = 0x1; /** * cputype */ - public static final int CPU_TYPE_ANY = -1; - public static final int CPU_ARCH_ABI64 = 0x1000000; - public static final int CPU_TYPE_X86_64 = 0x1000007; - public static final int CPU_TYPE_ARM64 = 0x100000c; /** * cpusubtype */ - public static final int CPU_SUBTYPE_I386_ALL = 3; - public static final int CPU_SUBTYPE_ARM64_ALL = 0; - public static final int CPU_SUBTYPE_LITTLE_ENDIAN = 0; - public static final int CPU_SUBTYPE_BIG_ENDIAN = 1; } /** * segment_command_64 structure defines */ - public enum segment_command_64 { cmd( 0, 4), cmdsize( 4, 4), segname( 8,16), vmaddr(24, 8), vmsize(32, 8),
*** 106,132 **** --- 106,132 ---- maxprot(56, 4), initprot(60, 4), nsects(64, 4), flags(68, 4); - public final int off; - public final int sz; segment_command_64(int offset, int size) { this.off = offset; this.sz = size; } - public static int totalsize = 72; - public static final int LC_SEGMENT_64 = 0x19; } /** * section_64 structure defines */ - public enum section_64 { sectname( 0,16), segname(16,16), addr(32, 8), size(40, 8), offset(48, 4),
*** 136,240 **** --- 136,240 ---- flags(64, 4), reserved1(68, 4), reserved2(72, 4), reserved3(76, 4); - public final int off; - public final int sz; section_64(int offset, int size) { this.off = offset; this.sz = size; } - public static int totalsize = 80; - public static int S_REGULAR = 0x0; - public static int S_CSTRING_LITERALS = 0x2; - public static int S_ATTR_PURE_INSTRUCTIONS = 0x80000000; - public static int S_ATTR_SOME_INSTRUCTIONS = 0x400; } /** * version_min_command structure defines */ - public enum version_min_command { cmd( 0, 4), cmdsize( 4, 4), version( 8, 4), sdk(12, 4); - public final int off; - public final int sz; version_min_command(int offset, int size) { this.off = offset; this.sz = size; } - public static int totalsize = 16; - public static final int LC_VERSION_MIN_MACOSX = 0x24; - public static final int LC_VERSION_MIN_IPHONEOS = 0x25; } /** * symtab_command structure defines */ - public enum symtab_command { cmd( 0, 4), cmdsize( 4, 4), symoff( 8, 4), nsyms(12, 4), stroff(16, 4), strsize(20, 4); - public final int off; - public final int sz; symtab_command(int offset, int size) { this.off = offset; this.sz = size; } - public static int totalsize = 24; - public static final int LC_SYMTAB = 0x2; } /** * Symbol table entry definitions * * nlist_64 structure defines */ - public enum nlist_64 { n_strx( 0, 4), n_type( 4, 1), n_sect( 5, 1), n_desc( 6, 2), n_value( 8, 8); - public final int off; - public final int sz; nlist_64(int offset, int size) { this.off = offset; this.sz = size; } - public static int totalsize = 16; - public static final int N_EXT = 0x1; - public static final int N_TYPE = 0xe; - public static final int N_UNDF = 0x0; - public static final int N_SECT = 0xe; } /** * dysymtab_command structure defines */ - public enum dysymtab_command { cmd( 0, 4), cmdsize( 4, 4), ilocalsym( 8, 4), nlocalsym(12, 4), iextdefsym(16, 4),
*** 252,307 **** --- 252,308 ---- extreloff(64, 4), nextrel(68, 4), locreloff(72, 4), nlocrel(76, 4); - public final int off; - public final int sz; dysymtab_command(int offset, int size) { this.off = offset; this.sz = size; } - public static int totalsize = 80; - public static final int LC_DYSYMTAB = 0xb; } /** * relocation_info structure defines */ - public enum reloc_info { r_address( 0, 4), r_relocinfo( 4, 4); - public final int off; - public final int sz; reloc_info(int offset, int size) { this.off = offset; this.sz = size; } - public static int totalsize = 8; - public static final int REL_SYMNUM_MASK = 0xffffff; - public static final int REL_SYMNUM_SHIFT = 0x0; - public static final int REL_PCREL_MASK = 0x1; - public static final int REL_PCREL_SHIFT = 0x18; - public static final int REL_LENGTH_MASK = 0x3; - public static final int REL_LENGTH_SHIFT = 0x19; - public static final int REL_EXTERN_MASK = 0x1; - public static final int REL_EXTERN_SHIFT = 0x1b; - public static final int REL_TYPE_MASK = 0xf; - public static final int REL_TYPE_SHIFT = 0x1c; /* reloc_type_x86_64 defines */ - public static final int X86_64_RELOC_NONE = 0x0; - public static final int X86_64_RELOC_BRANCH = 0x2; - public static final int X86_64_RELOC_GOT = 0x4; - public static final int X86_64_RELOC_GOT_LOAD = 0x3; - public static final int X86_64_RELOC_SIGNED = 0x1; - public static final int X86_64_RELOC_UNSIGNED = 0x0; } } + //@formatter:on

src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/macho/MachO.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File