Hi
I would like to put in a request for GPatch to optimise patches for ELF format executables, similar to how it does with HUNK ones. I modified a couple of bytes in some source code and recompiled for AmigaOS 68k and OS4 PowerPC. I then created a patch file for both. As expected, the 68k patch file came out at 22 bytes in length. However, a patch file created for the OS4 executable (OS4 uses ELF format, same as Linux) was a staggering 65KB for the exact same changes.
I have done some basic analysis on the ELF sections in the original and modified executable, and it looks like one of my changes has modified the offset of the text strings in the .rodata and/or .rela.rodata section, as many values in .text and .rela.text have increased by a few bytes. The size of the executable and all sections has however remained the same.
I believe it should be possible to more intelligently patch ELF executables . Would it be possible to look into this? (I realise it is likely to be a lot of work) I've attached the patch file; the original binary is on Aminet as misc/wb/wet.lha
patch file