musl - an implementation of the standard library for Linux-based systems
Go to file
Rich Felker 4035556907 fix and overhaul dlsym depedency order, always record direct deps
dlsym with an explicit handle is specified to use "dependency order",
a breadth-first search rooted at the argument. this has always been
implemented by iterating a flattened dependency list built at dlopen
time. however, the logic for building this list was completely wrong
except in trivial cases; it simply used the list of libraries loaded
since a given library, and their direct dependencies, as that
library's dependencies, which could result in misordering, wrongful
omission of deep dependencies from the search, and wrongful inclusion
of unrelated libraries in the search.

further, libraries did not have any recorded list of resolved
dependencies until they were explicitly dlopened, meaning that
DT_NEEDED entries had to be resolved again whenever a library
participated as a dependency of more than one dlopened library.

with this overhaul, the resolved direct dependency list of each
library is always recorded when it is first loaded, and can be
extended to a full flattened breadth-first search list if dlopen is
called on the library. the extension is performed using the direct
dependency list as a queue and appending copies of the direct
dependency list of each dependency in the queue, excluding duplicates,
until the end of the queue is reached. the direct deps remain
available for future use as the initial subarray of the full deps
array.

first-load logic in dlopen is updated to match these changes, and
clarified.
2019-02-27 16:05:37 -05:00
arch move arch-invariant definitions out of bits/ioctl.h 2019-02-07 12:43:19 -05:00
crt define and use internal macros for hidden visibility, weak refs 2018-09-05 14:05:14 -04:00
dist add another example option to dist/config.mak 2012-04-24 16:49:11 -04:00
include add membarrier syscall wrapper, refactor dynamic tls install to use it 2019-02-22 03:25:39 -05:00
ldso fix and overhaul dlsym depedency order, always record direct deps 2019-02-27 16:05:37 -05:00
src add membarrier syscall wrapper, refactor dynamic tls install to use it 2019-02-22 03:25:39 -05:00
tools fix musl-gcc wrapper to be compatible with default-pie gcc toolchains 2018-08-02 19:15:48 -04:00
.gitignore remove obsolete gitignore rules 2016-07-06 00:21:25 -04:00
COPYRIGHT new tsearch implementation 2018-09-20 17:57:47 -04:00
INSTALL add powerpc64 and s390x to list of supported archs in INSTALL file 2017-08-29 20:48:02 -04:00
Makefile overhaul internally-public declarations using wrapper headers 2018-09-12 14:34:33 -04:00
README update version reference in the README file 2014-06-25 14:16:53 -04:00
VERSION release 1.1.21 2019-01-21 12:30:47 -05:00
WHATSNEW release 1.1.21 2019-01-21 12:30:47 -05:00
configure configure: accept ppc[64] as alias for powerpc[64] in gcc tuples 2019-01-19 18:39:54 -05:00
dynamic.list fix regression in access to optopt object 2018-11-19 13:20:41 -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/