mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[PATCH] x86/x86_64: mark rodata section read only: generic infrastructure
Generic prep-work for marking the .rodata section readonly: * Align the rodata section at 4Kb boundary * call the mark_rodata_ro() function when available Signed-off-by: Arjan van de Ven <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Adrian Bunk <[email protected]> Cc: Andi Kleen <[email protected]> Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d89c145c03
commit
37b73c8281
2 changed files with 9 additions and 0 deletions
|
|
@ -10,6 +10,8 @@
|
|||
#define ALIGN_FUNCTION() . = ALIGN(8)
|
||||
|
||||
#define RODATA \
|
||||
. = ALIGN(4096); \
|
||||
__start_rodata = .; \
|
||||
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
|
||||
*(.rodata) *(.rodata.*) \
|
||||
*(__vermagic) /* Kernel version magic */ \
|
||||
|
|
@ -74,6 +76,8 @@
|
|||
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
|
||||
*(__ksymtab_strings) \
|
||||
} \
|
||||
__end_rodata = .; \
|
||||
. = ALIGN(4096); \
|
||||
\
|
||||
/* Built-in module parameters. */ \
|
||||
__param : AT(ADDR(__param) - LOAD_OFFSET) { \
|
||||
|
|
|
|||
Loading…
Reference in a new issue