[PATCH] D115051: Enable pdbpagesize to allow support for PDB file sizes > 4GB

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 6 12:42:52 PST 2021


thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.

This basically lgtm. One comment to fix a diagnostic below.

I patched this in and checked that lld now indeed produces PDBs > 4GiB when needed (with /pdbpagesize:8192, with the repro in crbug.com/1179085) and that llvm-pdbutil can dump the summary of such large PDBs.

Do you need me to commit this for you?



================
Comment at: llvm/lib/DebugInfo/MSF/MSFBuilder.cpp:349
     return make_error<MSFError>(
         msf_error_code::size_overflow,
         formatv("File size would have been {0,1:N}", FileSize));
----------------
Take a look at llvm/lib/DebugInfo/MSF/MSFError.cpp:

```
    case msf_error_code::size_overflow:
      return "Output data is larger than 4 GiB.";
```

The lld linker for > 4GB files is: `lld-link: error: Output data is larger than 4 GiB. File size would have been 4,593,000,448`

But we'll use the "larger than 4 GiB" text even with page size 8192.

The easiest fix is probably to rename the current size_overflow to size_overflow_4096 and add size_overflow_8192, size_overflow_16384, size_overflow_32768. (Maybe there's a nicer fix too, but that'd work.)

Maybe the string returned by MSFError.cpp could mention ", the maximum for a PDB with page size XXX" so that users get the idea that the page size is now configurable.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115051/new/

https://reviews.llvm.org/D115051



More information about the llvm-commits mailing list