xref: /freebsd/sys/arm64/linux/linux_vdso.lds.s (revision 19261079)
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
53/*
54 * This controls what symbols we export from the DSO.
55 */
56VERSION
57{
58	LINUX_2.6.39 {
59	global:
60		__kernel_rt_sigreturn;
61		__kernel_gettimeofday;
62		__kernel_clock_gettime;
63		__kernel_clock_getres;
64	local: *;
65	};
66
67	LINUX_0.0 {
68	global:
69		linux_platform;
70		kern_timekeep_base;
71	local: *;
72	};
73}
74