xref: /freebsd/sys/i386/linux/linux_vdso.lds.s (revision 19261079b74319502c6ffa1249920079f0f69a72)
1/*
2 * Linker script for 32-bit vDSO.
3 * Copied from Linux kernel arch/x86/vdso/vdso-layout.lds.S
4 * and arch/x86/vdso/vdso32/vdso32.lds.S
5 *
6 * $FreeBSD$
7 */
8
9SECTIONS
10{
11	. = . + SIZEOF_HEADERS;
12
13	.hash		: { *(.hash) }			:text
14	.gnu.hash	: { *(.gnu.hash) }
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	.note		: { *(.note.*) }		:text	:note
22
23	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
24	.eh_frame	: { KEEP (*(.eh_frame)) }	:text
25
26	.dynamic	: { *(.dynamic) }		:text	:dynamic
27
28	.rodata		: { *(.rodata*) }		:text
29	.data		: {
30	      *(.data*)
31	      *(.sdata*)
32	      *(.got.plt) *(.got)
33	      *(.gnu.linkonce.d.*)
34	      *(.bss*)
35	      *(.dynbss*)
36	      *(.gnu.linkonce.b.*)
37	}
38
39	.altinstructions	: { *(.altinstructions) }
40	.altinstr_replacement	: { *(.altinstr_replacement) }
41
42	. = ALIGN(0x100);
43	.text		: { *(.text*) }			:text	=0x90909090
44}
45
46PHDRS
47{
48	text		PT_LOAD		FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
49	dynamic		PT_DYNAMIC	FLAGS(4);		/* PF_R */
50	note		PT_NOTE		FLAGS(4);		/* PF_R */
51	eh_frame_hdr	PT_GNU_EH_FRAME;
52}
53
54VERSION
55{
56	LINUX_2.6 {
57	global:
58		__vdso_clock_gettime;
59		__vdso_gettimeofday;
60		__vdso_time;
61		__vdso_clock_getres;
62		__vdso_clock_gettime64;
63	};
64
65	LINUX_2.5 {
66	global:
67		__kernel_vsyscall;
68		__kernel_sigreturn;
69		__kernel_rt_sigreturn;
70	local: *;
71	};
72
73	LINUX_0.0 {
74	global:
75		linux_platform;
76		kern_timekeep_base;
77		kern_tsc_selector;
78	local: *;
79	};
80}
81