-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
MIPS ELF imported symbols are not recognized correctly #796
Comments
Glad to see this issue open, I just noticed the same issue for an elf on powerpc and was just starting to investigate it
running print("PRINTF VALUE", [(s.name, s.value) for s in l.symbols if s.name == 'printf']) also shows this:
|
Mrbenoit624
pushed a commit
to Mrbenoit624/LIEF
that referenced
this issue
Sep 19, 2023
mips and powerpc add a st_value for their import function (issue lief-project#796)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have the following file (same as in #795).
Which is compiled to MIPS platforms:
test-mips.zip
Except the shared lib (test-mips-64bit-le-lib), these parse correctly, but selecting imported symbols/function is failing.
To Reproduce
I have the following python code to show list imported symbols/functions:
Running it results in the following:
Expected behavior
Neither
printf
norstrcpy
are listed in imported, while they should be.For each ELF Symbol
is_imported
status is defined here:However on MIPS symbols have
value
:While on other platforms (like arm/x86) they do not:
Getting the value in LIEF for
printf
usingprint("PRINTF VALUE", [(s.name, s.value) for s in l.symbols if s.name == 'printf'])
also shows this:On MIPS:
PRINTF VALUE [('printf', 4831841616)]
On ARM32:
PRINTF VALUE [('printf', 0)]
On X86_64:
PRINTF VALUE [('printf', 0)]
Not sure if not having a value is a mandatory requirement for imported functions, radare2 also has a bit different definition:
In
_r_bin_elf_get_symbols_imports
:The text was updated successfully, but these errors were encountered: