ofrak icon indicating copy to clipboard operation
ofrak copied to clipboard

Investigate if LiefAddSegmentModifierConfig should default to `replace_note = True`

Open rbs-afflitto opened this issue 2 months ago • 1 comments

When LiefAddSegmentModifier was implemented, LIEF had a bug which caused Elf.add(Segment) to corrupt the binary. The linked issues (https://github.com/lief-project/LIEF/issues/98, https://github.com/lief-project/LIEF/issues/143) have been closed, so we should consider defaulting to the Elf.add method instead of replacing NOTE

Which files would be affected?

ofrak_core/src/ofrak/core/elf/lief_modifier.py

Does the proposed maintenance include non-doc string functional changes to the Python code?

Yes

Are you interested in implementing it yourself?

Yes

rbs-afflitto avatar Oct 21 '25 20:10 rbs-afflitto

Did a quick test with replace_note=False on one of the OFRAK test assets and the binary was still executable.

rbs-afflitto avatar Oct 23 '25 21:10 rbs-afflitto