bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/25029] Invalid PE file caused by discarded .rdata section


From: nickc at redhat dot com
Subject: [Bug ld/25029] Invalid PE file caused by discarded .rdata section
Date: Fri, 11 Oct 2019 11:02:52 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=25029

--- Comment #5 from Nick Clifton <nickc at redhat dot com> ---
Hi Florin,

Just checking...

> The problem is in fact with the SizeOfImage and SizeOfHeaders fields.
> If I call the data section .rdata, then I get a SizeOfImage of 0x4000 and a
> SizeOfHeaders of 0x200 which is correct.
> But if I call the data section .data, then I get a SizeOfImage of 0x3000 and
> a SizeOfHeaders of 0x400.

I assume that you mean that the SizeOfImage is 0x4000 with .data, not 0x3000 ?
The actual size of the executable does not change...

> It seems that ld considers the empty 512 bytes, from the discarded .rdata
> section, as part of the header.

Agreed - and I am uploading a patch which I think will fix the problem.
Please could you give it a try and let me know if it actually works ?

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]