* the COMDAT record contains the section number which is off-by-one to the section index

This commit is contained in:
Sven/Sarah Barth 2024-06-07 15:31:18 +02:00
parent 52c5a0932d
commit f5beaa80d8

View File

@ -2598,7 +2598,7 @@ const pemagic : array[0..3] of byte = (
if (secrec.assoc<>0) and not assigned(objsym.objsection.AssociativeSection) then
begin
objsym.objsection.AssociativeSection:=GetSection(secrec.assoc);
objsym.objsection.AssociativeSection:=GetSection(secrec.assoc-1);
if not assigned(objsym.objsection.AssociativeSection) then
Message1(link_e_comdat_associative_section_not_found,objsym.objsection.Name);
end;