Hi Mark, On Fri, Oct 18, 2024 at 11:03 AM Mark Wielaard <m...@klomp.org> wrote: > > I waited too long deciding what to do here. Sorry. We are about to make > the 0.192 release today. If it isn't too late then I would like to > apply my proposed patch (as attached). > > It isn't ideal, but it basically reverts to the behavior of elfutils > 0.190. So you can again do direct manipulation on ELF images created > through elf_memory. So in that way it was a regression in 0.191, fixed > for 0.192. > > It does mean that if the memory you gave elf_memory is read-only and > you call elf_compress on one of the sections things might crash > (because elf_compress will try to update the Elf_Shdr structure in > place to set the new size). Which indeed could be seen as a regression > from 0.191 (but was there before). If you do want to decompress (or > otherwise manipulate) the ELF image created through elf_memory you have > to do what the testcase (now) does. mmap the image using MMAP_PRIVATE > so it is (copy-on-)writable. > > Longer term we probably want a new elf_memory2 function that takes an > argument describing the protection bits of the given memory. > > Aaron, is it OK to commit this before you start the 0.192 release > process?
This is fine, please go ahead and merge. Aaron