public abstract class NativeBootImage extends AbstractBootImage
Modifier and Type | Class and Description |
---|---|
static class |
NativeBootImage.NativeTextSectionImpl |
AbstractBootImage.NativeImageKind
Modifier and Type | Field and Description |
---|---|
static long |
RWDATA_CGLOBALS_PARTITION_OFFSET |
codeCache, entryPoints, heap, imageClassLoader, kind, metaAccess, nativeLibs, resultingImageSize, universe
Constructor and Description |
---|
NativeBootImage(AbstractBootImage.NativeImageKind k,
HostedUniverse universe,
HostedMetaAccess metaAccess,
NativeLibraries nativeLibs,
NativeImageHeap heap,
NativeImageCodeCache codeCache,
List<HostedMethod> entryPoints,
ClassLoader imageClassLoader) |
Modifier and Type | Method and Description |
---|---|
void |
build(org.graalvm.compiler.debug.DebugContext debug)
Create the image sections for code, constants, and the heap.
|
com.oracle.objectfile.ObjectFile |
getOrCreateDebugObjectFile() |
com.oracle.objectfile.ObjectFile.Section |
getTextSection()
Returns the ObjectFile.Section within the image, if any, whose vaddr defines the image's base
vaddr.
|
static String |
globalSymbolNameForMethod(Method m)
Given a java.lang.reflect.Method, compute the symbol name of its entry point (if any) in the
image.
|
static String |
globalSymbolNameForMethod(jdk.vm.ci.meta.ResolvedJavaMethod sm)
Given a
ResolvedJavaMethod , compute what symbol name of its entry point (if any) in
the image. |
static String |
localSymbolNameForMethod(Method m)
Given a java.lang.reflect.Method, compute the symbol name of its start address (if any) in
the image.
|
static String |
localSymbolNameForMethod(jdk.vm.ci.meta.ResolvedJavaMethod sm)
Given a
ResolvedJavaMethod , compute what symbol name of its start address (if any) in
the image. |
abstract String[] |
makeLaunchCommand(AbstractBootImage.NativeImageKind k,
String imageName,
Path binPath,
Path workPath,
Method method) |
protected void |
write(Path outputFile) |
create, getBootImageKind, getCodeCache, getHeap, getImageSize, getKind, getNativeLibs, requiresCustomDebugRelocation, write
public static final long RWDATA_CGLOBALS_PARTITION_OFFSET
public NativeBootImage(AbstractBootImage.NativeImageKind k, HostedUniverse universe, HostedMetaAccess metaAccess, NativeLibraries nativeLibs, NativeImageHeap heap, NativeImageCodeCache codeCache, List<HostedMethod> entryPoints, ClassLoader imageClassLoader)
public com.oracle.objectfile.ObjectFile.Section getTextSection()
AbstractBootImage
getTextSection
in class AbstractBootImage
public abstract String[] makeLaunchCommand(AbstractBootImage.NativeImageKind k, String imageName, Path binPath, Path workPath, Method method)
makeLaunchCommand
in class AbstractBootImage
protected final void write(Path outputFile)
public void build(org.graalvm.compiler.debug.DebugContext debug)
build
in class AbstractBootImage
public static String localSymbolNameForMethod(Method m)
m
- a java.lang.reflect.Methodpublic static String localSymbolNameForMethod(jdk.vm.ci.meta.ResolvedJavaMethod sm)
ResolvedJavaMethod
, compute what symbol name of its start address (if any) in
the image. The symbol name returned is the one that would be used for local references (e.g.
for relocation), so is guaranteed to exist if the method is in the image. However, it is not
necessarily visible for linking from other objects.sm
- a SubstrateMethodpublic static String globalSymbolNameForMethod(Method m)
m
- a java.lang.reflect.Methodpublic static String globalSymbolNameForMethod(jdk.vm.ci.meta.ResolvedJavaMethod sm)
ResolvedJavaMethod
, compute what symbol name of its entry point (if any) in
the image. The symbol name returned is one that would be used for external references (e.g.
for linking) and for method lookup by signature. If multiple methods with the same signature
are present in the image, the returned symbol name is not guaranteed to resolve to the method
being passed.sm
- a SubstrateMethodpublic com.oracle.objectfile.ObjectFile getOrCreateDebugObjectFile()
getOrCreateDebugObjectFile
in class AbstractBootImage