Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c7ec16da5adc1c1b341b2a83bde7add17dcf811a
Commit:     c7ec16da5adc1c1b341b2a83bde7add17dcf811a
Parent:     641916881322a2dee5b120d509a3bdd05a502510
Author:     Jeff Dike <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:17 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:22 2007 -0700

    uml: fix linker script alignment bugs
    
    Fix a class of bugs in the UML linker scripts which caused section boundary
    variables to sometimes not line up with their sections.
    
    Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/um/kernel/dyn.lds.S    |   12 ++-
 arch/um/kernel/uml.lds.S    |   11 +-
 include/asm-um/common.lds.S |  230 ++++++++++++++++++++++++-------------------
 3 files changed, 143 insertions(+), 110 deletions(-)

diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index 2454774..4185090 100644
--- a/arch/um/kernel/dyn.lds.S
+++ b/arch/um/kernel/dyn.lds.S
@@ -71,11 +71,13 @@ SECTIONS
     *(.gnu.warning)
 
     . = ALIGN(4096);
-    __syscall_stub_start = .;
-    *(.__syscall_stub*)
-    __syscall_stub_end = .;
-    . = ALIGN(4096);
   } =0x90909090
+  . = ALIGN(4096);
+  .syscall_stub : {
+       __syscall_stub_start = .;
+       *(.__syscall_stub*)
+       __syscall_stub_end = .;
+  }
   .fini           : {
     KEEP (*(.fini))
   } =0x90909090
@@ -138,8 +140,8 @@ SECTIONS
   .got            : { *(.got.plt) *(.got) }
   _edata = .;
   PROVIDE (edata = .);
-  __bss_start = .;
   .bss            : {
+   __bss_start = .;
    *(.dynbss)
    *(.bss .bss.* .gnu.linkonce.b.*)
    *(COMMON)
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S
index 307b937..81acdc2 100644
--- a/arch/um/kernel/uml.lds.S
+++ b/arch/um/kernel/uml.lds.S
@@ -44,12 +44,13 @@ SECTIONS
     /* .gnu.warning sections are handled specially by elf32.em.  */
     *(.gnu.warning)
     *(.gnu.linkonce.t*)
+  }
 
-    . = ALIGN(4096);
-    __syscall_stub_start = .;
-    *(.__syscall_stub*)
-    __syscall_stub_end = .;
-    . = ALIGN(4096);
+  . = ALIGN(4096);
+  .syscall_stub : {
+       __syscall_stub_start = .;
+       *(.__syscall_stub*)
+       __syscall_stub_end = .;
   }
 
   #include "asm/common.lds.S"
diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S
dissimilarity index 63%
index e3f010b..cb02486 100644
--- a/include/asm-um/common.lds.S
+++ b/include/asm-um/common.lds.S
@@ -1,100 +1,130 @@
-#include <asm-generic/vmlinux.lds.h>
-
-  .fini      : { *(.fini)    } =0x9090
-  _etext = .;
-  PROVIDE (etext = .);
-
-  . = ALIGN(4096);
-  _sdata = .;
-  PROVIDE (sdata = .);
-
-  RODATA
-
-  .unprotected : { *(.unprotected) }
-  . = ALIGN(4096);
-  PROVIDE (_unprotected_end = .);
-
-  . = ALIGN(4096);
-  .note : { *(.note.*) }
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  BUG_TABLE
-
-  __uml_setup_start = .;
-  .uml.setup.init : { *(.uml.setup.init) }
-  __uml_setup_end = .;
-       
-  __uml_help_start = .;
-  .uml.help.init : { *(.uml.help.init) }
-  __uml_help_end = .;
-       
-  __uml_postsetup_start = .;
-  .uml.postsetup.init : { *(.uml.postsetup.init) }
-  __uml_postsetup_end = .;
-       
-  __setup_start = .;
-  .init.setup : { *(.init.setup) }
-  __setup_end = .;
-
-  . = ALIGN(32);
-  __per_cpu_start = . ; 
-  .data.percpu : { *(.data.percpu) }
-  __per_cpu_end = . ;
-       
-  __initcall_start = .;
-  .initcall.init : {
-       INITCALLS
-  }
-  __initcall_end = .;
-
-  __con_initcall_start = .;
-  .con_initcall.init : { *(.con_initcall.init) }
-  __con_initcall_end = .;
-
-  __uml_initcall_start = .;
-  .uml.initcall.init : { *(.uml.initcall.init) }
-  __uml_initcall_end = .;
-  __init_end = .;
-
-  SECURITY_INIT
-
-  __exitcall_begin = .;
-  .exitcall : { *(.exitcall.exit) }
-  __exitcall_end = .;
-
-  __uml_exitcall_begin = .;
-  .uml.exitcall : { *(.uml.exitcall.exit) }
-  __uml_exitcall_end = .;
-
-  . = ALIGN(4);
-  __alt_instructions = .;
-  .altinstructions : { *(.altinstructions) }
-  __alt_instructions_end = .;
-  .altinstr_replacement : { *(.altinstr_replacement) }
-  /* .exit.text is discard at runtime, not link time, to deal with references
-     from .altinstructions and .eh_frame */
-  .exit.text : { *(.exit.text) }
-  .exit.data : { *(.exit.data) }
-
-  __preinit_array_start = .;
-  .preinit_array : { *(.preinit_array) }
-  __preinit_array_end = .;
-  __init_array_start = .;
-  .init_array : { *(.init_array) }
-  __init_array_end = .;
-  __fini_array_start = .;
-  .fini_array : { *(.fini_array) }
-  __fini_array_end = .;
-
-   . = ALIGN(4096);
-  __initramfs_start = .;
-  .init.ramfs : { *(.init.ramfs) }
-  __initramfs_end = .;
-
-  /* Sections to be discarded */
-  /DISCARD/ : {
-       *(.exitcall.exit)
-  }
-
+#include <asm-generic/vmlinux.lds.h>
+
+  .fini      : { *(.fini)    } =0x9090
+  _etext = .;
+  PROVIDE (etext = .);
+
+  . = ALIGN(4096);
+  _sdata = .;
+  PROVIDE (sdata = .);
+
+  RODATA
+
+  .unprotected : { *(.unprotected) }
+  . = ALIGN(4096);
+  PROVIDE (_unprotected_end = .);
+
+  . = ALIGN(4096);
+  .note : { *(.note.*) }
+  __ex_table : {
+       __start___ex_table = .;
+       *(__ex_table)
+       __stop___ex_table = .;
+  }
+
+  BUG_TABLE
+
+  .uml.setup.init : {
+       __uml_setup_start = .;
+       *(.uml.setup.init)
+       __uml_setup_end = .;
+  }
+       
+  .uml.help.init : {
+       __uml_help_start = .;
+       *(.uml.help.init)
+       __uml_help_end = .;
+  }
+       
+  .uml.postsetup.init : {
+       __uml_postsetup_start = .;
+       *(.uml.postsetup.init)
+       __uml_postsetup_end = .;
+  }
+       
+  .init.setup : {
+       __setup_start = .;
+       *(.init.setup)
+       __setup_end = .;
+  }
+
+  . = ALIGN(32);
+  .data.percpu : {
+       __per_cpu_start = . ;
+       *(.data.percpu)
+       __per_cpu_end = . ;
+  }
+       
+  .initcall.init : {
+       __initcall_start = .;
+       INITCALLS
+       __initcall_end = .;
+  }
+
+  .con_initcall.init : {
+       __con_initcall_start = .;
+       *(.con_initcall.init)
+       __con_initcall_end = .;
+  }
+
+  .uml.initcall.init : {
+       __uml_initcall_start = .;
+       *(.uml.initcall.init)
+       __uml_initcall_end = .;
+  }
+  __init_end = .;
+
+  SECURITY_INIT
+
+  .exitcall : {
+       __exitcall_begin = .;
+       *(.exitcall.exit)
+       __exitcall_end = .;
+  }
+
+  .uml.exitcall : {
+       __uml_exitcall_begin = .;
+       *(.uml.exitcall.exit)
+       __uml_exitcall_end = .;
+  }
+
+  . = ALIGN(4);
+  .altinstructions : {
+       __alt_instructions = .;
+       *(.altinstructions)
+       __alt_instructions_end = .;
+  }
+  .altinstr_replacement : { *(.altinstr_replacement) }
+  /* .exit.text is discard at runtime, not link time, to deal with references
+     from .altinstructions and .eh_frame */
+  .exit.text : { *(.exit.text) }
+  .exit.data : { *(.exit.data) }
+
+  .preinit_array : {
+       __preinit_array_start = .;
+       *(.preinit_array)
+       __preinit_array_end = .;
+  }
+  .init_array : {
+       __init_array_start = .;
+       *(.init_array)
+       __init_array_end = .;
+  }
+  .fini_array : {
+       __fini_array_start = .;
+       *(.fini_array)
+       __fini_array_end = .;
+  }
+
+   . = ALIGN(4096);
+  .init.ramfs : {
+       __initramfs_start = .;
+       *(.init.ramfs)
+       __initramfs_end = .;
+  }
+
+  /* Sections to be discarded */
+  /DISCARD/ : {
+       *(.exitcall.exit)
+  }
+
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to