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: Reverting the s390 jmp_buf/ucontext_t ABI change


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."


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