-
-
Notifications
You must be signed in to change notification settings - Fork 520
patchelf breaks dylibs from recent Firefox Nightly builds #520
Copy link
Copy link
Open
Labels
Description
Describe the bug
After using patchelf --set-rpath on a library from a recent Firefox Nightly build, the library can no longer be loaded because it segfaults the linker.
Steps To Reproduce
- Download and unpack https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central/firefox-119.0a1.en-US.linux-x86_64.tar.bz2
- Attempt to dlopen any of the .so files (
libmozsqlite3.sowas my test target), e.g. withpython -c 'import ctypes; ctypes.cdll.LoadLibrary("./libmozsqlite3.so")' - Observe success
patchelf --set-rpath "test" ./libmozsqlite3.so- Attempt
dlopenagain - Segfault
Expected behavior
No segfault.
patchelf --version output
Attempted both default nixpkgs 0.15.0 and current nixpkgs patchelfUnstable (c401289).
Additional context
This seems to have been caused by upstream enabling some kind of advanced linker wizardry called "relrhack": https://hg.mozilla.org/mozilla-central/rev/032b87ff55061bcbdc7a85d9e18fde814797073a
The last build before that commit works fine.
Reactions are currently unavailable