From nobody Sat Jan 04 13:18:11 2025 X-Original-To: dev-commits-src-main@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 4YQLbn1nv1z5kFy7; Sat, 04 Jan 2025 13:18:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YQLbn11mWz4P43; Sat, 4 Jan 2025 13:18:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735996693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IjxmuwUIc0wCkAdbux4kWrl4yowXBpEyuIo0w+Ulc20=; b=cFRSxYb2fLqLRwQatZwH5bRHFiFkQNVuJCu5/+rjoFWeanbNR4ijc/AzD9UruLg2cUZ8EN UMr3Uk1HFQ9SyaNKYO401JFH5lkGAF72TgoidmRQElxrF4shxj+HZ9oNyuXyefg/Nn9EUa usqa2D7z0OgQpcKlqG9MbIemKGBq5CwNOxx9oNOFp/cmr0iGz97IalzRgG9ehjsfq9plkW D4d9FZF6n0SBV93qmRaJ7epKrVigSru7ANfBmWsEun6JRzL2mQ4A+qa18Zps5vSg1ANtsb TsAk4DTjVgpFu0LU/eZrNZC0HIQzpjIDqSSoVkacN/FhMLaXiR5U3F+x/6buEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735996693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IjxmuwUIc0wCkAdbux4kWrl4yowXBpEyuIo0w+Ulc20=; b=inAghuf5AmULpH1PjBoJHr0Hhm52B0vDH9RK8nsDHWHsKJUp/Li/8biYql2oa8/t8PWu9R HABtLRd46WGROxnKt+qrTfazTX45sOPgsf8c3AxEIC7ZxXYQX+wh112g3PIJmuIA0ZzTVb ruFFoY6/8lKoOKkgESMUIzBMqBRy0GzCAdjJMwDlbP8bzinygaY5QUEd76cAMU14liUh1d q9DGvaEnLsopVERqBW/r5bocM8ZoTJY9rxiL/K3j1ER9V+LcpcCLrCkNfl4aI3XiGQGrPp Zp0nv94QRDI6VY7MBy7Kkh8AI0FDVw3cAJk2D2MAdc0hl2WwJgD7/QYm9+X5Wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735996693; a=rsa-sha256; cv=none; b=mLG0Hlwfk4o8kETtjZDRuUppd+jW3t2Aw6DBxEFsRj7wjqZ1yu6qmjZKGRnfDlr5PuZY40 fpqAexVZJW4ugNCe/89lD1LCJ1MO9BBNxs8rVCXV8AzCCYrJdiFLi6WBmPgLNhDiZBQuA9 111QYlFrE5updCGi1AwvAvY29Zp8xKoBqooLXlIGF5DHhBtoMknMpb8j/RySC9veflQdTj MtcPAFS49eUIZO0GPZFeJEKxgRuXeUcTFEqSUyHH47TY21qXuLO7DkFQgaHdyUjeteQWD6 oycsZPR+99cBAu2Uj4ARQePvE3veJOavhOGVfIVwdQi12D7tUMJ3ZccyK/HejA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R10" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4YQLbm6n4xzLSM; Sat, 04 Jan 2025 13:18:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id CC5915FD7F; Sat, 04 Jan 2025 14:18:11 +0100 (CET) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.9\)) Subject: Re: git: caab831338f4 - main - Export additional __aeabi_ symbols from arm's libgcc_s From: Dimitry Andric In-Reply-To: <0ed7a6fa-12a5-4fd9-a77f-a4d49d0b3699@FreeBSD.org> Date: Sat, 4 Jan 2025 14:18:11 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <8531A9F2-3333-4C74-8DB7-2455C9AE070B@FreeBSD.org> References: <202412282118.4BSLIhVr001896@gitrepo.freebsd.org> <0ed7a6fa-12a5-4fd9-a77f-a4d49d0b3699@FreeBSD.org> To: "mmel@freebsd.org" X-Mailer: Apple Mail (2.3731.700.6.1.9) On 4 Jan 2025, at 14:09, Michal Meloun wrote: >=20 > On 28.12.2024 22:18, Dimitry Andric wrote: >> The branch main has been updated by dim: >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dcaab831338f4eeaa7455e981478be9fd= 414b7969 >> commit caab831338f4eeaa7455e981478be9fd414b7969 >> Author: Dimitry Andric >> AuthorDate: 2024-12-28 21:17:13 +0000 >> Commit: Dimitry Andric >> CommitDate: 2024-12-28 21:18:20 +0000 >> Export additional __aeabi_ symbols from arm's libgcc_s >> Some programs depend on these symbols, when they are = compiled for armv6 >> or armv7. Closes #1560 (slightly changed due to sorting of the = symbols). >> PR: 271087 >> Reported by: fuz >> Submitted by: jfc@mit.edu >> MFC after: 1 week >> --- >> lib/libgcc_s/arm/Symbol.map | 27 ++++++++++++++++++++++++++- >> 1 file changed, 26 insertions(+), 1 deletion(-) >> diff --git a/lib/libgcc_s/arm/Symbol.map = b/lib/libgcc_s/arm/Symbol.map >> index 92b54761d810..a426f823de5c 100644 >> --- a/lib/libgcc_s/arm/Symbol.map >> +++ b/lib/libgcc_s/arm/Symbol.map >> @@ -4,8 +4,33 @@ >> GCC_3.5 { >> _Unwind_Complete; >> _Unwind_VRS_Get; >> - _Unwind_VRS_Set; >> _Unwind_VRS_Pop; >> + _Unwind_VRS_Set; >> + __aeabi_d2h; >> + __aeabi_d2lz; >> + __aeabi_d2ulz; >> + __aeabi_f2h; >> + __aeabi_f2lz; >> + __aeabi_f2ulz; >> + __aeabi_h2f; >> + __aeabi_idiv; >> + __aeabi_idiv0; >> + __aeabi_l2d; >> + __aeabi_l2f; >> + __aeabi_lasr; >> + __aeabi_lcmp; >> + __aeabi_ldivmod; >> + __aeabi_llsl; >> + __aeabi_llsr; >> + __aeabi_lmul; >> + __aeabi_ui2d; >> + __aeabi_ui2f; >> + __aeabi_uidiv; >> + __aeabi_uidivmod; >> + __aeabi_ul2d; >> + __aeabi_ul2f; >> + __aeabi_ulcmp; >> + __aeabi_uldivmod; >> __aeabi_unwind_cpp_pr0; >> __aeabi_unwind_cpp_pr1; >> __aeabi_unwind_cpp_pr2; >=20 > I think the aeabi_ functions with floating point arguments were not = added correctly. By definition, they must be compiled with = -mfloat-abi=3Dsoftfp event if the rest of the library is compiled with = hardfp abi. >=20 > It is also not clear why they are added to lib/libgcc_s/arm/Symbol.map = and not to lib/libc/arm/aeabi/Symbol.map, where the other (some now = duplicated) aeabi_ symbols are. >=20 > Also, the list of aeabi_ functions in is not complete, although the = compiler_rt library contains them (__aeabi_f2d, __aeabi_f2iz...). >=20 > When I looked at it, I found another problem - the whole vfp suffix = dance in = https://cgit.freebsd.org/src/tree/lib/libcompiler_rt/Makefile.inc#n277 = is pointless, all these functions have the same extension in their name. = They are expected to be compiled (again with -mfloat-abi=3Dsoftfp) = together with the version without the suffix , and the rt linker will = select the appropriate version depending on the VFP presence. >=20 > In addition, the makefile searches for resources in the wrong order, > contrib/llvm-project/compiler-rt/lib/builtins is searched before > contrib/llvm-project/compiler-rt/lib/builtins/, so for example a = non-specific fp_mode is built, not an architecture-specific one. >=20 > What now? For me the most important question is in which map (and = namespace) should the aeabi_ symbols be defined (without breaking the = ABI for the user space). All good questions, for which I unfortunately do not know the answers. = It is probably best to make a follow-up bug to = https://bugs.freebsd.org/283484 where this patch originated. Or maybe = reopen it? -Dimitry