aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86_64/kernel/e820.c3
-rw-r--r--arch/x86_64/kernel/head64.c6
-rw-r--r--arch/x86_64/kernel/setup.c2
-rw-r--r--arch/x86_64/kernel/vmlinux.lds.S2
-rw-r--r--arch/x86_64/mm/init.c10
-rw-r--r--include/asm-generic/sections.h1
6 files changed, 8 insertions, 16 deletions
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index ab3f87aaff70..17579a1a174b 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -23,8 +23,7 @@
23#include <asm/e820.h> 23#include <asm/e820.h>
24#include <asm/proto.h> 24#include <asm/proto.h>
25#include <asm/bootsetup.h> 25#include <asm/bootsetup.h>
26 26#include <asm/sections.h>
27extern char _end[];
28 27
29/* 28/*
30 * PFN of last memory page. 29 * PFN of last memory page.
diff --git a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c
index e0f12d49db4c..b675c5add01e 100644
--- a/arch/x86_64/kernel/head64.c
+++ b/arch/x86_64/kernel/head64.c
@@ -20,14 +20,14 @@
20#include <asm/setup.h> 20#include <asm/setup.h>
21#include <asm/desc.h> 21#include <asm/desc.h>
22#include <asm/pgtable.h> 22#include <asm/pgtable.h>
23#include <asm/sections.h>
23 24
24/* Don't add a printk in there. printk relies on the PDA which is not initialized 25/* Don't add a printk in there. printk relies on the PDA which is not initialized
25 yet. */ 26 yet. */
26static void __init clear_bss(void) 27static void __init clear_bss(void)
27{ 28{
28 extern char __bss_start[], __bss_end[];
29 memset(__bss_start, 0, 29 memset(__bss_start, 0,
30 (unsigned long) __bss_end - (unsigned long) __bss_start); 30 (unsigned long) __bss_stop - (unsigned long) __bss_start);
31} 31}
32 32
33#define NEW_CL_POINTER 0x228 /* Relative to real mode data */ 33#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
@@ -76,8 +76,6 @@ static void __init setup_boot_cpu_data(void)
76 boot_cpu_data.x86_mask = eax & 0xf; 76 boot_cpu_data.x86_mask = eax & 0xf;
77} 77}
78 78
79extern char _end[];
80
81void __init x86_64_start_kernel(char * real_mode_data) 79void __init x86_64_start_kernel(char * real_mode_data)
82{ 80{
83 char *s; 81 char *s;
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index f76f3743f5d7..2ad3556dda52 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -60,6 +60,7 @@
60#include <asm/setup.h> 60#include <asm/setup.h>
61#include <asm/mach_apic.h> 61#include <asm/mach_apic.h>
62#include <asm/numa.h> 62#include <asm/numa.h>
63#include <asm/sections.h>
63 64
64/* 65/*
65 * Machine setup.. 66 * Machine setup..
@@ -103,7 +104,6 @@ struct edid_info edid_info;
103struct e820map e820; 104struct e820map e820;
104 105
105extern int root_mountflags; 106extern int root_mountflags;
106extern char _text, _etext, _edata, _end;
107 107
108char command_line[COMMAND_LINE_SIZE]; 108char command_line[COMMAND_LINE_SIZE];
109 109
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S
index 6dd642cad2ef..58b19215b4b3 100644
--- a/arch/x86_64/kernel/vmlinux.lds.S
+++ b/arch/x86_64/kernel/vmlinux.lds.S
@@ -50,7 +50,7 @@ SECTIONS
50 *(.bss.page_aligned) 50 *(.bss.page_aligned)
51 *(.bss) 51 *(.bss)
52 } 52 }
53 __bss_end = .; 53 __bss_stop = .;
54 54
55 . = ALIGN(PAGE_SIZE); 55 . = ALIGN(PAGE_SIZE);
56 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 56 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index be483a1d7b54..489e18df1fe9 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -36,6 +36,7 @@
36#include <asm/mmu_context.h> 36#include <asm/mmu_context.h>
37#include <asm/proto.h> 37#include <asm/proto.h>
38#include <asm/smp.h> 38#include <asm/smp.h>
39#include <asm/sections.h>
39 40
40#ifndef Dprintk 41#ifndef Dprintk
41#define Dprintk(x...) 42#define Dprintk(x...)
@@ -45,8 +46,6 @@
45extern int swiotlb; 46extern int swiotlb;
46#endif 47#endif
47 48
48extern char _stext[];
49
50static unsigned long dma_reserve __initdata; 49static unsigned long dma_reserve __initdata;
51 50
52DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 51DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
@@ -88,9 +87,6 @@ void show_mem(void)
88 87
89/* References to section boundaries */ 88/* References to section boundaries */
90 89
91extern char _text, _etext, _edata, __bss_start, _end[];
92extern char __init_begin, __init_end;
93
94int after_bootmem; 90int after_bootmem;
95 91
96static void *spp_getpage(void) 92static void *spp_getpage(void)
@@ -491,8 +487,6 @@ void __init mem_init(void)
491#endif 487#endif
492} 488}
493 489
494extern char __initdata_begin[], __initdata_end[];
495
496void free_initmem(void) 490void free_initmem(void)
497{ 491{
498 unsigned long addr; 492 unsigned long addr;
@@ -506,7 +500,7 @@ void free_initmem(void)
506 totalram_pages++; 500 totalram_pages++;
507 } 501 }
508 memset(__initdata_begin, 0xba, __initdata_end - __initdata_begin); 502 memset(__initdata_begin, 0xba, __initdata_end - __initdata_begin);
509 printk ("Freeing unused kernel memory: %luk freed\n", (&__init_end - &__init_begin) >> 10); 503 printk ("Freeing unused kernel memory: %luk freed\n", (__init_end - __init_begin) >> 10);
510} 504}
511 505
512#ifdef CONFIG_BLK_DEV_INITRD 506#ifdef CONFIG_BLK_DEV_INITRD
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index 886dbd116899..0b49f9e070f1 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -13,5 +13,6 @@ extern char _eextratext[] __attribute__((weak));
13extern char _end[]; 13extern char _end[];
14extern char __per_cpu_start[], __per_cpu_end[]; 14extern char __per_cpu_start[], __per_cpu_end[];
15extern char __kprobes_text_start[], __kprobes_text_end[]; 15extern char __kprobes_text_start[], __kprobes_text_end[];
16extern char __initdata_begin[], __initdata_end[];
16 17
17#endif /* _ASM_GENERIC_SECTIONS_H_ */ 18#endif /* _ASM_GENERIC_SECTIONS_H_ */