musl - an implementation of the standard library for Linux-based systems
Go to file
Rich Felker 5bf7eba213 fix support for initialized TLS in static PIE binaries
the static-linked version of __init_tls needs to locate the TLS
initialization image via the ELF program headers, which requires
determining the base address at which the program was loaded. the
existing code attempted to do this by comparing the actual address of
the program headers (obtained via auxv) with the virtual address for
the PT_PHDR record in the program headers. however, the linker seems
to produce a PT_PHDR record only when a program interpreter (dynamic
linker) is used. thus the computation failed and used the default base
address of 0, leading to a crash when trying to access the TLS image
at the wrong address.

the dynamic linker entry point and static-PIE rcrt1.o startup code
compute the base address instead by taking the difference between the
run-time address of _DYNAMIC and the virtual address in the PT_DYNAMIC
record. this patch copies the approach they use, but with a weak
symbolic reference to _DYNAMIC instead of obtaining the address from
the crt_arch.h asm. this works because relocations have already been
performed at the time __init_tls is called.
2016-12-20 14:19:32 -05:00
arch rework arm atomic/tp backends to be thumb-compatible and fdpic-ready 2016-12-19 21:21:08 -05:00
crt add s390x port 2016-11-11 23:06:21 -05:00
dist add another example option to dist/config.mak 2012-04-24 16:49:11 -04:00
include in public headers, don't assume pre-C99 compilers have __inline keyword 2016-12-16 23:12:32 -05:00
ldso treat null vdso base same as missing 2016-11-11 12:58:27 -05:00
src fix support for initialized TLS in static PIE binaries 2016-12-20 14:19:32 -05: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
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 deduplicate __NR_* and SYS_* syscall number definitions 2016-05-12 00:34:05 -05:00
README update version reference in the README file 2014-06-25 14:16:53 -04:00
VERSION release 1.1.15 2016-07-05 17:58:46 -04:00
WHATSNEW release 1.1.15 2016-07-05 17:58:46 -04:00
configure when building for arm as thumb2 code, also request assembly as thumb 2016-12-19 21:53:33 -05: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/