joeq.Bootstrap
Class MultiPassBootImage

java.lang.Object
  extended by joeq.Bootstrap.MultiPassBootImage
All Implemented Interfaces:
ELFConstants

public class MultiPassBootImage
extends Object
implements ELFConstants

BootImage

Version:
$Id: MultiPassBootImage.java,v 1.2 2004/09/30 03:35:29 joewhaley Exp $
Author:
John Whaley

Field Summary
static jq_StaticField _DEFAULT
           
 Set boot_types
           
static byte C_ARG
           
static byte C_AUTO
           
static byte C_AUTOARG
           
static byte C_BLOCK
           
static byte C_EFCN
           
static byte C_ENTAG
           
static byte C_EOS
           
static byte C_EXT
           
static byte C_EXTDEF
           
static byte C_FCN
           
static byte C_FIELD
           
static byte C_FILE
           
static byte C_LABEL
           
static byte C_LASTENT
           
static byte C_MOE
           
static byte C_MOS
           
static byte C_MOU
           
static byte C_NULL
           
static byte C_REG
           
static byte C_REGPARM
           
static byte C_SECTION
           
static byte C_STAT
           
static byte C_STRTAG
           
static byte C_TPDEF
           
static byte C_ULABEL
           
static byte C_UNTAG
           
static byte C_USTATIC
           
static byte C_WEAKEXT
           
static MultiPassBootImage DEFAULT
           
static char DT_ARY
           
static char DT_FCN
           
static char DT_NON
           
static char DT_PTR
           
static char F_AR32WR
           
static char F_EXEC
           
static char F_LNNO
           
static char F_LSYMS
           
static char F_RELFLG
           
static boolean IGNORE_UNKNOWN_OBJECTS
           
static short N_ABS
           
static short N_DEBUG
           
static short N_UNDEF
           
static int NUM_OF_EXTERNAL_SYMS
           
static PrintStream out
           
static char RELOC_ADDR32
           
static char RELOC_REL32
           
static int STYP_BSS
           
static int STYP_DATA
           
static int STYP_EXEC
           
static int STYP_READ
           
static int STYP_RELOV
           
static int STYP_TEXT
           
static int STYP_WRITE
           
static char T_CHAR
           
static char T_DOUBLE
           
static char T_ENUM
           
static char T_FLOAT
           
static char T_INT
           
static char T_LNGDBL
           
static char T_LONG
           
static char T_MOE
           
static char T_NULL
           
static char T_SHORT
           
static char T_STRUCT
           
static char T_UCHAR
           
static char T_UINT
           
static char T_ULONG
           
static char T_UNION
           
static char T_USHORT
           
static char T_VOID
           
static boolean TRACE
           
static int UPDATE_PERIOD
           
static boolean USE_MICROSOFT_STYLE_MUNGE
           
 
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
 
Constructor Summary
MultiPassBootImage(BootstrapCodeAllocator bca)
           
MultiPassBootImage(BootstrapCodeAllocator bca, int initialCapacity)
           
MultiPassBootImage(BootstrapCodeAllocator bca, int initialCapacity, float loadFactor)
           
 
Method Summary
 void addCodeReloc(HeapAddress addr, CodeAddress target)
           
 void addDataReloc(HeapAddress addr, HeapAddress target)
           
 HeapAddress addressOf(Object o)
           
 void addStaticFieldReloc(jq_StaticField f)
           
 void addSystemInterfaceRelocs_COFF(List extref, List dataRelocs)
           
 void addSystemInterfaceRelocs_ELF(List extref, List dataRelocs)
           
 int addVTableRelocs(List list)
           
 void disableAllocations()
           
 void dumpCOFF(jwutil.io.ExtendedDataOutput out, jq_StaticMethod rootm)
           
 void dumpDATASCNHDR(jwutil.io.ExtendedDataOutput out, int scnptr, int size, int nreloc)
           
 void dumpELF(jwutil.io.ExtendedDataOutput out, jq_StaticMethod rootm)
           
 void dumpEXTDEFSYMENTs(jwutil.io.ExtendedDataOutput out, List extrefs)
           
 void dumpEXTSYMENTs(jwutil.io.ExtendedDataOutput out, jq_StaticMethod rootm)
           
 void dumpFILHDR(jwutil.io.ExtendedDataOutput out, int symptr, int nsyms)
           
 void dumpIFIELDSYMENT(jwutil.io.ExtendedDataOutput out, jq_InstanceField f)
           
 void dumpLINENO(jwutil.io.ExtendedDataOutput out, int addr, char lnno)
           
 void dumpMETHODSYMENT(jwutil.io.ExtendedDataOutput out, jq_CompiledCode cc)
           
 void dumpSECTIONSYMENTs(jwutil.io.ExtendedDataOutput out)
           
 void dumpSFIELDSYMENT(jwutil.io.ExtendedDataOutput out, jq_StaticField sf)
           
 void dumpTEXTSCNHDR(jwutil.io.ExtendedDataOutput out, int size, int nreloc)
           
 void enableAllocations()
           
 void find_reachable(int i)
           
 HeapAddress getAddressOf(Object o)
           
 Object getObject(int i)
           
 HeapAddress getOrAllocateObject(Object o)
           
 void initStaticField(jq_StaticField f)
           
 void invokeclinit(jq_Class c)
           
 int numOfEntries()
           
 int size()
           
static void write_bytes(jwutil.io.ExtendedDataOutput out, String s, int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE

public static boolean TRACE

out

public static final PrintStream out

DEFAULT

public static final MultiPassBootImage DEFAULT

boot_types

public Set boot_types

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
Constructor Detail

MultiPassBootImage

public MultiPassBootImage(BootstrapCodeAllocator bca,
                          int initialCapacity,
                          float loadFactor)

MultiPassBootImage

public MultiPassBootImage(BootstrapCodeAllocator bca,
                          int initialCapacity)

MultiPassBootImage

public MultiPassBootImage(BootstrapCodeAllocator bca)
Method Detail

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()

getOrAllocateObject

public HeapAddress getOrAllocateObject(Object o)

getAddressOf

public HeapAddress getAddressOf(Object o)

getObject

public Object getObject(int i)

addStaticFieldReloc

public void addStaticFieldReloc(jq_StaticField f)

initStaticField

public void initStaticField(jq_StaticField f)

numOfEntries

public int numOfEntries()

find_reachable

public void find_reachable(int i)

size

public int size()

dumpFILHDR

public void dumpFILHDR(jwutil.io.ExtendedDataOutput out,
                       int symptr,
                       int nsyms)
                throws IOException
Throws:
IOException

dumpTEXTSCNHDR

public void dumpTEXTSCNHDR(jwutil.io.ExtendedDataOutput out,
                           int size,
                           int nreloc)
                    throws IOException
Throws:
IOException

dumpDATASCNHDR

public void dumpDATASCNHDR(jwutil.io.ExtendedDataOutput out,
                           int scnptr,
                           int size,
                           int nreloc)
                    throws IOException
Throws:
IOException

dumpLINENO

public void dumpLINENO(jwutil.io.ExtendedDataOutput out,
                       int addr,
                       char lnno)
                throws IOException
Throws:
IOException

dumpSECTIONSYMENTs

public void dumpSECTIONSYMENTs(jwutil.io.ExtendedDataOutput out)
                        throws IOException
Throws:
IOException

dumpEXTSYMENTs

public void dumpEXTSYMENTs(jwutil.io.ExtendedDataOutput out,
                           jq_StaticMethod rootm)
                    throws IOException
Throws:
IOException

dumpEXTDEFSYMENTs

public void dumpEXTDEFSYMENTs(jwutil.io.ExtendedDataOutput out,
                              List extrefs)
                       throws IOException
Throws:
IOException

dumpSFIELDSYMENT

public void dumpSFIELDSYMENT(jwutil.io.ExtendedDataOutput out,
                             jq_StaticField sf)
                      throws IOException
Throws:
IOException

dumpIFIELDSYMENT

public void dumpIFIELDSYMENT(jwutil.io.ExtendedDataOutput out,
                             jq_InstanceField f)
                      throws IOException
Throws:
IOException

dumpMETHODSYMENT

public void dumpMETHODSYMENT(jwutil.io.ExtendedDataOutput out,
                             jq_CompiledCode cc)
                      throws IOException
Throws:
IOException

addSystemInterfaceRelocs_COFF

public void addSystemInterfaceRelocs_COFF(List extref,
                                          List dataRelocs)

addSystemInterfaceRelocs_ELF

public void addSystemInterfaceRelocs_ELF(List extref,
                                         List dataRelocs)

addVTableRelocs

public int addVTableRelocs(List list)

dumpCOFF

public void dumpCOFF(jwutil.io.ExtendedDataOutput out,
                     jq_StaticMethod rootm)
              throws IOException
Throws:
IOException

write_bytes

public static void write_bytes(jwutil.io.ExtendedDataOutput out,
                               String s,
                               int len)
                        throws IOException
Throws:
IOException

dumpELF

public void dumpELF(jwutil.io.ExtendedDataOutput out,
                    jq_StaticMethod rootm)
             throws IOException
Throws:
IOException


Copyright © 2001-2005 John Whaley. All Rights Reserved.