I have an .obj
and I disassemble it (I do not have the original source file).
I modify the resulting assembly file by inserting my own assembly at certain instructions of interest, taking care to push/pop to the stack registers I use so I do not thrash the original content.
Why? Maybe I want to toggle a pin whenever a certain assembly instruction is executed (in real-time i.e. no debugger/JTAG).
Then, I want to assemble it back to .obj
but since I've inserted my own assembly, the relative addresses for branches are incorrect now.
QUESTION
Is there an ARM tool that will auto-correct the relative addresses or do I have to do it manually as I insert my assembly?
This is for ARM Cortex M4 but I don't think it should matter.