[PATCH] bfd/pdb: fix bitmap generation in pdb_write_bitmap

Jan Beulich jbeulich@suse.com
Mon Sep 2 07:46:07 GMT 2024


On 01.09.2024 18:47, Mark Harmstone wrote:
> MSVC 2022 is more pedantic than MSVC 2019 when it comes to loading PDB
> files, and was rejecting PDB files generated by binutils because of
> their invalid free-space bitmaps. This patch fixes pdb_write_bitmap so
> we generate files that MSVC will accept.
> 
> Specifically there were three things we were doing wrong:
> 
> - We weren't including the superblock (block 0)
> 
> - We were setting bits in bytes backwards (MSB to LSB, rather than LSB to MSB)

This doesn't look to be merely a matter of being pedantic. Any explanation
of how things ended up appearing to work, despite this inversion? (Patch
generally looks okay, yet I'd like to understand this aspect, which may
call for a change to the description.)

Jan


More information about the Binutils mailing list