summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2003-01-14 23:48:47 -0600
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2003-01-14 23:48:47 -0600
commitd6699e96022a8d645374e82e597bb532b0cce564 (patch)
tree001cbc318dae5fd81eb8ea79b96b517d2729bad7 /include
parentbb9fc49ff383d14d025eb8bbc049921bef110a75 (diff)
Consolidate read-only sections in arch/*/vmlinux.lds.S
It's annoying having to touch 20+ arch vmlinux.lds.S file for every new section introduced, just because they all duplicate the same statements. Since we preprocess vmlinux.lds.S anyway, let's #include <asm-generic/vmlinux.lds.h> and share the common statements. This is a first step in consolidating most of the read-only sections.
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/vmlinux.lds.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
new file mode 100644
index 000000000000..8f1f4974f1f4
--- /dev/null
+++ b/include/asm-generic/vmlinux.lds.h
@@ -0,0 +1,24 @@
+#define RODATA \
+ .rodata : { *(.rodata) *(.rodata.*) *(.rodata1) } \
+ .rodata1 : { *(.rodata1) } \
+ \
+ .kstrtab : { *(.kstrtab) } \
+ \
+ /* Kernel version magic */ \
+ __vermagic : { *(__vermagic) } \
+ \
+ /* Kernel symbol table */ \
+ . = ALIGN(64); \
+ __start___ksymtab = .; \
+ __ksymtab : { *(__ksymtab) } \
+ __stop___ksymtab = .; \
+ \
+ /* Kernel symbol table: GPL-only symbols */ \
+ __start___gpl_ksymtab = .; \
+ __gpl_ksymtab : { *(__gpl_ksymtab) } \
+ __stop___gpl_ksymtab = .; \
+ \
+ /* All kernel symbols */ \
+ __start___kallsyms = .; \
+ __kallsyms : { *(__kallsyms) } \
+ __stop___kallsyms = .; \