lib.dwfl
Class ElfSymbol

java.lang.Object
  extended by lib.dwfl.ElfSymbol

public class ElfSymbol
extends Object

The object-file symbol. Typically obtained by reading ELF information. Do not confuse this with higher-level symbolic information, such as function names, obtained from debug information such as DWARF.


Nested Class Summary
static interface ElfSymbol.Builder
           
static class ElfSymbol.Loader
           
protected static class ElfSymbol.PrivVerdef
           
protected static class ElfSymbol.PrivVerneed
           
 
Field Summary
private  long address
           
private  String name
           
private  long size
           
private  ElfSymbolType type
           
 
Constructor Summary
protected ElfSymbol(long address, long size, String name, ElfSymbolType type)
           
 
Method Summary
protected static boolean elf_buildsymbol(Elf parent, long data_pointer, long symbol_index, long str_sect_index, List versions, ElfSymbol.Builder builder)
           
protected static int elf_getversym(long data_pointer, long symbol_index)
           
protected static boolean elf_load_verdef(Elf parent, long data_pointer, long str_sect_index, ElfSymbol.PrivVerdef[] ret)
           
protected static boolean elf_load_verneed(Elf parent, long data_pointer, long str_sect_index, ElfSymbol.PrivVerneed[] ret)
           
 long getAddress()
          Return the address of the symbol.
 String getName()
          Return the mangled name (the raw string found in the symbol table).
 long getSize()
          Return the size of the symbol (possibly zero).
private static ElfSectionHeader getSymtabHeader(ElfSection symbolsS)
           
 ElfSymbolType getType()
          Return the symbol type.
static long symbolsCount(ElfSection symbolsS)
           
 String toString()
          Dump the symbol's contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

address

private final long address

size

private final long size

name

private final String name

type

private final ElfSymbolType type
Constructor Detail

ElfSymbol

protected ElfSymbol(long address,
                    long size,
                    String name,
                    ElfSymbolType type)
Method Detail

getAddress

public long getAddress()
Return the address of the symbol.


getSize

public long getSize()
Return the size of the symbol (possibly zero).


getName

public String getName()
Return the mangled name (the raw string found in the symbol table). Or NULL, of the name is unknown.


getType

public ElfSymbolType getType()
Return the symbol type.


toString

public String toString()
Dump the symbol's contents.

Overrides:
toString in class Object

getSymtabHeader

private static ElfSectionHeader getSymtabHeader(ElfSection symbolsS)
                                         throws ElfException
Throws:
ElfException

symbolsCount

public static long symbolsCount(ElfSection symbolsS)
                         throws ElfException
Throws:
ElfException

elf_buildsymbol

protected static boolean elf_buildsymbol(Elf parent,
                                         long data_pointer,
                                         long symbol_index,
                                         long str_sect_index,
                                         List versions,
                                         ElfSymbol.Builder builder)

elf_getversym

protected static int elf_getversym(long data_pointer,
                                   long symbol_index)

elf_load_verneed

protected static boolean elf_load_verneed(Elf parent,
                                          long data_pointer,
                                          long str_sect_index,
                                          ElfSymbol.PrivVerneed[] ret)

elf_load_verdef

protected static boolean elf_load_verdef(Elf parent,
                                         long data_pointer,
                                         long str_sect_index,
                                         ElfSymbol.PrivVerdef[] ret)