Linker fails to link dynamic link libraries correctly

Aperta
#1,469 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Start with the Qiling invocation in the sample, using ./update/os and ./rootfs, and reproduce the run through address 0x15fd0. Trace how ld-linux.so handles the listed libraries, including libc.so, and compare with the executable modified by patchelf. Done means the dynamic libraries load successfully and symbol calls jump to the appropriate locations.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

*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?

Lingua principale
Python
Stelle
6.2k
Fork
806
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di qilingframework/qiling

Tutte le issue di qilingframework/qiling

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.