elf: shuffle some stages to make it clear what needs what

This commit is contained in:
Jakub Konka 2024-08-27 15:34:13 +02:00
parent d32af9ea2a
commit 8f1ce3c85b

View File

@ -1049,14 +1049,16 @@ pub fn flushModule(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_nod
try self.initSyntheticSections();
try self.initSpecialPhdrs();
try self.sortShdrs();
for (self.objects.items) |index| {
try self.file(index).?.object.addAtomsToOutputSections(self);
}
try self.sortInitFini();
try self.setDynamicSection(rpath_table.keys());
self.sortDynamicSymtab();
try self.setHashSections();
try self.setVersionSymtab();
for (self.objects.items) |index| {
try self.file(index).?.object.addAtomsToOutputSections(self);
}
try self.sortInitFini();
try self.updateMergeSectionSizes();
try self.updateSectionSizes();