This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: powerpc help needed: Defining hidden alias for __sigsetjmp
On Nov 14 2016, Florian Weimer <fweimer@redhat.com> wrote:
> This patch adds a reference to __longjmp to libc.so. With it, libc_pic.os
> has this:
>
> 8296: 00017024 492 FUNC GLOBAL HIDDEN 2
> __longjmp@@GLIBC_2.3.4
> 9342: 00017210 184 FUNC GLOBAL DEFAULT 2 __longjmp@GLIBC_2.0
>
> And libc.so has this:
>
> 5208: 00039c04 492 FUNC LOCAL DEFAULT 11
> __longjmp@@GLIBC_2.3.4
> 5758: 00039df0 184 FUNC LOCAL DEFAULT 11 __longjmp@GLIBC_2.0
>
> It turns out that libc.map lists _longjmp only, based on the entry in
> sysdeps/powerpc/Versions.
So it looks like a linker bug that the symbol was exported before,
probably related to the fact that it is a default version. But it is
also a bug that __longjmp has a version in the first place.
> setjmp/__longjmp.os has:
>
> 11: 00000000 492 FUNC GLOBAL DEFAULT 1 __vmx__longjmp
> 14: 000001ec 184 FUNC GLOBAL DEFAULT 1 __novmx__longjmp
> 15: 00000000 492 FUNC GLOBAL DEFAULT 1
> __longjmp@@GLIBC_2.3.4
> 16: 000001ec 184 FUNC GLOBAL DEFAULT 1 __longjmp@GLIBC_2.0
>
> setjmp/longjmp.os has:
>
> 21: 00000000 116 FUNC GLOBAL DEFAULT 1 __vmx__libc_longjmp
> 22: 00000000 116 FUNC GLOBAL DEFAULT 1
> __vmx__libc_siglongjmp
> 23: 00000000 116 FUNC WEAK DEFAULT 1 __vmx_longjmp
> 24: 00000000 116 FUNC WEAK DEFAULT 1 __vmxlongjmp
> 25: 00000000 116 FUNC WEAK DEFAULT 1 __vmxsiglongjmp
> 30: 00000000 116 FUNC GLOBAL HIDDEN 1
> __GI___vmx__libc_longjmp
> 31: 00000000 116 FUNC GLOBAL DEFAULT 1
> __libc_longjmp@@GLIBC_PRIVATE
> 32: 00000000 116 FUNC GLOBAL DEFAULT 1
> __libc_siglongjmp@@GLIBC_PRIVATE
> 33: 00000000 116 FUNC WEAK DEFAULT 1
> _longjmp@@GLIBC_2.3.4
> 34: 00000000 116 FUNC WEAK DEFAULT 1 longjmp@@GLIBC_2.3.4
> 35: 00000000 116 FUNC WEAK DEFAULT 1
> siglongjmp@@GLIBC_2.3.4
The version is coming from sysdeps/powerpc/powerpc32/fpu/__longjmp.S,
and was added in commit 5c76ff279f. Clearly this was a genuine error,
and the versioned alias in sysdeps/powerpc/powerpc32/__longjmp.S has
later been removed in commit 9b9ef82358 (without fixing the fpu
version).
> So the __GI_* aliases are missing there, too.
There is no hidden_proto for __longjmp, only attribute_hidden, so this
is correct. It is already an internal-only function.
> I wonder if this indeed the root cause. It would mean this is a spurious
> ABI addition. Can we drop __longjmp from the ABI in this way? Or do we
> have to fix this up using a powerpc-specific alias?
I'm not sure. Nobody should be using __longjmp, it's not declared or
used in any public header.
> This happens on no other architecture for which we have abilist files. It
> was introduced into the abilist file here:
>
> commit 0741d64c9140aa205f9df8ebee80ca0bcb018445
> Author: Andreas Schwab <schwab@linux-m68k.org>
> Date: Tue May 1 01:12:54 2012 +0200
>
> Update powerpc ABI data
It's unfortunate that Jakub didn't fix the fpu version back in 2004.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."