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