Saturday, 30 June 2012

Interpreting readelf -r, in this case R_X86_64_PC32

Having just put the monster Relocations, Relocations blog-post to bed, at one point I caught myself trying to compute a relocation from the information given by readelf -r. It turns out that it's a bit confusing, and not at all clear how you get from the readelf output to addresses and offsets. So, I've put together the following shared library in the hope that we can walk through that process.

Sunday, 24 June 2012

Relocations, Relocations

I've wanted to write something about symbol relocations in ELF binaries for a while now, but it's become apparent that it's no small topic, since it depends on understanding of the Executable and Linkable Format. I'm going to try to report what I've found in as much detail as I can imagine before I realise what a monumental task it actually is.