musl - an implementation of the standard library for Linux-based systems
Go to file
Rich Felker 6ba5517a46 fix local-dynamic model TLS on mips and powerpc
the TLS ABI spec for mips, powerpc, and some other (presently
unsupported) RISC archs has the return value of __tls_get_addr offset
by +0x8000 and the result of DTPOFF relocations offset by -0x8000. I
had previously assumed this part of the ABI was actually just an
implementation detail, since the adjustments cancel out. however, when
the local dynamic model is used for accessing TLS that's known to be
in the same DSO, either of the following may happen:

1. the -0x8000 offset may already be applied to the argument structure
passed to __tls_get_addr at ld time, without any opportunity for
runtime relocations.

2. __tls_get_addr may be used with a zero offset argument to obtain a
base address for the module's TLS, to which the caller then applies
immediate offsets for individual objects accessed using the local
dynamic model. since the immediate offsets have the -0x8000 adjustment
applied to them, the base address they use needs to include the
+0x8000 offset.

it would be possible, but more complex, to store the pointers in the
dtv[] array with the +0x8000 offset pre-applied, to avoid the runtime
cost of adding 0x8000 on each call to __tls_get_addr. this change
could be made later if measurements show that it would help.
2015-06-25 22:22:00 +00:00
arch fix local-dynamic model TLS on mips and powerpc 2015-06-25 22:22:00 +00:00
crt add rcrt1 start file for fully static-linked PIE 2015-05-26 03:37:41 -04:00
dist add another example option to dist/config.mak 2012-04-24 16:49:11 -04:00
include byte-based C locale, phase 3: make MB_CUR_MAX variable to activate code 2015-06-16 06:18:00 +00:00
lib new solution for empty lib dir (old one had some problems) 2011-02-17 17:12:52 -05:00
src fix local-dynamic model TLS on mips and powerpc 2015-06-25 22:22:00 +00:00
tools fix system breakage window during make install due to permissions 2014-01-15 22:29:13 -05:00
.gitignore add version.h to .gitignore; it is a generated file 2014-01-21 01:06:42 -05:00
COPYRIGHT update authors/contributors list 2015-03-16 18:43:54 -04:00
INSTALL update notice on broken gcc versions in INSTALL file 2014-07-31 19:02:54 -04:00
Makefile add additional Makefile dependency rules for rcrt1.o PIE start file 2015-06-03 02:02:09 -04:00
README update version reference in the README file 2014-06-25 14:16:53 -04:00
VERSION release 1.1.10 2015-06-04 16:08:24 -04:00
WHATSNEW release 1.1.10 2015-06-04 16:08:24 -04:00
configure configure: work around compilers that merely warn for unknown options 2015-05-28 00:08:13 -04:00

README

    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/