public abstract class NativeBootImage extends AbstractBootImage
| Modifier and Type | Class and Description |
|---|---|
protected static class |
NativeBootImage.TextImpl |
AbstractBootImage.NativeImageKindcodeCache, 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,
HostedMethod mainEntryPoint,
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.
|
static String |
getMethodDescriptor(Method m,
boolean includeReturnType)
Return the Java bytecode method descriptor for a java.lang.reflect.Method.
|
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) |
static String |
mangleName(String methodName)
Mangle the given method name according to our image's (default) mangling convention.
|
static String |
methodFullNameAndDescriptor(Method m,
boolean includeReturnType)
Given a java.lang.reflect.Method, compute a "full name" including its classname and method
descriptor.
|
protected void |
write(Path outputFile) |
create, getBootImageKind, getCodeCache, getHeap, getImageSize, getKind, getNativeLibs, requiresCustomDebugRelocation, writepublic NativeBootImage(AbstractBootImage.NativeImageKind k, HostedUniverse universe, HostedMetaAccess metaAccess, NativeLibraries nativeLibs, NativeImageHeap heap, NativeImageCodeCache codeCache, List<HostedMethod> entryPoints, HostedMethod mainEntryPoint, ClassLoader imageClassLoader)
public com.oracle.objectfile.ObjectFile.Section getTextSection()
AbstractBootImagegetTextSection in class AbstractBootImagepublic abstract String[] makeLaunchCommand(AbstractBootImage.NativeImageKind k, String imageName, Path binPath, Path workPath, Method method)
makeLaunchCommand in class AbstractBootImageprotected final void write(Path outputFile)
public void build(org.graalvm.compiler.debug.DebugContext debug)
build in class AbstractBootImagepublic static String methodFullNameAndDescriptor(Method m, boolean includeReturnType)
m - a methodincludeReturnType - TODOpublic 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 static String getMethodDescriptor(Method m, boolean includeReturnType)
m - a methodincludeReturnType - whether the descriptor string should include the return typepublic static String mangleName(String methodName)
methodName - a string to manglepublic com.oracle.objectfile.ObjectFile getOrCreateDebugObjectFile()
getOrCreateDebugObjectFile in class AbstractBootImage