This PR changes SectionLoadList::SetSectionLoadAddress to avoid O(n) linear scan when removing stale reverse-map entries. While I was there, I did some gardening to improve the function's readability. The change is not NFC as I also fixed a pre-existing bug where the stale addr-to-sect entry was not removed when the new load address already existed in the map (the ats_pos != end() branch).
9.5 KiB
9.5 KiB