ofrak icon indicating copy to clipboard operation
ofrak copied to clipboard

PatchMaker support for AVR

Open rbs-afflitto opened this issue 3 years ago • 1 comments

This PR adds PatchMaker and toolchain support for the AVR architecture. Needed to fix a few assumptions, for example, some compiler/linker flags set in Abstract_GNU_Toolchain are not supported in avr-gcc. Additionally, the LiefAddSegmentModifier relied on an existing NOTE segment, which AVR ELFs do not have. I've added a configuration option to choose between NOTE replacement vs LIEF's add segment method.

rbs-afflitto avatar Aug 09 '22 20:08 rbs-afflitto

@rbs-afflitto Is there anything preventing us from testing the AVR assembler out as well? I see we don't have handling for x86/x64 either... though we do want to support those compilers.

andresito00 avatar Aug 16 '22 02:08 andresito00

I owe us the creation of two new issues for this merge:

  1. test_toolchain_asm.py updates with AVR instructions.
  2. A longer lived effort to ensure all PatchMaker tests result in emulatable/runnable patches in programs, not just builds.

andresito00 avatar Aug 17 '22 18:08 andresito00

Thanks for running the pytests locally.

Should have a new CI pipeline up and running soon!

andresito00 avatar Aug 17 '22 22:08 andresito00