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