NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-arm/58789: aarch64 long double arithmetic is haunted
The following reply was made to PR port-arm/58789; it has been noted by GNATS.
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Cc:
Subject: Re: port-arm/58789: aarch64 long double arithmetic is haunted
Date: Tue, 29 Oct 2024 18:52:50 +0000
It seems the reason why the rintl1/rintl2 examples I gave get linked
against libgcc_s is that libm pulls it in, via --as-needed -lgcc_s:
$ grep -B2 libgcc_s libm.so.0.map
As-needed library included to satisfy reference by file (symbol)
libgcc_s.so.1 libm_pic.a(s_tanl.pico) (__getf2@@GCC_3.0)
...
(In netbsd-10, it's for __getf2 in csqrtl.pico. __getf2 is the
one-argument `tetra-float' (128-bit long double) greater-or-equal
comparison function.)
It is unclear to me why libm wants __getf2 out of libgcc_s, but not,
say, __addtf3 (two-argument `tetra-float' add function), which is also
defined in both libgcc_s and in libc.
$ nm -gD --undefined-only libm.so.0 | grep -e __addtf3 -e __getf2
U __addtf3
U __getf2
$ readelf -a libm.so.0 | grep -e __addtf3 -e __getf2
000000060368 012300000402 R_AARCH64_JUMP_SL 0000000000000000 __addtf3@GCC_=
3.0 + 0
0000000605f8 01ea00000402 R_AARCH64_JUMP_SL 0000000000000000 __getf2@GCC_3=
.0 + 0
291: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __addtf3@GCC_3.0=
(2)
490: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __getf2@GCC_3.0 =
(2)
1210: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __addtf3@GCC_3.0
1409: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __getf2@GCC_3.0
Need a wizard to decipher this ancient elven lore...
Home |
Main Index |
Thread Index |
Old Index