I would like to modify the value of a global variable in an elf file i.e.
int variable = 10;
I see that first I would have to open the elf file. This answer has a short program to open up an elf file,
finding integer declared variables in ELF executable using a hex editor
then I would've to find the virtual address of the global variable using maybe readelf as in this other solution
but instead of modifying the variable using a hex editor, I want to edit it in C using the Section header(Sdhr) struct members from the elf.h file. Hopefully my question makes sense...