musl - an implementation of the standard library for Linux-based systems
Go to file
Rich Felker 68a5a23abc fix dynamic linker mapping/clearing bss in first/only LOAD segment
writable load segments can have size-in-memory larger than their size
in the ELF file, representing bss or equivalent. the initial partial
page has to be zero-filled, and additional anonymous pages have to be
mapped such that accesses don't failt with SIGBUS.

map_library skips redundant MAP_FIXED mapping of the initial
(lowest-address) segment when processing LOAD segments since it was
already mapped when reserving the virtual address range, but in doing
so, inadvertently also skipped the code to fill/map bss. typical
executable and library files have two or more LOAD segments, and the
first one is text/rodata (non-writable) and thus has no bss, but it is
syntactically valid for an ELF program/library to put its writable
segment first, or to have only one segment (everything writable). the
binutils bfd-based linker has been observed to create such programs in
the presence of unusual sections or linker scripts.

fix by moving only the mmap_fixed operation under the conditional
rather than skipping the remainder of the loop body. add a check to
avoid bss processing in the case where the segment is not writable;
this should not happen, but if it does, the change would be a crashing
regression without this check.
2018-06-26 12:22:29 -04:00
arch fix m68k float.h long double exponent range 2018-06-20 15:28:49 -04: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 add memfd_create syscall wrapper 2018-06-20 21:36:04 -04:00
ldso fix dynamic linker mapping/clearing bss in first/only LOAD segment 2018-06-26 12:22:29 -04:00
src add memfd_create syscall wrapper 2018-06-20 21:36:04 -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
COPYRIGHT update authors/contributors list 2018-02-21 14:19:01 -05:00
INSTALL add powerpc64 and s390x to list of supported archs in INSTALL file 2017-08-29 20:48:02 -04:00
Makefile adjust makefile target-specific CFLAGS rules to be more robust & complete 2018-03-24 22:47:36 -04:00
README update version reference in the README file 2014-06-25 14:16:53 -04:00
VERSION release 1.1.19 2018-02-22 13:39:19 -05:00
WHATSNEW release 1.1.19 2018-02-22 13:39:19 -05:00
configure add m68k port 2018-06-19 13:24:05 -04:00
dynamic.list allow interposition/replacement of allocator (malloc) 2018-04-18 14:22:49 -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/