- Put all init functions in a special section and do free
authorHartmut Birr <osexpert@googlemail.com>
Sun, 12 Oct 2003 17:37:08 +0000 (17:37 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Sun, 12 Oct 2003 17:37:08 +0000 (17:37 +0000)
  the memory from this section after system initialization.

svn path=/trunk/; revision=6298

reactos/ntoskrnl/ntoskrnl.dbg.lnk
reactos/ntoskrnl/ntoskrnl.lnk

index 7937f44..a7373a6 100644 (file)
@@ -14,6 +14,10 @@ SECTIONS
      *(.gcc_exc)
     *(.gcc_except_table)
   }
+  /DISCARD/ :
+  {
+    *(init)
+  }
   /* The Cygwin32 library uses a section to avoid copying certain data
      on fork.  This used to be named ".data".  The linker used
      to include this between __data_start__ and __data_end__, but that
index 14299b3..c759bab 100644 (file)
@@ -20,7 +20,13 @@ SECTIONS
      __text_end__ = .;
     *(.gcc_except_table)
   }
-  /* The Cygwin32 library uses a section to avoid copying certain data
+  init BLOCK(__section_alignment__) :
+  {
+    __init_start__ = . ;
+    *(init)
+    __init_end__ = . ;
+  }
+   /* The Cygwin32 library uses a section to avoid copying certain data
      on fork.  This used to be named ".data".  The linker used
      to include this between __data_start__ and __data_end__, but that
      breaks building the cygwin32 dll.  Instead, we name the section