Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/cfdumper/stubs.c
5985 views
1
/*******************************************************************************
2
* Copyright (c) 2019, 2019 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
* or the Apache License, Version 2.0 which accompanies this distribution and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
20
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
*******************************************************************************/
22
23
#include "j9.h"
24
25
/* Stub methods called from files in the runtime/bcutil directory.
26
*
27
* These functions are called using the following macros which
28
* * J9_VM_FUNCTION(currentThread, function)
29
* * J9_VM_FUNCTION_VIA_JAVAVM(javaVM, function)
30
* allow them to be direct calls or indirect through the
31
* internalVMFunctions table.
32
*
33
* The bcutil directory is compiled as a static library with
34
* `J9_INTERNAL_TO_VM` defined so the calls appear to be direct.
35
*
36
* cfdump needs to stub some of these functions to allow the
37
* bcutil static library to be linked. This avoids the following
38
* link errors:
39
*
40
*
41
* "_freeMemorySegment", referenced from:
42
* _internalDefineClass in libj9dyn.a(defineclass.o)
43
* "_internalCreateRAMClassFromROMClass", referenced from:
44
* _internalDefineClass in libj9dyn.a(defineclass.o)
45
* "_setCurrentException", referenced from:
46
* _internalDefineClass in libj9dyn.a(defineclass.o)
47
* "_setCurrentExceptionUTF", referenced from:
48
* _internalDefineClass in libj9dyn.a(defineclass.o)
49
*/
50
51
void freeMemorySegment (J9JavaVM *javaVM, J9MemorySegment *segment, BOOLEAN freeDescriptor)
52
{
53
printf("freeMemorySegment stub called!\n");
54
return;
55
}
56
57
J9Class *
58
internalCreateRAMClassFromROMClass(J9VMThread *vmThread, J9ClassLoader *classLoader, J9ROMClass *romClass,
59
UDATA options, J9Class* elementClass, j9object_t protectionDomain, J9ROMMethod ** methodRemapArray,
60
IDATA entryIndex, I_32 locationType, J9Class *classBeingRedefined, J9Class *hostClass)
61
{
62
printf("internalCreateRAMClassFromROMClass stub called!\n");
63
return NULL;
64
65
}
66
67
void
68
setCurrentExceptionUTF(J9VMThread * vmThread, UDATA exceptionNumber, const char * detailUTF)
69
{
70
printf("setCurrentExceptionUTF stub called!\n");
71
return;
72
}
73
74
void
75
setCurrentException(J9VMThread *currentThread, UDATA exceptionNumber, UDATA *detailMessage)
76
{
77
printf("setCurrentException stub called!\n");
78
return;
79
}
80
81