aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/vdso64/vdso64.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc64/kernel/vdso64/vdso64.lds.S')
-rw-r--r--arch/ppc64/kernel/vdso64/vdso64.lds.S110
1 files changed, 110 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/vdso64/vdso64.lds.S b/arch/ppc64/kernel/vdso64/vdso64.lds.S
new file mode 100644
index 000000000000..942c815c7bc7
--- /dev/null
+++ b/arch/ppc64/kernel/vdso64/vdso64.lds.S
@@ -0,0 +1,110 @@
1/*
2 * This is the infamous ld script for the 64 bits vdso
3 * library
4 */
5#include <asm/vdso.h>
6
7OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", "elf64-powerpc")
8OUTPUT_ARCH(powerpc:common64)
9ENTRY(_start)
10
11SECTIONS
12{
13 . = VDSO64_LBASE + SIZEOF_HEADERS;
14 .hash : { *(.hash) } :text
15 .dynsym : { *(.dynsym) }
16 .dynstr : { *(.dynstr) }
17 .gnu.version : { *(.gnu.version) }
18 .gnu.version_d : { *(.gnu.version_d) }
19 .gnu.version_r : { *(.gnu.version_r) }
20
21 . = ALIGN (16);
22 .text :
23 {
24 *(.text .stub .text.* .gnu.linkonce.t.*)
25 *(.sfpr .glink)
26 }
27 PROVIDE (__etext = .);
28 PROVIDE (_etext = .);
29 PROVIDE (etext = .);
30
31 /* Other stuff is appended to the text segment: */
32 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
33 .rodata1 : { *(.rodata1) }
34 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
35 .eh_frame : { KEEP (*(.eh_frame)) } :text
36 .gcc_except_table : { *(.gcc_except_table) }
37
38 .opd ALIGN(8) : { KEEP (*(.opd)) }
39 .got ALIGN(8) : { *(.got .toc) }
40 .rela.dyn ALIGN(8) : { *(.rela.dyn) }
41
42 .dynamic : { *(.dynamic) } :text :dynamic
43
44 _end = .;
45 PROVIDE (end = .);
46
47 /* Stabs debugging sections are here too
48 */
49 .stab 0 : { *(.stab) }
50 .stabstr 0 : { *(.stabstr) }
51 .stab.excl 0 : { *(.stab.excl) }
52 .stab.exclstr 0 : { *(.stab.exclstr) }
53 .stab.index 0 : { *(.stab.index) }
54 .stab.indexstr 0 : { *(.stab.indexstr) }
55 .comment 0 : { *(.comment) }
56 /* DWARF debug sectio/ns.
57 Symbols in the DWARF debugging sections are relative to the beginning
58 of the section so we begin them at 0. */
59 /* DWARF 1 */
60 .debug 0 : { *(.debug) }
61 .line 0 : { *(.line) }
62 /* GNU DWARF 1 extensions */
63 .debug_srcinfo 0 : { *(.debug_srcinfo) }
64 .debug_sfnames 0 : { *(.debug_sfnames) }
65 /* DWARF 1.1 and DWARF 2 */
66 .debug_aranges 0 : { *(.debug_aranges) }
67 .debug_pubnames 0 : { *(.debug_pubnames) }
68 /* DWARF 2 */
69 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
70 .debug_abbrev 0 : { *(.debug_abbrev) }
71 .debug_line 0 : { *(.debug_line) }
72 .debug_frame 0 : { *(.debug_frame) }
73 .debug_str 0 : { *(.debug_str) }
74 .debug_loc 0 : { *(.debug_loc) }
75 .debug_macinfo 0 : { *(.debug_macinfo) }
76 /* SGI/MIPS DWARF 2 extensions */
77 .debug_weaknames 0 : { *(.debug_weaknames) }
78 .debug_funcnames 0 : { *(.debug_funcnames) }
79 .debug_typenames 0 : { *(.debug_typenames) }
80 .debug_varnames 0 : { *(.debug_varnames) }
81
82 /DISCARD/ : { *(.note.GNU-stack) }
83 /DISCARD/ : { *(.branch_lt) }
84 /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.*) }
85 /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) }
86}
87
88PHDRS
89{
90 text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
91 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
92 eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */
93}
94
95/*
96 * This controls what symbols we export from the DSO.
97 */
98VERSION
99{
100 VDSO_VERSION_STRING {
101 global:
102 __kernel_datapage_offset; /* Has to be there for the kernel to find it */
103 __kernel_get_syscall_map;
104 __kernel_gettimeofday;
105 __kernel_sync_dicache;
106 __kernel_sync_dicache_p5;
107 __kernel_sigtramp_rt64;
108 local: *;
109 };
110}