marin-m / vmlinux-to-elf

A tool to recover a fully analyzable .ELF from a raw kernel, through extracting the kernel symbol table (kallsyms)
GNU General Public License v3.0
1.37k stars 131 forks source link

ValueError: 2 candidates for kallsyms_token_table in kernel image #29

Closed liettua closed 3 years ago

liettua commented 3 years ago

Hello, im trying to use vmlinux-to-elf on this image: https://drive.google.com/file/d/1D4tMA-gllrzNfHw6bw2DvDnIINpz6gEG/view?usp=sharing

but i get error:

  File "./vmlinux-to-elf", line 63, in <module>
    ElfSymbolizer(
  File "/home/henris/vmlinux-to-elf/vmlinux_to_elf/elf_symbolizer.py", line 44, in __init__
    kallsyms_finder = KallsymsFinder(file_contents, bit_size)
  File "/home/henris/vmlinux-to-elf/vmlinux_to_elf/kallsyms_finder.py", line 193, in __init__
    self.find_kallsyms_token_table()
  File "/home/henris/vmlinux-to-elf/vmlinux_to_elf/kallsyms_finder.py", line 423, in find_kallsyms_token_table
    raise ValueError('%d candidates for kallsyms_token_table in kernel image' % len(candidates_offsets))
ValueError: 2 candidates for kallsyms_token_table in kernel image

Could you help?

marin-m commented 3 years ago

Hello,

It should now be fixed by commit 9b5d680, can you please confirm?

Thanks!

liettua commented 3 years ago

Hello,

It should now be fixed by commit 9b5d680, can you please confirm?

Thanks!

Yes it does work now. Thank you