xref: /freebsd/sys/amd64/linux32/linux32_vdso.lds.s (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
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
7SECTIONS
8{
9	. = . + SIZEOF_HEADERS;
10
11	.hash		: { *(.hash) }			:text
12	.gnu.hash	: { *(.gnu.hash) }
13	.dynsym		: { *(.dynsym) }
14	.dynstr		: { *(.dynstr) }
15	.gnu.version	: { *(.gnu.version) }
16	.gnu.version_d	: { *(.gnu.version_d) }
17	.gnu.version_r	: { *(.gnu.version_r) }
18
19	.note		: { *(.note.*) }		:text	:note
20
21	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
22	.eh_frame	: { KEEP (*(.eh_frame)) }	:text
23
24	.dynamic	: { *(.dynamic) }		:text	:dynamic
25
26	.rodata		: { *(.rodata*) }		:text
27	.data		: {
28	      *(.data*)
29	      *(.sdata*)
30	      *(.got.plt) *(.got)
31	      *(.gnu.linkonce.d.*)
32	      *(.bss*)
33	      *(.dynbss*)
34	      *(.gnu.linkonce.b.*)
35	}
36
37	.altinstructions	: { *(.altinstructions) }
38	.altinstr_replacement	: { *(.altinstr_replacement) }
39
40	. = ALIGN(0x100);
41	.text		: { *(.text*) }			:text	=0x90909090
42}
43
44PHDRS
45{
46	text		PT_LOAD		FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
47	dynamic		PT_DYNAMIC	FLAGS(4);		/* PF_R */
48	note		PT_NOTE		FLAGS(4);		/* PF_R */
49	eh_frame_hdr	PT_GNU_EH_FRAME;
50}
51
52VERSION
53{
54	LINUX_2.6 {
55	global:
56		__vdso_clock_gettime;
57		__vdso_gettimeofday;
58		__vdso_time;
59		__vdso_getcpu;
60		__vdso_clock_getres;
61		__vdso_clock_gettime64;
62	};
63
64	LINUX_2.5 {
65	global:
66		__kernel_vsyscall;
67		__kernel_sigreturn;
68		__kernel_rt_sigreturn;
69	local: *;
70	};
71
72	LINUX_0.0 {
73	global:
74		linux_platform;
75		kern_timekeep_base;
76		kern_tsc_selector;
77		kern_cpu_selector;
78		linux32_vdso_sigcode;
79		linux32_vdso_rt_sigcode;
80	local: *;
81	};
82}
83