Package ghidra.app.util.opinion
Class LoadSpec
- java.lang.Object
-
- ghidra.app.util.opinion.LoadSpec
-
public class LoadSpec extends java.lang.Object
Represents a possible way for aLoader
to load something.
-
-
Constructor Summary
Constructors Constructor Description LoadSpec(Loader loader, long imageBase, boolean requiresLanguageCompilerSpec)
Constructs aLoadSpec
with an unknown language/compiler.LoadSpec(Loader loader, long imageBase, QueryResult languageCompilerSpecQueryResult)
Constructs aLoadSpec
from aQueryResult
.LoadSpec(Loader loader, long imageBase, LanguageCompilerSpecPair languageCompilerSpec, boolean isPreferred)
Constructs aLoadSpec
from a manually suppliedLanguageCompilerSpecPair
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDesiredImageBase()
Gets the desired image base to use during the load.LanguageCompilerSpecPair
getLanguageCompilerSpec()
Gets thisLoadSpec
'sLanguageCompilerSpecPair
.Loader
getLoader()
boolean
isComplete()
Gets whether or not thisLoadSpec
is complete.boolean
isPreferred()
boolean
requiresLanguageCompilerSpec()
Gets whether or not thisLoadSpec
requires a language/compiler to load something.
-
-
-
Constructor Detail
-
LoadSpec
public LoadSpec(Loader loader, long imageBase, LanguageCompilerSpecPair languageCompilerSpec, boolean isPreferred)
Constructs aLoadSpec
from a manually suppliedLanguageCompilerSpecPair
.- Parameters:
loader
- ThisLoadSpec
'sLoader
.imageBase
- The desired image base address for the load.languageCompilerSpec
- The language/compiler spec ID. If this is not needed or not known, useLoadSpec(Loader, long, boolean)
.isPreferred
- true if thisLoadSpec
is preferred; otherwise, false.
-
LoadSpec
public LoadSpec(Loader loader, long imageBase, QueryResult languageCompilerSpecQueryResult)
Constructs aLoadSpec
from aQueryResult
.
-
LoadSpec
public LoadSpec(Loader loader, long imageBase, boolean requiresLanguageCompilerSpec)
Constructs aLoadSpec
with an unknown language/compiler. SomeLoader
's do not require a language/compiler.- Parameters:
loader
- ThisLoadSpec
'sLoader
.imageBase
- The desired image base address for the load.requiresLanguageCompilerSpec
- True if thisLoadSpec
requires a language/compiler; otherwise, false. If a language/compiler is required, it will have to be supplied to theLoader
by some other means, and thisLoadSpec
will be considered incomplete.- See Also:
isComplete()
-
-
Method Detail
-
getDesiredImageBase
public long getDesiredImageBase()
Gets the desired image base to use during the load.- Returns:
- The desired image base to use during the load.
-
getLanguageCompilerSpec
public LanguageCompilerSpecPair getLanguageCompilerSpec()
Gets thisLoadSpec
'sLanguageCompilerSpecPair
.- Returns:
- This
LoadSpec
'sLanguageCompilerSpecPair
. Could be null if thisLoadSpec
doesn't need or know the language/compiler.
-
isPreferred
public boolean isPreferred()
-
requiresLanguageCompilerSpec
public boolean requiresLanguageCompilerSpec()
Gets whether or not thisLoadSpec
requires a language/compiler to load something.- Returns:
- True if this
LoadSpec
requires a language/compiler to load something; otherwise, false.
-
-