xref: /aosp_15_r20/external/ltp/testcases/kernel/kvm/linker/x86.lds (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1OUTPUT_FORMAT(elf32-i386)
2
3PHDRS
4{
5	headers PT_PHDR PHDRS ;
6	text PT_LOAD FILEHDR PHDRS ;
7	data PT_LOAD ;
8	bss PT_LOAD ;
9}
10
11SECTIONS
12{
13	/DISCARD/ :
14	{
15		  *(.note.gnu.* .comment)
16	}
17
18	. = 0x1000;
19	.init.boot :
20	{
21		*(.init.protected_mode)
22		*(.init.gdt32)
23		*(.init.memlayout)
24	} :text
25
26	.text :
27	{
28		*(.rodata .rodata.*)
29		*(.text.unlikely .text.unlikely.*)
30		*(.text.startup .text.startup.*)
31		*(.text .text.*)
32		*(.gnu.linkonce.t.*)
33	}
34
35	.init :
36	{
37		KEEP (*(SORT_NONE(.init)))
38	}
39
40	.data :
41	{
42		*(.data.strings)
43		*(.data)
44	} :data
45
46	.preinit_array :
47	{
48		PROVIDE_HIDDEN (__preinit_array_start = .);
49		KEEP (*(.preinit_array))
50		PROVIDE_HIDDEN (__preinit_array_end = .);
51	}
52
53	.init_array :
54	{
55		PROVIDE_HIDDEN (__init_array_start = .);
56		KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
57		KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
58		PROVIDE_HIDDEN (__init_array_end = .);
59	}
60
61	.bss.pgtables : ALIGN(4096)
62	{
63		*(.bss.pgtables)
64	} :bss
65
66	.bss : ALIGN(4096)
67	{
68		*(.bss.stack)
69		*(.bss.tss)
70		*(.bss)
71
72		. = ALIGN(4096);
73		kvm_heap_begin = .;
74	}
75}
76