Skip to content

naive solution

Matthew McGill requested to merge WRT_fix_experimental into master

The handle_reloc lambda was moved in both the zipr.cpp and zipr_dollop_man.cpp files, and it could certainly be a freestanding function in both cases. However, what is done in the lambda differs between the two files and there is no duplication within either file, so I'm not sure that there's really a code duplication problem.

My change is to handle WRT insns by looping through the firp relocation set two times--once for creating dollops, and once for putting dollops in the placement queue. Dollop creation and placement was formerly done only for WRT insns of relocs put on instructions (so relocs put on scoops were skipped). So before, creating and adding WRT insns was done inside loops that were iterating over the existing set of dollop entries. My change necessitated moving WRT handling into separate loops because it would be redundant to loop over the firp's complete relocation set for every dollop entry.

Be aware that I haven't really tested the change apart from the cfi testing and the CI/CD tests of course. Feel free to hold off on the merge if you think more testing is needed.

Merge request reports