[PATCH] D45791: Cache getSymVA

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 19 01:59:28 PDT 2018


peter.smith added a comment.

As well as Thunks and errata patching, I'm guessing that any future generic (not just Android) uses of packed dynamic relocs might also need symbol addresses to be recalculated (https://sourceware.org/ml/gnu-gabi/2017-q2/msg00000.html)

Some thoughts:

- Rather than disabling for the architectures that need thunks, I think it would be better to invalidate the cache after content was changed as this might help prevent bugs if other features are added later that change addresses.
- Adding new content can only change the address of defined non-absolute symbols, it might be possible to cache everything else but these ones. Whether this makes a significant difference in link time or not I don't know.
- assignAddresses() could update the symbol cache instead of invalidating it, there would only be a displacement for defined non-absolute symbols.

I guess we'll need to benchmark to make sure if any of those are worth the additional complexity.


https://reviews.llvm.org/D45791





More information about the llvm-commits mailing list