Skip to contentSkip to conversation

UML - Fix linker script alignment bugs

PATCH In review Jeff Dike 1 participant 1 message Aug 22, 2007 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 1/2 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.

--

 arch/um/kernel/dyn.lds.S    |   12 ++--
 arch/um/kernel/uml.lds.S    |   11 ++-
 include/asm-um/common.lds.S |  128 +++++++++++++++++++++++++++-----------------
 3 files changed, 92 insertions(+), 59 deletions(-)
arch/um/kernel/dyn.lds.S +7 -5
Index: linux-2.6.22/arch/um/kernel/dyn.lds.S
===================================================================
@@ -69,11 +69,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
@@ -136,8 +138,8 @@ SECTIONS
   .got            : { *(.got.plt) *(.got) }
   _edata = .;
   PROVIDE (edata = .);
-  __bss_start = .;
   .bss            : {
+   __bss_start = .;
    *(.dynbss)
    *(.bss .bss.* .gnu.linkonce.b.*)
    *(COMMON)
arch/um/kernel/uml.lds.S +6 -5
Index: linux-2.6.22/arch/um/kernel/uml.lds.S
===================================================================
@@ -37,12 +37,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"
include/asm-um/common.lds.S +79 -49

161 lines not on this page · raw message

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel