musl/tools, branch master musl - an implementation of the standard library for Linux-based systems install.sh: avoid creating symlinks with restricted permissions 2024年02月04日T00:57:30+00:00 Tim Cuthbertson tim@gfxmonk.net 2024年02月04日T00:55:23+00:00 2e1bb87af24e3cb053bb3d5f4bb6e2e72f79c44a Linux and most systems do not have symlink permissions, but some systems, including MacOS, do, and creation of the symlink with umask set to 0777 makes the symlink inaccessible on such systems. clear umask when making a symlink so that the behavior is uniform.
Linux and most systems do not have symlink permissions, but some
systems, including MacOS, do, and creation of the symlink with umask
set to 0777 makes the symlink inaccessible on such systems.
clear umask when making a symlink so that the behavior is uniform.
fix incorrect escaping in add-cfi.*.awk scripts 2020年01月20日T20:57:29+00:00 Will Dietz w@wdtz.org 2020年01月08日T19:20:44+00:00 a2e71304f358c5dbaf44e0b4c6fd343e8cd236e2 gawk 5 complains.
gawk 5 complains.
fix musl-gcc wrapper to be compatible with default-pie gcc toolchains 2018年08月02日T23:15:48+00:00 Rich Felker dalias@aerifal.cx 2018年08月02日T23:15:48+00:00 7dad9c212587267818de919dd9c5886f18f99779 the specfile for the wrapper was written assuming output is pie only if -pie appears on the command line. recent (and older patched) versions of gcc can be configured to produce pie output by default, adn when used with such a toolchain, the wrapper linked the wrong startfiles (crt*) containing pic-incompatible code. rather than trying to figure out gcc's default, simply always use the pic-compatible start files.
the specfile for the wrapper was written assuming output is pie only
if -pie appears on the command line. recent (and older patched)
versions of gcc can be configured to produce pie output by default,
adn when used with such a toolchain, the wrapper linked the wrong
startfiles (crt*) containing pic-incompatible code.
rather than trying to figure out gcc's default, simply always use the
pic-compatible start files.
add CFI generation script for x86_64 2015年10月13日T22:09:46+00:00 Alex Dowad alexinbeijing@gmail.com 2015年10月13日T11:28:52+00:00 4e6b8eee7755a5aa7f866d0d0cd290653fd87a31
recognize partial register operands in i386 CFI generation 2015年10月13日T22:02:36+00:00 Alex Dowad alexinbeijing@gmail.com 2015年10月13日T11:28:51+00:00 1b0c9cd099e80a7557eb4ae36efb1897f7202a02
fix misinterpretation of indexed memory operand in i386 CFI generation 2015年10月13日T21:58:43+00:00 Alex Dowad alexinbeijing@gmail.com 2015年10月13日T21:58:43+00:00 8cfdfa9c8fd84d4090bba54eb616a2c9361a076f a register used as an index in the memory destination of a mov instruction was wrongly interpreted as the destination of the mov.
a register used as an index in the memory destination of a mov
instruction was wrongly interpreted as the destination of the mov.
fix misinterpretation of operand order in i386 CFI generation 2015年10月13日T21:21:05+00:00 Alex Dowad alexinbeijing@gmail.com 2015年10月13日T11:28:50+00:00 fef9c801feeccbb40623f0c2a6e4f2b19f58a34b binary ops like ADD, AND, etc. modify the 2nd operand, not 1st.
binary ops like ADD, AND, etc. modify the 2nd operand, not 1st.
fix instruction matching errors in i386 CFI generation 2015年10月08日T21:04:41+00:00 Alex Dowad alexinbeijing@gmail.com 2015年10月02日T11:32:33+00:00 dc97951402b499023ce877dd2438bce0840b2c26 fdiv and fmul instructions were wrongly matched by the rules for integer div and mul instructions, leading to incorrect conclusions about register values being clobbered.
fdiv and fmul instructions were wrongly matched by the rules for
integer div and mul instructions, leading to incorrect conclusions
about register values being clobbered.
factor common awk functions for CFI generation scripts into new file 2015年10月08日T21:03:10+00:00 Alex Dowad alexinbeijing@gmail.com 2015年10月02日T11:32:32+00:00 0650a05947c9f67cedff693d2e1c2f61a8e6c0d3 There is a lot which could be common between i386 and x86_64, but none of it will be useful for any other arch. These should be useful for all archs, however.
There is a lot which could be common between i386 and x86_64, but none
of it will be useful for any other arch. These should be useful for
all archs, however.
Build process uses script to add CFI directives to x86 asm 2015年08月26日T14:55:13+00:00 Alex Dowad alexinbeijing@gmail.com 2015年07月10日T13:03:24+00:00 35b3312b6fcf3f72dcd5abf0dc4ba64da537f5a1 Some functions implemented in asm need to use EBP for purposes other than acting as a frame pointer. (Notably, it is used for the 6th argument to syscalls with 6 arguments.) Without frame pointers, GDB can only show backtraces if it gets CFI information from a .debug_frame or .eh_frame ELF section. Rather than littering our asm with ugly .cfi directives, use an awk script to insert them in the right places during the build process, so GDB can keep track of where the current stack frame is relative to the stack pointer. This means GDB can produce beautiful stack traces at any given point when single-stepping through asm functions. Additionally, when registers are saved on the stack and later overwritten, emit ..cfi directives so GDB will know where they were saved relative to the stack pointer. This way, when you look back up the stack from within an asm function, you can still reliably print the values of local variables in the caller. If this awk script were to understand every possible wild and crazy contortion that an asm programmer can do with the stack and registers, and always emit the exact ..cfi directives needed for GDB to know what the register values were in the preceding stack frame, it would necessarily be as complex as a full x86 emulator. That way lies madness. Hence, we assume that the stack pointer will _only_ ever be adjusted using push/pop or else add/sub with a constant. We do not attempt to detect every possible way that a register value could be saved for later use, just the simple and common ways. Thanks to Szabolcs Nagy for suggesting numerous improvements to this code.
Some functions implemented in asm need to use EBP for purposes other
than acting as a frame pointer. (Notably, it is used for the 6th
argument to syscalls with 6 arguments.) Without frame pointers, GDB
can only show backtraces if it gets CFI information from a
.debug_frame or .eh_frame ELF section.
Rather than littering our asm with ugly .cfi directives, use an awk
script to insert them in the right places during the build process, so
GDB can keep track of where the current stack frame is relative to the
stack pointer. This means GDB can produce beautiful stack traces at
any given point when single-stepping through asm functions.
Additionally, when registers are saved on the stack and later
overwritten, emit ..cfi directives so GDB will know where they were
saved relative to the stack pointer. This way, when you look back up
the stack from within an asm function, you can still reliably print
the values of local variables in the caller.
If this awk script were to understand every possible wild and crazy
contortion that an asm programmer can do with the stack and registers,
and always emit the exact ..cfi directives needed for GDB to know what
the register values were in the preceding stack frame, it would
necessarily be as complex as a full x86 emulator. That way lies
madness.
Hence, we assume that the stack pointer will _only_ ever be adjusted
using push/pop or else add/sub with a constant. We do not attempt to
detect every possible way that a register value could be saved for
later use, just the simple and common ways.
Thanks to Szabolcs Nagy for suggesting numerous improvements to this
code.

AltStyle によって変換されたページ (->オリジナル) /