[RFC 2/2] Fold compat_symbol_unique functionality into compat_symbol
Joseph Myers
joseph@codesourcery.com
Thu Mar 18 21:37:46 GMT 2021
On Thu, 18 Mar 2021, Florian Weimer via Libc-alpha wrote:
> This eliminates the need for intermediate aliases for defining
> multiple symbol versions, for both compat_symbol and
> versioned_symbol. Some binutils versions do not suport multiple
> versions per symbol on some targets, so aliases are automatically
> introduced, similar to what compat_symbol_unique did. To reduce
> symbol table sizes, a configure check is added to avoid these
> aliases if they are not needed.
totalorder / totalordermag implementations also use something similar to
compat_symbol_unique (but predating it) to create aliases and should
probably also be changed not to do so, whether in this patch or a
followup.
(Finding all the other places using aliases without __COUNTER__ for symbol
version definitions may be harder.)
> diff --git a/configure.ac b/configure.ac
> index 16b15b6f90..5b3440511b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1673,6 +1673,27 @@ elif test "$libc_cv_ehdr_start" = broken; then
> AC_MSG_WARN([linker is broken -- you should upgrade])
> fi
>
> +AC_CACHE_CHECK(whether the assembler requires one version per symbol,
> + libc_cv_symver_needs_alias, [dnl
I think either the configure test, or the code using it, should have a
comment saying when the binutils issue was fixed, so it's easy to tell
when the test and conditionals are obsolete and can be removed. It's
binutils bug 23840, so referencing that bug in the comment and saying it's
fixed in binutils 2.35 seems appropriate.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list