Merge tag 'drm/panel/for-3.16-rc1' of git://anongit.freedesktop.org/tegra/linux into...
[cascardo/linux.git] / arch / x86 / vdso / vdso-layout.lds.S
1 /*
2  * Linker script for vDSO.  This is an ELF shared object prelinked to
3  * its virtual address, and with only one read-only segment.
4  * This script controls its layout.
5  */
6
7 SECTIONS
8 {
9 #ifdef BUILD_VDSO32
10 #include <asm/vdso32.h>
11
12         hpet_page = . - VDSO_OFFSET(VDSO_HPET_PAGE);
13
14         vvar = . - VDSO_OFFSET(VDSO_VVAR_PAGE);
15
16         /* Place all vvars at the offsets in asm/vvar.h. */
17 #define EMIT_VVAR(name, offset) vvar_ ## name = vvar + offset;
18 #define __VVAR_KERNEL_LDS
19 #include <asm/vvar.h>
20 #undef __VVAR_KERNEL_LDS
21 #undef EMIT_VVAR
22 #endif
23         . = SIZEOF_HEADERS;
24
25         .hash           : { *(.hash) }                  :text
26         .gnu.hash       : { *(.gnu.hash) }
27         .dynsym         : { *(.dynsym) }
28         .dynstr         : { *(.dynstr) }
29         .gnu.version    : { *(.gnu.version) }
30         .gnu.version_d  : { *(.gnu.version_d) }
31         .gnu.version_r  : { *(.gnu.version_r) }
32
33         .note           : { *(.note.*) }                :text   :note
34
35         .eh_frame_hdr   : { *(.eh_frame_hdr) }          :text   :eh_frame_hdr
36         .eh_frame       : { KEEP (*(.eh_frame)) }       :text
37
38         .dynamic        : { *(.dynamic) }               :text   :dynamic
39
40         .rodata         : { *(.rodata*) }               :text
41         .data           : {
42               *(.data*)
43               *(.sdata*)
44               *(.got.plt) *(.got)
45               *(.gnu.linkonce.d.*)
46               *(.bss*)
47               *(.dynbss*)
48               *(.gnu.linkonce.b.*)
49         }
50
51         .altinstructions        : { *(.altinstructions) }
52         .altinstr_replacement   : { *(.altinstr_replacement) }
53
54         /*
55          * Align the actual code well away from the non-instruction data.
56          * This is the best thing for the I-cache.
57          */
58         . = ALIGN(0x100);
59
60         .text           : { *(.text*) }                 :text   =0x90909090,
61
62         /*
63          * The comma above works around a bug in gold:
64          * https://sourceware.org/bugzilla/show_bug.cgi?id=16804
65          */
66
67         /DISCARD/ : {
68                 *(.discard)
69                 *(.discard.*)
70         }
71 }
72
73 /*
74  * Very old versions of ld do not recognize this name token; use the constant.
75  */
76 #define PT_GNU_EH_FRAME 0x6474e550
77
78 /*
79  * We must supply the ELF program headers explicitly to get just one
80  * PT_LOAD segment, and set the flags explicitly to make segments read-only.
81  */
82 PHDRS
83 {
84         text            PT_LOAD         FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
85         dynamic         PT_DYNAMIC      FLAGS(4);               /* PF_R */
86         note            PT_NOTE         FLAGS(4);               /* PF_R */
87         eh_frame_hdr    PT_GNU_EH_FRAME;
88 }