Patching ELF with minimum number of change in bytes
0
Problem Definition : I need to patch an elf file. This elf file is produced from the available source code that I have developed. I also have a linker file which is a standard example for my target. Challenge is to keep changes (byte shifts) in the elf file as minimum when I add a new code line. When I take difference in bytes between original and patched elf files, the first occurrence of byte shift (cause of new code line) is desired to be near end of the elf file. So adding a new text and data section for patch purpose is a must! But these sections also be located at the end of elf file. Here is my test combinations : What works; When I add a new functionality to any function, I will rewrite this function in a new source file. And add this function to a new section called patchText (defined in link...