xref: /aosp_15_r20/bionic/tests/libs/segment_gap_outer.lds (revision 8d67ca893c1523eb926b9080dbe4e2ffd2a27ba1)
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(CONSTANT (MAXPAGESIZE));
7  .text : {*(.text .text.*)}
8  . = ALIGN(CONSTANT (MAXPAGESIZE));
9  .dynamic : {*(.dynamic)}
10  . = ALIGN(CONSTANT (MAXPAGESIZE));
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(CONSTANT (MAXPAGESIZE));
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