0
|
1 /*
|
|
2 * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
|
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 *
|
|
5 * This code is free software; you can redistribute it and/or modify it
|
|
6 * under the terms of the GNU General Public License version 2 only, as
|
|
7 * published by the Free Software Foundation.
|
|
8 *
|
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
|
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
12 * version 2 for more details (a copy is included in the LICENSE file that
|
|
13 * accompanied this code).
|
|
14 *
|
|
15 * You should have received a copy of the GNU General Public License version
|
|
16 * 2 along with this work; if not, write to the Free Software Foundation,
|
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
18 *
|
|
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
|
20 * CA 95054 USA or visit www.sun.com if you need additional information or
|
|
21 * have any questions.
|
|
22 *
|
|
23 */
|
|
24
|
|
25 package sun.jvm.hotspot.debugger.win32.coff;
|
|
26
|
|
27 /** Models the information stored in the optional header of a Portable
|
|
28 Executable file. */
|
|
29
|
|
30 public interface OptionalHeader {
|
|
31 /** Magic number for a PE32 file */
|
|
32 public static final short MAGIC_PE32 = (short) 0x10B;
|
|
33
|
|
34 /** Magic number for a PE32+ file */
|
|
35 public static final short MAGIC_PE32_PLUS = (short) 0x20B;
|
|
36
|
|
37 /** Magic number for a "ROM image" */
|
|
38 public static final short MAGIC_ROM_IMAGE = (short) 0x107;
|
|
39
|
|
40 /** Returns the magic number of the Optional Header ({@link
|
|
41 #MAGIC_PE32}, {@link #MAGIC_PE32_PLUS}, or {@link
|
|
42 #MAGIC_ROM_IMAGE}) */
|
|
43 public short getMagicNumber();
|
|
44
|
|
45 /** These are defined for all implementations of COFF, including
|
|
46 UNIX. */
|
|
47 public OptionalHeaderStandardFields getStandardFields();
|
|
48
|
|
49 /** These include additional fields to support specific features of
|
|
50 Windows (for example, subsystem). */
|
|
51 public OptionalHeaderWindowsSpecificFields getWindowsSpecificFields();
|
|
52
|
|
53 /** Gets the data directories portion of the optional header. */
|
|
54 public OptionalHeaderDataDirectories getDataDirectories();
|
|
55 }
|