<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/tools, branch master</title>
<subtitle>musl - an implementation of the standard library for Linux-based systems</subtitle>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/'/>
<entry>
<title>install.sh: avoid creating symlinks with restricted permissions</title>
<updated>2024-02-04T00:57:30+00:00</updated>
<author>
<name>Tim Cuthbertson</name>
<email>tim@gfxmonk.net</email>
</author>
<published>2024-02-04T00:55:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=2e1bb87af24e3cb053bb3d5f4bb6e2e72f79c44a'/>
<id>2e1bb87af24e3cb053bb3d5f4bb6e2e72f79c44a</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix incorrect escaping in add-cfi.*.awk scripts</title>
<updated>2020-01-20T20:57:29+00:00</updated>
<author>
<name>Will Dietz</name>
<email>w@wdtz.org</email>
</author>
<published>2020-01-08T19:20:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=a2e71304f358c5dbaf44e0b4c6fd343e8cd236e2'/>
<id>a2e71304f358c5dbaf44e0b4c6fd343e8cd236e2</id>
<content type='text'>
gawk 5 complains.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gawk 5 complains.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix musl-gcc wrapper to be compatible with default-pie gcc toolchains</title>
<updated>2018-08-02T23:15:48+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2018-08-02T23:15:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=7dad9c212587267818de919dd9c5886f18f99779'/>
<id>7dad9c212587267818de919dd9c5886f18f99779</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>add CFI generation script for x86_64</title>
<updated>2015-10-13T22:09:46+00:00</updated>
<author>
<name>Alex Dowad</name>
<email>alexinbeijing@gmail.com</email>
</author>
<published>2015-10-13T11:28:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=4e6b8eee7755a5aa7f866d0d0cd290653fd87a31'/>
<id>4e6b8eee7755a5aa7f866d0d0cd290653fd87a31</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>recognize partial register operands in i386 CFI generation</title>
<updated>2015-10-13T22:02:36+00:00</updated>
<author>
<name>Alex Dowad</name>
<email>alexinbeijing@gmail.com</email>
</author>
<published>2015-10-13T11:28:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=1b0c9cd099e80a7557eb4ae36efb1897f7202a02'/>
<id>1b0c9cd099e80a7557eb4ae36efb1897f7202a02</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix misinterpretation of indexed memory operand in i386 CFI generation</title>
<updated>2015-10-13T21:58:43+00:00</updated>
<author>
<name>Alex Dowad</name>
<email>alexinbeijing@gmail.com</email>
</author>
<published>2015-10-13T21:58:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=8cfdfa9c8fd84d4090bba54eb616a2c9361a076f'/>
<id>8cfdfa9c8fd84d4090bba54eb616a2c9361a076f</id>
<content type='text'>
a register used as an index in the memory destination of a mov
instruction was wrongly interpreted as the destination of the mov.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
a register used as an index in the memory destination of a mov
instruction was wrongly interpreted as the destination of the mov.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix misinterpretation of operand order in i386 CFI generation</title>
<updated>2015-10-13T21:21:05+00:00</updated>
<author>
<name>Alex Dowad</name>
<email>alexinbeijing@gmail.com</email>
</author>
<published>2015-10-13T11:28:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=fef9c801feeccbb40623f0c2a6e4f2b19f58a34b'/>
<id>fef9c801feeccbb40623f0c2a6e4f2b19f58a34b</id>
<content type='text'>
binary ops like ADD, AND, etc. modify the 2nd operand, not 1st.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
binary ops like ADD, AND, etc. modify the 2nd operand, not 1st.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix instruction matching errors in i386 CFI generation</title>
<updated>2015-10-08T21:04:41+00:00</updated>
<author>
<name>Alex Dowad</name>
<email>alexinbeijing@gmail.com</email>
</author>
<published>2015-10-02T11:32:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=dc97951402b499023ce877dd2438bce0840b2c26'/>
<id>dc97951402b499023ce877dd2438bce0840b2c26</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>factor common awk functions for CFI generation scripts into new file</title>
<updated>2015-10-08T21:03:10+00:00</updated>
<author>
<name>Alex Dowad</name>
<email>alexinbeijing@gmail.com</email>
</author>
<published>2015-10-02T11:32:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=0650a05947c9f67cedff693d2e1c2f61a8e6c0d3'/>
<id>0650a05947c9f67cedff693d2e1c2f61a8e6c0d3</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Build process uses script to add CFI directives to x86 asm</title>
<updated>2015-08-26T14:55:13+00:00</updated>
<author>
<name>Alex Dowad</name>
<email>alexinbeijing@gmail.com</email>
</author>
<published>2015-07-10T13:03:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=35b3312b6fcf3f72dcd5abf0dc4ba64da537f5a1'/>
<id>35b3312b6fcf3f72dcd5abf0dc4ba64da537f5a1</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
</feed>
