[PATCH] D94560: [ELF] report section sizes when output file too large

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 13:45:48 PST 2021


inglorion added a comment.

As for the specific alternatives you suggested:

--noinhibit-exec does not actually write an output file when we hit the "output file too large" error. So that doesn't help us here. I'm not sure what such an output file would look like or if it would be possible to parse it with readelf even if we did write it, because the limit comes from things like offsets and section sizes larger than 4GB not being representable in ELF32.

-M may help, but in order to support the use case of figuring out how section sizes changed between a good run and a bad run, we would need to either reproduce the bad run, or run with -M even in the vast majority of cases where we don't need it. Since we are talking about huge outputs here, this presumably adds appreciable cost to every run.

I did consider an alternative where we add an option to print the map only if the link failed (which I think we don't already have), but that actually seems more of a future commitment than not adding an option and just making the error message more informative. If you do want to go that way, I would be happy to implement it, though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94560



More information about the llvm-commits mailing list