joeq.Bootstrap
Class SinglePassBootImage
java.lang.Object
joeq.Bootstrap.SinglePassBootImage
- All Implemented Interfaces:
- ELFConstants
public class SinglePassBootImage
- extends Object
- implements ELFConstants
SinglePassBootImage
- Version:
- $Id: SinglePassBootImage.java,v 1.2 2004/09/30 03:35:29 joewhaley Exp $
- Author:
- John Whaley
Fields inherited from interface joeq.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(HeapAddress addr,
CodeAddress target)
|
void |
addDataReloc(HeapAddress addr,
HeapAddress target)
|
HeapAddress |
addressOf(Object o)
|
void |
addStaticFieldReloc(jq_StaticField f)
|
void |
addStaticFieldRelocs(jq_Class k)
|
void |
addSystemInterfaceRelocs_COFF(Collection extref,
Collection dataRelocs)
|
void |
addSystemInterfaceRelocs_ELF(Collection extref,
Collection dataRelocs)
|
int |
addVTableRelocs(Collection list)
|
void |
disableAllocations()
|
void |
dumpCOFF(FileChannel fc,
jq_StaticMethod rootm)
|
void |
dumpDATASCNHDR(ByteBuffer out,
int scnptr,
int size,
int nreloc)
|
void |
dumpELF(FileChannel fc,
jq_StaticMethod rootm)
|
void |
dumpEXTDEFSYMENTs(ByteBuffer out,
List extrefs)
|
void |
dumpEXTSYMENTs(ByteBuffer out,
jq_StaticMethod rootm)
|
void |
dumpFILHDR(ByteBuffer out,
int symptr,
int nsyms)
|
void |
dumpMETHODSYMENT(ByteBuffer out,
jq_CompiledCode cc)
|
void |
dumpSECTIONSYMENTs(ByteBuffer out)
|
void |
dumpTEXTSCNHDR(ByteBuffer out,
int size,
int nreloc)
|
void |
enableAllocations()
|
HeapAddress |
getAddressOf(HeapAddress from,
Object to)
|
HeapAddress |
getOrAllocateObject(Object o)
|
void |
handleForwardReferences()
|
HeapAddress |
initializeObject(Object o)
|
void |
initStaticData(jq_Class k)
|
void |
initStaticField(jq_StaticField f)
|
void |
initStaticFields(jq_Class k)
|
void |
initVTable(jq_Reference t)
|
void |
invokeclinit(jq_Class c)
|
HeapAddress |
isInitialized(Object o)
|
void |
layoutObject(Object o,
HeapAddress addr,
boolean addReloc)
|
int |
numOfEntries()
|
void |
reinitializeObjects()
|
int |
size()
|
static void |
write_bytes(ByteBuffer out,
String s,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_HEAP
public static int MAX_HEAP
TRACE
public static boolean TRACE
out
public static final PrintStream out
DEFAULT
public static final SinglePassBootImage DEFAULT
boot_types
public Set boot_types
toReinitialize
public final Collection toReinitialize
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
_DEFAULT
public static final jq_StaticField _DEFAULT
SinglePassBootImage
public SinglePassBootImage(BootstrapCodeAllocator bca,
int initialCapacity,
float loadFactor)
SinglePassBootImage
public SinglePassBootImage(BootstrapCodeAllocator bca,
int initialCapacity)
SinglePassBootImage
public SinglePassBootImage(BootstrapCodeAllocator bca)
addressOf
public final HeapAddress addressOf(Object o)
addCodeReloc
public final void addCodeReloc(HeapAddress addr,
CodeAddress target)
addDataReloc
public final void addDataReloc(HeapAddress addr,
HeapAddress target)
invokeclinit
public final void invokeclinit(jq_Class c)
enableAllocations
public void enableAllocations()
disableAllocations
public void disableAllocations()
isInitialized
public HeapAddress isInitialized(Object o)
initializeObject
public HeapAddress initializeObject(Object o)
getOrAllocateObject
public HeapAddress getOrAllocateObject(Object o)
getAddressOf
public HeapAddress getAddressOf(HeapAddress from,
Object to)
initStaticField
public void initStaticField(jq_StaticField f)
initStaticFields
public void initStaticFields(jq_Class k)
initStaticData
public void initStaticData(jq_Class k)
addStaticFieldRelocs
public void addStaticFieldRelocs(jq_Class k)
addStaticFieldReloc
public void addStaticFieldReloc(jq_StaticField f)
initVTable
public void initVTable(jq_Reference t)
numOfEntries
public int numOfEntries()
layoutObject
public void layoutObject(Object o,
HeapAddress addr,
boolean addReloc)
reinitializeObjects
public void reinitializeObjects()
size
public int size()
handleForwardReferences
public void handleForwardReferences()
dumpFILHDR
public void dumpFILHDR(ByteBuffer out,
int symptr,
int nsyms)
throws IOException
- Throws:
IOException
dumpTEXTSCNHDR
public void dumpTEXTSCNHDR(ByteBuffer out,
int size,
int nreloc)
throws IOException
- Throws:
IOException
dumpDATASCNHDR
public void dumpDATASCNHDR(ByteBuffer out,
int scnptr,
int size,
int nreloc)
throws IOException
- Throws:
IOException
dumpSECTIONSYMENTs
public void dumpSECTIONSYMENTs(ByteBuffer out)
throws IOException
- Throws:
IOException
dumpEXTSYMENTs
public void dumpEXTSYMENTs(ByteBuffer out,
jq_StaticMethod rootm)
throws IOException
- Throws:
IOException
dumpEXTDEFSYMENTs
public void dumpEXTDEFSYMENTs(ByteBuffer out,
List extrefs)
throws IOException
- Throws:
IOException
dumpMETHODSYMENT
public void dumpMETHODSYMENT(ByteBuffer out,
jq_CompiledCode cc)
throws IOException
- Throws:
IOException
addSystemInterfaceRelocs_COFF
public void addSystemInterfaceRelocs_COFF(Collection extref,
Collection dataRelocs)
addSystemInterfaceRelocs_ELF
public void addSystemInterfaceRelocs_ELF(Collection extref,
Collection dataRelocs)
addVTableRelocs
public int addVTableRelocs(Collection list)
dumpCOFF
public void dumpCOFF(FileChannel fc,
jq_StaticMethod rootm)
throws IOException
- Throws:
IOException
write_bytes
public static void write_bytes(ByteBuffer out,
String s,
int len)
throws IOException
- Throws:
IOException
dumpELF
public void dumpELF(FileChannel fc,
jq_StaticMethod rootm)
throws IOException
- Throws:
IOException
Copyright © 2001-2005 John Whaley. All Rights Reserved.