This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PowerPC ugly symbol versioning


On Thu, Aug 8, 2013 at 11:52 PM, Alan Modra <amodra@gmail.com> wrote:
> This patch fixes symbol versioning in setjmp/longjmp.  The existing
> code uses raw versions, which results in wrong symbol versioning when
> you want to build glibc with a base version of 2.19 for LE.
>
> Note that the merging the 64-bit and 32-bit versions in novmx-lonjmp.c
> and pt-longjmp.c doesn't result in GLIBC_2.0 versions for 64-bit, due
> to the base in shlib_versions.

This shouldn't be a problem because there wasn't a 64-bit version of
ppc64 glibc until 2.3 if I remember correctly.

>
>         * sysdeps/powerpc/longjmp.c: Use proper symbol versioning macros.
>         * sysdeps/powerpc/novmx-longjmp.c: Likewise.
>         * sysdeps/powerpc/powerpc32/bsd-_setjmp.S: Likewise.
>         * sysdeps/powerpc/powerpc32/bsd-setjmp.S: Likewise.
>         * sysdeps/powerpc/powerpc32/fpu/__longjmp.S: Likewise.
>         * sysdeps/powerpc/powerpc32/fpu/setjmp.S: Likewise.
>         * sysdeps/powerpc/powerpc32/mcount.c: Likewise.
>         * sysdeps/powerpc/powerpc32/setjmp.S: Likewise.
>         * sysdeps/powerpc/powerpc64/setjmp.S: Likewise.
>         * nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
>
> diff --git a/sysdeps/powerpc/longjmp.c b/sysdeps/powerpc/longjmp.c
> index 198c894..189fc03 100644
> --- a/sysdeps/powerpc/longjmp.c
> +++ b/sysdeps/powerpc/longjmp.c
> @@ -55,6 +55,6 @@ weak_alias (__vmx__libc_siglongjmp, __vmxsiglongjmp)
>
>  default_symbol_version (__vmx__libc_longjmp, __libc_longjmp, GLIBC_PRIVATE);
>  default_symbol_version (__vmx__libc_siglongjmp, __libc_siglongjmp, GLIBC_PRIVATE);
> -default_symbol_version (__vmx_longjmp, _longjmp, GLIBC_2.3.4);
> -default_symbol_version (__vmxlongjmp, longjmp, GLIBC_2.3.4);
> -default_symbol_version (__vmxsiglongjmp, siglongjmp, GLIBC_2.3.4);
> +versioned_symbol (libc, __vmx_longjmp, _longjmp, GLIBC_2_3_4);
> +versioned_symbol (libc, __vmxlongjmp, longjmp, GLIBC_2_3_4);
> +versioned_symbol (libc, __vmxsiglongjmp, siglongjmp, GLIBC_2_3_4);
> diff --git a/sysdeps/powerpc/novmx-longjmp.c b/sysdeps/powerpc/novmx-longjmp.c
> index 8f6ea35..b2c0e4c 100644
> --- a/sysdeps/powerpc/novmx-longjmp.c
> +++ b/sysdeps/powerpc/novmx-longjmp.c
> @@ -50,13 +50,7 @@ weak_alias (__novmx__libc_siglongjmp, __novmx_longjmp)
>  weak_alias (__novmx__libc_siglongjmp, __novmxlongjmp)
>  weak_alias (__novmx__libc_siglongjmp, __novmxsiglongjmp)
>
> -# if __WORDSIZE == 64
> -symbol_version (__novmx_longjmp,_longjmp,GLIBC_2.3);
> -symbol_version (__novmxlongjmp,longjmp,GLIBC_2.3);
> -symbol_version (__novmxsiglongjmp,siglongjmp,GLIBC_2.3);
> -# else
> -symbol_version (__novmx_longjmp,_longjmp,GLIBC_2.0);
> -symbol_version (__novmxlongjmp,longjmp,GLIBC_2.0);
> -symbol_version (__novmxsiglongjmp,siglongjmp,GLIBC_2.0);
> -# endif
> +compat_symbol (libc, __novmx_longjmp, _longjmp, GLIBC_2_0);
> +compat_symbol (libc, __novmxlongjmp, longjmp, GLIBC_2_0);
> +compat_symbol (libc, __novmxsiglongjmp, siglongjmp, GLIBC_2_0);

Doesn't eliminating the __WORDSIZE == 64 check erroneously export
glibc 2.0 symbol availability for this symbol?

Ryan S. Arnold


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]