musl - an implementation of the standard library for Linux-based systems
Go to file
Bobby Bingham e31c8c2d79 ppc64: fix setjmp/longjmp handling of TOC pointer
The TOC pointer is constant within a single dso, but needs to be saved
and restored around cross-dso calls.  The PLT stub saves it to the
caller's stack frame, and the linker adds code to the caller to restore
it.

With a local call, as within a single dso or with static linking, this
doesn't happen and the TOC pointer is always in r2.  Therefore,
setjmp/longjmp need to save/restore the TOC pointer from/to different
locations depending on whether the call to setjmp was a local or non-local
call.

It is always safe for longjmp to restore to both r2 and the caller's stack.
If the call to setjmp was local, and only r2 matters and the stack location
will be ignored, but is required by the ABI to be reserved for the TOC
pointer.  If the call was non-local, then only the stack location matters,
and whatever is restored into r2 will be clobbered anyway when the caller
reloads r2 from the stack.

A little extra care is required for sigsetjmp, because it uses setjmp
internally.  After the second return from this setjmp call, r2 will contain
the caller's TOC pointer instead of libc's TOC pointer.  We need to save
and restore the correct libc pointer before we can tail call to
__sigsetjmp_tail.
2017-08-11 20:31:33 -04:00
arch fix omission of microblaze user.h definitions 2017-06-21 12:47:15 -04:00
crt add s390x port 2016-11-11 23:06:21 -05:00
dist
include add _NL_LOCALE_NAME extension to nl_langinfo 2017-07-31 23:08:27 -04:00
ldso allow specifying argv[0] when invoking a program via ldso command 2017-07-04 16:58:28 -04:00
src ppc64: fix setjmp/longjmp handling of TOC pointer 2017-08-11 20:31:33 -04:00
tools add CFI generation script for x86_64 2015-10-13 18:09:46 -04:00
.gitignore remove obsolete gitignore rules 2016-07-06 00:21:25 -04:00
configure disable global visibility override hack (vis.h) by default 2017-08-11 00:17:00 -04:00
COPYRIGHT update COPYRIGHT file to clarify that permissions apply for all files 2016-04-28 20:41:45 -04:00
INSTALL update documentation files for mips64 port 2016-03-06 17:48:58 +00:00
Makefile increase limit on locale name length from 15 to 23 bytes 2017-03-21 12:19:47 -04:00
README update version reference in the README file 2014-06-25 14:16:53 -04:00
VERSION release 1.1.16 2016-12-31 22:27:17 -05:00
WHATSNEW release 1.1.16 2016-12-31 22:27:17 -05:00

    musl libc

musl, pronounced like the word "mussel", is an MIT-licensed
implementation of the standard C library targetting the Linux syscall
API, suitable for use in a wide range of deployment environments. musl
offers efficient static and dynamic linking support, lightweight code
and low runtime overhead, strong fail-safe guarantees under correct
usage, and correctness in the sense of standards conformance and
safety. musl is built on the principle that these goals are best
achieved through simple code that is easy to understand and maintain.

The 1.1 release series for musl features coverage for all interfaces
defined in ISO C99 and POSIX 2008 base, along with a number of
non-standardized interfaces for compatibility with Linux, BSD, and
glibc functionality.

For basic installation instructions, see the included INSTALL file.
Information on full musl-targeted compiler toolchains, system
bootstrapping, and Linux distributions built on musl can be found on
the project website:

    http://www.musl-libc.org/