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

LibraryCallMonitor: add support for ELF files #416

Open
vitalych opened this issue Jul 12, 2020 · 0 comments
Open

LibraryCallMonitor: add support for ELF files #416

vitalych opened this issue Jul 12, 2020 · 0 comments

Comments

@vitalych
Copy link
Member

vitalych commented Jul 12, 2020

LIbraryCallMonitor is currently limited to Windows PE files because of the limitations of the underlying file parsers. It is possible to fix it as follows:

  1. Add a getExports() call to ELFFile.h [1]. Currently, only PEFile.h supports getting exported symbols [2]. You will have to parse the ELF file to figure out the addresses of the exported functions.
  2. Adapt the cast in LibraryCallMonitor so that it also works with ELF files [3]
  3. We may need to add support for lazy binding in LibraryCallMonitor, which is pretty common on Linux. Otherwise, the program has to built with -fno-plt.

[1] https://github.com/S2E/s2e/blob/master/libvmi/include/vmi/ELFFile.h
[2] https://github.com/S2E/s2e/blob/master/libvmi/include/vmi/PEFile.h#L127
[3] https://github.com/S2E/s2e/blob/master/libs2eplugins/src/s2e/Plugins/ExecutionMonitors/LibraryCallMonitor.cpp#L207

@vitalych vitalych changed the title LIbraryCallMonitor: add support for ELF files LibraryCallMonitor: add support for ELF files Jul 13, 2020
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