xref: /freebsd/sys/amd64/linux/linux_vdso.lds.s (revision 0b3105a37d7adcadcb720112fed4dc4e8040be99)
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		time;
58		__vdso_time;
59		gettimeofday;
60		__vdso_gettimeofday;
61		getcpu;
62		__vdso_getcpu;
63		clock_gettime;
64		__vdso_clock_gettime;
65		linux_rt_sigcode;
66		linux_platform;
67	local: *;
68	};
69}
70