[llvm] [Object][x86-64] Add support for `R_X86_64_GLOB_DAT` relocations. (PR #103029)
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 13 19:53:22 PDT 2024
lhames wrote:
Revert PR is here, for reference: https://github.com/llvm/llvm-project/pull/103497
> RelocationResolver API design should not support dynamic relocations
I think it's reasonable to have `RelocationResolver` support both static and dynamic relocations, especially since some relocations are usable in both contexts, but I agree that we'd want a way to prevent accidental misuse. Straw man: an `enum class LinkingContext { Static, Dynamic }` argument to `getRelocationResolver` that can be used to select a suitable predicate.
Whether it's actually worth making this generic depends on how many more dynamic relocations we might want to evaluate. If it really is just a handful then it'll be easier to let clients do it. @al45tair -- do you know whether this is a one off, or whether we will need to support more dynamic relocations in the future?
https://github.com/llvm/llvm-project/pull/103029
More information about the llvm-commits
mailing list