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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 15 00:29:33 PST 2021


grimar added a comment.

In D94560#2499076 <https://reviews.llvm.org/D94560#2499076>, @inglorion wrote:

> Thanks for the comments!
>
> In D94560#2497393 <https://reviews.llvm.org/D94560#2497393>, @grimar wrote:
>
>> E.g. I think it can be just a 2 lines loop which would iterate over all output sections and print their names ans sizes.
>> No need to sort them or to calculate fields width.
>
> The reason I do the sorting is because there can potentially be very many sections. Imagine a large binary with -fdata-sections -ffunction-settings.

I might me missing something, but `-fdata-sections -ffunction-settings` affects on number of input sections, but here we iterate over output sections.
I believe that the number of output sections is usually small. E.g. I'd not expect to see more than 10-50 in most of the common cases?

In D94560#2499115 <https://reviews.llvm.org/D94560#2499115>, @inglorion wrote:

> In D94560#2497416 <https://reviews.llvm.org/D94560#2497416>, @jhenderson wrote:
>
>> I wonder whether the issue could be better solved by adding something (probably output section sizes as @grimar suggests) to the verbose output?
>
> Not sure I understand what precisely you are suggesting. Are you saying to only show this information when --verbose is passed?

I think this is what @jhenderson meant, yes.


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