Re: vmlinux.lds: consolidate initcall sections

Matthew Wilcox
2006-10-27T19:44:15Z

On Fri, Oct 27, 2006 at 11:41:44AM -0700, Andrew Morton wrote:
> Add a vmlinux.lds.h helper macro for defining the eight-level initcall table,
> teach all the architectures to use it.

> @@ -48,13 +48,7 @@ SECTIONS
> . = ALIGN(8);
> __initcall_start = .;
> .initcall.init : {
> - *(.initcall1.init)
> - *(.initcall2.init)
> - *(.initcall3.init)
> - *(.initcall4.init)
> - *(.initcall5.init)
> - *(.initcall6.init)
> - *(.initcall7.init)
> + INITCALLS
> }
> __initcall_end = .;

Why not make the INITCALLS macro include more:

+#define INITCALLS \
+ __initcall_start = .; \
+ .initcall.init : { \
+ *(.initcall1.init) \
+ *(.initcall2.init) \
+ *(.initcall3.init) \
+ *(.initcall4.init) \
+ *(.initcall5.init) \
+ *(.initcall6.init) \
+ *(.initcall7.init) \
+ } \
+ __initcall_end = .;

Also, you might want to check the spaces at the front of your INITCALLS
macro; I see two spaces before the first tab.