Re: elf_memory again, readonly or readwrite...

2024-10-18 Thread Aaron Merey
Hi Mark, On Fri, Oct 18, 2024 at 11:03 AM Mark Wielaard 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

Re: elf_memory again, readonly or readwrite...

2024-10-18 Thread Mark Wielaard
Hi, On Thu, 2024-08-29 at 15:47 +0200, Mark Wielaard wrote: > So we changed elf_memory so it pretends the in-memory Elf image is > read with ELF_C_READ_MMAP. This helps when calling elf_memory on > read-only memory which still wants to change some things about the Elf > like uncompress some sectio

Re: elf_memory again, readonly or readwrite...

2024-08-29 Thread Derek Bruening
Instead of elf_memory() having to guess, which seems like it will confuse future users (esp if its behavior is not documented), can we make a new extended API routine elf_memory_mode() that takes in the mode, and clearly document that the old legacy one assumes readonly (or read-write if you change

Re: elf_memory again, readonly or readwrite...

2024-08-29 Thread John Mellor-Crummey
Mark, The draft patch you provided lets my section header updates happen in place. This meets my needs. I am working with Intel Ponte Vecchio GPU binaries, which are relocatables. What I am trying to do is to (1) change the sh_addr field in the section headers to make the sections non-overlapp