当前位置:网站首页>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.
边栏推荐
- 解决报错TypeError:unsupported operand type(s) for +: ‘NoneType‘ and ‘str‘
- pycharm汉化教程(碧蓝幻想汉化插件安装)
- 《JUC并发编程 - 高级篇》06 - 共享模型之不可变(不可变类的设计 | 不可变类的使用 | 享元模式)
- 双链表的插入和删除
- 我们能做出来数据库吗?
- Creation of doubly linked list
- Web系统常见安全漏洞介绍及解决方案-sql注入
- 【LeetCode】36.有效的数独
- A Method for Ensuring Data Consistency of Multi-Party Subsystems
- DC-7-vulnhub
猜你喜欢

3D激光SLAM:LeGO-LOAM论文解读---点云分割部分

面试、工作中常用sql大全(建议收藏备用)

CoCube群机器人预览→资讯剧透←

内网渗透学习(四)域横向移动——SMB和WMI服务利用

Hospital management system database, course design, SQLserver, pure code design

医院管理系统数据库,课程设计,SQLserver,纯代码设计

Source code analysis of GZIPInputStream class

unity-shader-2

Windows安装mysql详细步骤(通俗易懂,简单上手)

darknet 硬件软件环境的设置和检测
随机推荐
sql力扣刷题六
【JWT】JWT 整合
项目管理工具之燃尽图:动态考核团队工作能力
SQLServer2019安装(Windows)
The principle of v-model
Source code analysis of GZIPInputStream class
Qt 编译错误:C2228: “.key”的左边必须有类/结构/联合
pycharm汉化教程(碧蓝幻想汉化插件安装)
SQLSERVER merges subquery data into one field
3D激光SLAM:LeGO-LOAM论文解读---点云分割部分
Three ways of single sign-on
Web系统常见安全漏洞介绍及解决方案-sql注入
oracle优化:instr做join条件很慢「建议收藏」
[ 图 论 ]二分图判定及其匹配(基础+提高)
LeetCode二叉树系列——101.对称二叉树
淀粉与纤维素
SQL study notes - REGEXP operator
《MySQL高级篇》四、索引的存储结构
Qt compile error: C2228: '.key' must have class/struct/union on the left
【LeetCode】36.有效的数独