| ▲ | C89cc.sh – standalone C89/ELF64 compiler in pure portable shell(gist.github.com) | ||||||||||||||||||||||
| 54 points by gaigalas 2 days ago | 10 comments | |||||||||||||||||||||||
| ▲ | _ache_ 32 minutes ago | parent | next [-] | ||||||||||||||||||||||
I'm tempted to execute it, but it may as well be shellcode I couldn't tell. | |||||||||||||||||||||||
| ▲ | kelsey98765431 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
Would be a lot better if it came with tests. Please do this justice and dont let it rot as a gist, make a real repo and add some docs and at least smoke tests or some kind. Thanks | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | gaigalas 2 days ago | parent | prev | next [-] | ||||||||||||||||||||||
Single standalone file, no external tools used, PATH='' (empty), portable (bash, dash, ksh, zsh), produces x86 ELF executables, has mini-libc builtin. Usage: printf 'int main(){puts("hello");return 0;}' | sh c89cc.sh > hello chmod +x hello ./hello | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | jey an hour ago | parent | prev | next [-] | ||||||||||||||||||||||
It targets x86-64/ELF? I thought it would target `sh` to be portable? | |||||||||||||||||||||||
| ▲ | dmitrygr 2 hours ago | parent | prev [-] | ||||||||||||||||||||||
Many parts of this are clearly autogenerated, but that in no way diminishes the sickening impressiveness of it! | |||||||||||||||||||||||
| |||||||||||||||||||||||