kdb doesn't compile with KDB modules with gcc 3.4.1 toolchain

Steven Dake sdake at mvista.com
Mon Jun 6 14:38:11 PDT 2005


I couldn't get kdb to compile with KDB modules set to * (but m works). 
I traced it to the linker script not properly setting up the init call
table.  The patch is:


Index: linux-2.6.10/arch/i386/kernel/vmlinux.lds.S
===================================================================
--- linux-2.6.10.orig/arch/i386/kernel/vmlinux.lds.S
+++ linux-2.6.10/arch/i386/kernel/vmlinux.lds.S
@@ -91,7 +91,9 @@
   }
   __con_initcall_end = .;
   __kdb_initcall_start = .;
-  .kdb_initcall.init : { *(.kdb_initcall.init) }
+  .kdb_initcall.init : AT(ADDR(.kdb_initcall.init) - LOAD_OFFSET) {
+       *(.kdb_initcall.init)
+  }
   __kdb_initcall_end = .;

   SECURITY_INIT


Source: MontaVista Software, Inc.
Signed-off-by: Steven Dake <sdake at mvista.com>
Description:
The KDB init call section is not properly setup in the linker script. 
This patch sets up the init call linker start location so that the
object tools can build the kernel with KDB modules turned on.


---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.


More information about the kdb mailing list