https://sourceware.org/bugzilla/show_bug.cgi?id=20193
--- Comment #4 from Jon TURNEY <jon.turney at dronecode dot org.uk> --- Created attachment 9309 --> https://sourceware.org/bugzilla/attachment.cgi?id=9309&action=edit Patch to update size of resources in DataDirectory (In reply to Nick Clifton from comment #2) > > > The size of the resources in the DataDirectory is not updated by > > rsrc_process_section() > > Hmm, I wonder if that is it. Does this, completely untested, patch make a > difference ? > > Cheers > Nick > > diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c > index c92c1ea..bb0e2c8 100644 > --- a/bfd/peXXigen.c > +++ b/bfd/peXXigen.c > @@ -4320,6 +4320,8 @@ rsrc_process_section (bfd * abfd, > bfd_set_section_contents (pfinfo->output_bfd, sec, new_data, 0, size); > sec->size = sec->rawsize = size; > > + pe->pe_opthdr.DataDirectory[PE_RESOURCE_TABLE].Size = size; > + > end: > /* Step six: Free all the memory that we have used. */ > /* FIXME: Free the resource tree, if we have one. */ This isn't quite enough to set the size of the DataDirectory correctly, I used the attached instead. Unfortunately, with that patch applied, 1.exe is invalid, while 2.exe and 3.exe are good -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils