xref: /freebsd/sys/arm64/linux/linux_vdso.lds.s (revision 1719886f6d08408b834d270c59ffcfd821c8f63a)
1/*
2 * Linker script for 64-bit vDSO.
3 * Copied from Linux kernel arch/arm64/kernel/vdso/vdso.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	/DISCARD/	: {
19		*(.note.GNU-stack .note.gnu.property)
20	}
21
22	.note		: { *(.note.*) }		:text	:note
23
24	. = ALIGN(0x100);
25
26	.text		: { *(.text*) }			:text	=0x90909090
27	PROVIDE (__etext = .);
28	PROVIDE (_etext = .);
29	PROVIDE (etext = .);
30
31	.dynamic	: { *(.dynamic) }		:text	:dynamic
32
33	.rodata		: { *(.rodata*) }		:text
34	.data		: {
35		*(.data*)
36	}
37
38	_end = .;
39	PROVIDE(end = .);
40
41	/DISCARD/	: {
42		*(.eh_frame .eh_frame_hdr)
43	}
44}
45
46PHDRS
47{
48	text		PT_LOAD		FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
49	dynamic		PT_DYNAMIC	FLAGS(4);		/* PF_R */
50	note		PT_NOTE		FLAGS(4);		/* PF_R */
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		__user_rt_sigreturn;
72	local: *;
73	};
74}
75