This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Reverting the s390 jmp_buf/ucontext_t ABI change
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 25 Jul 2014 20:31:28 +0200
- Subject: Re: Reverting the s390 jmp_buf/ucontext_t ABI change
- Authentication-results: sourceware.org; auth=none
- References: <201407221441 dot s6MEfA1P017456 at d06av02 dot portsmouth dot uk dot ibm dot com> <lqt0ev$ben$1 at ger dot gmane dot org>
Stefan Liebler <stli@linux.vnet.ibm.com> writes:
> we have still some issues with the revert-patch.
> Trying to create a symbol versioning of one function (e.g. __setjmp)
> with the same name leads to linker errors:
> "libc_pic.a(setjmp.os):(*IND*+0x0): multiple definition of `__setjmp'
> libc_pic.a(setjmp.os):(.text+0x10): first defined here"
You need to give the actual symbol a unique name and then add the
versioned symbols under the desired name, each pointing to distinct
aliases for this symbol.
> Here is an example for __setjmp:
> #if !defined IS_IN_rtld
> # if defined SHARED
> # if SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
> weak_extern (__setjmp);
> strong_alias (__setjmp, __v1__setjmp);
> strong_alias (__setjmp, __v2__setjmp);
> versioned_symbol (libc, __v1__setjmp, __setjmp, GLIBC_2_0);
> compat_symbol (libc, __v2__setjmp, __setjmp, GLIBC_2_19);
Name the __setjmp function either __v1__setjmp or __v2__setjmp (or any
other name you like), add the other name as an alias, and then attach
the GLIBC_2_0 and and GLIBC_2_19 versions to the __setjmp symbol using
the two aliases.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."