lkml.org 
[lkml]   [2015]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 26/28] asm-generic: vmlinux.lds.h: allow customized rodata section name
Date
Some architectures needs customized rodata section names (e.g. lkl for
Windows host). Allow them to set the rodata section name.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
---
arch/lkl/include/asm/vmlinux.lds.h | 5 -----
include/asm-generic/vmlinux.lds.h | 9 +++++++--
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/lkl/include/asm/vmlinux.lds.h b/arch/lkl/include/asm/vmlinux.lds.h
index 392c94a..7c1a640 100644
--- a/arch/lkl/include/asm/vmlinux.lds.h
+++ b/arch/lkl/include/asm/vmlinux.lds.h
@@ -2,14 +2,9 @@
#define _LKL_VMLINUX_LDS_H

#ifdef __MINGW32__
-#define VMLINUX_SYMBOL(sym) _##sym
#define RODATA_SECTION .rdata
#endif

#include <asm-generic/vmlinux.lds.h>

-#ifndef RODATA_SECTION
-#define RODATA_SECTION .rodata
-#endif
-
#endif
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 1781e54..8bd8b90 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -241,11 +241,16 @@
/*
* Read only Data
*/
+
+#ifndef RODATA_SECTION
+#define RODATA_SECTION .rodata
+#endif
+
#define RO_DATA_SECTION(align) \
. = ALIGN((align)); \
- .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
+ RODATA_SECTION : AT(ADDR(RODATA_SECTION) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start_rodata) = .; \
- *(.rodata) *(.rodata.*) \
+ *(RODATA_SECTION) *(RODATA_SECTION.*) \
*(__vermagic) /* Kernel version magic */ \
. = ALIGN(8); \
VMLINUX_SYMBOL(__start___tracepoints_ptrs) = .; \
--
2.1.0


\
 
 \ /
  Last update: 2015-11-03 21:41    [W:0.382 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site