From mboxrd@z Thu Jan 1 00:00:00 1970 From: Octavian Purdila Subject: [RFC PATCH 26/28] asm-generic: vmlinux.lds.h: allow customized rodata section name Date: Tue, 3 Nov 2015 22:20:57 +0200 Message-ID: <1446582059-17355-27-git-send-email-octavian.purdila@intel.com> References: <1446582059-17355-1-git-send-email-octavian.purdila@intel.com> Return-path: In-Reply-To: <1446582059-17355-1-git-send-email-octavian.purdila@intel.com> Sender: linux-kernel-owner@vger.kernel.org To: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org, thehajime@gmail.com, Octavian Purdila List-Id: linux-arch.vger.kernel.org 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 --- 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 -#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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com ([134.134.136.65]:34871 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965001AbbKCUXZ (ORCPT ); Tue, 3 Nov 2015 15:23:25 -0500 From: Octavian Purdila Subject: [RFC PATCH 26/28] asm-generic: vmlinux.lds.h: allow customized rodata section name Date: Tue, 3 Nov 2015 22:20:57 +0200 Message-ID: <1446582059-17355-27-git-send-email-octavian.purdila@intel.com> In-Reply-To: <1446582059-17355-1-git-send-email-octavian.purdila@intel.com> References: <1446582059-17355-1-git-send-email-octavian.purdila@intel.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org, thehajime@gmail.com, Octavian Purdila Message-ID: <20151103202057.ZBVPg5eMYKVU8qq6PPTrLK2fqGfaAFuiVkRB_DAqJXM@z> 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 --- 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 -#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