blob: af346bbc3d01fb0a3e64512208ff12cd6c21158e [file] [log] [blame]
Martin Roth9b1b3352016-02-24 12:27:06 -08001OUTPUT_FORMAT("elf32-i386");
2OUTPUT_ARCH(i386);
3
Martin Roth4dcd13d2016-02-24 13:53:07 -08004ENTRY(startup_32);
Martin Roth9b1b3352016-02-24 12:27:06 -08005SECTIONS {
6 . = 0;
7 .text : {
8 _start = .;
9 *(.text)
10 *(.text.*)
11 *(.plt)
12 _etext = . ;
13 } = 0x9090
14 .rodata : {
15 *(.rodata)
16 *(.rodata.*)
17 }
18 .dynsym : { *(.dynsym) }
19 .dynstr : { *(.dynstr) }
20 .hash : { *(.hash) }
21 .gnu.hash : { *(.gnu.hash) }
22 .dynamic : { *(.dynamic) }
23
24 .rel.text : { *(.rel.text .rel.text.*) }
25 .rel.rodata : { *(.rel.rodata .rel.rodata.*) }
26 .rel.data : { *(.rel.data .rel.data.*) }
27 .rel.got : { *(.rel.got .rel.got.*) }
28 .rel.plt : { *(.rel.plt .rel.plt.*) }
29
30 . = ALIGN(4);
31 .data : {
Martin Roth4dcd13d2016-02-24 13:53:07 -080032 _data = .;
33 *(.data)
34 *(.data.*)
Martin Roth9b1b3352016-02-24 12:27:06 -080035 }
36 .got : {
37 *(.got.plt)
38 *(.got)
39 _edata = . ;
40 }
41 . = ALIGN(4);
Martin Roth4dcd13d2016-02-24 13:53:07 -080042 .bss : {
Martin Roth9b1b3352016-02-24 12:27:06 -080043 _bss = .;
44 *(.dynbss)
Martin Roth4dcd13d2016-02-24 13:53:07 -080045 *(.bss)
46 *(.bss.*)
47 *(COMMON)
Martin Roth9b1b3352016-02-24 12:27:06 -080048 /* _end must be at least 256 byte aligned */
Martin Roth4dcd13d2016-02-24 13:53:07 -080049 . = ALIGN(256);
Martin Roth9b1b3352016-02-24 12:27:06 -080050 _end = .;
51 }
Martin Roth4dcd13d2016-02-24 13:53:07 -080052 /DISCARD/ : { *(*) }
Martin Roth9b1b3352016-02-24 12:27:06 -080053}