• Home
Name Date Size #Lines LOC

..--

README.mdD12-May-20241.2 KiB199

dynlink.cD12-May-2024144 KiB5,0994,427

dynlink_rand.cD12-May-20246.1 KiB247210

dynlink_rand.hD12-May-20242.4 KiB9359

ld_log.cD12-May-20242.4 KiB9570

ld_log.hD12-May-20242.1 KiB7446

namespace.cD12-May-202417.3 KiB597526

namespace.hD12-May-20243.5 KiB10564

ns_config.cD12-May-202419.6 KiB675578

ns_config.hD12-May-20242.2 KiB8149

strops.cD12-May-20243.2 KiB139107

strops.hD12-May-20241.2 KiB4824

zip_archive.hD12-May-20243.9 KiB12166

README.md

1## Dynamic Linker Namespace
2
3The dynamic linker provides the namespace mechanism which is based on configures and apis.
4
5Shared libraries can be isolated in different  namespaces so that libraries with same library name but with different symbols won't conflict. On the other hand, the namespace mechanism provides the flexibility so that some shared libraries can be exported by a linker namespace and used by another linker namespace.
6
7
8### How does it work
9
10There are two ways to use the linker namespace:
11
121. Modify and save the namespace configure file </etc/ld-musl-namespace-arm.ini> or </etc/ld-musl-namespace-aarch64.ini> base on architecture. When it does not exist or is filled in, a default namespace will be created.
13
142. Use the apis of namespace in head file <dlfcn.h>, to create a namespace, to set search paths of library, or to use exported libraries of another namespace by inheriting it.
15
16### Usage example
17
18Test usages show some examples of using the linker namespace. The file <ld-musl-namespace-arm.ini> or <ld-musl-namespace-aarch64.ini> in config directory is configures for test. The file <libc-test/src/functionalext/dlns/> gives usages of how apis and configures work.
19