xref: /freebsd/sys/amd64/linux32/linux32_vdso.lds.s (revision b9f654b163bce26de79705e77b872427c9f2afa1)
1/*
2 * Linker script for 32-bit vDSO.
3 * Copied from Linux kernel arch/x86/vdso/vdso-layout.lds.S
4 * and arch/x86/vdso/vdso32/vdso32.lds.S
5 *
6 * $FreeBSD$
7 */
8
9SECTIONS
10{
11	. = . + SIZEOF_HEADERS;
12
13	.hash		: { *(.hash) }			:text
14	.gnu.hash	: { *(.gnu.hash) }
15	.dynsym		: { *(.dynsym) }
16	.dynstr		: { *(.dynstr) }
17	.gnu.version	: { *(.gnu.version) }
18	.gnu.version_d	: { *(.gnu.version_d) }
19	.gnu.version_r	: { *(.gnu.version_r) }
20
21	.note		: { *(.note.*) }		:text	:note
22
23	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
24	.eh_frame	: { KEEP (*(.eh_frame)) }	:text
25
26	.dynamic	: { *(.dynamic) }		:text	:dynamic
27
28	.rodata		: { *(.rodata*) }		:text
29	.data		: {
30	      *(.data*)
31	      *(.sdata*)
32	      *(.got.plt) *(.got)
33	      *(.gnu.linkonce.d.*)
34	      *(.bss*)
35	      *(.dynbss*)
36	      *(.gnu.linkonce.b.*)
37	}
38
39	.altinstructions	: { *(.altinstructions) }
40	.altinstr_replacement	: { *(.altinstr_replacement) }
41
42	. = ALIGN(0x100);
43	.text		: { *(.text*) }			:text	=0x90909090
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	eh_frame_hdr	PT_GNU_EH_FRAME;
52}
53
54ENTRY(linux32_vsyscall);
55
56VERSION
57{
58	LINUX_2.5 {
59	global:
60		linux32_vsyscall;
61		linux32_sigcode;
62		linux32_rt_sigcode;
63		linux_platform;
64	local: *;
65	};
66}
67