From nobody Fri Apr 18 18:59:55 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZfPG33J0hz5tCyk; Fri, 18 Apr 2025 18:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZfPG31ZNwz3bFq; Fri, 18 Apr 2025 18:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745002795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9QBg0Hi0xYvsb0fY2VoQqpK/iikBYVjN0+2f2gIp70o=; b=K2bI0KVDdUEt34KgY6rl/dZxuHbdFlxGaYqo8xZgTm2t/3l3Em2NoemLmrsl+LplOXVgAG gLYVHry7CrEhAgbEU63tUWWpptaNLDNSqbLeE8LGu+locK7rEmNp8AnV5r6IhKTLwCj0P8 JsxoljmuqkK2npxjPKCjMl9MCtMNg8j4VZdhsZnOuvvO/wnysnz01T/x7eCRVXMaPBib2b CABMiiSvLYMLPbWxt81hGl44+HTL/BPQ09+j8WFiH+8Brakp2McGVJJrdHOhk7AWlQ4QgM QXgLCpyV15jizRNciW1fB6jXVq7/kD/YIr8574KbiFAspeqsGJYsSDG/zjzqHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745002795; a=rsa-sha256; cv=none; b=qQ2Jp99ONLxhb4viSO+LoOMuSA365z4IdCQrr/TguQoAYC4sNdA6ZSXdIUbAf6Qx5gw0ua Q4kKVXCJDB7QYFty7+OQbqLt/P/HvrpGNPC7Z8D2vJJm0yd+3mDLz2VQVFbg+gJ9bmcqtx RZndhpNnrjLCHP3qFQvs3Oq31BjO5GiIaOo3pfmxm/uEgz9+GDG0ozK0wLMmsdGFH8vUcq G+eHPCcZPwCcIm/7Hf7Q8Xk5/fSwNP+WpSLQhr4dHPu2pCOL8j4PKDAL9Pzm7EdnfnEBEz O9BZlSuYESjoJA6ea/G9P73XC+n2cwZqtsg2sS+B/8ZSfUxj23InzPX8KygNwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745002795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9QBg0Hi0xYvsb0fY2VoQqpK/iikBYVjN0+2f2gIp70o=; b=Ule/bbCcR9La2wsuabcBN+8/7gdu+LMaXnpd9quaWNveFeyeDlufleXScnZqBM7lNPLbPP AF72X+FQZOiGG36cjHbJbKMSOY6/rIJ869KNQ+AL9wKmMSBwFTXYNdWGIHe8c84BraT7pl jFASlAuZGXamQgnan+7YoEhmP/xgi2pdimRMy/5SS/DmkqvCrMObs3wK1iV7WsetJJnp7Y Dqxl6e6S29cmnMWd4NSsB+uV6k26Gl5qWMx8pWghxBwtuUY+UJK0Nax2+daPmyxojsCVcn SAzvXc8xhp02wRVTAm5aRbgW6Q6by2Mcks3Jiilxm9PTAcVn7W3hHp3TKbx/YQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZfPG3191gzm54; Fri, 18 Apr 2025 18:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53IIxt5W080626; Fri, 18 Apr 2025 18:59:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53IIxtf1080623; Fri, 18 Apr 2025 18:59:55 GMT (envelope-from git) Date: Fri, 18 Apr 2025 18:59:55 GMT Message-Id: <202504181859.53IIxtf1080623@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: a60615d5be83 - main - csu: drop support for GCJ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a60615d5be83ca050d4ddfbbb4411ca7a8a11486 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a60615d5be83ca050d4ddfbbb4411ca7a8a11486 commit a60615d5be83ca050d4ddfbbb4411ca7a8a11486 Author: Brooks Davis AuthorDate: 2025-04-18 18:49:01 +0000 Commit: Brooks Davis CommitDate: 2025-04-18 18:59:19 +0000 csu: drop support for GCJ Remove .jcr sections and related infrastructure. This has no impact on existing binaries and the toolchain remains capability of linking them, but would require different (or additional) csu files. GCC removed GCJ from trunk in on September 30, 2016. Our support came in with D17587 for compatibility with old object files. It was roughly contemporaneous with GCC 6.5, the last release with GCJ support. At this point we don't even have a compiler port capable of producing GCJ binaries so there is no need to carry this around any more. For reference see: https://en.wikipedia.org/wiki/GNU_Compiler_for_Java#History Reviewed by: kib, emaste Discussed with: imp Sponsored by: SRI International Differential Revision: https://reviews.freebsd.org/D49882 --- lib/csu/common/crtbegin.c | 33 --------------------------------- lib/csu/common/crtend.c | 4 ---- lib/csu/tests/init_test.c | 30 ------------------------------ share/man/man5/elf.5 | 3 +++ 4 files changed, 3 insertions(+), 67 deletions(-) diff --git a/lib/csu/common/crtbegin.c b/lib/csu/common/crtbegin.c index 06fe990052f7..8ef9b8923c21 100644 --- a/lib/csu/common/crtbegin.c +++ b/lib/csu/common/crtbegin.c @@ -98,36 +98,3 @@ asm ( ".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 index bf25c1d836a9..9eb75de2ef60 100644 --- 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 index 47bd9b7e64d7..2d4484735f76 100644 --- 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_run; 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_TC_BODY(init_array_test, tc) 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 index 7ad469a03c3b..5bd71efcb56c 100644 --- a/share/man/man5/elf.5 +++ b/share/man/man5/elf.5 @@ -1065,6 +1065,9 @@ and .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