summaryrefslogtreecommitdiff
path: root/sys/arch/loongson
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2019-11-09 20:07:01 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2019-11-09 20:07:01 +0000
commit79ae1b85e00b046d6b83378e2374a08e91d8c79c (patch)
tree48a44463abbea2016493120f3beed6dd69e657f8 /sys/arch/loongson
parentf297199eb02ce6fac9f8f676bcb421a30a7740ff (diff)
Retguard will start using sections named ".openbsd.randomdata.retguard.*"
and not just ".openbsd.randomdata.retguard". Accept both in the kernel ldscripts so that they're placed together between the __retguard_{start,end} symbols. Similarly, match not just ".openbsd.randomdata" but also ".openbsd.randomdata.*" to pick up other random (pun intended) items. While here, stub in those retguard bits into all the ldscripts. ok deraadt@
Diffstat (limited to 'sys/arch/loongson')
-rw-r--r--sys/arch/loongson/conf/ld.script9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/loongson/conf/ld.script b/sys/arch/loongson/conf/ld.script
index 4b58a5c08eb..c8680b0fc6c 100644
--- a/sys/arch/loongson/conf/ld.script
+++ b/sys/arch/loongson/conf/ld.script
@@ -10,7 +10,14 @@ SECTIONS
_gp = ALIGN(16) + 0x7ff0;
.data : { *(.data .data.* .gnu.linkonce.d.*) }
.openbsd.randomdata :
- { *(.openbsd.randomdata) }
+ {
+ /* XXX shouldn't this be placed next to rodata? */
+ __retguard_start = ABSOLUTE(.);
+ *(.openbsd.randomdata.retguard .openbsd.randomdata.retguard.*)
+ /* XXX . = ALIGN(0x1000); */
+ __retguard_end = ABSOLUTE(.);
+ *(.openbsd.randomdata .openbsd.randomdata.*)
+ }
PROVIDE (edata = .);
.sbss : { *(.sbss .sbss.* .gnu.linkonce.sb.* .scommon) }
.bss : { *(.bss .bss.* .gnu.linkonce.b.* COMMON) }