[PATCH] D113865: [COFF] Keep temporary symbols in object files on ARM64, as IMAGE_SYM_CLASS_LABEL

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 21 14:28:07 PST 2021


mstorsjo added a comment.

In D113865#3132910 <https://reviews.llvm.org/D113865#3132910>, @mstorsjo wrote:

> In D113865#3132841 <https://reviews.llvm.org/D113865#3132841>, @efriedma wrote:
>
>> It shouldn't be a problem to define additional symbols after layout.  "layout" only cares about the contents of the sections.
>>
>>> But then, when doing the loop for fixing relocations, would that increase the complexity of that loop from O(n) into O(n^2), or at least O(n log n), as we have to search for the best symbol as reference point for each of them.
>>
>> You'd need to binary search or something to find the closest symbol.
>>
>> If we have a symbol exactly every 1MB, and emit relocations relative to those symbols, we can do a constant-time mapping from offset to symbol.  (This might not find the closest symbol if the section has other symbols.)
>
> Ok, this sounds doable. I'll try to give it a shot.

This was pretty straightforward, see D114340 <https://reviews.llvm.org/D114340>.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113865



More information about the llvm-commits mailing list