-
Notifications
You must be signed in to change notification settings - Fork 568
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#7120: Do not add addend for rela jump slot relocation (#7121)
Despite "rela" relocations having an explicit addend value and it being set to non-0 in a new Debian glibc, the addend is assumed to *not* be added to the symbol value when relocating on x86_64 and aarch64 (it does seem to be added on RISCV). This is not obvious and not well documented; we have to just behave like existing loaders behave from experimentation/examination. (Yet another reason to possibly invert the private loader and let the private copy of ld.so do all the loading and relocating: #5437). Tested on a machine where nearly every client test in our suite was crashing after a glibc update: now they pass. Unfortunately it's not simple to make automated tests for this: we don't have an existing framework for relocation testing and it would take non-trivial effort to construct that, beyond the scope of this fix. Fixes #7120
- Loading branch information
1 parent
eec4721
commit fb0542b
Showing
2 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters