mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibC+LibELF: Correctly call destructors on exit()
We currently don't call any DT_FINI_ARRAY functions, so change that. The call to `_fini` in `exit` is unnecessary, as we now call the function referenced by DT_FINI in `__call_fini_functions`.
This commit is contained in:
parent
dcff48356f
commit
0bff1f61b6
Notes:
sideshowbarker
2024-07-17 06:35:23 +09:00
Author: https://github.com/spholz
Commit: 0bff1f61b6
Pull-request: https://github.com/SerenityOS/serenity/pull/21203
Reviewed-by: https://github.com/BertalanD
5 changed files with 58 additions and 9 deletions
|
@ -377,6 +377,12 @@ DynamicObject::InitializationFunction DynamicObject::init_section_function() con
|
|||
return (InitializationFunction)init_section().address().as_ptr();
|
||||
}
|
||||
|
||||
DynamicObject::FinalizationFunction DynamicObject::fini_section_function() const
|
||||
{
|
||||
VERIFY(has_fini_section());
|
||||
return (FinalizationFunction)fini_section().address().as_ptr();
|
||||
}
|
||||
|
||||
char const* DynamicObject::name_for_dtag(ElfW(Sword) d_tag)
|
||||
{
|
||||
switch (d_tag) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue