Commit 3cdac41f authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Ingo Molnar

x86: lds - Use PAGE_SIZE instead of numeric constant

It's much better to use PAGE_SIZE then magic 4096
(though it's almost synonym in most cases on x86 but
not for *all* cases ;)
Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent bbb1e57a
...@@ -38,7 +38,7 @@ SECTIONS ...@@ -38,7 +38,7 @@ SECTIONS
/* read-only */ /* read-only */
.text : AT(ADDR(.text) - LOAD_OFFSET) { .text : AT(ADDR(.text) - LOAD_OFFSET) {
. = ALIGN(4096); /* not really needed, already page aligned */ . = ALIGN(PAGE_SIZE); /* not really needed, already page aligned */
*(.text.page_aligned) *(.text.page_aligned)
TEXT_TEXT TEXT_TEXT
SCHED_TEXT SCHED_TEXT
...@@ -70,21 +70,21 @@ SECTIONS ...@@ -70,21 +70,21 @@ SECTIONS
RODATA RODATA
/* writeable */ /* writeable */
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
.data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */ .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
DATA_DATA DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} :data } :data
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
__nosave_begin = .; __nosave_begin = .;
*(.data.nosave) *(.data.nosave)
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
__nosave_end = .; __nosave_end = .;
} }
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
.data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
*(.data.page_aligned) *(.data.page_aligned)
*(.data.idt) *(.data.idt)
...@@ -108,7 +108,7 @@ SECTIONS ...@@ -108,7 +108,7 @@ SECTIONS
} }
/* might get freed after init */ /* might get freed after init */
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
.smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
__smp_locks = .; __smp_locks = .;
*(.smp_locks) *(.smp_locks)
...@@ -120,10 +120,10 @@ SECTIONS ...@@ -120,10 +120,10 @@ SECTIONS
* after boot. Always make sure that ALIGN() directive is present after * after boot. Always make sure that ALIGN() directive is present after
* the section which contains __smp_alt_end. * the section which contains __smp_alt_end.
*/ */
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
/* will be freed after init */ /* will be freed after init */
. = ALIGN(4096); /* Init code and data */ . = ALIGN(PAGE_SIZE); /* Init code and data */
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
__init_begin = .; __init_begin = .;
_sinittext = .; _sinittext = .;
...@@ -174,21 +174,21 @@ SECTIONS ...@@ -174,21 +174,21 @@ SECTIONS
EXIT_DATA EXIT_DATA
} }
#if defined(CONFIG_BLK_DEV_INITRD) #if defined(CONFIG_BLK_DEV_INITRD)
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
.init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
__initramfs_start = .; __initramfs_start = .;
*(.init.ramfs) *(.init.ramfs)
__initramfs_end = .; __initramfs_end = .;
} }
#endif #endif
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
.data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
__per_cpu_start = .; __per_cpu_start = .;
*(.data.percpu) *(.data.percpu)
*(.data.percpu.shared_aligned) *(.data.percpu.shared_aligned)
__per_cpu_end = .; __per_cpu_end = .;
} }
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
/* freed after init ends here */ /* freed after init ends here */
.bss : AT(ADDR(.bss) - LOAD_OFFSET) { .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
...@@ -200,7 +200,7 @@ SECTIONS ...@@ -200,7 +200,7 @@ SECTIONS
__bss_stop = .; __bss_stop = .;
_end = . ; _end = . ;
/* This is where the kernel creates the early boot page tables */ /* This is where the kernel creates the early boot page tables */
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
pg0 = . ; pg0 = . ;
} }
......
...@@ -119,7 +119,7 @@ SECTIONS ...@@ -119,7 +119,7 @@ SECTIONS
.vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3))
{ *(.vsyscall_3) } { *(.vsyscall_3) }
. = VSYSCALL_VIRT_ADDR + 4096; . = VSYSCALL_VIRT_ADDR + PAGE_SIZE;
#undef VSYSCALL_ADDR #undef VSYSCALL_ADDR
#undef VSYSCALL_PHYS_ADDR #undef VSYSCALL_PHYS_ADDR
...@@ -134,23 +134,23 @@ SECTIONS ...@@ -134,23 +134,23 @@ SECTIONS
*(.data.init_task) *(.data.init_task)
}:data.init }:data.init
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
.data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
*(.data.page_aligned) *(.data.page_aligned)
} }
/* might get freed after init */ /* might get freed after init */
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
__smp_alt_begin = .; __smp_alt_begin = .;
__smp_locks = .; __smp_locks = .;
.smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
*(.smp_locks) *(.smp_locks)
} }
__smp_locks_end = .; __smp_locks_end = .;
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
__smp_alt_end = .; __smp_alt_end = .;
. = ALIGN(4096); /* Init code and data */ . = ALIGN(PAGE_SIZE); /* Init code and data */
__init_begin = .; __init_begin = .;
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
_sinittext = .; _sinittext = .;
...@@ -207,25 +207,25 @@ SECTIONS ...@@ -207,25 +207,25 @@ SECTIONS
/* vdso blob that is mapped into user space */ /* vdso blob that is mapped into user space */
vdso_start = . ; vdso_start = . ;
.vdso : AT(ADDR(.vdso) - LOAD_OFFSET) { *(.vdso) } .vdso : AT(ADDR(.vdso) - LOAD_OFFSET) { *(.vdso) }
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
vdso_end = .; vdso_end = .;
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
__initramfs_start = .; __initramfs_start = .;
.init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) }
__initramfs_end = .; __initramfs_end = .;
#endif #endif
PERCPU(4096) PERCPU(PAGE_SIZE)
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
__init_end = .; __init_end = .;
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
__nosave_begin = .; __nosave_begin = .;
.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { *(.data.nosave) } .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { *(.data.nosave) }
. = ALIGN(4096); . = ALIGN(PAGE_SIZE);
__nosave_end = .; __nosave_end = .;
__bss_start = .; /* BSS */ __bss_start = .; /* BSS */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment