-SECTIONS {\r
- /*\r
- * Put the .text section at 0x0 explicitly. While we know it will minimally\r
- * end up at 0x280, (the size of the PE/COFF headers being 0x250 bytes and the\r
- * minimum alignment 0x40), choosing 0x280 as the offset causes problems when\r
- * linking objects with a greater .text alignment, since the section's base\r
- * must adhere to its own alignment.\r
- * Using 0x0 will result in the PE/COFF binary's memory layout to be shifted\r
- * with respect to the ELF version, but this shouldn't be a problem as long as\r
- * the .data's offset relative to .text is kept the same.\r
- */\r
- .text 0x0 : ALIGN(0x40) {\r
- *(.text .text.* .rodata .rodata.*)\r
- }\r
-\r
- /*\r
- * The alignment of the .data section needs to be less than or equal to the\r
- * alignment of the .text section. This ensures that the relative offset\r
- * between these sections is the same in the ELF and the PE/COFF version of\r
- * this binary.\r
- */\r
- .data : ALIGN(0x40) {\r
- *(.data .data.*)\r
- *(.bss .bss.* *COM*)\r
- }\r
- .rela ALIGN(0x20) : {\r
- *(.rela .rela.*)\r
- }\r
-\r
- /DISCARD/ : {\r
- *(.note.GNU-stack)\r
- *(.interp)\r
- *(.dynsym)\r
- *(.dynstr)\r
- *(.dynamic)\r
- *(.hash)\r
- *(.comment)\r
- }\r
-}\r