-
Notifications
You must be signed in to change notification settings - Fork 156
WIP: Experiment to use LIEF #187
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
Conversation
Add a new flag to make it possible to use the LIEF library to patch ELF files instead of using `patchelf`.
requirements.txt
Outdated
@@ -1,2 +1,3 @@ | |||
wheel == 0.31.1 | |||
pyelftools >=0.24 | |||
https://lief-project.github.io/packages/lief/lief-0.10.0.dev0-cp37-cp37m-manylinux1_x86_64.whl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lief
has been published in pypi. Why don't you install it from there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am, but I haven't yet pushed the latest changes. I just did now. Note that this is still a work in progress.
I have to build on manylinux2010. So I applied this patch and built the patched
On importing the package on
You can checkout the corresponding scripts and Dockerfile which I use. Hope it would be helpful. |
I came across the same issue while I was testing LIEF with auditwheel. I think this might be due to a bug in LIEF but I can't reproduce the issue right now. What would be most useful is a concrete reproducer including the exact LIEF version, vendored library name and version and the environment, so we can further investigate this. I am not able to dedicate much time to this at the moment but I am planning to follow up soon. @figroc if you could upload the wheel somewhere (before invoking auditwheel on it) I can check if I can reproduce the issue. |
@lkollar You can build the wheel with the command:
The non-audited wheel file The commit I applied to build the |
@figroc thanks, I managed to reproduce the issue with |
logger.info("Replacing needed library: %s with %s", | ||
lib.name, new_so_name) | ||
lib.name = new_so_name | ||
elf.write(file_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my case I also needed to:
for sym in elf.symbols_version_requirement:
if sym.name == so_name:
sym.name = new_so_name
Testing out LIEF for #174.
This will fail CI at the moment because of the missing wheel for CentOS 5.