java.lang.Object
Bootstrap.BootImage
- All Implemented Interfaces:
- Linker.ELF.ELFConstants
- public class BootImage
- extends java.lang.Object
- implements Linker.ELF.ELFConstants
BootImage
- Version:
- $Id: BootImage.java,v 1.43 2003/08/10 00:14:39 joewhaley Exp $
Fields inherited from interface Linker.ELF.ELFConstants |
ELFCLASS32, ELFCLASS64, ELFCLASSNONE, ELFDATA2LSB, ELFDATA2MSB, ELFDATANONE, ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3, EM_386, EM_68K, EM_860, EM_88K, EM_M32, EM_MIPS, EM_MIPS_RS4_BE, EM_SPARC, ET_CORE, ET_DYN, ET_EXEC, ET_HIPROC, ET_LOPROC, ET_NONE, ET_REL, EV_CURRENT, EV_NONE, PT_DYNAMIC, PT_HIPROC, PT_INTERP, PT_LOAD, PT_LOPROC, PT_NOTE, PT_NULL, PT_PHDR, PT_SHLIB, R_386_32, R_386_NONE, R_386_PC32, SHF_ALLOC, SHF_EXECINSTR, SHF_MASKPROC, SHF_WRITE, SHN_ABS, SHN_COMMON, SHN_HIPROC, SHN_HIRESERVE, SHN_INVALID, SHN_LOPROC, SHN_LORESERVE, SHN_UNDEF, SHT_DYNAMIC, SHT_DYNSYM, SHT_HASH, SHT_HIPROC, SHT_HIUSER, SHT_LOPROC, SHT_LOUSER, SHT_NOBITS, SHT_NOTE, SHT_NULL, SHT_PROGBITS, SHT_REL, SHT_RELA, SHT_SHLIB, SHT_STRTAB, SHT_SYMTAB, STB_GLOBAL, STB_HIPROC, STB_LOCAL, STB_LOPROC, STB_WEAK, STT_FILE, STT_FUNC, STT_HIPROC, STT_LOPROC, STT_NOTYPE, STT_OBJECT, STT_SECTION |
Method Summary |
void |
addCodeReloc(Memory.HeapAddress addr,
Memory.CodeAddress target)
|
void |
addDataReloc(Memory.HeapAddress addr,
Memory.HeapAddress target)
|
Memory.HeapAddress |
addressOf(java.lang.Object o)
|
void |
addStaticFieldReloc(Clazz.jq_StaticField f)
|
void |
addSystemInterfaceRelocs_COFF(java.util.List extref,
java.util.List heap2code)
|
void |
addSystemInterfaceRelocs_ELF(java.util.List extref,
java.util.List heap2code)
|
int |
addVTableRelocs(java.util.List list)
|
private int |
alloc_string(java.lang.String name)
|
void |
disableAllocations()
|
private void |
dump_strings(Util.IO.ExtendedDataOutput out)
|
void |
dumpCOFF(Util.IO.ExtendedDataOutput out,
Clazz.jq_StaticMethod rootm)
|
void |
dumpDATASCNHDR(Util.IO.ExtendedDataOutput out,
int scnptr,
int size,
int nreloc)
|
void |
dumpELF(Util.IO.ExtendedDataOutput out,
Clazz.jq_StaticMethod rootm)
|
void |
dumpEXTDEFSYMENTs(Util.IO.ExtendedDataOutput out,
java.util.List extrefs)
|
void |
dumpEXTSYMENTs(Util.IO.ExtendedDataOutput out,
Clazz.jq_StaticMethod rootm)
|
void |
dumpFILHDR(Util.IO.ExtendedDataOutput out,
int symptr,
int nsyms)
|
private void |
dumpHeap(Util.IO.ExtendedDataOutput out)
|
void |
dumpIFIELDSYMENT(Util.IO.ExtendedDataOutput out,
Clazz.jq_InstanceField f)
|
void |
dumpLINENO(Util.IO.ExtendedDataOutput out,
int addr,
char lnno)
|
void |
dumpMETHODSYMENT(Util.IO.ExtendedDataOutput out,
Clazz.jq_CompiledCode cc)
|
void |
dumpSECTIONSYMENTs(Util.IO.ExtendedDataOutput out)
|
void |
dumpSFIELDSYMENT(Util.IO.ExtendedDataOutput out,
Clazz.jq_StaticField sf)
|
void |
dumpTEXTSCNHDR(Util.IO.ExtendedDataOutput out,
int size,
int nreloc)
|
void |
enableAllocations()
|
void |
find_reachable(int i)
|
private boolean |
findReferencePath(java.lang.Object p,
BootImage.UnknownObjectException x,
java.util.HashSet visited)
|
Memory.HeapAddress |
getAddressOf(java.lang.Object o)
|
java.lang.Object |
getObject(int i)
|
Memory.HeapAddress |
getOrAllocateObject(java.lang.Object o)
|
void |
initStaticField(Clazz.jq_StaticField f)
|
void |
invokeclinit(Clazz.jq_Class c)
|
private java.lang.String |
mungeMemberName(Clazz.jq_Member m)
|
int |
numOfEntries()
|
private Clazz.jq_StaticField |
searchStaticVariables(java.lang.Object p)
|
int |
size()
|
static void |
write_bytes(Util.IO.ExtendedDataOutput out,
java.lang.String s,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TRACE
public static boolean TRACE
out
public static final java.io.PrintStream out
DEFAULT
public static final BootImage DEFAULT
hash
private final java.util.Map hash
entries
private final java.util.ArrayList entries
heapCurrent
private int heapCurrent
startAddress
private final int startAddress
bca
private BootstrapCodeAllocator bca
data_relocs
private java.util.List data_relocs
alloc_enabled
private boolean alloc_enabled
IGNORE_UNKNOWN_OBJECTS
public static boolean IGNORE_UNKNOWN_OBJECTS
UPDATE_PERIOD
public static int UPDATE_PERIOD
F_RELFLG
public static final char F_RELFLG
- See Also:
- Constant Field Values
F_EXEC
public static final char F_EXEC
- See Also:
- Constant Field Values
F_LNNO
public static final char F_LNNO
- See Also:
- Constant Field Values
F_LSYMS
public static final char F_LSYMS
- See Also:
- Constant Field Values
F_AR32WR
public static final char F_AR32WR
- See Also:
- Constant Field Values
STYP_TEXT
public static final int STYP_TEXT
- See Also:
- Constant Field Values
STYP_DATA
public static final int STYP_DATA
- See Also:
- Constant Field Values
STYP_BSS
public static final int STYP_BSS
- See Also:
- Constant Field Values
STYP_RELOV
public static final int STYP_RELOV
- See Also:
- Constant Field Values
STYP_EXEC
public static final int STYP_EXEC
- See Also:
- Constant Field Values
STYP_READ
public static final int STYP_READ
- See Also:
- Constant Field Values
STYP_WRITE
public static final int STYP_WRITE
- See Also:
- Constant Field Values
RELOC_ADDR32
public static final char RELOC_ADDR32
- See Also:
- Constant Field Values
RELOC_REL32
public static final char RELOC_REL32
- See Also:
- Constant Field Values
N_UNDEF
public static final short N_UNDEF
- See Also:
- Constant Field Values
N_ABS
public static final short N_ABS
- See Also:
- Constant Field Values
N_DEBUG
public static final short N_DEBUG
- See Also:
- Constant Field Values
T_NULL
public static final char T_NULL
- See Also:
- Constant Field Values
T_VOID
public static final char T_VOID
- See Also:
- Constant Field Values
T_CHAR
public static final char T_CHAR
- See Also:
- Constant Field Values
T_SHORT
public static final char T_SHORT
- See Also:
- Constant Field Values
T_INT
public static final char T_INT
- See Also:
- Constant Field Values
T_LONG
public static final char T_LONG
- See Also:
- Constant Field Values
T_FLOAT
public static final char T_FLOAT
- See Also:
- Constant Field Values
T_DOUBLE
public static final char T_DOUBLE
- See Also:
- Constant Field Values
T_STRUCT
public static final char T_STRUCT
- See Also:
- Constant Field Values
T_UNION
public static final char T_UNION
- See Also:
- Constant Field Values
T_ENUM
public static final char T_ENUM
- See Also:
- Constant Field Values
T_MOE
public static final char T_MOE
- See Also:
- Constant Field Values
T_UCHAR
public static final char T_UCHAR
- See Also:
- Constant Field Values
T_USHORT
public static final char T_USHORT
- See Also:
- Constant Field Values
T_UINT
public static final char T_UINT
- See Also:
- Constant Field Values
T_ULONG
public static final char T_ULONG
- See Also:
- Constant Field Values
T_LNGDBL
public static final char T_LNGDBL
- See Also:
- Constant Field Values
DT_NON
public static final char DT_NON
- See Also:
- Constant Field Values
DT_PTR
public static final char DT_PTR
- See Also:
- Constant Field Values
DT_FCN
public static final char DT_FCN
- See Also:
- Constant Field Values
DT_ARY
public static final char DT_ARY
- See Also:
- Constant Field Values
C_NULL
public static final byte C_NULL
- See Also:
- Constant Field Values
C_AUTO
public static final byte C_AUTO
- See Also:
- Constant Field Values
C_EXT
public static final byte C_EXT
- See Also:
- Constant Field Values
C_STAT
public static final byte C_STAT
- See Also:
- Constant Field Values
C_REG
public static final byte C_REG
- See Also:
- Constant Field Values
C_EXTDEF
public static final byte C_EXTDEF
- See Also:
- Constant Field Values
C_LABEL
public static final byte C_LABEL
- See Also:
- Constant Field Values
C_ULABEL
public static final byte C_ULABEL
- See Also:
- Constant Field Values
C_MOS
public static final byte C_MOS
- See Also:
- Constant Field Values
C_ARG
public static final byte C_ARG
- See Also:
- Constant Field Values
C_STRTAG
public static final byte C_STRTAG
- See Also:
- Constant Field Values
C_MOU
public static final byte C_MOU
- See Also:
- Constant Field Values
C_UNTAG
public static final byte C_UNTAG
- See Also:
- Constant Field Values
C_TPDEF
public static final byte C_TPDEF
- See Also:
- Constant Field Values
C_USTATIC
public static final byte C_USTATIC
- See Also:
- Constant Field Values
C_ENTAG
public static final byte C_ENTAG
- See Also:
- Constant Field Values
C_MOE
public static final byte C_MOE
- See Also:
- Constant Field Values
C_REGPARM
public static final byte C_REGPARM
- See Also:
- Constant Field Values
C_FIELD
public static final byte C_FIELD
- See Also:
- Constant Field Values
C_AUTOARG
public static final byte C_AUTOARG
- See Also:
- Constant Field Values
C_LASTENT
public static final byte C_LASTENT
- See Also:
- Constant Field Values
C_BLOCK
public static final byte C_BLOCK
- See Also:
- Constant Field Values
C_FCN
public static final byte C_FCN
- See Also:
- Constant Field Values
C_EOS
public static final byte C_EOS
- See Also:
- Constant Field Values
C_FILE
public static final byte C_FILE
- See Also:
- Constant Field Values
C_SECTION
public static final byte C_SECTION
- See Also:
- Constant Field Values
C_WEAKEXT
public static final byte C_WEAKEXT
- See Also:
- Constant Field Values
C_EFCN
public static final byte C_EFCN
- See Also:
- Constant Field Values
USE_MICROSOFT_STYLE_MUNGE
public static boolean USE_MICROSOFT_STYLE_MUNGE
NUM_OF_EXTERNAL_SYMS
public static final int NUM_OF_EXTERNAL_SYMS
- See Also:
- Constant Field Values
stringTableOffset
int stringTableOffset
stringTable
java.util.List stringTable
_DEFAULT
public static final Clazz.jq_StaticField _DEFAULT
BootImage
public BootImage(BootstrapCodeAllocator bca,
int initialCapacity,
float loadFactor)
BootImage
public BootImage(BootstrapCodeAllocator bca,
int initialCapacity)
BootImage
public BootImage(BootstrapCodeAllocator bca)
addressOf
public final Memory.HeapAddress addressOf(java.lang.Object o)
addCodeReloc
public final void addCodeReloc(Memory.HeapAddress addr,
Memory.CodeAddress target)
addDataReloc
public final void addDataReloc(Memory.HeapAddress addr,
Memory.HeapAddress target)
invokeclinit
public final void invokeclinit(Clazz.jq_Class c)
enableAllocations
public void enableAllocations()
disableAllocations
public void disableAllocations()
getOrAllocateObject
public Memory.HeapAddress getOrAllocateObject(java.lang.Object o)
getAddressOf
public Memory.HeapAddress getAddressOf(java.lang.Object o)
getObject
public java.lang.Object getObject(int i)
addStaticFieldReloc
public void addStaticFieldReloc(Clazz.jq_StaticField f)
initStaticField
public void initStaticField(Clazz.jq_StaticField f)
numOfEntries
public int numOfEntries()
find_reachable
public void find_reachable(int i)
size
public int size()
dumpFILHDR
public void dumpFILHDR(Util.IO.ExtendedDataOutput out,
int symptr,
int nsyms)
throws java.io.IOException
dumpTEXTSCNHDR
public void dumpTEXTSCNHDR(Util.IO.ExtendedDataOutput out,
int size,
int nreloc)
throws java.io.IOException
dumpDATASCNHDR
public void dumpDATASCNHDR(Util.IO.ExtendedDataOutput out,
int scnptr,
int size,
int nreloc)
throws java.io.IOException
dumpLINENO
public void dumpLINENO(Util.IO.ExtendedDataOutput out,
int addr,
char lnno)
throws java.io.IOException
dumpSECTIONSYMENTs
public void dumpSECTIONSYMENTs(Util.IO.ExtendedDataOutput out)
throws java.io.IOException
dumpEXTSYMENTs
public void dumpEXTSYMENTs(Util.IO.ExtendedDataOutput out,
Clazz.jq_StaticMethod rootm)
throws java.io.IOException
dumpEXTDEFSYMENTs
public void dumpEXTDEFSYMENTs(Util.IO.ExtendedDataOutput out,
java.util.List extrefs)
throws java.io.IOException
dumpSFIELDSYMENT
public void dumpSFIELDSYMENT(Util.IO.ExtendedDataOutput out,
Clazz.jq_StaticField sf)
throws java.io.IOException
dumpIFIELDSYMENT
public void dumpIFIELDSYMENT(Util.IO.ExtendedDataOutput out,
Clazz.jq_InstanceField f)
throws java.io.IOException
dumpMETHODSYMENT
public void dumpMETHODSYMENT(Util.IO.ExtendedDataOutput out,
Clazz.jq_CompiledCode cc)
throws java.io.IOException
addSystemInterfaceRelocs_COFF
public void addSystemInterfaceRelocs_COFF(java.util.List extref,
java.util.List heap2code)
addSystemInterfaceRelocs_ELF
public void addSystemInterfaceRelocs_ELF(java.util.List extref,
java.util.List heap2code)
addVTableRelocs
public int addVTableRelocs(java.util.List list)
dumpCOFF
public void dumpCOFF(Util.IO.ExtendedDataOutput out,
Clazz.jq_StaticMethod rootm)
throws java.io.IOException
searchStaticVariables
private Clazz.jq_StaticField searchStaticVariables(java.lang.Object p)
findReferencePath
private boolean findReferencePath(java.lang.Object p,
BootImage.UnknownObjectException x,
java.util.HashSet visited)
dumpHeap
private void dumpHeap(Util.IO.ExtendedDataOutput out)
throws java.io.IOException
write_bytes
public static void write_bytes(Util.IO.ExtendedDataOutput out,
java.lang.String s,
int len)
throws java.io.IOException
mungeMemberName
private java.lang.String mungeMemberName(Clazz.jq_Member m)
alloc_string
private int alloc_string(java.lang.String name)
dump_strings
private void dump_strings(Util.IO.ExtendedDataOutput out)
throws java.io.IOException
dumpELF
public void dumpELF(Util.IO.ExtendedDataOutput out,
Clazz.jq_StaticMethod rootm)
throws java.io.IOException