From f6f2a0267ffe0362adedaca1e237eeefcf5682fd Mon Sep 17 00:00:00 2001
From: wadesong <wadesong@codeaurora.org>
Date: Thu, 30 Nov 2017 14:34:30 +0800
Subject: [PATCH] lrdp-v2: Start to parse 'core_layout' since msm-4.9

Starting from msm-4.9, a new field named 'core_layout' will be
available to replace 'module_core' in struct module.

Add code to parse the newly introduced field for loadable module
symbol addition based on the Linux kernel version.

Change-Id: I503ba6b0d4f5928bb2fea85ab3fdd4a33150b1c0
---
 linux-ramdump-parser-v2/ramdump.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-ramdump-parser-v2/ramdump.py b/linux-ramdump-parser-v2/ramdump.py
index fba4cbc..3c0e8bb 100644
--- a/linux-ramdump-parser-v2/ramdump.py
+++ b/linux-ramdump-parser-v2/ramdump.py
@@ -1249,7 +1249,7 @@ class RamDump():
         list_offset = self.field_offset('struct module', 'list')
         name_offset = self.field_offset('struct module', 'name')
 
-        if self.kernel_version > (4, 4, 0):
+        if self.kernel_version > (4, 9, 0):
             module_core_offset = self.field_offset('struct module', 'core_layout.base')
         else:
             module_core_offset = self.field_offset('struct module', 'module_core')
-- 
GitLab