Skip to content

Commit c823182

Browse files
keessuryasaimadhu
authored andcommitted
vmlinux.lds.h: Replace RODATA with RO_DATA
There's no reason to keep the RODATA macro: replace the callers with the expected RO_DATA macro. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Borislav Petkov <bp@suse.de> 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-12-keescook@chromium.org
1 parent eaf9370 commit c823182

7 files changed

Lines changed: 7 additions & 9 deletions

File tree

‎arch/alpha/kernel/vmlinux.lds.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ SECTIONS
3434
swapper_pg_dir = SWAPPER_PGD;
3535
_etext = .; /* End of text section */
3636

37-
RODATA
37+
RO_DATA(4096)
3838
EXCEPTION_TABLE(16)
3939

4040
/* Will be freed after init */

‎arch/ia64/kernel/vmlinux.lds.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ SECTIONS {
104104
code_continues2 : {
105105
} :text
106106

107-
RODATA
107+
RO_DATA(4096)
108108

109109
.opd : AT(ADDR(.opd) - LOAD_OFFSET) {
110110
__start_opd = .;

‎arch/microblaze/kernel/vmlinux.lds.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ SECTIONS {
5151
}
5252

5353
. = ALIGN(16);
54-
RODATA
54+
RO_DATA(4096)
5555
EXCEPTION_TABLE(16)
5656

5757
/*

‎arch/mips/kernel/vmlinux.lds.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ SECTIONS
8282
}
8383

8484
_sdata = .; /* Start of data section */
85-
RODATA
85+
RO_DATA(4096)
8686

8787
/* writeable */
8888
.data : { /* Data */

‎arch/um/include/asm/common.lds.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
_sdata = .;
1010
PROVIDE (sdata = .);
1111

12-
RODATA
12+
RO_DATA(4096)
1313

1414
.unprotected : { *(.unprotected) }
1515
. = ALIGN(4096);

‎arch/xtensa/kernel/vmlinux.lds.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ SECTIONS
124124

125125
. = ALIGN(16);
126126

127-
RODATA
127+
RO_DATA(4096)
128128

129129
/* Relocation table */
130130

‎include/asm-generic/vmlinux.lds.h‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,7 @@
518518
. = ALIGN((align)); \
519519
__end_rodata = .;
520520

521-
/* RODATA & RO_DATA provided for backward compatibility.
522-
* All archs are supposed to use RO_DATA() */
523-
#define RODATA RO_DATA_SECTION(4096)
521+
/* All archs are supposed to use RO_DATA() */
524522
#define RO_DATA(align) RO_DATA_SECTION(align)
525523

526524
/*

0 commit comments

Comments
 (0)