mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 16:46:08 +00: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
|
@ -245,14 +245,19 @@ public:
|
|||
Symbol symbol(unsigned) const;
|
||||
|
||||
typedef void (*InitializationFunction)();
|
||||
typedef void (*FinalizationFunction)();
|
||||
typedef ElfW(Addr) (*IfuncResolver)();
|
||||
|
||||
bool has_init_section() const { return m_init_offset != 0; }
|
||||
bool has_init_array_section() const { return m_init_array_offset != 0; }
|
||||
Section init_section() const;
|
||||
InitializationFunction init_section_function() const;
|
||||
Section fini_section() const;
|
||||
Section init_array_section() const;
|
||||
|
||||
bool has_fini_section() const { return m_fini_offset != 0; }
|
||||
bool has_fini_array_section() const { return m_fini_array_offset != 0; }
|
||||
Section fini_section() const;
|
||||
FinalizationFunction fini_section_function() const;
|
||||
Section fini_array_section() const;
|
||||
|
||||
HashSection hash_section() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue