]> git.hungrycats.org Git - linux/commitdiff
[PATCH] M68k linker file updates
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 3 Nov 2002 07:53:08 +0000 (23:53 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Sun, 3 Nov 2002 07:53:08 +0000 (23:53 -0800)
2.5.44 linker file updates for m68k:
  - .*.init got renamed to .init.* to allow -ffunction-sections
  - discard .exit* sections like most other ports do

arch/m68k/vmlinux-std.lds
arch/m68k/vmlinux-sun3.lds

index fd167995c01ab43f1bcca90a925720a5fafeae0b..c0ac0012d92d7cbb554fba10b8914c2cc97fd48c 100644 (file)
@@ -38,13 +38,14 @@ SECTIONS
 
   _edata = .;                  /* End of data section */
 
+  /* will be freed after init */
   . = ALIGN(4096);             /* Init code and data */
   __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
+  .init.text : { *(.init.text) }
+  .init.data : { *(.init.data) }
   . = ALIGN(16);
   __setup_start = .;
-  .setup.init : { *(.setup.init) }
+  .init.setup : { *(.init.setup) }
   __setup_end = .;
   __initcall_start = .;
   .initcall.init : {
@@ -64,6 +65,13 @@ SECTIONS
 
   _end = . ;
 
+  /* Sections to be discarded */
+  /DISCARD/ : {
+       *(.exit.text)
+       *(.exit.data)
+       *(.exitcall.exit)
+       }
+
   /* Stabs debugging sections.  */
   .stab 0 : { *(.stab) }
   .stabstr 0 : { *(.stabstr) }
index 339641da51671f151c7e45c7f69e96d920173581..83aa0185079cd79a6a3d7e0c341ca216622bcf3c 100644 (file)
@@ -34,13 +34,14 @@ SECTIONS
   /* End of data goes *here* so that freeing init code works properly. */
   _edata = .;
 
+  /* will be freed after init */
   . = ALIGN(8192);     /* Init code and data */
 __init_begin = .;
-       .text.init : { *(.text.init) }
-       .data.init : { *(.data.init) }
+       .init.text : { *(.init.text) }
+       .init.data : { *(.init.data) }
        . = ALIGN(16);
        __setup_start = .;
-       .setup.init : { *(.setup.init) }
+       .init.setup : { *(.init.setup) }
        __setup_end = .;
        __initcall_start = .;
        .initcall.init : {
@@ -62,6 +63,13 @@ __init_begin = .;
 
   _end = . ;
 
+  /* Sections to be discarded */
+  /DISCARD/ : {
+       *(.exit.text)
+       *(.exit.data)
+       *(.exitcall.exit)
+       }
+
   .crap : {
        /* Stabs debugging sections.  */
        *(.stab)