public abstract class NativeImage extends AbstractImage
Modifier and Type | Class and Description |
---|---|
static class |
NativeImage.NativeTextSectionImpl |
AbstractImage.NativeImageKind
Modifier and Type | Field and Description |
---|---|
static long |
RWDATA_CGLOBALS_PARTITION_OFFSET |
codeCache, debugInfoSize, entryPoints, heap, imageClassLoader, imageKind, metaAccess, nativeLibs, resultingImageSize, universe
Constructor and Description |
---|
NativeImage(AbstractImage.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(String imageName,
org.graalvm.compiler.debug.DebugContext debug)
Create the image sections for code, constants, and the heap.
|
long |
getImageHeapSize() |
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(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(AbstractImage.NativeImageKind k,
String imageName,
Path binPath,
Path workPath,
Method method) |
protected void |
write(org.graalvm.compiler.debug.DebugContext context,
Path outputFile) |
create, getCodeCache, getDebugInfoSize, getHeap, getImageKind, getImageSize, getNativeLibs, requiresCustomDebugRelocation, write
public static final long RWDATA_CGLOBALS_PARTITION_OFFSET
public NativeImage(AbstractImage.NativeImageKind k, HostedUniverse universe, HostedMetaAccess metaAccess, NativeLibraries nativeLibs, NativeImageHeap heap, NativeImageCodeCache codeCache, List<HostedMethod> entryPoints, ClassLoader imageClassLoader)
public com.oracle.objectfile.ObjectFile.Section getTextSection()
AbstractImage
getTextSection
in class AbstractImage
public abstract String[] makeLaunchCommand(AbstractImage.NativeImageKind k, String imageName, Path binPath, Path workPath, Method method)
makeLaunchCommand
in class AbstractImage
protected final void write(org.graalvm.compiler.debug.DebugContext context, Path outputFile)
public void build(String imageName, org.graalvm.compiler.debug.DebugContext debug)
build
in class AbstractImage
public 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 long getImageHeapSize()
getImageHeapSize
in class AbstractImage
public com.oracle.objectfile.ObjectFile getOrCreateDebugObjectFile()
getOrCreateDebugObjectFile
in class AbstractImage