+2020-07-19 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * scripttempl/elf.sc (ETEXT_LAST_IN_RODATA_SEGMENT): New variable.
+ * emulparams/elf64mmix.sh (ETEXT_LAST_IN_RODATA_SEGMENT): Define.
+ * testsuite/ld-mmix/sec-1.d: Adjust.
+
2020-07-19 Alan Modra <amodra@gmail.com>
* emultempl/ppc64elf.em (power10-stubs): Accept optional "auto" arg.
# OTHER_SYMBOLS - symbols to place right at the end of the script.
# ETEXT_NAME - name of a symbol for the end of the text section,
# normally etext.
+# ETEXT_LAST_IN_RODATA_SEGMENT - emit ETEXT_NAME after all sections in
+# the read-only data segment (which may or may not be equal to
+# the code segment), instead of after just the code parts.
# SEPARATE_CODE - if set, .text and similar sections containing
# actual machine instructions must be in wholly disjoint
# pages from any other data, including headers
KEEP (*(SORT_NONE(.fini)))
${RELOCATING+${FINI_END}}
} ${FILL}
- ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
- ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
- ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
+ ${RELOCATING+${ETEXT_LAST_IN_RODATA_SEGMENT-PROVIDE (__${ETEXT_NAME} = .);}}
+ ${RELOCATING+${ETEXT_LAST_IN_RODATA_SEGMENT-PROVIDE (_${ETEXT_NAME} = .);}}
+ ${RELOCATING+${ETEXT_LAST_IN_RODATA_SEGMENT-PROVIDE (${ETEXT_NAME} = .);}}
${RELOCATING+${TEXT_SEGMENT_ALIGN}}
EOF
.exception_ranges ${RELOCATING-0} : ONLY_IF_RO { *(.exception_ranges${RELOCATING+*}) }
${TEXT_PLT+${PLT_NEXT_DATA+${PLT} ${OTHER_PLT_SECTIONS}}}
+ ${RELOCATING+${ETEXT_LAST_IN_RODATA_SEGMENT+PROVIDE (__${ETEXT_NAME} = .);}}
+ ${RELOCATING+${ETEXT_LAST_IN_RODATA_SEGMENT+PROVIDE (_${ETEXT_NAME} = .);}}
+ ${RELOCATING+${ETEXT_LAST_IN_RODATA_SEGMENT+PROVIDE (${ETEXT_NAME} = .);}}
+
${RELOCATING+/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */}
${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}}