Skip to content

Commit 64c8560

Browse files
authored
Revert "[Object][x86-64] Add support for R_X86_64_GLOB_DAT relocations. (#103029)" (#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.
1 parent 51328b7 commit 64c8560

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

llvm/lib/Object/RelocationResolver.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ static bool supportsX86_64(uint64_t Type) {
4747
case ELF::R_X86_64_PC64:
4848
case ELF::R_X86_64_32:
4949
case ELF::R_X86_64_32S:
50-
case ELF::R_X86_64_GLOB_DAT:
5150
return true;
5251
default:
5352
return false;
@@ -69,8 +68,6 @@ static uint64_t resolveX86_64(uint64_t Type, uint64_t Offset, uint64_t S,
6968
case ELF::R_X86_64_32:
7069
case ELF::R_X86_64_32S:
7170
return (S + Addend) & 0xFFFFFFFF;
72-
case ELF::R_X86_64_GLOB_DAT:
73-
return S;
7471
default:
7572
llvm_unreachable("Invalid relocation type");
7673
}

0 commit comments

Comments
 (0)