Binutils causes abnormally large, non-working binaries since 2.43

Bastiaan Timmer basjetimmer@yahoo.com
Mon Feb 17 15:19:21 GMT 2025


Thanks you for your thorough reply. It looks like you are onto 
something: I've compiled binutils-2.43 with just that commit undone, and 
all sizes seem to be back to normal. Unfortunately, the simple sample 
program linked against a newly built openssl still does not run on 
Windows, though this time Windows actually shows an error message when 
trying to run it.

Maybe I'm doing something else wrong, I will test a little more later. 
It could also be that the failure to run and the increase in size are 
two separate problems (also considering Julian's comments).

I'm open to any more suggestions. Thanks again.

Kind regards,
Bas


On 17-02-2025 14:08, Dimitry Andric wrote:
> On 17 Feb 2025, at 13:56, Dimitry Andric <dimitry@andric.com> wrote:
>> Hence, it looks like the compiler/assembler in 2.43 now outputs aligned sections, filling them with zero bytes.
>>
>>   $ objdump -j .xdata -s libcommon-lib-ciphercommon_block.obj
>>
>>   libcommon-lib-ciphercommon_block.obj:     file format pe-x86-64
>>
>>   Contents of section .xdata:
>>    0000 010e0600 0e320a30 09600870 075006c0  .....2.0.`.p.P..
>>    0010 010a0300 0a420630 05600000 01040000  .....B.0.`......
>>    0020 01080100 08420000 01060200 06300560  .....B.......0.`
>>    0030 00000000 00000000 00000000 00000000  ................
>>    0040 00000000 00000000 00000000 00000000  ................
>>    0050 00000000 00000000 00000000 00000000  ................
>>    ... lots more zeros ...
>>    0fe0 00000000 00000000 00000000 00000000  ................
>>    0ff0 00000000 00000000 00000000 00000000  ................
>>
>> Bisecting might help to find where this behavior change occurred.
> My first guess would be https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=121a3f4b4f4aac216abe239f6f3bd491b63e5e34, "Update objcopy's --section-alignment option so that it sets the alignment flag on PE sections". But I'm unsure whether the build process for this openssl package is using objcopy.
>
> -Dimitry
>



More information about the Binutils mailing list