@@ -837,20 +837,21 @@ void Writer::addSyntheticIdata() {
837
837
838
838
// The loader assumes a specific order of data.
839
839
// Add each type in the correct order.
840
- add (" .idata$2" , idata.dirs );
841
- add (" .idata$4" , idata.lookups );
840
+ add (ctx. config . driver ? " INIT$2 " : " .idata$2" , idata.dirs );
841
+ add (ctx. config . driver ? " INIT$4 " : " .idata$4" , idata.lookups );
842
842
add (" .idata$5" , idata.addresses );
843
843
if (!idata.hints .empty ())
844
- add (" .idata$6" , idata.hints );
845
- add (" .idata$7" , idata.dllNames );
844
+ add (ctx. config . driver ? " INIT$6 " : " .idata$6" , idata.hints );
845
+ add (ctx. config . driver ? " INIT$7 " : " .idata$7" , idata.dllNames );
846
846
}
847
847
848
848
// Locate the first Chunk and size of the import directory list and the
849
849
// IAT.
850
850
void Writer::locateImportTables () {
851
851
uint32_t rdata = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ;
852
852
853
- if (PartialSection *importDirs = findPartialSection (" .idata$2" , rdata)) {
853
+ if (PartialSection *importDirs = findPartialSection (
854
+ ctx.config .driver ? " INIT$2" : " .idata$2" , rdata)) {
854
855
if (!importDirs->chunks .empty ())
855
856
importTableStart = importDirs->chunks .front ();
856
857
for (Chunk *c : importDirs->chunks )
0 commit comments