diff options
Diffstat (limited to 'driver')
-rw-r--r-- | driver/utils/merge_sections_pe.ld | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/driver/utils/merge_sections_pe.ld b/driver/utils/merge_sections_pe.ld new file mode 100644 index 0000000000..c9eed87ced --- /dev/null +++ b/driver/utils/merge_sections_pe.ld @@ -0,0 +1,26 @@ +/* Linker script to undo -split-sections and merge all sections together when + * linking relocatable object files for GHCi. + * ld -r normally retains the individual sections, which is what you would want + * if the intention is to eventually link into a binary with --gc-sections, but + * it doesn't have a flag for directly doing what we want. */ +SECTIONS +{ + .text : { + *(.text$*) + } + .rdata : { + *(.rdata$*) + } + .data : { + *(.data$*) + } + .pdata : { + *(.pdata$*) + } + .xdata : { + *(.xdata$*) + } + .bss : { + *(.bss$*) + } +} |