Created
May 9, 2017 10:59
-
-
Save AaronDMarasco-VSI/cacfade609b77d8627567eaf3202d30e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- src/patchelf.cc.orig 2015-09-23 14:32:37.245849869 -0400 | |
+++ src/patchelf.cc 2015-09-23 14:49:41.719109921 -0400 | |
@@ -970,6 +970,25 @@ | |
return; | |
} | |
+ if (soname) | |
+ debug("current SONAME is '%s'\n", soname); | |
+ | |
+ if (soname and newSoname == "OCPI") { | |
+ char *old = strstr(soname, "_s.so"); | |
+ if (old) { | |
+ do { | |
+ *old = *(old + 2); | |
+ } while (*old++); | |
+ *old = '\0'; // One more NULL (there should now be three at the end: original, copied, and this one stuffed in between) | |
+ // memcpy(old, ".so\0\0", 5); | |
+ debug("new SONAME is `%s'\n", soname); | |
+ changed = true; | |
+ return; | |
+ } else { | |
+ error("Could not find '_s.so' in SONAME!"); | |
+ } | |
+ } | |
+ | |
/* Zero out the previous SONAME */ | |
unsigned int sonameSize = 0; | |
if (soname) { | |
@@ -1545,6 +1564,10 @@ | |
setSoname = true; | |
newSoname = argv[i]; | |
} | |
+ else if (arg == "--ocpi-fix-soname") { | |
+ setSoname = true; | |
+ newSoname = "OCPI"; | |
+ } | |
else if (arg == "--remove-rpath") { | |
removeRPath = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment