aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/vdso32/vdso32.lds.S219
1 files changed, 118 insertions, 101 deletions
diff --git a/arch/powerpc/kernel/vdso32/vdso32.lds.S b/arch/powerpc/kernel/vdso32/vdso32.lds.S
index 26e138c4ce17..9352ab5200e5 100644
--- a/arch/powerpc/kernel/vdso32/vdso32.lds.S
+++ b/arch/powerpc/kernel/vdso32/vdso32.lds.S
@@ -1,130 +1,147 @@
1
2/* 1/*
3 * This is the infamous ld script for the 32 bits vdso 2 * This is the infamous ld script for the 32 bits vdso
4 * library 3 * library
5 */ 4 */
6#include <asm/vdso.h> 5#include <asm/vdso.h>
7 6
8/* Default link addresses for the vDSOs */
9OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") 7OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
10OUTPUT_ARCH(powerpc:common) 8OUTPUT_ARCH(powerpc:common)
11ENTRY(_start) 9ENTRY(_start)
12 10
13SECTIONS 11SECTIONS
14{ 12{
15 . = VDSO32_LBASE + SIZEOF_HEADERS; 13 . = VDSO32_LBASE + SIZEOF_HEADERS;
16 .hash : { *(.hash) } :text 14
17 .gnu.hash : { *(.gnu.hash) } 15 .hash : { *(.hash) } :text
18 .dynsym : { *(.dynsym) } 16 .gnu.hash : { *(.gnu.hash) }
19 .dynstr : { *(.dynstr) } 17 .dynsym : { *(.dynsym) }
20 .gnu.version : { *(.gnu.version) } 18 .dynstr : { *(.dynstr) }
21 .gnu.version_d : { *(.gnu.version_d) } 19 .gnu.version : { *(.gnu.version) }
22 .gnu.version_r : { *(.gnu.version_r) } 20 .gnu.version_d : { *(.gnu.version_d) }
23 21 .gnu.version_r : { *(.gnu.version_r) }
24 .note : { *(.note.*) } :text :note 22
25 23 .note : { *(.note.*) } :text :note
26 . = ALIGN (16); 24
27 .text : 25 . = ALIGN(16);
28 { 26 .text : {
29 *(.text .stub .text.* .gnu.linkonce.t.*) 27 *(.text .stub .text.* .gnu.linkonce.t.*)
30 } 28 }
31 PROVIDE (__etext = .); 29 PROVIDE(__etext = .);
32 PROVIDE (_etext = .); 30 PROVIDE(_etext = .);
33 PROVIDE (etext = .); 31 PROVIDE(etext = .);
34 32
35 . = ALIGN(8); 33 . = ALIGN(8);
36 __ftr_fixup : { 34 __ftr_fixup : { *(__ftr_fixup) }
37 *(__ftr_fixup)
38 }
39 35
40#ifdef CONFIG_PPC64 36#ifdef CONFIG_PPC64
41 . = ALIGN(8); 37 . = ALIGN(8);
42 __fw_ftr_fixup : { 38 __fw_ftr_fixup : { *(__fw_ftr_fixup) }
43 *(__fw_ftr_fixup)
44 }
45#endif 39#endif
46 40
47 /* Other stuff is appended to the text segment: */ 41 /*
48 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } 42 * Other stuff is appended to the text segment:
49 .rodata1 : { *(.rodata1) } 43 */
50 44 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
51 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr 45 .rodata1 : { *(.rodata1) }
52 .eh_frame : { KEEP (*(.eh_frame)) } :text 46
53 .gcc_except_table : { *(.gcc_except_table) } 47 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
54 .fixup : { *(.fixup) } 48 .eh_frame : { KEEP (*(.eh_frame)) } :text
55 49 .gcc_except_table : { *(.gcc_except_table) }
56 .dynamic : { *(.dynamic) } :text :dynamic 50 .fixup : { *(.fixup) }
57 .got : { *(.got) } 51
58 .plt : { *(.plt) } 52 .dynamic : { *(.dynamic) } :text :dynamic
59 53 .got : { *(.got) }
60 _end = .; 54 .plt : { *(.plt) }
61 __end = .; 55
62 PROVIDE (end = .); 56 _end = .;
63 57 __end = .;
64 58 PROVIDE(end = .);
65 /* Stabs debugging sections are here too 59
66 */ 60 /*
67 .stab 0 : { *(.stab) } 61 * Stabs debugging sections are here too.
68 .stabstr 0 : { *(.stabstr) } 62 */
69 .stab.excl 0 : { *(.stab.excl) } 63 .stab 0 : { *(.stab) }
70 .stab.exclstr 0 : { *(.stab.exclstr) } 64 .stabstr 0 : { *(.stabstr) }
71 .stab.index 0 : { *(.stab.index) } 65 .stab.excl 0 : { *(.stab.excl) }
72 .stab.indexstr 0 : { *(.stab.indexstr) } 66 .stab.exclstr 0 : { *(.stab.exclstr) }
73 .comment 0 : { *(.comment) } 67 .stab.index 0 : { *(.stab.index) }
74 .debug 0 : { *(.debug) } 68 .stab.indexstr 0 : { *(.stab.indexstr) }
75 .line 0 : { *(.line) } 69 .comment 0 : { *(.comment) }
76 70
77 .debug_srcinfo 0 : { *(.debug_srcinfo) } 71 /*
78 .debug_sfnames 0 : { *(.debug_sfnames) } 72 * DWARF debug sections.
79 73 * Symbols in the DWARF debugging sections are relative to the beginning
80 .debug_aranges 0 : { *(.debug_aranges) } 74 * of the section so we begin them at 0.
81 .debug_pubnames 0 : { *(.debug_pubnames) } 75 */
82 76 /* DWARF 1 */
83 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } 77 .debug 0 : { *(.debug) }
84 .debug_abbrev 0 : { *(.debug_abbrev) } 78 .line 0 : { *(.line) }
85 .debug_line 0 : { *(.debug_line) } 79 /* GNU DWARF 1 extensions */
86 .debug_frame 0 : { *(.debug_frame) } 80 .debug_srcinfo 0 : { *(.debug_srcinfo) }
87 .debug_str 0 : { *(.debug_str) } 81 .debug_sfnames 0 : { *(.debug_sfnames) }
88 .debug_loc 0 : { *(.debug_loc) } 82 /* DWARF 1.1 and DWARF 2 */
89 .debug_macinfo 0 : { *(.debug_macinfo) } 83 .debug_aranges 0 : { *(.debug_aranges) }
90 84 .debug_pubnames 0 : { *(.debug_pubnames) }
91 .debug_weaknames 0 : { *(.debug_weaknames) } 85 /* DWARF 2 */
92 .debug_funcnames 0 : { *(.debug_funcnames) } 86 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
93 .debug_typenames 0 : { *(.debug_typenames) } 87 .debug_abbrev 0 : { *(.debug_abbrev) }
94 .debug_varnames 0 : { *(.debug_varnames) } 88 .debug_line 0 : { *(.debug_line) }
95 89 .debug_frame 0 : { *(.debug_frame) }
96 /DISCARD/ : { *(.note.GNU-stack) } 90 .debug_str 0 : { *(.debug_str) }
97 /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.* .sdata*) } 91 .debug_loc 0 : { *(.debug_loc) }
98 /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) } 92 .debug_macinfo 0 : { *(.debug_macinfo) }
93 /* SGI/MIPS DWARF 2 extensions */
94 .debug_weaknames 0 : { *(.debug_weaknames) }
95 .debug_funcnames 0 : { *(.debug_funcnames) }
96 .debug_typenames 0 : { *(.debug_typenames) }
97 .debug_varnames 0 : { *(.debug_varnames) }
98
99 /DISCARD/ : {
100 *(.note.GNU-stack)
101 *(.data .data.* .gnu.linkonce.d.* .sdata*)
102 *(.bss .sbss .dynbss .dynsbss)
103 }
99} 104}
100 105
106/*
107 * Very old versions of ld do not recognize this name token; use the constant.
108 */
109#define PT_GNU_EH_FRAME 0x6474e550
101 110
111/*
112 * We must supply the ELF program headers explicitly to get just one
113 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
114 */
102PHDRS 115PHDRS
103{ 116{
104 text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ 117 text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
105 note PT_NOTE FLAGS(4); /* PF_R */ 118 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
106 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ 119 note PT_NOTE FLAGS(4); /* PF_R */
107 eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ 120 eh_frame_hdr PT_GNU_EH_FRAME;
108} 121}
109 122
110
111/* 123/*
112 * This controls what symbols we export from the DSO. 124 * This controls what symbols we export from the DSO.
113 */ 125 */
114VERSION 126VERSION
115{ 127{
116 VDSO_VERSION_STRING { 128 VDSO_VERSION_STRING {
117 global: 129 global:
118 __kernel_datapage_offset; /* Has to be there for the kernel to find */ 130 /*
119 __kernel_get_syscall_map; 131 * Has to be there for the kernel to find
120 __kernel_gettimeofday; 132 */
121 __kernel_clock_gettime; 133 __kernel_datapage_offset;
122 __kernel_clock_getres; 134
123 __kernel_get_tbfreq; 135 __kernel_get_syscall_map;
124 __kernel_sync_dicache; 136 __kernel_gettimeofday;
125 __kernel_sync_dicache_p5; 137 __kernel_clock_gettime;
126 __kernel_sigtramp32; 138 __kernel_clock_getres;
127 __kernel_sigtramp_rt32; 139 __kernel_get_tbfreq;
128 local: *; 140 __kernel_sync_dicache;
129 }; 141 __kernel_sync_dicache_p5;
142 __kernel_sigtramp32;
143 __kernel_sigtramp_rt32;
144
145 local: *;
146 };
130} 147}