-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
--set-rpath corrupts symbols that are suffix of current RPath #162
Comments
Good catch, just ran into the very same problem in an OpenWRT build. They use patchelf to set an empty rpath, the affected binary uses Any pointers on how to work around this bug? |
If you comment out the following 4 lines in modifyRPath() it should work: if (newRPath.size() <= rpathSize) {
strcpy(rpath, newRPath.c_str());
return;
} Also the |
I think @eliasnaur's assessment here is accurate. |
The GNU linker merges together items that share a common suffix in the dynamic string table, where RPath lives. If you have an Rpath like
somedir/lib
and a symbol calledb
, the symbolb
will point to the end of the Rpath. When the Rpath is replaced, the symbol's name will be changed toX
.See http://dsludwig.github.io/2019/02/12/building-up-to-something.html for references
The text was updated successfully, but these errors were encountered: