summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZephiles <cae222@yahoo.com>2022-05-23 22:43:26 -0500
committerZephiles <cae222@yahoo.com>2022-05-23 22:50:33 -0500
commit442e696d0a5be973e240b3ffcbd38919a4fd6618 (patch)
tree5dad7772d0e7a3f77ad27b423555877187a9482b
parentca2c7efda27d8421650d4071b5197ad21a471273 (diff)
Add exit function call to rel epilog
This function will be needed if a rel file will be unlinked and needs to do additional stuff just before unlinking/exiting.
-rw-r--r--source/rel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/rel.cpp b/source/rel.cpp
index e0d4d3c..6f0d736 100644
--- a/source/rel.cpp
+++ b/source/rel.cpp
@@ -13,7 +13,8 @@ extern "C"
namespace mod
{
extern void main();
-}
+ extern void exit();
+} // namespace mod
void _prolog()
{
@@ -28,7 +29,9 @@ void _prolog()
void _epilog()
{
- // In the unlikely event we ever get here, run the global destructors
+ // Run exit
+ mod::exit();
+ // Run global destructors
for ( PFN_voidfunc* dtor = _dtors_start; dtor != _dtors_end && *dtor; ++dtor )
{
( *dtor )();