mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
LibELF: Perform .relr.dyn relocations before .rel.dyn
IFUNC resolvers depend on the resolved function's address having been relocated by the time they are called. This means that relative relocations have to be done first. The linker is kind enough to put R_*_RELATIVE before R_*_IRELATIVE in .rel.dyn, but .relr.dyn contains relative relocations too.
This commit is contained in:
parent
435a263998
commit
ed5f110b40
Notes:
sideshowbarker
2024-07-17 11:25:34 +09:00
Author: https://github.com/BertalanD
Commit: ed5f110b40
Pull-request: https://github.com/SerenityOS/serenity/pull/13238
Reviewed-by: https://github.com/ADKaster
1 changed files with 1 additions and 1 deletions
|
@ -197,9 +197,9 @@ void DynamicLoader::do_main_relocations()
|
|||
}
|
||||
};
|
||||
|
||||
do_relr_relocations();
|
||||
m_dynamic_object->relocation_section().for_each_relocation(do_single_relocation);
|
||||
m_dynamic_object->plt_relocation_section().for_each_relocation(do_single_relocation);
|
||||
do_relr_relocations();
|
||||
}
|
||||
|
||||
Result<NonnullRefPtr<DynamicObject>, DlErrorMessage> DynamicLoader::load_stage_3(unsigned flags)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue