[PATCH] D109400: [LLD] Add archive Name to relocaiton overflow printout
Alexander Yermolovich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 4 10:46:40 PDT 2021
ayermolo added a comment.
In D109400#3094169 <https://reviews.llvm.org/D109400#3094169>, @MaskRay wrote:
> Thanks:)
>
> ---
>
> I think companies shipping large executables may have similar needs. Internally someone asked me whether LLD can record a section but I feel that `--emit-relocs` is the right solution.
> I am always concerned with whether we may spend too much code on a rather specific use case where an alternative existing functionality exists.
> I'd still say that watching relocations is like shooting a different target. The build system can rearrange dependencies/object files and the max relocation distance may not be representative.
> (Say the longest relocation can disappear in the next build and the second longest relocation in the previous build can become the longest one.)
I understand we don't want to chase too specialized use cases, but Relocation overflows do happen to multiple users of LLD. One can just search stack overflow with people asking "What does this relocation overflow mean". Adding extra information on none-critical path that will tell user at a glance, without re-linking, and doing extra steps, what the state of the binary is and what is the source and destination of relocation does improve user experience. Instead of every user who experiences relocation overflow being forced to repeat same steps over and over, LLD can produce that information with a cost of one function in Relocations.cpp. It is less to do with chasing any particular relocation, but providing a high level overview of what went wrong and where to look next. For example if reloc was between .gcc_except and .data, one can look at sections between those to see if maybe something there that can be moved out of the way, or one of the other sections is abnormally large, etc.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109400/new/
https://reviews.llvm.org/D109400
More information about the llvm-commits
mailing list