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