I have an ELF file that I would like to decompile into C
code, and make simple changes to the resulting C
code and rebuild it into an ELF.
You write a simulator for the processor, then you run the elf instructions through your simulated processor. It's generally not too much of a task because even CISC processors have relatively small, contained instruction sets that perform simple operations.
When you've got that working, look at more efficient solutions, like outputting C code to match instructions.