Skip to content

Commit

Permalink
Revert "options/rtld: Fix relr relocations"
Browse files Browse the repository at this point in the history
This reverts commit 92a263c.
  • Loading branch information
Qwinci committed Oct 17, 2024
1 parent b7e6c6a commit 5336ba3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions options/rtld/generic/linker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1731,6 +1731,7 @@ void Loader::_processStaticRelocations(SharedObject *object) {
if(!(entry & 1)) {
addr = (elf_addr *)(object->baseAddress + entry);
__ensure(addr);
*addr++ += object->baseAddress;
}else {
// Odd entry indicates entry is a bitmap of the subsequent locations to be relocated.
for(int i = 0; entry; ++i) {
Expand Down
1 change: 1 addition & 0 deletions options/rtld/generic/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ extern "C" void relocateSelf() {
if(!(entry & 1)) {
addr = (elf_addr *)(ldso_base + entry);
__ensure(addr);
*addr++ += ldso_base;
}else {
// Odd entry indicates entry is a bitmap of the subsequent locations to be relocated.
for(int i = 0; entry; ++i) {
Expand Down

0 comments on commit 5336ba3

Please sign in to comment.