From nobody Sat Jan 04 13:36:47 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 4YQM1D5cGrz5kHKv; Sat, 04 Jan 2025 13:36:48 +0000 (UTC) (envelope-from mmel@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 4YQM1D4tvJz4Ryv; Sat, 4 Jan 2025 13:36:48 +0000 (UTC) (envelope-from mmel@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735997808; h=from:from:reply-to: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=JMhwvNz1EraPbdgRvoIuRAYg83BgAIV+4Ak31cqNo9U=; b=BzY4OTg0UqShoIoWrXZ37Y/8Wi9idkWuUdVozRq/8taCzDGFKN+9j8R68HbVRnaQouZFFy LNguxVG1W2HgPq2TsNbs/zLLHGO9ApwlnHLHdCszBWjAE3/ipQPg0O030ZXbWsOG2mmZm8 Wqfn9gDE945BePgy/iU1CluLZUJ58nPF53WOSqE8oSDgJeL8JpqzRNvR1XdZnVCnNx+YED ZKvPwq3avSvnbYl20r3aVgurHSLtNeM7FlQLmfnhGRUlyKsL3BjYQXpVOVFpbQGIZ2/eyl S6ume7dHd5xL/OSppGfL7Lb3qnT0ZNUXwqoN58uWz1jWVMyJ9cMxjRFEpzFPng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735997808; h=from:from:reply-to: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=JMhwvNz1EraPbdgRvoIuRAYg83BgAIV+4Ak31cqNo9U=; b=B8yZxP56JgMHFSGiucfO+LuPHUuJMS6FPuzySzxb6z9CgX05erDNhxHQx6J2YoPrpiL/LY mpza8nRccFLxRkpNWlaRTRQxcM2N/ZEABfjeY7Lwq5JsMBckLZ2qJMb1ZCvJtHIGWsAt2U xGGsxbwi2kzgllLNHYJm0Wc4C9Cl1MFaANKbjxk4SDu9VhGS5cDX0esNPry63/ZqRugXHu /dOcKbo14Ssqcc377d6C2nr3x7yOGnfT2ORkadoQ9KejzxJ9m0clC9DeaKBU7b/C28YUMf 7WwCZ1hJjnp2l05SHr6BIyL0UQ+VGQmn9QiISsG/KZx4y3MH9C6bEo+RQQi9rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735997808; a=rsa-sha256; cv=none; b=eeyV2z8/UARKWeZSCnMLHULnJ5APxCrEBNzPE1GL/9sLbL1YQfIwgJY7l4NNfSNksqJEun oMb/a+DQGSSTNZ+zxoYjvRouk7r3smhaxHeZnrhrOMS9XqaUMKN40v++WYDbDIiZwGbIEJ KBVtBAE7Bqh+J+hHMtcQDUbLZvtAHm8PLpbvEg9VfOG4uqd1EcTm5mZhksC3Mbobb2m7rD uyiQQ0ltYB9/xToRYPZveXk9KMmXOu2v/VssovgYSw06TAzQuuXgp6EJIn8OFZ+65EqR7Q KENGN8/r7zMJCW7Cjg5FTOQB0d2OATGgg+eglj9Lwaq4AnVwZoOqNFnWeRddvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2001:67c:14a0:5fe0:bcb2:4da4:ff9a:30fe] (unknown [IPv6:2001:67c:14a0:5fe0:bcb2:4da4:ff9a:30fe]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mmel/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4YQM1C71VlzLSb; Sat, 04 Jan 2025 13:36:47 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Message-ID: <0f8338a6-6a27-47dd-8c5a-8b797f123c27@FreeBSD.org> Date: Sat, 4 Jan 2025 14:36:47 +0100 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 User-Agent: Mozilla Thunderbird From: "mmel@freebsd.org" Reply-To: mmel@FreeBSD.org Subject: Re: git: caab831338f4 - main - Export additional __aeabi_ symbols from arm's libgcc_s To: Dimitry Andric Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202412282118.4BSLIhVr001896@gitrepo.freebsd.org> <0ed7a6fa-12a5-4fd9-a77f-a4d49d0b3699@FreeBSD.org> <8531A9F2-3333-4C74-8DB7-2455C9AE070B@FreeBSD.org> Content-Language: cs, en-US In-Reply-To: <8531A9F2-3333-4C74-8DB7-2455C9AE070B@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 04.01.2025 14:18, Dimitry Andric wrote: > On 4 Jan 2025, at 14:09, Michal Meloun wrote: >> >> 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=caab831338f4eeaa7455e981478be9fd414b7969 >>> 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; >> >> I think the aeabi_ functions with floating point arguments were not added correctly. By definition, they must be compiled with -mfloat-abi=softfp event if the rest of the library is compiled with hardfp abi. >> >> 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. >> >> Also, the list of aeabi_ functions in is not complete, although the compiler_rt library contains them (__aeabi_f2d, __aeabi_f2iz...). >> >> 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=softfp) together with the version without the suffix , and the rt linker will select the appropriate version depending on the VFP presence. >> >> 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. >> >> 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? > Reopened. Michal