Skip to content

[Object][x86-64] Add support for R_X86_64_GLOB_DAT relocations. #103029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions llvm/lib/Object/RelocationResolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ 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 @@ -68,6 +69,8 @@ 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
Loading