1SECTIONS { 2 # This starts off fairly normal: rodata, text, dynamic, data, bss with 3 # appropriate alignment between them. 4 . = SIZEOF_HEADERS; 5 .rodata : {} 6 . = ALIGN(0x1000); 7 .text : {} 8 . = ALIGN(0x1000); 9 .dynamic : {} 10 . = ALIGN(0x1000); 11 .data : {} 12 .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} 27