Date: Sat, 1 Nov 2025 22:24:32 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Mark Millard <marklmi@yahoo.com> Cc: dev-commits-src-main <dev-commits-src-main@freebsd.org> Subject: Re: git: 51e8e8b0f369 - main - Merge commit e24f90190c77 from llvm git (by Brad Smith): Message-ID: <F73BE5F1-E808-48AF-936D-297BFBFF79EA@FreeBSD.org> In-Reply-To: <9890C464-D776-4E27-9496-220F041D0973@yahoo.com> References: <38155720-430A-4E3B-82C3-3DFF36A37098@yahoo.com> <E36B177E-274D-48E4-8B82-564294E7FB09@FreeBSD.org> <9890C464-D776-4E27-9496-220F041D0973@yahoo.com>
index | next in thread | previous in thread | raw e-mail
On 1 Nov 2025, at 21:47, Mark Millard <marklmi@yahoo.com> wrote: > > On Nov 1, 2025, at 13:17, Dimitry Andric <dim@FreeBSD.org> wrote: ... >> No, the symbol should be there, and it shouldn't be "non-exported". However, looking with readelf, I see: >> >> Symbol table '.symtab' contains 13 entries: >> Num: Value Size Type Bind Vis Ndx Name >> ... >> 11: 0000000000000000 0 NOTYPE GLOBAL HIDDEN UND __aarch64_have_lse_atomics >> 12: 0000000000000000 48 FUNC GLOBAL HIDDEN 2 __aarch64_cas4_acq >> >> So the symbol is global but hidden, which is because lib/libcompiler_rt/Makefile compiles everything with -fvisibility=hidden. >> >> It has been doing that for a long time, so I am unsure why ld now suddenly makes a problem out of it. Maybe the CI builds use another linker, either on purpose or by accident? > > May be something like: > > QUOTE from https://github.com/llvm/llvm-project/issues/86777 > ("[lld] why does lld export hidden symbols without warning when dynamic libraries link to object files?") > > swift-ci > added a commit that references this issue on Mar 29, 2024 > [ELF] Enhance --no-allow-shlib-undefined for non-exported definitions > df54f62 > For a DSO with all DT_NEEDED entries accounted for, if it contains an > undefined non-weak symbol that shares a name with a non-exported > definition (hidden visibility or localized by a version script), and > there is no DSO definition, we should report an error. > > llvm#70769 implemented the error when we see `ref.so def-hidden.so`. This patch > implementes the error when we see `def-hidden.so ref.so`, matching GNU > ld. > > Close llvm#86777 > END QUOTE Yes, I found that too, and an informative blog post by Fangrui Song at <https://maskray.me/blog/2023-10-31-dso-undef-and-non-exported-definition>. But it doesn't explain why this error only occurs for some people and not others. If I understand the llvm commit and the blog post correctly, I would expect this error to always appear. :) -Dimitryhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F73BE5F1-E808-48AF-936D-297BFBFF79EA>
