Commit 93240b32 authored by Kees Cook's avatar Kees Cook Committed by Borislav Petkov

vmlinux.lds.h: Replace RO_DATA_SECTION with RO_DATA

Finish renaming RO_DATA_SECTION to RO_DATA. (Calling this a "section"
is a lie, since it's multiple sections and section flags cannot be
applied to the macro.)
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # s390
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-alpha@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-c6x-dev@linux-c6x.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Will Deacon <will@kernel.org>
Cc: x86-ml <x86@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: https://lkml.kernel.org/r/20191029211351.13243-13-keescook@chromium.org
parent c8231825
...@@ -95,7 +95,7 @@ SECTIONS ...@@ -95,7 +95,7 @@ SECTIONS
_etext = .; _etext = .;
_sdata = .; _sdata = .;
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
/* /*
* 1. this is .data essentially * 1. this is .data essentially
......
...@@ -82,7 +82,7 @@ SECTIONS ...@@ -82,7 +82,7 @@ SECTIONS
EXCEPTION_TABLE(16) EXCEPTION_TABLE(16)
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
.const : .const :
{ {
*(.const .const.* .gnu.linkonce.r.*) *(.const .const.* .gnu.linkonce.r.*)
......
...@@ -49,7 +49,7 @@ SECTIONS ...@@ -49,7 +49,7 @@ SECTIONS
_sdata = .; _sdata = .;
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .; _edata = .;
......
...@@ -38,7 +38,7 @@ SECTIONS ...@@ -38,7 +38,7 @@ SECTIONS
_etext = . ; _etext = . ;
} }
EXCEPTION_TABLE(16) EXCEPTION_TABLE(16)
RO_DATA_SECTION(4) RO_DATA(4)
ROMEND = .; ROMEND = .;
#if defined(CONFIG_ROMKERNEL) #if defined(CONFIG_ROMKERNEL)
. = RAMTOP; . = RAMTOP;
......
...@@ -50,7 +50,7 @@ SECTIONS ...@@ -50,7 +50,7 @@ SECTIONS
_sdata = .; _sdata = .;
RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE) RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE)
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
_edata = .; _edata = .;
EXCEPTION_TABLE(16) EXCEPTION_TABLE(16)
......
...@@ -60,7 +60,7 @@ SECTIONS { ...@@ -60,7 +60,7 @@ SECTIONS {
#endif #endif
_sdata = .; _sdata = .;
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
_edata = .; _edata = .;
......
...@@ -53,7 +53,7 @@ SECTIONS ...@@ -53,7 +53,7 @@ SECTIONS
_etext = .; /* End of text and rodata section */ _etext = .; /* End of text and rodata section */
_sdata = .; _sdata = .;
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .; _edata = .;
......
...@@ -49,7 +49,7 @@ SECTIONS ...@@ -49,7 +49,7 @@ SECTIONS
__init_end = .; __init_end = .;
_sdata = .; _sdata = .;
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .; _edata = .;
......
...@@ -67,8 +67,8 @@ SECTIONS ...@@ -67,8 +67,8 @@ SECTIONS
_sdata = .; _sdata = .;
/* Page alignment required for RO_DATA_SECTION */ /* Page alignment required for RO_DATA */
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
_e_kernel_ro = .; _e_kernel_ro = .;
/* Whatever comes after _e_kernel_ro had better be page-aligend, too */ /* Whatever comes after _e_kernel_ro had better be page-aligend, too */
......
...@@ -109,7 +109,7 @@ SECTIONS ...@@ -109,7 +109,7 @@ SECTIONS
_sdata = .; _sdata = .;
/* Architecturally we need to keep __gp below 0x1000000 and thus /* Architecturally we need to keep __gp below 0x1000000 and thus
* in front of RO_DATA_SECTION() which stores lots of tracepoint * in front of RO_DATA() which stores lots of tracepoint
* and ftrace symbols. */ * and ftrace symbols. */
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
. = ALIGN(16); . = ALIGN(16);
...@@ -127,7 +127,7 @@ SECTIONS ...@@ -127,7 +127,7 @@ SECTIONS
} }
#endif #endif
RO_DATA_SECTION(8) RO_DATA(8)
/* RO because of BUILDTIME_EXTABLE_SORT */ /* RO because of BUILDTIME_EXTABLE_SORT */
EXCEPTION_TABLE(8) EXCEPTION_TABLE(8)
......
...@@ -52,7 +52,7 @@ SECTIONS ...@@ -52,7 +52,7 @@ SECTIONS
/* Start of data section */ /* Start of data section */
_sdata = .; _sdata = .;
RO_DATA_SECTION(L1_CACHE_BYTES) RO_DATA(L1_CACHE_BYTES)
.srodata : { .srodata : {
*(.srodata*) *(.srodata*)
} }
......
...@@ -52,7 +52,7 @@ SECTIONS ...@@ -52,7 +52,7 @@ SECTIONS
_etext = .; /* End of text section */ _etext = .; /* End of text section */
} :text = 0x0700 } :text = 0x0700
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
_sdata = .; /* Start of data section */ _sdata = .; /* Start of data section */
......
...@@ -43,7 +43,7 @@ SECTIONS ...@@ -43,7 +43,7 @@ SECTIONS
_etext = .; _etext = .;
_sdata = .; _sdata = .;
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .; _edata = .;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* _etext = .; * _etext = .;
* *
* _sdata = .; * _sdata = .;
* RO_DATA_SECTION(PAGE_SIZE) * RO_DATA(PAGE_SIZE)
* RW_DATA_SECTION(...) * RW_DATA_SECTION(...)
* _edata = .; * _edata = .;
* *
...@@ -363,7 +363,7 @@ ...@@ -363,7 +363,7 @@
/* /*
* Read only Data * Read only Data
*/ */
#define RO_DATA_SECTION(align) \ #define RO_DATA(align) \
. = ALIGN((align)); \ . = ALIGN((align)); \
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
__start_rodata = .; \ __start_rodata = .; \
...@@ -518,9 +518,6 @@ ...@@ -518,9 +518,6 @@
. = ALIGN((align)); \ . = ALIGN((align)); \
__end_rodata = .; __end_rodata = .;
/* All archs are supposed to use RO_DATA() */
#define RO_DATA(align) RO_DATA_SECTION(align)
/* /*
* .text section. Map to function alignment to avoid address changes * .text section. Map to function alignment to avoid address changes
* during second ld run in second ld pass when generating System.map * during second ld run in second ld pass when generating System.map
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment