Re:Exploring Object File Formats
by boricj on Tuesday January 16, 2024 @08:04AM
(#39012831)
I've written an ELF object file exporter as part of a Ghidra
extension [1]. It's a bit finicky to get it right (toolchains assume that object files are valid and don't have much in the way of diagnostics), but these are fairly simple under the hood. Section bytes, symbols and relocations, with some headers and metadata to wrap these up...
It's a bit of a shame that object files aren't more of a lingua franca of toolchains in practice. Embedding binary blobs inside a program in a portable way is still a mess today.
It's a bit of a shame that object files aren't more of a lingua franca of toolchains in practice. Embedding binary blobs inside a program in a portable way is still a mess today.
[1] https://github.com/boricj/ghidra-delinker-extension/tree/mas...