On Mon, 22 Jan 2024 15:34:38 +0100 Tijl Coosemans <t...@coosemans.org> wrote:
> Apply the fix for Linux from fb5e6cda96bd9dcae9e4f62ec8b6b3e572a32743
> to the non-Linux cases.
> 
> -export-symbols was implemented using --retain-symbols-file. For
> non-exported symbols this flag tries to remove symbol information
> altogether which it can only do if a symbol isn't referenced
> anywhere. So, often this flag doesn't do anything. With a version
> script non-exported symbols can be marked local instead of removed.
> 
> * m4/libtool.m4: Fix -export-symbols for GNU ld on non-Linux.
> ---
>  m4/libtool.m4 | 35 ++++++++++++++++++++++++++++++-----
>  1 file changed, 30 insertions(+), 5 deletions(-)

Note that --retain-symbols-file is also used in the non-GNU ld case and
in the C++ case.  This patch doesn't change those.

If accepted, you may want to mention this in the NEWS file because this
change may have a significant impact in some cases.

Reply via email to