
How is a binary executable organized? Let’s explore it - jvns
http://jvns.ca/blog/2014/09/06/how-to-read-an-executable/
======
ibisum
A nice treatise on a well-charted ocean.

Another great article along these lines for those interested in assembly and
execution environments and so on .. is of course the famous muppetlabs
exploration to build the smallest linux executable:

[http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm...](http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html)

~~~
Alupis
Goes very well with some Assembler (GAS - GNU Assembler, ie. Linux Assembly)
knowledge -- and, there's a great free ebook for that!

[http://download.savannah.gnu.org/releases/pgubook/Programmin...](http://download.savannah.gnu.org/releases/pgubook/ProgrammingGroundUp-1-0-booksize.pdf)

~~~
userbinator
Too bad it's AT&T syntax, which is pretty incompatible with the majority of
x86 reference material out there (including Intel's own manuals)... something
like fasm/nasm would probably be much better in a *nix enviroment. This gives
some of the reasons why: [http://x86asm.net/articles/what-i-dislike-about-
gas/](http://x86asm.net/articles/what-i-dislike-about-gas/)

It's also an odd order for that book to defer binary/hex and data
representation until far beyond other more complex/higher-level material. The
fact that the code listings have a "compiler-generated" feel to it, complete
with redundant instructions, suggests that this isn't a great way to learn
Asm; see
[https://news.ycombinator.com/item?id=8248172](https://news.ycombinator.com/item?id=8248172)
for a more detailed explanation.

------
fnbr
I've read a number of jvns articles on HN [1], and each one impresses me with
how she is able to balance technical discussion with readability. I really
enjoy her writing, and look forward to her next post.

I applied to Hacker School solely on the basis of reading her blogs and being
impressed with the work she was doing.

[1] Favourite: [http://jvns.ca/blog/2013/10/16/day-11-how-does-gzip-
work/](http://jvns.ca/blog/2013/10/16/day-11-how-does-gzip-work/)

------
alexanderblom
Wiki [1] and OSDev [2] both have pretty solid articles if you want to know how
to load an ELF into memory.

I used both when implementing ELF for my hobby kernel [3]

[1]
[http://en.wikipedia.org/wiki/Executable_and_Linkable_Format](http://en.wikipedia.org/wiki/Executable_and_Linkable_Format)

[2] [http://wiki.osdev.org/ELF_Tutorial](http://wiki.osdev.org/ELF_Tutorial)

[3] [https://github.com/lexs/rust-
os/blob/master/rost/exec/elf.rs](https://github.com/lexs/rust-
os/blob/master/rost/exec/elf.rs)

------
phloxicon
Do you think it would be possible to describe a binary file in such a way that
some git extension of sorts could be made to understand the file so that only
the minimum delta would have to be saved by git?

~~~
gnoway
Probably, but what for? It doesn't seem feasible to support every common
binary type, and are all common binaries even understood well enough to do
this?

------
daffodil2
I wish this didn't have so many exclamation points in it! There are literally
41 (!!!) exclamation points in this short blog post! It is exhausting to read!
Please consider not using so many! There should be ways to convey enthusiasm
about a topic without peppering your writing with exclamation points!

~~~
tptacek
We're discussing a pretty solid technical article, one deeper than the typical
HN programming article, and this is a very superficial criticism. It's like
you're proudly advertising that you're so disengaged with executable file
formats that you can be derailed by idiosyncratic punctuation.

~~~
daffodil2
I'm actually very interested, which is why I bothered to comment in the first
place. I had to download the HTML of the article and search and replace all
exclamation points with periods to be able to read it.

~~~
tptacek
That is a crippling disability you're grappling with and I am sorry I made
light of it.

