Skip to content

Commit

Permalink
Revert "[Object][x86-64] Add support for R_X86_64_GLOB_DAT relocati…
Browse files Browse the repository at this point in the history
…ons. (llvm#103029)" (llvm#103497)

This reverts commit 5ae9faa.

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

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.
  • Loading branch information
MaskRay authored Aug 15, 2024
1 parent 51328b7 commit 64c8560
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions llvm/lib/Object/RelocationResolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ static bool supportsX86_64(uint64_t Type) {
case ELF::R_X86_64_PC64:
case ELF::R_X86_64_32:
case ELF::R_X86_64_32S:
case ELF::R_X86_64_GLOB_DAT:
return true;
default:
return false;
Expand All @@ -69,8 +68,6 @@ static uint64_t resolveX86_64(uint64_t Type, uint64_t Offset, uint64_t S,
case ELF::R_X86_64_32:
case ELF::R_X86_64_32S:
return (S + Addend) & 0xFFFFFFFF;
case ELF::R_X86_64_GLOB_DAT:
return S;
default:
llvm_unreachable("Invalid relocation type");
}
Expand Down

0 comments on commit 64c8560

Please sign in to comment.