Merge tag 'v3.10.49' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / kernel / vmlinux.lds.S
1 /*
2  * ld script to make ARM Linux kernel
3  * taken from the i386 version by Russell King
4  * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
5  */
6
7 #include <asm-generic/vmlinux.lds.h>
8 #include <asm/thread_info.h>
9 #include <asm/memory.h>
10 #include <asm/page.h>
11
12 #define ARM_EXIT_KEEP(x)
13 #define ARM_EXIT_DISCARD(x)     x
14
15 OUTPUT_ARCH(aarch64)
16 ENTRY(stext)
17
18 jiffies = jiffies_64;
19
20 SECTIONS
21 {
22         /*
23          * XXX: The linker does not define how output sections are
24          * assigned to input sections when there are multiple statements
25          * matching the same input section name.  There is no documented
26          * order of matching.
27          */
28         /DISCARD/ : {
29                 ARM_EXIT_DISCARD(EXIT_TEXT)
30                 ARM_EXIT_DISCARD(EXIT_DATA)
31                 EXIT_CALL
32                 *(.discard)
33                 *(.discard.*)
34         }
35
36         . = PAGE_OFFSET + TEXT_OFFSET;
37
38         .head.text : {
39                 _text = .;
40                 HEAD_TEXT
41         }
42         .text : {                       /* Real text segment            */
43                 _stext = .;             /* Text and read-only data      */
44                         __exception_text_start = .;
45                         *(.exception.text)
46                         __exception_text_end = .;
47                         IRQENTRY_TEXT
48                         TEXT_TEXT
49                         SCHED_TEXT
50                         LOCK_TEXT
51                         *(.fixup)
52                         *(.gnu.warning)
53                 . = ALIGN(16);
54                 *(.got)                 /* Global offset table          */
55         }
56
57         RO_DATA(PAGE_SIZE)
58         EXCEPTION_TABLE(8)
59         NOTES
60         _etext = .;                     /* End of text and rodata section */
61
62         . = ALIGN(PAGE_SIZE);
63         __init_begin = .;
64
65         INIT_TEXT_SECTION(8)
66         .exit.text : {
67                 ARM_EXIT_KEEP(EXIT_TEXT)
68         }
69         . = ALIGN(16);
70         .init.data : {
71                 INIT_DATA
72                 INIT_SETUP(16)
73                 INIT_CALLS
74                 CON_INITCALL
75                 SECURITY_INITCALL
76                 INIT_RAM_FS
77         }
78         .exit.data : {
79                 ARM_EXIT_KEEP(EXIT_DATA)
80         }
81
82         PERCPU_SECTION(64)
83
84         __init_end = .;
85
86         . = ALIGN(PAGE_SIZE);
87         _data = .;
88         _sdata = .;
89         RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE)
90         _edata = .;
91
92         BSS_SECTION(0, 0, 0)
93         _end = .;
94
95         STABS_DEBUG
96         .comment 0 : { *(.comment) }
97 }