1SECTIONS { 2 # This starts off fairly normal: rodata, text, dynamic, data, bss with 3 # appropriate alignment between them. 4 . = SIZEOF_HEADERS; 5 .rodata : {*(.rodata .rodata.*)} 6 . = ALIGN(0x1000); 7 .text : {*(.text .text.*)} 8 . = ALIGN(0x1000); 9 .dynamic : {*(.dynamic)} 10 . = ALIGN(0x1000); 11 .data : {*(.data .data.*)} 12 .bss : {*(.bss .bss.*)} 13 14 # Now create the gap. We need a text segment first to prevent the linker from 15 # merging .bss with .custom_bss. 16 . = ALIGN(0x1000); 17 .custom_text : { 18 *(.custom_text); 19 } 20 21 # Place custom_bss at the end of the gap. 22 . = 0x1000000; 23 .custom_bss : { 24 *(.custom_bss); 25 } 26} 27