From nobody Sat Jan 04 13:09:02 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 4YQLPD1tK2z5kFrM; Sat, 04 Jan 2025 13:09:04 +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 4YQLPD1BwPz4N3X; Sat, 4 Jan 2025 13:09:04 +0000 (UTC) (envelope-from mmel@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735996144; h=from:from:reply-to: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: in-reply-to:in-reply-to:references:references; bh=jhfi+hU0kuWqH+le8u/mxMierKU/ZqD87efol/fnEWI=; b=uRgWvCnj+NWx0ACCgggExov7TmeuEXA4R8wKir1Q+enrsZevwd+1mhA9hHjBn44W6uk7oz n4/L/N1sHcMpmMp61vtHNbdVIkV3edmnWGzedGRhHMD9xhCIyoAuvoJoKPHBSHbMhu6sBE H82RU52Ql+WUF/+xtkD2fO5WlsJZtqGCcd5SaOmPxiHqH9JIMoz/QbBnQhDlSAfDjJDf6+ HIcQnxi9nz0o2iWxZ3VrqIgMKvaFoDGyNBL17xM5sNHSMaksoMQdJ8OKchMDjdYH0X2JkA J/Tx1R0zt6saM7JwlahLDLrEERdUqFUPTTze8KHmSyiJ5mQZfKrvdDvKQeisrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735996144; h=from:from:reply-to: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: in-reply-to:in-reply-to:references:references; bh=jhfi+hU0kuWqH+le8u/mxMierKU/ZqD87efol/fnEWI=; b=ZfNNP4ioTu5pVtDs8a8AxV6XfIygv5QkHYunPZCtNeO/3DrFcko9iiB7UpWQKeRH0LExod iTgc1tEr772q8ubd67gtphKV6GpeFcx54VGwINRFH8XqJROWTsbjPP72bFdstFnRBUDCcK At8V8uP0uhbzDl1xNFCLV6uvUDlgwW/AVIJVnMhUGC39k61PoN8VLGGNBYAEuwG6I8rT3l ztn/ZyACTxXBP9sJ52QLf+XPFEGMLKdGXW+dRD3/fq/8b4VJvd1fohOL1MNFIH3MubnTPV g3iR+4YyRfGSiQ5mm6kCWypuTf0OCDYP4A8Dj6Z1zLCpknNosNEZ6PJmPist3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735996144; a=rsa-sha256; cv=none; b=LZytapCU8ZeB81nvJxq6iOhSwTWl1nuKkwbRHptMU0DAja5KyIxYXkNsGdZWyBdOvnx+MO eHwGll1hBhB6ebv5RMFJkyBGDoRchu+pIh5iAq1MHJYfLEWdx839oBE98AcK0CkbfQQCgc qX0OmbX29MA3CAdrrzx3mwZaehSGvhJQ+TUyqskuv/jsj0iGezccZXfTNEVSThYsJATkyM e0xKkUVjdna6T5grgCwNF7icjSBIq2VRJJS5WUrKcrgmWLppmQcZwlFqtFUPKHKAhpbGkQ II1n6AqGPd7F3JRJUKrhwKDguV7L3jBhyVn+proA5RvG6jHhLmvoWEXiP//P+w== 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 4YQLPC3JCpzKtB; Sat, 04 Jan 2025 13:09:03 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Message-ID: <0ed7a6fa-12a5-4fd9-a77f-a4d49d0b3699@FreeBSD.org> Date: Sat, 4 Jan 2025 14:09:02 +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 Reply-To: mmel@FreeBSD.org Subject: Re: git: caab831338f4 - main - Export additional __aeabi_ symbols from arm's libgcc_s To: Dimitry Andric , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202412282118.4BSLIhVr001896@gitrepo.freebsd.org> Content-Language: cs, en-US From: Michal Meloun In-Reply-To: <202412282118.4BSLIhVr001896@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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). Michal