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

Linker fails to link dynamic link libraries correctly #1469

Open
zhu1024 opened this issue May 6, 2024 · 0 comments
Open

Linker fails to link dynamic link libraries correctly #1469

zhu1024 opened this issue May 6, 2024 · 0 comments

Comments

@zhu1024
Copy link

zhu1024 commented May 6, 2024

*Describe the bug
When using Qiling to simulate executable file, I encountered a problem where the linker was unable to link dynamic link libraries correctly, i.e. ld-linux.so was unable to link dynamic link libraries such as libc.so. This resulted in the target program in the simulation environment not being able to find the required DLLs, and thus the simulation could not be executed successfully.

Sample Code

ql = Qiling([r'./update/os'], r'./rootfs', verbose=QL_VERBOSE.DISASM)
ql.run(end=0x15fd0)    #15fd0 is the address of the main function

Expected behavior
Dynamic link libraries are all loaded successfully, qiling can be called by symbols can jump to the appropriate location.

Screenshots
图片12
pic13

Additional context
The environment should be fine and there are many other executables that can be emulated successfully. There is one executable that can also be simulated successfully after removing some of the dynamic link libraries using the patchelf tool. Is there a solution for this situation?

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

1 participant