diff options
Diffstat (limited to 'arch/arm/kernel/vmlinux.lds.S')
| -rw-r--r-- | arch/arm/kernel/vmlinux.lds.S | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index b16c07914b55..cead8893b46b 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
| @@ -8,6 +8,19 @@ | |||
| 8 | #include <asm/memory.h> | 8 | #include <asm/memory.h> |
| 9 | #include <asm/page.h> | 9 | #include <asm/page.h> |
| 10 | 10 | ||
| 11 | #define PROC_INFO \ | ||
| 12 | VMLINUX_SYMBOL(__proc_info_begin) = .; \ | ||
| 13 | *(.proc.info.init) \ | ||
| 14 | VMLINUX_SYMBOL(__proc_info_end) = .; | ||
| 15 | |||
| 16 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 17 | #define ARM_CPU_DISCARD(x) | ||
| 18 | #define ARM_CPU_KEEP(x) x | ||
| 19 | #else | ||
| 20 | #define ARM_CPU_DISCARD(x) x | ||
| 21 | #define ARM_CPU_KEEP(x) | ||
| 22 | #endif | ||
| 23 | |||
| 11 | OUTPUT_ARCH(arm) | 24 | OUTPUT_ARCH(arm) |
| 12 | ENTRY(stext) | 25 | ENTRY(stext) |
| 13 | 26 | ||
| @@ -31,15 +44,18 @@ SECTIONS | |||
| 31 | HEAD_TEXT | 44 | HEAD_TEXT |
| 32 | INIT_TEXT | 45 | INIT_TEXT |
| 33 | _einittext = .; | 46 | _einittext = .; |
| 34 | __proc_info_begin = .; | 47 | ARM_CPU_DISCARD(PROC_INFO) |
| 35 | *(.proc.info.init) | ||
| 36 | __proc_info_end = .; | ||
| 37 | __arch_info_begin = .; | 48 | __arch_info_begin = .; |
| 38 | *(.arch.info.init) | 49 | *(.arch.info.init) |
| 39 | __arch_info_end = .; | 50 | __arch_info_end = .; |
| 40 | __tagtable_begin = .; | 51 | __tagtable_begin = .; |
| 41 | *(.taglist.init) | 52 | *(.taglist.init) |
| 42 | __tagtable_end = .; | 53 | __tagtable_end = .; |
| 54 | #ifdef CONFIG_SMP_ON_UP | ||
| 55 | __smpalt_begin = .; | ||
| 56 | *(.alt.smp.init) | ||
| 57 | __smpalt_end = .; | ||
| 58 | #endif | ||
| 43 | 59 | ||
| 44 | INIT_SETUP(16) | 60 | INIT_SETUP(16) |
| 45 | 61 | ||
| @@ -68,10 +84,8 @@ SECTIONS | |||
| 68 | /DISCARD/ : { | 84 | /DISCARD/ : { |
| 69 | *(.ARM.exidx.exit.text) | 85 | *(.ARM.exidx.exit.text) |
| 70 | *(.ARM.extab.exit.text) | 86 | *(.ARM.extab.exit.text) |
| 71 | #ifndef CONFIG_HOTPLUG_CPU | 87 | ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text)) |
| 72 | *(.ARM.exidx.cpuexit.text) | 88 | ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text)) |
| 73 | *(.ARM.extab.cpuexit.text) | ||
| 74 | #endif | ||
| 75 | #ifndef CONFIG_HOTPLUG | 89 | #ifndef CONFIG_HOTPLUG |
| 76 | *(.ARM.exidx.devexit.text) | 90 | *(.ARM.exidx.devexit.text) |
| 77 | *(.ARM.extab.devexit.text) | 91 | *(.ARM.extab.devexit.text) |
| @@ -99,13 +113,13 @@ SECTIONS | |||
| 99 | *(.rodata.*) | 113 | *(.rodata.*) |
| 100 | *(.glue_7) | 114 | *(.glue_7) |
| 101 | *(.glue_7t) | 115 | *(.glue_7t) |
| 116 | . = ALIGN(4); | ||
| 102 | *(.got) /* Global offset table */ | 117 | *(.got) /* Global offset table */ |
| 118 | ARM_CPU_KEEP(PROC_INFO) | ||
| 103 | } | 119 | } |
| 104 | 120 | ||
| 105 | RO_DATA(PAGE_SIZE) | 121 | RO_DATA(PAGE_SIZE) |
| 106 | 122 | ||
| 107 | _etext = .; /* End of text and rodata section */ | ||
| 108 | |||
| 109 | #ifdef CONFIG_ARM_UNWIND | 123 | #ifdef CONFIG_ARM_UNWIND |
| 110 | /* | 124 | /* |
| 111 | * Stack unwinding tables | 125 | * Stack unwinding tables |
| @@ -123,6 +137,8 @@ SECTIONS | |||
| 123 | } | 137 | } |
| 124 | #endif | 138 | #endif |
| 125 | 139 | ||
| 140 | _etext = .; /* End of text and rodata section */ | ||
| 141 | |||
| 126 | #ifdef CONFIG_XIP_KERNEL | 142 | #ifdef CONFIG_XIP_KERNEL |
| 127 | __data_loc = ALIGN(4); /* location in binary */ | 143 | __data_loc = ALIGN(4); /* location in binary */ |
| 128 | . = PAGE_OFFSET + TEXT_OFFSET; | 144 | . = PAGE_OFFSET + TEXT_OFFSET; |
| @@ -237,6 +253,12 @@ SECTIONS | |||
| 237 | 253 | ||
| 238 | /* Default discards */ | 254 | /* Default discards */ |
| 239 | DISCARDS | 255 | DISCARDS |
| 256 | |||
| 257 | #ifndef CONFIG_SMP_ON_UP | ||
| 258 | /DISCARD/ : { | ||
| 259 | *(.alt.smp.init) | ||
| 260 | } | ||
| 261 | #endif | ||
| 240 | } | 262 | } |
| 241 | 263 | ||
| 242 | /* | 264 | /* |
