RE: [Linux-ia64] [Patch] trivial fix in linker script

From: Siddha, Suresh B <suresh.b.siddha_at_intel.com>
Date: 2003-01-25 07:05:35
hi David,

I agree. Attached a bigger patch now :)

thanks,
suresh

--- linux-2.5.52/arch/ia64/vmlinux.lds.S~	Fri Jan 17 17:58:44 2003
+++ linux-2.5.52/arch/ia64/vmlinux.lds.S	Fri Jan 24 11:08:06 2003
@@ -45,25 +45,29 @@
   _data = .;
 
   /* Exception table */
-  . = ALIGN(16);
-  __start___ex_table = .;
   __ex_table : AT(ADDR(__ex_table) - PAGE_OFFSET)
-	{ *(__ex_table) }
-  __stop___ex_table = .;
+	{ 
+	   __start___ex_table = .;
+	   *(__ex_table) 
+	   __stop___ex_table = .;
+	}
 
 #if defined(CONFIG_IA64_GENERIC)
   /* Machine Vector */
-  . = ALIGN(16);
-  machvec_start = .;
   .machvec : AT(ADDR(.machvec) - PAGE_OFFSET)
-	{ *(.machvec) }
-  machvec_end = .;
+	{ 
+  	   machvec_start = .;
+	   *(.machvec)
+	   machvec_end = .;
+	}
 #endif
 
-  __start___ksymtab = .;	/* Kernel symbol table */
   __ksymtab : AT(ADDR(__ksymtab) - PAGE_OFFSET)
-	{ *(__ksymtab) }
-  __stop___ksymtab = .;
+	{ 
+  	   __start___ksymtab = .;	/* Kernel symbol table */
+	   *(__ksymtab) 
+  	   __stop___ksymtab = .;
+	}
 
   __kallsyms : AT(ADDR(__kallsyms) - PAGE_OFFSET)
 	{
@@ -73,13 +77,14 @@
 	}
 
   /* Unwind info & table: */
-  . = ALIGN(8);
   .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - PAGE_OFFSET)
 	{ *(.IA_64.unwind_info*) }
-  ia64_unw_start = .;
   .IA_64.unwind : AT(ADDR(.IA_64.unwind) - PAGE_OFFSET)
-	{ *(.IA_64.unwind*) }
-  ia64_unw_end = .;
+	{ 
+	   ia64_unw_start = .;
+	   *(.IA_64.unwind*)
+	   ia64_unw_end = .;
+	}
 
   .rodata : AT(ADDR(.rodata) - PAGE_OFFSET)
 	{ *(.rodata) *(.rodata.*) }
@@ -98,23 +103,28 @@
   .init.data : AT(ADDR(.init.data) - PAGE_OFFSET)
 	{ *(.init.data) }
 
-  __initramfs_start = .;
   .init.ramfs : AT(ADDR(.init.ramfs) - PAGE_OFFSET)
-	{ *(.init.ramfs) }
-  __initramfs_end = .;
+	{ 
+  	   __initramfs_start = .;
+	   *(.init.ramfs)
+	   __initramfs_end = .;
+	}
 
-   . = ALIGN(16);
-  __setup_start = .;
   .init.setup : AT(ADDR(.init.setup) - PAGE_OFFSET)
-        { *(.init.setup) }
-  __setup_end = .;
-  __start___param = .;
+	{ 
+	   __setup_start = .;
+	   *(.init.setup)
+	   __setup_end = .;
+	}
   __param : AT(ADDR(__param) - PAGE_OFFSET)
-        { *(__param) }
-  __stop___param = .;
-  __initcall_start = .;
+	{ 
+	   __start___param = .;
+	   *(__param)
+	   __stop___param = .;
+	}
   .initcall.init : AT(ADDR(.initcall.init) - PAGE_OFFSET)
 	{
+		__initcall_start = .;
 		*(.initcall1.init)
 		*(.initcall2.init)
 		*(.initcall3.init)
@@ -122,8 +132,8 @@
 		*(.initcall5.init)
 		*(.initcall6.init)
 		*(.initcall7.init)
+		__initcall_end = .;
 	}
-  __initcall_end = .;
   . = ALIGN(PAGE_SIZE);
   __init_end = .;
 
@@ -138,7 +148,6 @@
 	  __stop_gate_section = .;
 	}
 
-  . = ALIGN(SMP_CACHE_BYTES);
   .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - PAGE_OFFSET)
         { *(.data.cacheline_aligned) }
 

> -----Original Message-----
> From: David Mosberger [mailto:davidm@napali.hpl.hp.com]
> Sent: Friday, January 24, 2003 10:30 AM
> To: Siddha, Suresh B
> Cc: davidm@hpl.hp.com; linux-ia64@linuxia64.org
> Subject: Re: [Linux-ia64] [Patch] trivial fix in linker script
> 
> 
> >>>>> On Mon, 20 Jan 2003 19:16:09 -0800, "Siddha, Suresh B" 
> <suresh.b.siddha@intel.com> said:
> 
>   Suresh> There is a chance that __start___ksymtab may not point at
>   Suresh> the beginning of section __ksymtab. Appended/attached one
>   Suresh> line patch fixes this problem.
> 
> It seems to me that a better solution would be to move
> __start___ksymtab inside the __ksymtab section.  That should make it
> always work, independent of what the real alignment of that section
> is.
> 
> 	--david
> 



Received on Fri Jan 24 12:05:49 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:11 EST