|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object joeq.Linker.ELF.ELFOutput
public class ELFOutput
Field Summary | |
---|---|
protected int |
e_entry
|
protected int |
e_flags
|
protected int |
e_machine
|
protected int |
e_type
|
protected int |
e_version
|
protected byte |
ei_class
|
protected byte |
ei_data
|
protected DataOutput |
out
|
protected List |
program_headers
|
protected Section.StrTabSection |
section_header_string_table
|
protected List |
sections
|
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 | |
---|---|
ELFOutput(byte data,
int type,
int machine,
int entry,
DataOutput out)
|
Method Summary | |
---|---|
void |
addProgramHeader(ProgramHeader p)
Adds the given ELF program header to this object. |
void |
addSection(Section s)
Adds the given ELF section to this object. |
static int |
getHeaderSize()
|
DataOutput |
getOutput()
|
Section |
getSection(int i)
|
Section.StrTabSection |
getSectionHeaderStringTable()
Returns the section header string table, if one has been defined. |
int |
getSectionIndex(Section s)
|
List |
getSections()
Returns the list of ELF sections in this object. |
boolean |
isBigEndian()
Returns true if this ELF object is big-endian. |
boolean |
isLittleEndian()
Returns true if this ELF object is little-endian. |
int |
read_addr()
|
byte |
read_byte()
|
void |
read_bytes(byte[] b)
|
int |
read_half()
|
int |
read_off()
|
int |
read_sword()
|
int |
read_word()
|
void |
removeProgramHeader(ProgramHeader p)
Removes the given ELF program header from this object. |
void |
removeSection(Section s)
Removes the given ELF section from this object. |
void |
set_position(int offset)
|
void |
setBigEndian()
|
void |
setLittleEndian()
|
void |
setSectionHeaderStringTable(Section.StrTabSection shstrtab)
Sets the section header string table to be the given section. |
void |
write_addr(int v)
|
void |
write_byte(byte v)
|
void |
write_bytes(byte[] v)
|
void |
write_half(int v)
|
void |
write_off(int v)
|
void |
write_sectionname(String s)
|
void |
write_sword(int v)
|
void |
write_word(int v)
|
void |
write()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DataOutput out
protected byte ei_class
protected byte ei_data
protected int e_type
protected int e_machine
protected int e_version
protected int e_entry
protected int e_flags
protected List program_headers
protected List sections
protected Section.StrTabSection section_header_string_table
Constructor Detail |
---|
public ELFOutput(byte data, int type, int machine, int entry, DataOutput out)
Method Detail |
---|
public DataOutput getOutput()
public void write_byte(byte v) throws IOException
IOException
public void write_bytes(byte[] v) throws IOException
IOException
public void write_half(int v) throws IOException
IOException
public void write_word(int v) throws IOException
IOException
public void write_sword(int v) throws IOException
IOException
public void write_off(int v) throws IOException
IOException
public void write_addr(int v) throws IOException
IOException
public void write_sectionname(String s) throws IOException
IOException
public void set_position(int offset) throws IOException
IOException
public byte read_byte() throws IOException
IOException
public void read_bytes(byte[] b) throws IOException
IOException
public int read_half() throws IOException
IOException
public int read_word() throws IOException
IOException
public int read_sword() throws IOException
IOException
public int read_off() throws IOException
IOException
public int read_addr() throws IOException
IOException
public Section.StrTabSection getSectionHeaderStringTable()
ELF
getSectionHeaderStringTable
in interface ELF
public void setSectionHeaderStringTable(Section.StrTabSection shstrtab)
ELF
setSectionHeaderStringTable
in interface ELF
shstrtab
- new section header string tablepublic int getSectionIndex(Section s)
public Section getSection(int i)
getSection
in interface ELF
public List getSections()
ELF
getSections
in interface ELF
public void addSection(Section s)
ELF
addSection
in interface ELF
s
- section to addpublic void removeSection(Section s)
ELF
removeSection
in interface ELF
s
- section to removepublic void addProgramHeader(ProgramHeader p)
ELF
addProgramHeader
in interface ELF
p
- program header to addpublic void removeProgramHeader(ProgramHeader p)
ELF
removeProgramHeader
in interface ELF
p
- program header to removepublic boolean isLittleEndian()
ELF
isLittleEndian
in interface ELF
public boolean isBigEndian()
ELF
isBigEndian
in interface ELF
public void setLittleEndian()
setLittleEndian
in interface ELF
public void setBigEndian()
setBigEndian
in interface ELF
public void write() throws IOException
write
in interface ELF
IOException
public static int getHeaderSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |