Package ghidra.app.util.bin.format.pef
Class ImportStateCache
- java.lang.Object
-
- ghidra.app.util.bin.format.pef.ImportStateCache
-
public class ImportStateCache extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ImportStateCache(Program program, ContainerHeader header)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
createLibrarySymbol(ImportedLibrary library, java.lang.String symbolName, Address address)
void
dispose()
MemoryBlock
getMemoryBlockForSection(SectionHeader section)
Returns the memory block for the given section.Namespace
getNamespace(ImportedLibrary library)
Returns a namespace for the given imported library.Symbol
getSymbol(java.lang.String symbolName, ImportedLibrary library)
Returns the symbol object with the given name in the specified namespace.Address
getTocAddress()
Namespace
getTVectNamespace()
void
setMemoryBlockForSection(SectionHeader section, MemoryBlock block)
void
setTocAddress(Address tocAddress)
-
-
-
Constructor Detail
-
ImportStateCache
public ImportStateCache(Program program, ContainerHeader header)
-
-
Method Detail
-
dispose
public void dispose()
-
getTVectNamespace
public Namespace getTVectNamespace()
-
getNamespace
public Namespace getNamespace(ImportedLibrary library)
Returns a namespace for the given imported library.- Parameters:
library
- the imported library- Returns:
- a namespace for the given imported library
-
getMemoryBlockForSection
public MemoryBlock getMemoryBlockForSection(SectionHeader section)
Returns the memory block for the given section. Generally sections do not specify a preferred address and are not named. This map provides a way to lookup the block that was created for the given section.- Parameters:
section
- the PEF section header- Returns:
- the memory block for the given section
-
setMemoryBlockForSection
public void setMemoryBlockForSection(SectionHeader section, MemoryBlock block)
-
getSymbol
public Symbol getSymbol(java.lang.String symbolName, ImportedLibrary library)
Returns the symbol object with the given name in the specified namespace.- Parameters:
program
- the programid
- the desired symbol's namenamespace
- the desired symbols' namespace- Returns:
- the symbol object with the given name in the specified namespace
-
createLibrarySymbol
public boolean createLibrarySymbol(ImportedLibrary library, java.lang.String symbolName, Address address)
-
getTocAddress
public Address getTocAddress()
-
setTocAddress
public void setTocAddress(Address tocAddress)
-
-