blob: f326aab2671a306ca15f9b79dac1d5b6eff36d10 [file] [log] [blame]
Peter Collingbourneb39cb3c2019-03-01 13:12:49 -08001SECTIONS {
2 # This starts off fairly normal: rodata, text, data, relro, bss with
3 # appropriate alignment between them.
4 . = SIZEOF_HEADERS;
5 .rodata : {}
6 . = ALIGN(0x1000);
7 .text : {}
8 . = ALIGN(0x1000);
9 .data : {}
10 . = ALIGN(0x1000);
11 .data.rel.ro : {}
12 . = ALIGN(0x1000);
13 .bss : {}
14
15 # Now create the gap. We need a text segment first to prevent the linker from
16 # merging .bss with .bss.end_of_gap.
17 . = ALIGN(0x1000);
18 .text.text_before_start_of_gap : {
19 *(.text.text_before_start_of_gap);
20 }
21
22 # Place end_of_gap at the end of the gap.
23 . = 0x1000000;
24 .bss.end_of_gap : {
25 *(.bss.end_of_gap);
26 }
27}