xref: /freebsd/sys/arm64/linux/linux_vdso.lds.s (revision 3c4ba5f55438f7afd4f4b0b56f88f2bb505fd6a6)
1/*
2 * Linker script for 64-bit vDSO.
3 * Copied from Linux kernel arch/arm64/kernel/vdso/vdso.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	/DISCARD/	: {
21		*(.note.GNU-stack .note.gnu.property)
22	}
23
24	.note		: { *(.note.*) }		:text	:note
25
26	. = ALIGN(0x100);
27
28	.text		: { *(.text*) }			:text	=0x90909090
29	PROVIDE (__etext = .);
30	PROVIDE (_etext = .);
31	PROVIDE (etext = .);
32
33	.dynamic	: { *(.dynamic) }		:text	:dynamic
34
35	.rodata		: { *(.rodata*) }		:text
36	.data		: {
37		*(.data*)
38	}
39
40	_end = .;
41	PROVIDE(end = .);
42
43	/DISCARD/	: {
44		*(.eh_frame .eh_frame_hdr)
45	}
46}
47
48PHDRS
49{
50	text		PT_LOAD		FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
51	dynamic		PT_DYNAMIC	FLAGS(4);		/* PF_R */
52	note		PT_NOTE		FLAGS(4);		/* PF_R */
53}
54
55/*
56 * This controls what symbols we export from the DSO.
57 */
58VERSION
59{
60	LINUX_2.6.39 {
61	global:
62		__kernel_rt_sigreturn;
63		__kernel_gettimeofday;
64		__kernel_clock_gettime;
65		__kernel_clock_getres;
66	local: *;
67	};
68
69	LINUX_0.0 {
70	global:
71		linux_platform;
72		kern_timekeep_base;
73		linux_vdso_sigcode;
74	local: *;
75	};
76}
77