src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/macho/MachOHeader.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/MachOHeader.java	Tue Aug 22 11:46:32 2017
--- new/src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/macho/MachOHeader.java	Tue Aug 22 11:46:32 2017

*** 22,60 **** --- 22,57 ---- */ package jdk.tools.jaotc.binformat.macho; import java.nio.ByteBuffer; import java.nio.ByteOrder; import jdk.tools.jaotc.binformat.macho.MachO; import jdk.tools.jaotc.binformat.macho.MachO.mach_header_64; import jdk.tools.jaotc.binformat.macho.MachOTargetInfo; import jdk.tools.jaotc.binformat.macho.MachOByteBuffer; ! public class MachOHeader { ! ByteBuffer header; ! final class MachOHeader { ! private final ByteBuffer header; - public MachOHeader() { header = MachOByteBuffer.allocate(mach_header_64.totalsize); header.putInt(mach_header_64.magic.off, mach_header_64.MH_MAGIC_64); header.putInt(mach_header_64.cputype.off, MachOTargetInfo.getMachOArch()); header.putInt(mach_header_64.cpusubtype.off, MachOTargetInfo.getMachOSubArch()); header.putInt(mach_header_64.flags.off, 0x2000); header.putInt(mach_header_64.filetype.off, mach_header_64.MH_OBJECT); } - public void setCmdSizes(int ncmds, int sizeofcmds) { header.putInt(mach_header_64.ncmds.off, ncmds); header.putInt(mach_header_64.sizeofcmds.off, sizeofcmds); } - public int getCmdSize() { return (header.getInt(mach_header_64.sizeofcmds.off)); } - public byte[] getArray() { return header.array(); } }

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