xref: /freebsd/sys/amd64/linux/linux_vdso.lds.s (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1/*
2 * Linker script for 64-bit vDSO.
3 * Copied from Linux kernel arch/x86/vdso/vdso-layout.lds.S
4 */
5
6SECTIONS
7{
8	. = . + SIZEOF_HEADERS;
9
10	.hash		: { *(.hash) }			:text
11	.gnu.hash	: { *(.gnu.hash) }
12	.dynsym		: { *(.dynsym) }
13	.dynstr		: { *(.dynstr) }
14	.gnu.version	: { *(.gnu.version) }
15	.gnu.version_d	: { *(.gnu.version_d) }
16	.gnu.version_r	: { *(.gnu.version_r) }
17
18	.note		: { *(.note.*) }		:text	:note
19
20	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
21	.eh_frame	: { KEEP (*(.eh_frame)) }	:text
22
23	.dynamic	: { *(.dynamic) }		:text	:dynamic
24
25	.rodata		: { *(.rodata*) }		:text
26	.data		: {
27	      *(.data*)
28	      *(.sdata*)
29	      *(.got.plt) *(.got)
30	      *(.gnu.linkonce.d.*)
31	      *(.bss*)
32	      *(.dynbss*)
33	      *(.gnu.linkonce.b.*)
34	}
35
36	.altinstructions	: { *(.altinstructions) }
37	.altinstr_replacement	: { *(.altinstr_replacement) }
38
39	. = ALIGN(0x100);
40	.text		: { *(.test .text*) }			:text	=0x90909090
41}
42
43PHDRS
44{
45	text		PT_LOAD		FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
46	dynamic		PT_DYNAMIC	FLAGS(4);		/* PF_R */
47	note		PT_NOTE		FLAGS(4);		/* PF_R */
48	eh_frame_hdr	PT_GNU_EH_FRAME;
49}
50
51VERSION
52{
53	LINUX_2.6 {
54	global:
55		__vdso_time;
56		__vdso_gettimeofday;
57		__vdso_getcpu;
58		__vdso_clock_gettime;
59		__vdso_clock_getres;
60	local: *;
61	};
62
63	LINUX_0.0 {
64	global:
65		linux_rt_sigcode;
66		linux_platform;
67		kern_timekeep_base;
68		kern_tsc_selector;
69		kern_cpu_selector;
70	local: *;
71	};
72}
73