Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

armbe kernel processing failure #34

Open
skochinsky opened this issue Jan 18, 2022 · 1 comment
Open

armbe kernel processing failure #34

skochinsky opened this issue Jan 18, 2022 · 1 comment

Comments

@skochinsky
Copy link

Source: https://downloads.openwrt.org/releases/17.01.0/targets/ixp4xx/harddisk/lede-17.01.0-r3205-59508e3-ixp4xx-harddisk-ap1000-zImage

[+] Kernel successfully decompressed in-memory (the offsets that follow will be given relative to the decompressed binary)
[+] Version string: Linux version 4.4.50 (buildbot@builds-02.infra.lede-project.org) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3103-1b51a49) ) #0 Mon Feb 20 17:13:44 2017
[+] Guessed architecture: armbe successfully in 0.81 seconds
Traceback (most recent call last):
  File "C:\Work\git\vmlinux-to-elf\vmlinux_to_elf\kallsyms_finder.py", line 200, in __init__
    self.find_kallsyms_names_uncompressed()
  File "C:\Work\git\vmlinux-to-elf\vmlinux_to_elf\kallsyms_finder.py", line 540, in find_kallsyms_names_uncompressed
    raise KallsymsNotFoundException('No embedded symbol table found in this kernel')
kallsyms_finder.KallsymsNotFoundException: No embedded symbol table found in this kernel

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Work\git\vmlinux-to-elf\vmlinux_to_elf\main.py", line 67, in <module>
    args.base_address, args.file_offset
  File "C:\Work\git\vmlinux-to-elf\vmlinux_to_elf\elf_symbolizer.py", line 44, in __init__
    kallsyms_finder = KallsymsFinder(file_contents, bit_size)
  File "C:\Work\git\vmlinux-to-elf\vmlinux_to_elf\kallsyms_finder.py", line 205, in __init__
    raise first_error
  File "C:\Work\git\vmlinux-to-elf\vmlinux_to_elf\kallsyms_finder.py", line 193, in __init__
    self.find_kallsyms_token_table()
  File "C:\Work\git\vmlinux-to-elf\vmlinux_to_elf\kallsyms_finder.py", line 423, in find_kallsyms_token_table
    raise KallsymsNotFoundException('%d candidates for kallsyms_token_table in kernel image' % len(candidates_offsets))
kallsyms_finder.KallsymsNotFoundException: 0 candidates for kallsyms_token_table in kernel image

BTW, can you add a "fallaback" mode which writes a decompressed image (with or without ELF headers) on disk if kallsyms finder fails?

marin-m added a commit that referenced this issue Jan 22, 2022
…ript in order to attempt to meet the proposal from issue #34
@marin-m
Copy link
Owner

marin-m commented Jan 22, 2022

Hello,

Source: https://downloads.openwrt.org/releases/17.01.0/targets/ixp4xx/harddisk/lede-17.01.0-r3205-59508e3-ixp4xx-harddisk-ap1000-zImage

May not there just be no kernel symbols table within this file, just like the kernel that you shared in your latest comment of issue #3?

BTW, can you add a "fallaback" mode which writes a decompressed image (with or without ELF headers) on disk if kallsyms finder fails?

I added a branch with a simple entry point to just perform the decompression feature and to output a raw file afterwards (see commit 40d767d), where the corresponding executable entry point is named kernel-raw-decompressor in order to avoid confusion with vmlinux-to-elf, does the naming look right and do you think I should merge it to the master branch?

I also note that the kernel that you shared in the current issue can also be decompressed using 7-Zip.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants