mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 18:55:07 +00:00
DynamicLoader: Stop performing relative relocations on non-pie objects
Co-authored-by: Daniel Bertalan <dani@danielbertalan.dev>
This commit is contained in:
parent
b700d1a474
commit
fbeef409c6
1 changed files with 2 additions and 0 deletions
|
@ -557,6 +557,8 @@ DynamicLoader::RelocationResult DynamicLoader::do_relocation(const ELF::DynamicO
|
||||||
#else
|
#else
|
||||||
case R_X86_64_RELATIVE: {
|
case R_X86_64_RELATIVE: {
|
||||||
#endif
|
#endif
|
||||||
|
if (!image().is_dynamic())
|
||||||
|
break;
|
||||||
// FIXME: According to the spec, R_386_relative ones must be done first.
|
// FIXME: According to the spec, R_386_relative ones must be done first.
|
||||||
// We could explicitly do them first using m_number_of_relocations from DT_RELCOUNT
|
// We could explicitly do them first using m_number_of_relocations from DT_RELCOUNT
|
||||||
// However, our compiler is nice enough to put them at the front of the relocations for us :)
|
// However, our compiler is nice enough to put them at the front of the relocations for us :)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue