News for hackers. Stuff that matters.
Re:Exploring Object File Formats by khaledh on Tuesday January 16, 2024 @09:14AM (#39013444)
Low-level programming is one of my favourite subjects. I've written a simple ELF parser in Nim (with the help of an amazing binary parsing library) among other things: https://github.com/khaledh/elfdump
Re:Exploring Object File Formats by a2code on Tuesday January 16, 2024 @11:54AM (#39015515)
How did you learn to do this?
Re:Exploring Object File Formats by hnthrowaway0328 on Tuesday January 16, 2024 @05:00PM (#39019746)
Just read the ELF specification. There is a header and everything else follows. There are a lot of explanations online, here is one: https://www.cs.cmu.edu/afs/cs/academic/class/15213-f00/docs/...
Re:Exploring Object File Formats by khaledh on Tuesday January 16, 2024 @07:09PM (#39021117)
My reference was the "System V Application Binary Interface" itself (chapter 4). It's not that difficult to grok.

https://refspecs.linuxbase.org/elf/x86_64-abi-0.99.pdf

Re:Exploring Object File Formats by eddd-ddde on Tuesday January 16, 2024 @09:45AM (#39013790)
That reminds me, couple of years ago when I was leaning to program, one of my first projects was a ELF parser so I could understand what binaries where doing and how they where built.
Re:Exploring Object File Formats by WalterBright on Tuesday January 16, 2024 @01:55PM (#39017234)
In order to learn an object file format, the first thing I'd do is write a dumper for it.
Re:Exploring Object File Formats by mhh__ on Tuesday January 16, 2024 @07:38PM (#39021451)
Writing a program that can dump itself is a great learning project.

Good bit twiddling practice too