[llvm] [Object][x86-64] Add support for `R_X86_64_GLOB_DAT` relocations. (PR #103029)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 18:57:54 PDT 2024


MaskRay wrote:

This change made me nervous, not only because it lacks in-tree test and context.
I have contribution to glibc, musl, and FreeBSD rtld.

---

Dynamic relocation types are limited, significantly different from static relocation types.

If GLOB_DAT is the sole required relocation, explicitly checking for it in the caller would be more reliable.
Additionally, the caller should handle GLOB_DAT on other architectures.

Relying on RelocationResolver might inadvertently identify unsupported static relocation types as valid.

Introducing GLOB_DAT could negatively impact other RelocationResolver users who solely handle static relocations
and want to report errors for dynamic relocations.


https://github.com/llvm/llvm-project/pull/103029


More information about the llvm-commits mailing list