blob: 758b6bc9364baf9e2a716eb97e347e5a4e227910 [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;
Stephen Hines15027e02020-07-23 19:35:49 -07005 .rodata : {*(.rodata .rodata.*)}
Vilas Bhat8420cf02024-08-20 01:56:53 +00006 . = ALIGN(CONSTANT (MAXPAGESIZE));
Stephen Hines15027e02020-07-23 19:35:49 -07007 .text : {*(.text .text.*)}
Vilas Bhat8420cf02024-08-20 01:56:53 +00008 . = ALIGN(CONSTANT (MAXPAGESIZE));
Stephen Hines15027e02020-07-23 19:35:49 -07009 .dynamic : {*(.dynamic)}
Vilas Bhat8420cf02024-08-20 01:56:53 +000010 . = ALIGN(CONSTANT (MAXPAGESIZE));
Stephen Hines15027e02020-07-23 19:35:49 -070011 .data : {*(.data .data.*)}
12 .bss : {*(.bss .bss.*)}
Peter Collingbourneb39cb3c2019-03-01 13:12:49 -080013
14 # Now create the gap. We need a text segment first to prevent the linker from
Stephen Hines15027e02020-07-23 19:35:49 -070015 # merging .bss with .custom_bss.
Vilas Bhat8420cf02024-08-20 01:56:53 +000016 . = ALIGN(CONSTANT (MAXPAGESIZE));
Stephen Hines15027e02020-07-23 19:35:49 -070017 .custom_text : {
18 *(.custom_text);
Peter Collingbourneb39cb3c2019-03-01 13:12:49 -080019 }
20
Stephen Hines15027e02020-07-23 19:35:49 -070021 # Place custom_bss at the end of the gap.
Peter Collingbourneb39cb3c2019-03-01 13:12:49 -080022 . = 0x1000000;
Stephen Hines15027e02020-07-23 19:35:49 -070023 .custom_bss : {
24 *(.custom_bss);
Peter Collingbourneb39cb3c2019-03-01 13:12:49 -080025 }
26}