mirror of
https://github.com/crash-utility/crash
synced 2025-03-02 12:30:31 +00:00
Fix for the "dis <function>" option with kernel module text
symbols on Linux 5.0 and later kernels. Without the patch, the disassembly may stop prematurely or extend into the next function because the st_size member of the Elf32_Sym or Elf64_Sym text symbol structures can no longer be used as the function size. (anderson@redhat.com)
This commit is contained in:
parent
b0b3ef2eda
commit
2eadad07aa
@ -2986,6 +2986,9 @@ kallsyms_module_function_size(struct syment *sp, struct load_module *lm, ulong *
|
||||
if (!(lm->mod_flags & MOD_KALLSYMS) || !(kt->flags & KALLSYMS_V2))
|
||||
return FALSE;
|
||||
|
||||
if (THIS_KERNEL_VERSION >= LINUX(5,0,0)) /* st_size not useable */
|
||||
return FALSE;
|
||||
|
||||
module_buf = GETBUF(lm->mod_size);
|
||||
modbuf = module_buf + (lm->module_struct - lm->mod_base);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user