24
24
*/
25
25
package com .oracle .svm .hosted .jdk ;
26
26
27
- import java .lang .reflect .Method ;
28
-
29
- import org .graalvm .nativeimage .IsolateThread ;
30
- import org .graalvm .nativeimage .c .type .CCharPointer ;
31
-
32
27
import com .oracle .svm .core .feature .AutomaticallyRegisteredFeature ;
33
28
import com .oracle .svm .core .feature .InternalFeature ;
34
29
import com .oracle .svm .core .jdk .JNIRegistrationUtil ;
35
30
import com .oracle .svm .core .jdk .PlatformNativeLibrarySupport ;
36
- import com .oracle .svm .core .jdk .management .LibManagementExtSupport ;
37
31
import com .oracle .svm .hosted .FeatureImpl .DuringAnalysisAccessImpl ;
38
32
import com .oracle .svm .hosted .c .NativeLibraries ;
39
- import com .oracle .svm .hosted .code .CEntryPointCallStubSupport ;
40
- import com .oracle .svm .hosted .code .CEntryPointData ;
41
- import com .oracle .svm .util .ReflectionUtil ;
42
33
43
34
@ AutomaticallyRegisteredFeature
44
35
public class JNIRegistrationManagementExt extends JNIRegistrationUtil implements InternalFeature {
@@ -60,14 +51,6 @@ private void linkManagementExt(DuringAnalysisAccess access) {
60
51
nativeLibraries .addStaticNonJniLibrary ("management_ext" , "java" );
61
52
if (isWindows ()) {
62
53
nativeLibraries .addDynamicNonJniLibrary ("psapi" );
63
- } else {
64
- /*
65
- * Register our port of the native function `throw_internal_error`. This avoids linking
66
- * the entire object file of the original function, which is necessary to prevent linker
67
- * errors such as JDK-8264047.
68
- */
69
- Method method = ReflectionUtil .lookupMethod (LibManagementExtSupport .class , "throwInternalError" , IsolateThread .class , CCharPointer .class );
70
- CEntryPointCallStubSupport .singleton ().registerStubForMethod (method , () -> CEntryPointData .create (method ));
71
54
}
72
55
}
73
56
}
0 commit comments