Skip to content

Instantly share code, notes, and snippets.

/*
* tl;dr: C program initialization, written in C!
*
* This applies to an executable dynamically linked with glibc.
* It is current as of glibc 2.26.
*
* A LOT of information has been omitted for simplicity; hell,
* some of it might be flat-out wrong (I wrote this after about
* 3 hours of experimenting with GDB). If you want to know EXACTLY
* what goes on under the covers, I advise you to read the
@jstaursky
jstaursky / compiling_asm.md
Created December 14, 2020 17:08 — forked from yellowbyte/compiling_asm.md
how to assemble assembly with NASM assembler to 32-bit or 64-bit ELF binary with or without libc

32-bit ELF binary

how to assemble and link:

nasm -f elf32 -o <filename>.o <filename>.asm
ld -m elf_i386 -o <filename> <filename>.o

template code (hello world):

section .text
global _start

Emacs isn't just an editor, it’s an entire Emacs Lisp interpreter and environment. We can use Emacs Lisp not only to extend and customize our beloved editor, but also to write entire programs and applications. Nic Ferrier’s [elnode][] server is the most ambitious Emacs Lisp application of this sort, but we can start at a smaller scale and try to write our shell scripts and tools with Emacs Lisp.

However, it turns out that writing programs in Emacs Lisp is more intricate than it looks at a first glance. Emacs decades-long history as interactive application have left deep marks in Emacs and Emacs Lisp, which make independent