mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
[ARM] 5565/2: Use PAGE_SIZE and RO_DATA() in link script
Update the link script for ARM to use PAGE_SIZE instead of hard- coded 4096. Also the old RODATA macro is deprecated for the RO_DATA(PAGE_SIZE) macro. As a consequence the PAGE_SIZE was changed from (1UL << PAGE_SHIFT) to (_AC(1,UL) << PAGE_SHIFT) because the linker does not understand the "UL" suffix to numeric constants. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
7aa5514e71
commit
f6430a938d
2 changed files with 9 additions and 8 deletions
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
/* PAGE_SHIFT determines the page size */
|
/* PAGE_SHIFT determines the page size */
|
||||||
#define PAGE_SHIFT 12
|
#define PAGE_SHIFT 12
|
||||||
#define PAGE_SIZE (1UL << PAGE_SHIFT)
|
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
|
||||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <asm-generic/vmlinux.lds.h>
|
#include <asm-generic/vmlinux.lds.h>
|
||||||
#include <asm/thread_info.h>
|
#include <asm/thread_info.h>
|
||||||
#include <asm/memory.h>
|
#include <asm/memory.h>
|
||||||
|
#include <asm/page.h>
|
||||||
|
|
||||||
OUTPUT_ARCH(arm)
|
OUTPUT_ARCH(arm)
|
||||||
ENTRY(stext)
|
ENTRY(stext)
|
||||||
|
@ -63,7 +64,7 @@ SECTIONS
|
||||||
usr/built-in.o(.init.ramfs)
|
usr/built-in.o(.init.ramfs)
|
||||||
__initramfs_end = .;
|
__initramfs_end = .;
|
||||||
#endif
|
#endif
|
||||||
. = ALIGN(4096);
|
. = ALIGN(PAGE_SIZE);
|
||||||
__per_cpu_load = .;
|
__per_cpu_load = .;
|
||||||
__per_cpu_start = .;
|
__per_cpu_start = .;
|
||||||
*(.data.percpu.page_aligned)
|
*(.data.percpu.page_aligned)
|
||||||
|
@ -73,7 +74,7 @@ SECTIONS
|
||||||
#ifndef CONFIG_XIP_KERNEL
|
#ifndef CONFIG_XIP_KERNEL
|
||||||
__init_begin = _stext;
|
__init_begin = _stext;
|
||||||
INIT_DATA
|
INIT_DATA
|
||||||
. = ALIGN(4096);
|
. = ALIGN(PAGE_SIZE);
|
||||||
__init_end = .;
|
__init_end = .;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -118,7 +119,7 @@ SECTIONS
|
||||||
*(.got) /* Global offset table */
|
*(.got) /* Global offset table */
|
||||||
}
|
}
|
||||||
|
|
||||||
RODATA
|
RO_DATA(PAGE_SIZE)
|
||||||
|
|
||||||
_etext = .; /* End of text and rodata section */
|
_etext = .; /* End of text and rodata section */
|
||||||
|
|
||||||
|
@ -158,17 +159,17 @@ SECTIONS
|
||||||
*(.data.init_task)
|
*(.data.init_task)
|
||||||
|
|
||||||
#ifdef CONFIG_XIP_KERNEL
|
#ifdef CONFIG_XIP_KERNEL
|
||||||
. = ALIGN(4096);
|
. = ALIGN(PAGE_SIZE);
|
||||||
__init_begin = .;
|
__init_begin = .;
|
||||||
INIT_DATA
|
INIT_DATA
|
||||||
. = ALIGN(4096);
|
. = ALIGN(PAGE_SIZE);
|
||||||
__init_end = .;
|
__init_end = .;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
. = ALIGN(4096);
|
. = ALIGN(PAGE_SIZE);
|
||||||
__nosave_begin = .;
|
__nosave_begin = .;
|
||||||
*(.data.nosave)
|
*(.data.nosave)
|
||||||
. = ALIGN(4096);
|
. = ALIGN(PAGE_SIZE);
|
||||||
__nosave_end = .;
|
__nosave_end = .;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue