[PATCH 1/2] Allow constructor name selection by architecture.

From
Sam Ravnborg <hidden>
Date
2012-05-28 20:30:18
Also in
lkml
Reply to
Vincent Sanders, 2012-05-28
On Mon, May 28, 2012 at 07:33:37PM +0100, Vincent Sanders wrote:
quoted hunk ↗ jump to hunk
From: Vincent Sanders <redacted>

The constructor symbol name is different between platforms. Allow this
to be selected by configuration and set suitable default values.

Signed-off-by: Vincent Sanders <redacted>
---
 include/asm-generic/vmlinux.lds.h |    6 +++---
 init/Kconfig                      |    6 ++++++
 kernel/module.c                   |    2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 8aeadf6..fd34808 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -471,9 +471,9 @@
 	}
 
 #ifdef CONFIG_CONSTRUCTORS
-#define KERNEL_CTORS()	. = ALIGN(8);			   \
-			VMLINUX_SYMBOL(__ctors_start) = .; \
-			*(.ctors)			   \
+#define KERNEL_CTORS()	. = ALIGN(8);					\
+			VMLINUX_SYMBOL(__ctors_start) = .;		\
+			*(CONFIG_CONSTRUCTORS_NAME)			\
 			VMLINUX_SYMBOL(__ctors_end) = .;
What is wrong with adding both "standard" names for ctors uncnditionally?
Like this:
			*(.ctors)			   \
+			*(.init_array)			   \

	Sam
Thread (12 messages) 12 messages, 4 authors, last reply 2013-04-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help