<feed xmlns='http://www.w3.org/2005/Atom'>
<title>antcc/obj/elf.c, branch trunk</title>
<subtitle>A little C compiler</subtitle>
<id>https://git.lemon.rip/antcc/atom?h=trunk</id>
<link rel='self' href='https://git.lemon.rip/antcc/atom?h=trunk'/>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/'/>
<updated>2026-03-17T12:22:00+00:00</updated>
<entry>
<title>REFACTOR: move sources to src/</title>
<updated>2026-03-17T12:22:00+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2026-03-17T12:22:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=a8d6f8bf30c07edb775e56889f568ca20240bedf'/>
<id>urn:sha1:a8d6f8bf30c07edb775e56889f568ca20240bedf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>aarch64: LDR literal, cmp value</title>
<updated>2026-01-02T13:40:06+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2026-01-02T13:40:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=12974932af785a2ab2cefb5bc80da3ee1211e3c3'/>
<id>urn:sha1:12974932af785a2ab2cefb5bc80da3ee1211e3c3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>more aarch64 work</title>
<updated>2025-12-29T13:49:05+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-12-29T13:49:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=5559e5fc1f6c10d88eb32febc3a36a8fc2502d58'/>
<id>urn:sha1:5559e5fc1f6c10d88eb32febc3a36a8fc2502d58</id>
<content type='text'>
</content>
</entry>
<entry>
<title>backend: start implementing aarch64</title>
<updated>2025-12-28T18:02:39+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-12-28T18:02:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=17b4861e53fd5be2107f3b7fd8bf77f3d2cc15da'/>
<id>urn:sha1:17b4861e53fd5be2107f3b7fd8bf77f3d2cc15da</id>
<content type='text'>
</content>
</entry>
<entry>
<title>nicer defaults and facilities for cross-compilation</title>
<updated>2025-12-17T19:32:23+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-12-17T19:32:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=4545928179837c75ab1357b77e5723a4fdb60b98'/>
<id>urn:sha1:4545928179837c75ab1357b77e5723a4fdb60b98</id>
<content type='text'>
</content>
</entry>
<entry>
<title>create distinct interned string type</title>
<updated>2025-12-15T21:39:52+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-12-15T21:39:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=302e24671942051d70707586cf8c605a5815edac'/>
<id>urn:sha1:302e24671942051d70707586cf8c605a5815edac</id>
<content type='text'>
Interned strings are used pervasively, so it's a good idea to add a
layer of type safety to differentiate them from general cstrs and avoid
potential bugs from comparing non-interned and interned strings. Not
that that's happened so far that I can remember, but it could.

I'm 90% sure it's legal to alias `struct {char c;}` pointers with `char`
pointers. This specific typedef gives type safety but with a simple
one-way `internstr -&gt; const char *` typecast (with `&amp;istr-&gt;c`).
Converting the other way around is more intentional: a straight up cast
`(internstr)cstr` which sticks out as unchecked and probably wrong, or
calling the intern(cstr) function, which is the right way.
</content>
</entry>
<entry>
<title>various relocation related optimization</title>
<updated>2025-12-14T11:15:59+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-12-14T11:15:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=d8b4e87af669c2b260686a5db67f7f02b4c164d9'/>
<id>urn:sha1:d8b4e87af669c2b260686a5db67f7f02b4c164d9</id>
<content type='text'>
With 59ca5a8db, querying if a symbol is defined is cheap. If we're
compiling code that calls foo() and we defined foo() in this compilation
unit, we already know its offset within the .text section, so use it
instead of emitting a relocation for the linker to handle.  Also, put
small literal data in the .text section instead of .rodata.  This seems
to improve performance (cache locality?), and as a bonus, it will be
good for aarch64's instr encoding with smallish PC-relative offsets.
</content>
</entry>
<entry>
<title>elf: use a hashmap for looking up symbols</title>
<updated>2025-12-14T09:45:21+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-12-14T09:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=59ca5a8db396e3e9c395793d49e1cab05d2d3261'/>
<id>urn:sha1:59ca5a8db396e3e9c395793d49e1cab05d2d3261</id>
<content type='text'>
Gets rid of linear-time findsym(), though needs some extra indirection
to emit sorted symbols.
</content>
</entry>
<entry>
<title>s/amd64/x86_64/</title>
<updated>2025-12-12T16:40:35+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-12-12T16:40:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=24bcc929477751b056e81e7772dc2bb3d11ce4a5'/>
<id>urn:sha1:24bcc929477751b056e81e7772dc2bb3d11ce4a5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>elf: initialize str hashtable to a nicer size</title>
<updated>2025-12-09T18:20:01+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-12-09T18:20:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=600d94645e128dc88fdb9a2b6d42a5b49a138fd5'/>
<id>urn:sha1:600d94645e128dc88fdb9a2b6d42a5b49a138fd5</id>
<content type='text'>
</content>
</entry>
</feed>
