lpsantil/rt0
View on GitHub ↗ ★ 586 C
A minimal C runtime for Linux i386 & x86_64
16 mentions on Hacker News by 2 people: 3 stories, 13 comments · first 2015-01-29 · latest 2023-10-19
20082026
-
…with file rule variables (my name for them, `OBJ = ${SRC:.c=.o}`). https://github.com/lpsantil/rt0/blob/master/Makefile https://github.com/lpsantil/oop0/blob/master/Makefile
comment by oso2k · 2023-10-19 · in Show HN: One makefile to rule them all -
…be removed. Some of the code & data glibc adds has purpose (like TLS (thread level storage) bits). https://github.com/lpsantil/rt0/blob/master/STATS.md
comment by oso2k · 2023-02-05 · in A Linking Adventure -
Also worth noting that you should be able get the binary close to 2KB if you pass some other options. https://github.com/lpsantil/rt0/blob/master/STATS.md
comment by oso2k · 2023-02-05 · in A Linking Adventure -
…but main will still work. [0] https://github.com/torvalds/linux/tree/master/tools/include/... [1] https://github.com/lpsantil/rt0/blob/master/src/lib/00_start...
comment by oso2k · 2023-02-05 · in A Linking Adventure -
Locating argc, argv, and envp on the stack is done by the runtime [0]. [0] https://github.com/lpsantil/rt0/blob/master/src/lib/00_start...
comment by oso2k · 2020-08-10 · in Where do argc and argv come from? -
…they're used to keep track of what the kernel is doing to the program's virtual address space. [0] https://github.com/lpsantil/rt0/blob/master/t/sbrk.c
comment by oso2k · 2017-09-19 · in Memory allocation for the curious -
…There's also lots of references to other small c runtimes. I'll be adding this one as well. [0] https://github.com/lpsantil/rt0
comment by oso2k · 2016-11-29 · in Writing C software without the standard library -
▲ 2
A minimal C runtime for Linux i386 and x86_64story by c8g · 2016-11-03 · 0 comments
-
▲ 49
Show HN: Tiny C runtime Linux (rt0), HelloWorld 0.6k (i386), sbrk example addedstory by oso2k · 2015-10-12 · 10 comments
-
This seems a lot more complicated than what I implemented in rt0 [0]. [0] https://github.com/lpsantil/rt0
comment by oso2k · 2015-08-31 · in Linux-insides: System calls in the Linux kernel, Part 2 -
…by looking at my librt0 [0] project. You can also see a minimal amd64 version in C here [1]. [0] https://github.com/lpsantil/rt0/blob/master/src/lib/syscall.... [1] https://gist.github.com/lunixbochs/462ee21c3353c56b910f
comment by oso2k · 2015-08-12 · in Linux Assembly How To: “Hello, World” -
…it felt "icky" to put offsets outside of the "brackets" (or parenthesis, as it were) [0][1]. [0] https://github.com/lpsantil/rt0/blob/master/src/lib/00_start... [1] https://github.com/lpsantil/rt0/blob/master/src/lib/00_start...
comment by oso2k · 2015-04-23 · in “Hello World” in assembly language on Linux -
…stop continuous integration by doing make stop_ci Obviously, this is inspired by rc.d scripts. [0] https://github.com/lpsantil/rt0/blob/master/Makefile#L117
comment by oso2k · 2015-04-09 · in “The GNU Make Book”: probably more than you ever wanted to know about make -
…that's fixed. Just hope gcc on i386 doesn't stop doing `sub ESP, 0x1C` upon entry to _start. [0] https://github.com/lpsantil/rt0/blob/master/lib/00_start.c
comment by oso2k · 2015-02-02 · in Show HN: A minimal C runtime for Linux i386 and x86_64 in 87 SLOC of C -
▲ 172
Show HN: A minimal C runtime for Linux i386 and x86_64 in 87 SLOC of Cstory by oso2k · 2015-01-30 · 54 comments
-
…goal is to rewrite asmutils'[1] httpd [2] in C and get a binary about 2-3x in size (2-3K). [0] https://github.com/lpsantil/rt0 [1] http://asm.sourceforge.net/asmutils.html [2] https://github.com/leto/asmutils/blob/master/src/httpd.asm
comment by oso2k · 2015-01-29 · in C Runtime Overhead