Skip to content

Commit

Permalink
vmlinux.lds.h: Replace RO_DATA_SECTION with RO_DATA
Browse files Browse the repository at this point in the history
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: Kees Cook <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Acked-by: Heiko Carstens <[email protected]> # s390
Acked-by: Geert Uytterhoeven <[email protected]> # m68k
Cc: Andy Lutomirski <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Michael Ellerman <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Rick Edgecombe <[email protected]>
Cc: Segher Boessenkool <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: x86-ml <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
kees authored and suryasaimadhu committed Nov 4, 2019
1 parent c823182 commit 93240b3
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion arch/arc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ SECTIONS
_etext = .;

_sdata = .;
RO_DATA_SECTION(PAGE_SIZE)
RO_DATA(PAGE_SIZE)

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

EXCEPTION_TABLE(16)

RO_DATA_SECTION(PAGE_SIZE)
RO_DATA(PAGE_SIZE)
.const :
{
*(.const .const.* .gnu.linkonce.r.*)
Expand Down
2 changes: 1 addition & 1 deletion arch/csky/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ SECTIONS


_sdata = .;
RO_DATA_SECTION(PAGE_SIZE)
RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .;

Expand Down
2 changes: 1 addition & 1 deletion arch/h8300/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ SECTIONS
_etext = . ;
}
EXCEPTION_TABLE(16)
RO_DATA_SECTION(4)
RO_DATA(4)
ROMEND = .;
#if defined(CONFIG_ROMKERNEL)
. = RAMTOP;
Expand Down
2 changes: 1 addition & 1 deletion arch/hexagon/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SECTIONS

_sdata = .;
RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE)
RO_DATA_SECTION(PAGE_SIZE)
RO_DATA(PAGE_SIZE)
_edata = .;

EXCEPTION_TABLE(16)
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/kernel/vmlinux-nommu.lds
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ SECTIONS {
#endif

_sdata = .;
RO_DATA_SECTION(PAGE_SIZE)
RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
_edata = .;

Expand Down
2 changes: 1 addition & 1 deletion arch/nds32/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ SECTIONS
_etext = .; /* End of text and rodata section */

_sdata = .;
RO_DATA_SECTION(PAGE_SIZE)
RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .;

Expand Down
2 changes: 1 addition & 1 deletion arch/nios2/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ SECTIONS
__init_end = .;

_sdata = .;
RO_DATA_SECTION(PAGE_SIZE)
RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .;

Expand Down
4 changes: 2 additions & 2 deletions arch/openrisc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ SECTIONS

_sdata = .;

/* Page alignment required for RO_DATA_SECTION */
RO_DATA_SECTION(PAGE_SIZE)
/* Page alignment required for RO_DATA */
RO_DATA(PAGE_SIZE)
_e_kernel_ro = .;

/* Whatever comes after _e_kernel_ro had better be page-aligend, too */
Expand Down
4 changes: 2 additions & 2 deletions arch/parisc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ SECTIONS
_sdata = .;

/* 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. */
#ifdef CONFIG_64BIT
. = ALIGN(16);
Expand All @@ -127,7 +127,7 @@ SECTIONS
}
#endif

RO_DATA_SECTION(8)
RO_DATA(8)

/* RO because of BUILDTIME_EXTABLE_SORT */
EXCEPTION_TABLE(8)
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ SECTIONS

/* Start of data section */
_sdata = .;
RO_DATA_SECTION(L1_CACHE_BYTES)
RO_DATA(L1_CACHE_BYTES)
.srodata : {
*(.srodata*)
}
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ SECTIONS
_etext = .; /* End of text section */
} :text = 0x0700

RO_DATA_SECTION(PAGE_SIZE)
RO_DATA(PAGE_SIZE)

. = ALIGN(PAGE_SIZE);
_sdata = .; /* Start of data section */
Expand Down
2 changes: 1 addition & 1 deletion arch/unicore32/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SECTIONS
_etext = .;

_sdata = .;
RO_DATA_SECTION(PAGE_SIZE)
RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .;

Expand Down
7 changes: 2 additions & 5 deletions include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* _etext = .;
*
* _sdata = .;
* RO_DATA_SECTION(PAGE_SIZE)
* RO_DATA(PAGE_SIZE)
* RW_DATA_SECTION(...)
* _edata = .;
*
Expand Down Expand Up @@ -363,7 +363,7 @@
/*
* Read only Data
*/
#define RO_DATA_SECTION(align) \
#define RO_DATA(align) \
. = ALIGN((align)); \
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
__start_rodata = .; \
Expand Down Expand Up @@ -518,9 +518,6 @@
. = ALIGN((align)); \
__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
* during second ld run in second ld pass when generating System.map
Expand Down

0 comments on commit 93240b3

Please sign in to comment.