summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaya <maya@NetBSD.org>2022-01-24 00:15:09 +0000
committermaya <maya@NetBSD.org>2022-01-24 00:15:09 +0000
commit4e2ada596f55e5b79d5a2d5ef27291d7349a2a36 (patch)
tree96b3aa0a8fc2f10ab2790c8295654076c356eb71
parent3c2957df8e52b13da5ca60bae285b3d26a9b35a4 (diff)
put .note.Xen into PT_NOTE
this is where grub 2.02 and possibly other things expect to find it. Fixes booting with grub2 on prgmr.com.
-rw-r--r--sys/arch/amd64/conf/kern.ldscript.Xen13
-rw-r--r--sys/arch/i386/conf/kern.ldscript.Xen13
2 files changed, 22 insertions, 4 deletions
diff --git a/sys/arch/amd64/conf/kern.ldscript.Xen b/sys/arch/amd64/conf/kern.ldscript.Xen
index c9971f547f3..b03bd4666a2 100644
--- a/sys/arch/amd64/conf/kern.ldscript.Xen
+++ b/sys/arch/amd64/conf/kern.ldscript.Xen
@@ -1,4 +1,4 @@
-/* $NetBSD: kern.ldscript.Xen,v 1.17 2020/05/21 09:36:24 jdolecek Exp $ */
+/* $NetBSD: kern.ldscript.Xen,v 1.18 2022/01/24 00:15:09 maya Exp $ */
#include "assym.h"
@@ -13,7 +13,7 @@ SECTIONS
*(.text.*)
*(.stub)
. = ALIGN(__PAGE_SIZE);
- } =0xCC
+ } :main =0xCC
_etext = . ;
PROVIDE (etext = .) ;
@@ -80,5 +80,14 @@ SECTIONS
{
KEEP(*(.note.netbsd.ident));
}
+ .note.Xen :
+ {
+ KEEP(*(.note.Xen));
+ } :notes
}
+PHDRS
+{
+ main PT_LOAD;
+ notes PT_NOTE;
+}
diff --git a/sys/arch/i386/conf/kern.ldscript.Xen b/sys/arch/i386/conf/kern.ldscript.Xen
index 07f8bd9933d..39413e7edd3 100644
--- a/sys/arch/i386/conf/kern.ldscript.Xen
+++ b/sys/arch/i386/conf/kern.ldscript.Xen
@@ -1,4 +1,4 @@
-/* $NetBSD: kern.ldscript.Xen,v 1.16 2018/06/24 18:24:53 maxv Exp $ */
+/* $NetBSD: kern.ldscript.Xen,v 1.17 2022/01/24 00:15:09 maya Exp $ */
#include "assym.h"
@@ -12,7 +12,7 @@ SECTIONS
*(.text.*)
*(.stub)
. = ALIGN(__PAGE_SIZE);
- } =0xCC
+ } :main =0xCC
_etext = . ;
PROVIDE (etext = .) ;
@@ -75,5 +75,14 @@ SECTIONS
{
KEEP(*(.note.netbsd.ident));
}
+ .note.Xen :
+ {
+ KEEP(*(.note.Xen));
+ } :notes
}
+PHDRS
+{
+ main PT_LOAD;
+ notes PT_NOTE;
+}