Add mips64_verify_symbol() implementation, accept or reject a
symbol from the kernel namelist.

Signed-off-by: Huacai Chen <[email protected]>
Signed-off-by: Youling Tang <[email protected]>
---
v1 -> v2:
 - Fix a typo.

 mips64.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/mips64.c b/mips64.c
index 98c4fdd..eb41c82 100644
--- a/mips64.c
+++ b/mips64.c
@@ -1048,7 +1048,14 @@ mips64_get_elf_notes(void)
 static int
 mips64_verify_symbol(const char *name, ulong value, char type)
 {
-       return TRUE;
+       if (CRASHDEBUG(8) && name && strlen(name))
+               fprintf(fp, "%08lx %s\n", value, name);
+
+       if (STREQ(name, "_text") || STREQ(name, "_stext"))
+               machdep->flags |= KSYMS_START;
+
+       return (name && strlen(name) && (machdep->flags & KSYMS_START) &&
+               !STRNEQ(name, "__func__.") && !STRNEQ(name, "__crc_"));
 }
 
 /*
-- 
2.1.0

--
Crash-utility mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/crash-utility

Reply via email to