0
|
1 /*
|
|
2 * Copyright 2001-2003 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.posix.elf;
|
|
26
|
|
27 public interface ELFSymbol {
|
|
28 /** Binding specifying that local symbols are not visible outside the
|
|
29 * object file that contains its definition. */
|
|
30 public static final int BINDING_LOCAL = 0;
|
|
31 /** Binding specifying that global symbols are visible to all object files
|
|
32 * being combined. */
|
|
33 public static final int BINDING_GLOBAL = 1;
|
|
34 /** Binding secifying that the symbol resembles a global symbol, but has
|
|
35 * a lower precedence. */
|
|
36 public static final int BINDING_WEAK = 2;
|
|
37 /** Lower bound binding values reserverd for processor specific
|
|
38 * semantics. */
|
|
39 public static final int BINDING_LOPROC = 13;
|
|
40 /** Upper bound binding values reserverd for processor specific
|
|
41 * semantics. */
|
|
42 public static final int BINDING_HIPROC = 15;
|
|
43
|
|
44 /** Type specifying that the symbol is unspecified. */
|
|
45 public static final byte TYPE_NOOBJECT = 0;
|
|
46 /** Type specifying that the symbol is associated with an object. */
|
|
47 public static final byte TYPE_OBJECT = 1;
|
|
48 /** Type specifying that the symbol is associated with a function. */
|
|
49 public static final byte TYPE_FUNCTION = 2;
|
|
50 /** Type specifying that the symbol is associated with a section. Symbol
|
|
51 * table entries of this type exist for relocation and normally have the
|
|
52 * binding BINDING_LOCAL. */
|
|
53 public static final byte TYPE_SECTION = 3;
|
|
54 /** Type defining that the symbol is associated with a file. */
|
|
55 public static final byte TYPE_FILE = 4;
|
|
56 /** Lower bound type reserved for processor specific semantics. */
|
|
57 public static final byte TYPE_LOPROC = 13;
|
|
58 /** Upper bound type reserved for processor specific semantics. */
|
|
59 public static final byte TYPE_HIPROC = 15;
|
|
60
|
|
61 /** Returns the location from the beginning of the file to the symbol. */
|
|
62 public long getOffset();
|
|
63 /** Returns the name of the symbol or null if the symbol has no name. */
|
|
64 public String getName();
|
|
65 /** Returns the binding for this symbol. */
|
|
66 public int getBinding();
|
|
67 /** Returns the symbol type. */
|
|
68 public int getType();
|
|
69
|
|
70 /** Value of the associated symbol. This may be a relativa address for .so
|
|
71 * or absolute address for other ELFs. */
|
|
72 public long getValue();
|
|
73
|
|
74 /** Size of the symbol. 0 if the symbol has no size or the size
|
|
75 * is unknown. */
|
|
76 public int getSize();
|
|
77 }
|