[PATCH v2 14/17] MIPS64: Add the realization of verify symbol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
Signed-off-by: Youling Tang <tangyouling@xxxxxxxxxxx>
---
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
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux