From e9f636fa532b453e47b0e8aa23011caf8f5f201f Mon Sep 17 00:00:00 2001 From: Patrick Wildt Date: Wed, 4 Oct 2017 21:04:57 +0000 Subject: Due to changes in LLD where sections are sorted in a different way, the .got section was put into the randomdata segment. This caused the bootloader to overwrite parts of the .got and leads to broken pointers. Explicitly put the .got section into the .data segment. ok kettenis@ --- sys/arch/arm64/conf/kern.ldscript | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/arch/arm64/conf/kern.ldscript b/sys/arch/arm64/conf/kern.ldscript index 9a4dd31ba86..f4420390c03 100644 --- a/sys/arch/arm64/conf/kern.ldscript +++ b/sys/arch/arm64/conf/kern.ldscript @@ -1,4 +1,4 @@ -/* $OpenBSD: kern.ldscript,v 1.5 2017/03/22 10:47:29 kettenis Exp $ */ +/* $OpenBSD: kern.ldscript,v 1.6 2017/10/04 21:04:56 patrick Exp $ */ /* $NetBSD: ldscript.evbarm,v 1.2 2003/03/05 23:54:22 thorpej Exp $ */ OUTPUT_ARCH(aarch64) @@ -45,6 +45,10 @@ SECTIONS { *(.openbsd.randomdata) } :openbsd_randomize :data + .got : + { + *(.got .got.*) + } :data .data : { *(.data .data.*) -- cgit v1.2.3