joeq.Linker.ELF
Interface ELF

All Known Implementing Classes:
ELFOutput, ELFRandomAccessFile

public interface ELF

Version:
$Id: ELF.java,v 1.13 2004/09/30 03:35:33 joewhaley Exp $
Author:
John Whaley

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.
 Section getSection(int index)
           
 Section.StrTabSection getSectionHeaderStringTable()
          Returns the section header string table, if one has been defined.
 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()
           
 

Method Detail

getSections

List getSections()
Returns the list of ELF sections in this object.

Returns:
list of ELF sections in this object

getSection

Section getSection(int index)

getSectionHeaderStringTable

Section.StrTabSection getSectionHeaderStringTable()
Returns the section header string table, if one has been defined. Or null otherwise.

Returns:
section header string table

isLittleEndian

boolean isLittleEndian()
Returns true if this ELF object is little-endian.

Returns:
true if this ELF object is little-endian

isBigEndian

boolean isBigEndian()
Returns true if this ELF object is big-endian.

Returns:
true if this ELF object is big-endian

setSectionHeaderStringTable

void setSectionHeaderStringTable(Section.StrTabSection shstrtab)
Sets the section header string table to be the given section.

Parameters:
shstrtab - new section header string table

addSection

void addSection(Section s)
Adds the given ELF section to this object.

Parameters:
s - section to add

removeSection

void removeSection(Section s)
Removes the given ELF section from this object.

Parameters:
s - section to remove

addProgramHeader

void addProgramHeader(ProgramHeader p)
Adds the given ELF program header to this object.

Parameters:
p - program header to add

removeProgramHeader

void removeProgramHeader(ProgramHeader p)
Removes the given ELF program header from this object.

Parameters:
p - program header to remove

setLittleEndian

void setLittleEndian()

setBigEndian

void setBigEndian()

write

void write()
           throws IOException
Throws:
IOException

write_byte

void write_byte(byte v)
                throws IOException
Throws:
IOException

write_bytes

void write_bytes(byte[] v)
                 throws IOException
Throws:
IOException

write_half

void write_half(int v)
                throws IOException
Throws:
IOException

write_word

void write_word(int v)
                throws IOException
Throws:
IOException

write_sword

void write_sword(int v)
                 throws IOException
Throws:
IOException

write_off

void write_off(int v)
               throws IOException
Throws:
IOException

write_addr

void write_addr(int v)
                throws IOException
Throws:
IOException

write_sectionname

void write_sectionname(String s)
                       throws IOException
Throws:
IOException

set_position

void set_position(int offset)
                  throws IOException
Throws:
IOException

read_byte

byte read_byte()
               throws IOException
Throws:
IOException

read_bytes

void read_bytes(byte[] b)
                throws IOException
Throws:
IOException

read_half

int read_half()
              throws IOException
Throws:
IOException

read_word

int read_word()
              throws IOException
Throws:
IOException

read_sword

int read_sword()
               throws IOException
Throws:
IOException

read_off

int read_off()
             throws IOException
Throws:
IOException

read_addr

int read_addr()
              throws IOException
Throws:
IOException


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