/*******************************************************************************1* Copyright (c) 2019, 2019 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* 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-exception20*******************************************************************************/2122#include "j9.h"2324/* Stub methods called from files in the runtime/bcutil directory.25*26* These functions are called using the following macros which27* * J9_VM_FUNCTION(currentThread, function)28* * J9_VM_FUNCTION_VIA_JAVAVM(javaVM, function)29* allow them to be direct calls or indirect through the30* internalVMFunctions table.31*32* The bcutil directory is compiled as a static library with33* `J9_INTERNAL_TO_VM` defined so the calls appear to be direct.34*35* cfdump needs to stub some of these functions to allow the36* bcutil static library to be linked. This avoids the following37* link errors:38*39*40* "_freeMemorySegment", referenced from:41* _internalDefineClass in libj9dyn.a(defineclass.o)42* "_internalCreateRAMClassFromROMClass", referenced from:43* _internalDefineClass in libj9dyn.a(defineclass.o)44* "_setCurrentException", referenced from:45* _internalDefineClass in libj9dyn.a(defineclass.o)46* "_setCurrentExceptionUTF", referenced from:47* _internalDefineClass in libj9dyn.a(defineclass.o)48*/4950void freeMemorySegment (J9JavaVM *javaVM, J9MemorySegment *segment, BOOLEAN freeDescriptor)51{52printf("freeMemorySegment stub called!\n");53return;54}5556J9Class *57internalCreateRAMClassFromROMClass(J9VMThread *vmThread, J9ClassLoader *classLoader, J9ROMClass *romClass,58UDATA options, J9Class* elementClass, j9object_t protectionDomain, J9ROMMethod ** methodRemapArray,59IDATA entryIndex, I_32 locationType, J9Class *classBeingRedefined, J9Class *hostClass)60{61printf("internalCreateRAMClassFromROMClass stub called!\n");62return NULL;6364}6566void67setCurrentExceptionUTF(J9VMThread * vmThread, UDATA exceptionNumber, const char * detailUTF)68{69printf("setCurrentExceptionUTF stub called!\n");70return;71}7273void74setCurrentException(J9VMThread *currentThread, UDATA exceptionNumber, UDATA *detailMessage)75{76printf("setCurrentException stub called!\n");77return;78}798081