Skip to content

Commit

Permalink
vmlinux.lds.h: Replace RODATA with RO_DATA
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Kees Cook authored and Borislav Petkov committed Nov 4, 2019
1 parent eaf9370 commit c823182
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion arch/alpha/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SECTIONS
swapper_pg_dir = SWAPPER_PGD;
_etext = .; /* End of text section */

RODATA
RO_DATA(4096)
EXCEPTION_TABLE(16)

/* Will be freed after init */
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ SECTIONS {
code_continues2 : {
} :text

RODATA
RO_DATA(4096)

.opd : AT(ADDR(.opd) - LOAD_OFFSET) {
__start_opd = .;
Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SECTIONS {
}

. = ALIGN(16);
RODATA
RO_DATA(4096)
EXCEPTION_TABLE(16)

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ SECTIONS
}

_sdata = .; /* Start of data section */
RODATA
RO_DATA(4096)

/* writeable */
.data : { /* Data */
Expand Down
2 changes: 1 addition & 1 deletion arch/um/include/asm/common.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
_sdata = .;
PROVIDE (sdata = .);

RODATA
RO_DATA(4096)

.unprotected : { *(.unprotected) }
. = ALIGN(4096);
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ SECTIONS

. = ALIGN(16);

RODATA
RO_DATA(4096)

/* Relocation table */

Expand Down
4 changes: 1 addition & 3 deletions include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,7 @@
. = ALIGN((align)); \
__end_rodata = .;

/* RODATA & RO_DATA provided for backward compatibility.
* All archs are supposed to use RO_DATA() */
#define RODATA RO_DATA_SECTION(4096)
/* All archs are supposed to use RO_DATA() */
#define RO_DATA(align) RO_DATA_SECTION(align)

/*
Expand Down

0 comments on commit c823182

Please sign in to comment.