bfd/pdb: Increase the PDB block size to 4096
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_binutils_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_binutils_check--master-arm |
success
|
Test passed
|
Commit Message
The block map of the stream directory is itself a single block, so with
1024 byte blocks it can only hold 256 block numbers, which limits a PDB
file to about 64 MB. Writing a larger one fails partway through and
leaves a truncated file behind, which llvm-pdbutil rejects with "Too
many directory blocks".
4096 is what MSVC uses, and is the largest block size that both our
reader and LLVM accept. It raises the limit to about 4 GB.
bfd/
* pdb.c (pdb_write_contents): Use a block size of 4096.
---
bfd/pdb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -713,7 +713,7 @@ static bool
pdb_write_contents (bfd *abfd)
{
char tmp[sizeof (uint32_t)];
- const uint32_t block_size = 0x400;
+ const uint32_t block_size = 0x1000;
uint32_t block_map_addr;
uint32_t num_blocks;
uint32_t num_files = 0;