GNU Linux-libre 4.14.294-gnu1
[releases.git] / arch / x86 / realmode / rm / realmode.lds.S
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * realmode.lds.S
4  *
5  * Linker script for the real-mode code
6  */
7
8 #include <asm/page_types.h>
9
10 #undef i386
11
12 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
13 OUTPUT_ARCH(i386)
14
15 SECTIONS
16 {
17         real_mode_seg = 0;
18
19         . = 0;
20         .header : {
21                 pa_real_mode_base = .;
22                 *(.header)
23         }
24
25         . = ALIGN(4);
26         .rodata : {
27                 *(.rodata)
28                 *(.rodata.*)
29                 . = ALIGN(16);
30                 video_cards = .;
31                 *(.videocards)
32                 video_cards_end = .;
33         }
34
35         . = ALIGN(PAGE_SIZE);
36         pa_text_start = .;
37         .text : {
38                 *(.text)
39                 *(.text.*)
40         }
41
42         .text32 : {
43                 *(.text32)
44                 *(.text32.*)
45         }
46
47         .text64 : {
48                 *(.text64)
49                 *(.text64.*)
50         }
51         pa_ro_end = .;
52
53         . = ALIGN(PAGE_SIZE);
54         .data : {
55                 *(.data)
56                 *(.data.*)
57         }
58
59         . = ALIGN(128);
60         .bss : {
61                 *(.bss*)
62         }
63
64         /* End signature for integrity checking */
65         . = ALIGN(4);
66         .signature : {
67                 *(.signature)
68         }
69
70         /DISCARD/ : {
71                 *(.note*)
72                 *(.debug*)
73                 *(.eh_frame*)
74         }
75
76 #include "pasyms.h"
77 }