crash failed with mainline kernel with kaslr enabled.
Add the flags which will enable kaslr offset calculating.
Signed-off-by: Dave Young <yangrr.2009(a)tsinghua.org.cn>
---
loongarch64.c | 8 ++++++++
1 file changed, 8 insertions(+)
Index: crash/loongarch64.c
===================================================================
--- crash.orig/loongarch64.c 2026-08-18 08:59:46.731117021 +0800
+++ crash/loongarch64.c 2026-08-24 14:55:57.330529708 +0800
@@ -1891,6 +1891,14 @@
machdep->last_ptbl_read = 0;
machdep->verify_paddr = generic_verify_paddr;
machdep->ptrs_per_pgd = PTRS_PER_PGD;
+
+ /*
+ * Even if CONFIG_RANDOMIZE_BASE is not configured,
+ * derive_kaslr_offset() should work and set
+ * kt->relocate to 0
+ */
+ if (!kt->relocate && !(kt->flags2 & (RELOC_AUTO|KASLR)))
+ kt->flags2 |= (RELOC_AUTO|KASLR);
break;
case PRE_GDB: