
The dissection of a simple “hello world” ELF file - giuscri
https://github.com/mewrev/dissection
======
jasode
Another ELF diagram also made the rounds a few years ago:
[https://code.google.com/p/corkami/wiki/ELF101](https://code.google.com/p/corkami/wiki/ELF101)

It's more of a 1-page poster and doesn't have the longer explanations in the
submitted github article.

~~~
qwerty_asdf
I was hoping someone would post this, because I had lost the bookmark! Thanks!

------
danieleggert
Here's a similar write up I did about Mach-O (iOS / OS X):
[https://www.objc.io/issues/6-build-tools/mach-o-
executables/](https://www.objc.io/issues/6-build-tools/mach-o-executables/)

~~~
landr0id
Awesome, thanks for sharing this.

------
bgilroy26
The last sentence of the first paragraph really struck me

>In general, no single section has both write and execute permissions as this
could compromise the security of the system.

~~~
ant6n
Is that actually enforced in modern linux kernels? I thought it would be
possible to call

    
    
        mmap(..., PROT_READ | PROT_WRITE | PROT_EXEC, ...)

~~~
Hydraulix989
OpenBSD kernel enforces it (even inside the kernel, not just user mode
processes):

[http://marc.info/?l=openbsd-
tech&m=142120787308107&w=2](http://marc.info/?l=openbsd-
tech&m=142120787308107&w=2)

~~~
bgilroy26
Mike Larkin re:W^X a few days ago:

[https://youtu.be/A7vtAAeW6zo](https://youtu.be/A7vtAAeW6zo)

