Hi, The following patch series introduces compressed ELF sections in libelf. It is a prototype. We want to match the interface that other libelf implementations will use if possible. This version is slightly different from the one proposed by the Solaris hackers. I also wrote a different prototype that was based on the elf_[raw]data/new_data interface (which I lost that one is a freak fight with git...) That one gave the user a bit more control mixing compressed/decompressed data. But the current interface is much simpler. I will post about this on the Generic System V Application Binary Interface mailinglist where also other proposals have been discussed. If you have comments on the interface please join the discussion there. https://groups.google.com/forum/#!forum/generic-abi
Comments on the implementation very welcome here of course. The main thing that is missing is converting between memory and file representation before compressing if necessary. Which shouldn't be hard. There is a XXX comment. Also actually writing the compressed or decompressed data to the file isn't tested at all. I like to add a new program that lets you [un]compress sections and/or convert between different compression types next. That would also be a good testcase for the implementation. Cheers, Mark