1 /* SPDX-License-Identifier: GPL-2.0 */
3 * This is the infamous ld script for the 32 bits vdso
8 #include <asm-generic/vmlinux.lds.h>
10 #ifdef __LITTLE_ENDIAN__
11 OUTPUT_FORMAT("elf32-powerpcle", "elf32-powerpcle", "elf32-powerpcle")
13 OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
15 OUTPUT_ARCH(powerpc:common)
20 PROVIDE(_vdso_datapage = . - PAGE_SIZE);
23 .hash : { *(.hash) } :text
24 .gnu.hash : { *(.gnu.hash) }
25 .dynsym : { *(.dynsym) }
26 .dynstr : { *(.dynstr) }
27 .gnu.version : { *(.gnu.version) }
28 .gnu.version_d : { *(.gnu.version_d) }
29 .gnu.version_r : { *(.gnu.version_r) }
31 .note : { *(.note.*) } :text :note
35 *(.text .stub .text.* .gnu.linkonce.t.* __ftr_alt_*)
42 VDSO_ftr_fixup_start = .;
43 __ftr_fixup : { *(__ftr_fixup) }
44 VDSO_ftr_fixup_end = .;
47 VDSO_mmu_ftr_fixup_start = .;
48 __mmu_ftr_fixup : { *(__mmu_ftr_fixup) }
49 VDSO_mmu_ftr_fixup_end = .;
52 VDSO_lwsync_fixup_start = .;
53 __lwsync_fixup : { *(__lwsync_fixup) }
54 VDSO_lwsync_fixup_end = .;
58 VDSO_fw_ftr_fixup_start = .;
59 __fw_ftr_fixup : { *(__fw_ftr_fixup) }
60 VDSO_fw_ftr_fixup_end = .;
64 * Other stuff is appended to the text segment:
66 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
67 .rodata1 : { *(.rodata1) }
69 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
70 .eh_frame : { KEEP (*(.eh_frame)) } :text
71 .gcc_except_table : { *(.gcc_except_table) }
72 .fixup : { *(.fixup) }
74 .dynamic : { *(.dynamic) } :text :dynamic
75 .got : { *(.got) } :text
88 *(.data .data.* .gnu.linkonce.d.* .sdata*)
89 *(.bss .sbss .dynbss .dynsbss)
95 * Very old versions of ld do not recognize this name token; use the constant.
97 #define PT_GNU_EH_FRAME 0x6474e550
100 * We must supply the ELF program headers explicitly to get just one
101 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
105 text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
106 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
107 note PT_NOTE FLAGS(4); /* PF_R */
108 eh_frame_hdr PT_GNU_EH_FRAME;
112 * This controls what symbols we export from the DSO.
116 VDSO_VERSION_STRING {
118 __kernel_get_syscall_map;
119 __kernel_gettimeofday;
120 __kernel_clock_gettime;
121 __kernel_clock_gettime64;
122 __kernel_clock_getres;
125 __kernel_sync_dicache;
127 __kernel_sigtramp_rt32;
128 #if defined(CONFIG_PPC64) || !defined(CONFIG_SMP)
137 * Make the sigreturn code visible to the kernel.
139 VDSO_sigtramp32 = __kernel_sigtramp32;
140 VDSO_sigtramp_rt32 = __kernel_sigtramp_rt32;