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 | ||
34 | /* Other stuff is appended to the text segment: */ | |
35 | .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } | |
36 | .rodata1 : { *(.rodata1) } | |
37 | .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr | |
38 | .eh_frame : { KEEP (*(.eh_frame)) } :text | |
39 | .gcc_except_table : { *(.gcc_except_table) } | |
40 | ||
41 | .opd ALIGN(8) : { KEEP (*(.opd)) } | |
42 | .got ALIGN(8) : { *(.got .toc) } | |
43 | .rela.dyn ALIGN(8) : { *(.rela.dyn) } | |
44 | ||
45 | .dynamic : { *(.dynamic) } :text :dynamic | |
46 | ||
47 | _end = .; | |
48 | PROVIDE (end = .); | |
49 | ||
50 | /* Stabs debugging sections are here too | |
51 | */ | |
52 | .stab 0 : { *(.stab) } | |
53 | .stabstr 0 : { *(.stabstr) } | |
54 | .stab.excl 0 : { *(.stab.excl) } | |
55 | .stab.exclstr 0 : { *(.stab.exclstr) } | |
56 | .stab.index 0 : { *(.stab.index) } | |
57 | .stab.indexstr 0 : { *(.stab.indexstr) } | |
58 | .comment 0 : { *(.comment) } | |
59 | /* DWARF debug sectio/ns. | |
60 | Symbols in the DWARF debugging sections are relative to the beginning | |
61 | of the section so we begin them at 0. */ | |
62 | /* DWARF 1 */ | |
63 | .debug 0 : { *(.debug) } | |
64 | .line 0 : { *(.line) } | |
65 | /* GNU DWARF 1 extensions */ | |
66 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | |
67 | .debug_sfnames 0 : { *(.debug_sfnames) } | |
68 | /* DWARF 1.1 and DWARF 2 */ | |
69 | .debug_aranges 0 : { *(.debug_aranges) } | |
70 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
71 | /* DWARF 2 */ | |
72 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } | |
73 | .debug_abbrev 0 : { *(.debug_abbrev) } | |
74 | .debug_line 0 : { *(.debug_line) } | |
75 | .debug_frame 0 : { *(.debug_frame) } | |
76 | .debug_str 0 : { *(.debug_str) } | |
77 | .debug_loc 0 : { *(.debug_loc) } | |
78 | .debug_macinfo 0 : { *(.debug_macinfo) } | |
79 | /* SGI/MIPS DWARF 2 extensions */ | |
80 | .debug_weaknames 0 : { *(.debug_weaknames) } | |
81 | .debug_funcnames 0 : { *(.debug_funcnames) } | |
82 | .debug_typenames 0 : { *(.debug_typenames) } | |
83 | .debug_varnames 0 : { *(.debug_varnames) } | |
84 | ||
85 | /DISCARD/ : { *(.note.GNU-stack) } | |
86 | /DISCARD/ : { *(.branch_lt) } | |
87 | /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.*) } | |
88 | /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) } | |
89 | } | |
90 | ||
91 | PHDRS | |
92 | { | |
93 | text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ | |
1b29f9d1 | 94 | note PT_NOTE FLAGS(4); /* PF_R */ |
1da177e4 LT |
95 | dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ |
96 | eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ | |
97 | } | |
98 | ||
99 | /* | |
100 | * This controls what symbols we export from the DSO. | |
101 | */ | |
102 | VERSION | |
103 | { | |
104 | VDSO_VERSION_STRING { | |
105 | global: | |
a7f290da | 106 | __kernel_datapage_offset; /* Has to be there for the kernel to find */ |
1da177e4 LT |
107 | __kernel_get_syscall_map; |
108 | __kernel_gettimeofday; | |
a7f290da BH |
109 | __kernel_clock_gettime; |
110 | __kernel_clock_getres; | |
111 | __kernel_get_tbfreq; | |
1da177e4 LT |
112 | __kernel_sync_dicache; |
113 | __kernel_sync_dicache_p5; | |
114 | __kernel_sigtramp_rt64; | |
115 | local: *; | |
116 | }; | |
117 | } |