diff --git a/lib/csu/common/crtbegin.c b/lib/csu/common/crtbegin.c --- a/lib/csu/common/crtbegin.c +++ b/lib/csu/common/crtbegin.c @@ -98,36 +98,3 @@ ".popsection \n" ); #endif - -/* - * Handler for gcj. These provide a _Jv_RegisterClasses function and fill - * out the .jcr section. We just need to call this function with a pointer - * to the appropriate section. - */ -extern void _Jv_RegisterClasses(void *) __weak_symbol; -static void register_classes(void) __used; - -static crt_func __JCR_LIST__[] __section(".jcr") __used = { }; - -#ifndef CTORS_CONSTRUCTORS -__attribute__((constructor)) -#endif -static void -register_classes(void) -{ - - if (_Jv_RegisterClasses != NULL && __JCR_LIST__[0] != 0) - _Jv_RegisterClasses(__JCR_LIST__); -} - -/* - * We can't use constructors when they use the .ctors section as they may be - * placed before __CTOR_LIST__. - */ -#ifdef CTORS_CONSTRUCTORS -asm ( - ".pushsection .init \n" - "\t" INIT_CALL_SEQ(register_classes) "\n" - ".popsection \n" -); -#endif diff --git a/lib/csu/common/crtend.c b/lib/csu/common/crtend.c --- a/lib/csu/common/crtend.c +++ b/lib/csu/common/crtend.c @@ -26,10 +26,6 @@ typedef void (*crt_func)(void); -static crt_func __JCR_END__[] __section(".jcr") __used = { - (crt_func)0 -}; - #ifdef HAVE_CTORS /* diff --git a/lib/csu/tests/init_test.c b/lib/csu/tests/init_test.c --- a/lib/csu/tests/init_test.c +++ b/lib/csu/tests/init_test.c @@ -38,9 +38,6 @@ typedef void (*func_ptr)(void); -extern volatile int jcr_run; -extern const func_ptr *jcr_ptr; -extern const void *jcr_func_ptr; extern volatile int ctors_run; extern volatile int preinit_array_run; extern volatile int preinit_array_state; @@ -48,37 +45,11 @@ extern volatile int init_array_state; #ifndef DSO_BASE -volatile int jcr_run; -const func_ptr *jcr_ptr; volatile int ctors_run; volatile int preinit_array_run; volatile int preinit_array_state = -1; volatile int init_array_run; volatile int init_array_state = -1; - -void _Jv_RegisterClasses(const func_ptr *); - -__section(".jcr") __used static func_ptr jcr_func = (func_ptr)1; -const void *jcr_func_ptr = &jcr_func; - -void -_Jv_RegisterClasses(const func_ptr *jcr) -{ - - jcr_run = 1; - jcr_ptr = jcr; -} -#endif - -#ifndef DSO_LIB -ATF_TC_WITHOUT_HEAD(jcr_test); -ATF_TC_BODY(jcr_test, tc) -{ - - ATF_REQUIRE_MSG(jcr_run == 1, ".jcr not run"); - ATF_REQUIRE_MSG(jcr_ptr == jcr_func_ptr, - "Incorrect pointer passed to _Jv_RegisterClasses"); -} #endif #ifndef DSO_BASE @@ -160,7 +131,6 @@ ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, jcr_test); ATF_TP_ADD_TC(tp, ctors_test); ATF_TP_ADD_TC(tp, preinit_array_test); ATF_TP_ADD_TC(tp, init_array_test); diff --git a/share/man/man5/elf.5 b/share/man/man5/elf.5 --- a/share/man/man5/elf.5 +++ b/share/man/man5/elf.5 @@ -1065,6 +1065,9 @@ .It .jcr This section holds information about Java classes that must be registered. +It is obsolete and binaries created for +.Fx 15 +or later do not process it. .It .eh_frame This section holds information used for C++ exception-handling. .El