Don't output sections in reverse order (#1613)

This commit is contained in:
Rangi
2025-01-17 01:28:17 -05:00
committed by GitHub
parent fac5e35d24
commit 382ad17969
7 changed files with 20 additions and 20 deletions

View File

@@ -14,8 +14,8 @@ std::vector<std::unique_ptr<Section>> sectionList;
std::unordered_map<std::string, size_t> sectionMap; // Indexes into `sectionList`
void sect_ForEach(void (*callback)(Section &)) {
for (auto it = sectionList.rbegin(); it != sectionList.rend(); it++)
callback(*it->get());
for (auto &ptr : sectionList)
callback(*ptr);
}
static void checkAgainstFixedAddress(Section const &target, Section const &other, uint16_t org) {