diff options
-rw-r--r-- | arch/x86_64/kernel/e820.c | 3 | ||||
-rw-r--r-- | arch/x86_64/kernel/head64.c | 6 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/vmlinux.lds.S | 2 | ||||
-rw-r--r-- | arch/x86_64/mm/init.c | 10 | ||||
-rw-r--r-- | include/asm-generic/sections.h | 1 |
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> | |
27 | extern 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. */ |
26 | static void __init clear_bss(void) | 27 | static 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 | ||
79 | extern char _end[]; | ||
80 | |||
81 | void __init x86_64_start_kernel(char * real_mode_data) | 79 | void __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; | |||
103 | struct e820map e820; | 104 | struct e820map e820; |
104 | 105 | ||
105 | extern int root_mountflags; | 106 | extern int root_mountflags; |
106 | extern char _text, _etext, _edata, _end; | ||
107 | 107 | ||
108 | char command_line[COMMAND_LINE_SIZE]; | 108 | char 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 @@ | |||
45 | extern int swiotlb; | 46 | extern int swiotlb; |
46 | #endif | 47 | #endif |
47 | 48 | ||
48 | extern char _stext[]; | ||
49 | |||
50 | static unsigned long dma_reserve __initdata; | 49 | static unsigned long dma_reserve __initdata; |
51 | 50 | ||
52 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 51 | DEFINE_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 | ||
91 | extern char _text, _etext, _edata, __bss_start, _end[]; | ||
92 | extern char __init_begin, __init_end; | ||
93 | |||
94 | int after_bootmem; | 90 | int after_bootmem; |
95 | 91 | ||
96 | static void *spp_getpage(void) | 92 | static void *spp_getpage(void) |
@@ -491,8 +487,6 @@ void __init mem_init(void) | |||
491 | #endif | 487 | #endif |
492 | } | 488 | } |
493 | 489 | ||
494 | extern char __initdata_begin[], __initdata_end[]; | ||
495 | |||
496 | void free_initmem(void) | 490 | void 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)); | |||
13 | extern char _end[]; | 13 | extern char _end[]; |
14 | extern char __per_cpu_start[], __per_cpu_end[]; | 14 | extern char __per_cpu_start[], __per_cpu_end[]; |
15 | extern char __kprobes_text_start[], __kprobes_text_end[]; | 15 | extern char __kprobes_text_start[], __kprobes_text_end[]; |
16 | extern char __initdata_begin[], __initdata_end[]; | ||
16 | 17 | ||
17 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ | 18 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ |