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