aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/pr22266_script.t
diff options
context:
space:
mode:
Diffstat (limited to 'gold/testsuite/pr22266_script.t')
-rw-r--r--gold/testsuite/pr22266_script.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/gold/testsuite/pr22266_script.t b/gold/testsuite/pr22266_script.t
new file mode 100644
index 0000000..a9bc364
--- /dev/null
+++ b/gold/testsuite/pr22266_script.t
@@ -0,0 +1,23 @@
+/* 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*)
+ }
+ .rodata.cst16 : {
+ *(.rodata.cst16*)
+ }
+ .data.rel.ro : {
+ *(.data.rel.ro*)
+ }
+ .data : {
+ *(.data*)
+ }
+ .bss : {
+ *(.bss*)
+ }
+}