当前位置:网站首页>musl Reference Manual
musl Reference Manual
2022-07-31 10:52:00 【阳光8088】
musl is an implementation of the C standard library built on top of the Linux system call API, including interfaces defined in the base language standard, POSIX, and widely agreed-upon extensions. musl is lightweight, fast, simple, free, and strives to be correct in the sense of standards-conformance and safety.
doc
https://musl.libc.org/
RISC-V (riscv64[-sp|-sf])
The default ABI is hard-float; soft-float and single-precision-only FPU variants are also available but experimental.
Only 64-bit is supported.
x86_64 / AMD64 (x86_64, x32)
Both the standard LP64 ABI and the “x32” ILP32 ABI are supported, but the latter is experimental.
ARM (arm[eb][hf])
All ARM targets use the EABI, which requires armv4t or later. The default target is little-endian and uses the standard EABI where floating point arguments are passed in general-purpose registers. Hard-float ABI and big-endian variants are also supported.
AArch64 (aarch64[_be])
The default AArch64 target is little-endian. A big-endian variant is also supported. This target is experimental.
Filesystem Layout Dependencies
/dev/null - device node, required by POSIX
/dev/tty - device node, required by POSIX
/tmp - required by POSIX to exist as a directory, and used by various temporary file creation functions.
/bin/sh - an executable file providing a POSIX-conforming shell
/proc - must be a mount point for Linux procfs or a symlink to such. Several functions such as realpath, fexecve, and a number of the “at” functions added in POSIX 2008 need access to /proc to function correctly.
( s y s l i b d i r ) / l d − m u s l − (syslibdir)/ld-musl- (syslibdir)/ld−musl−(ARCH).so.1 - must resolve to the musl dynamic linker/libc.so binary in order for dynamic-linked programs to run. For static-linked programs it is unnecessary
Additional Files Used
/dev/log
/dev/shm
/dev/ptmx and /dev/pts
/etc/passwd and /etc/group
/var/run/nscd/socket -
/etc/shadow
/etc/tcb/user/shadow
/etc/resolv.conf
/etc/hosts
/etc/services
/etc/shells
/usr/share/zoneinfo
/etc/localtime
…/etc/ld-musl-$(ARCH).path, default path of “/lib:/usr/local/lib:/usr/lib” will be used. Not used by static-linked programs.
Environment Variables
PATH - Used by execvp, execlp, and posix_spawnp as specified in POSIX. If unset, a default search path of “/usr/local/bin:/bin:/usr/bin” is used.
PWD - Used by the nonstandard get_current_dir_name function; if it matches the actual current directory, it is returned instead of using getcwd to obtain the canonical pathname.
LOGNAME - The getlogin function simply returns the value of the LOGNAME variable.
LD_PRELOAD - Colon-separated list of shared libraries that will be preloaded by the dynamic linker before processing the application’s dependency list. Components can be absolute or relative pathnames or filenames in the default library search path. This variable is completely ignored in programs invoked setuid, setgid, or with other elevated capabilities.
LD_LIBRARY_PATH - Colon-separated list of pathnames that will be searched for shared libraries requested without an explicit pathname. This path is searched prior to the default path (which is specified in ( s y s l i b d i r ) / . . / e t c . l d − m u s l − (syslibdir)/../etc.ld-musl- (syslibdir)/../etc.ld−musl−(ARCH).path with built-in default fallback if this file is missing). This variable is completely ignored in programs invoked setuid, setgid, or with other elevated capabilities.
LC_ALL, LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES, and LANG - Used by setlocale and newlocale to determine a locale name to use when a zero-length string is passed. The precedence rules follow POSIX: LC_ALL overrides category-specific variables, and LANG provides a default for any category not set.
MUSL_LOCPATH - Colon-separated list of paths that will be searched for locale definitions. The requested locale name string will used as a filename and searched in each path component. If unset, locale files are not loaded and only the “C” locale is available. This variable is completely ignored in programs invoked setuid, setgid, or with other elevated capabilities.
边栏推荐
- 【LeetCode】383.赎金信
- Master SSR
- Android安全专题(三)JNI混淆
- LeetCode二叉树系列——101.对称二叉树
- What does "chmod 777-R filename" mean?
- Source code analysis of GZIPInputStream class
- 【LeetCode】141.环形链表
- csdn文件导出为pdf
- PyQt5快速开发与实战 9.5 PyQtGraph在PyQt中的应用 && 9.6 Plotly在PyQt中的应用
- [Part 1 of Cloud Native Monitoring Series] A detailed explanation of Prometheus monitoring system
猜你喜欢
随机推荐
1161. 最大层内元素和 (二叉树的层序遍历)
Usage of JOIN in MySQL
结构化查询语言SQL-关系数据库标准语言
尚医通【预约挂号系统】总结
Creation of doubly linked list
透过开发抽奖小程序,体会创新与迭代
redis-enterprise use
《云原生的本手、妙手和俗手》——2022全国新高考I卷作文
Unix知识:shell详细解读
内网渗透学习(四)域横向移动——SMB和WMI服务利用
AtCoder—E - Σ[k=0..10^100]floor(X/10^k
Qt compile error: C2228: '.key' must have class/struct/union on the left
csdn文件导出为pdf
LeetCode二叉树系列——101.对称二叉树
面试、工作中常用sql大全(建议收藏备用)
In half a month, MySQL has been consolidated again, and a tens of thousands of words "super hard core" article has been sorted out!
Windows系统Mysql8版本的安装教程
浅谈Attention与Self-Attention,一起感受注意力之美
ASP.NET 身份认证框架 Identity(一)
7 days to learn Go, Go structure + Go range to learn








![AtCoder—E - Σ[k=0..10^100]floor(X/10^k](/img/be/82cfab00950c1f28d426e76a792906.png)