diff options
Diffstat (limited to 'libdwfl/linux-kernel-modules.c')
-rw-r--r-- | libdwfl/linux-kernel-modules.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c index 0434f1e5..6edb27f2 100644 --- a/libdwfl/linux-kernel-modules.c +++ b/libdwfl/linux-kernel-modules.c @@ -128,7 +128,7 @@ try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug) if (fd < 0) for (size_t i = 0; - i < sizeof vmlinux_suffixes / sizeof vmlinux_suffixes[0]; + i < sizeof vmlinux_suffixes / sizeof vmlinux_suffixes[0] && fd < 0; ++i) { char *zname; @@ -357,6 +357,9 @@ check_suffix (const FTSENT *f, size_t namelen) #if USE_LZMA TRY (".ko.xz"); #endif +#if USE_ZSTD + TRY (".ko.zst"); +#endif return 0; @@ -538,10 +541,14 @@ intuit_kernel_bounds (Dwarf_Addr *start, Dwarf_Addr *end, Dwarf_Addr *notes) if (result == 0) { + Dwarf_Addr addr; *end = *start; - while (read_address (&state, end)) - if (*notes == 0 && !strcmp (state.p, "__start_notes\n")) - *notes = *end; + while (read_address (&state, &addr) && addr >= *end) + { + *end = addr; + if (*notes == 0 && !strcmp (state.p, "__start_notes\n")) + *notes = *end; + } Dwarf_Addr round_kernel = sysconf (_SC_PAGESIZE); *start &= -(Dwarf_Addr) round_kernel; |