You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
binary fails to load (_dl_check_map_versions) after patchelf --set-rpath #192
So, in summary:
I was using patchelf 0.9-1+b1 from debian9 repos, but run into issue #47 with binary "srsue" from srsLTE.git [1]:
$ patchelf --set-rpath /osmo-gsm-tester-srsue/srslte/lib /osmo-gsm-tester-srsue/srslte/bin/srsue
warning: working around a Linux kernel bug by creating a hole of 124461056 bytes in ‘/osmo-gsm-tester-srsue/srslte/bin/srsue’
maximum file size exceeded
so I then went into building/installing a new version of patchelf. I tried with following patchelf versions:
All of them fix the issue #47 on binary "srsue". However, all those new versions introduce a new bug with another binary generated by srsLTE.git [1] called "srspec". Patching itself seems to be working fine (patchelf doesn't exit with !=0), but afterwards the loader is unable to load the binary:
This issue doesn't show up with the original patchelf 0.9-1+b1 from debian9 I was using, so it's a regression added at some point after that and yet not fixed last release nor in currentmaster.
I confirm that the current patchelf (0.10) damages ELFs.
In my use case I need to first remove rpath/runpath and then set if explicitly as rpath. This procedure damaged most of my ELFs, and I had to find workarounds to patchelf, which were tricky and time consuming.
Activity
pespin commentedon Feb 11, 2020
I attach a diff here of readelf launched against the working binary (patchelf 0.9-1+b1) and the broken binary (master 2ba6481).
diff.log
pespin commentedon Feb 11, 2020
According to git bisect, this is the commit introducing the regression: c4deb5e
gsm-tester: Manual build and install of patchelf v0.10
ilg-ul commentedon May 24, 2020
I confirm that the current patchelf (0.10) damages ELFs.
In my use case I need to first remove rpath/runpath and then set if explicitly as rpath. This procedure damaged most of my ELFs, and I had to find workarounds to patchelf, which were tricky and time consuming.
domenkozar commentedon Jun 2, 2020
@pespin thanks for bisecting! I'm going to close this in favor of #170 to keep the duplicates down.
Fix shared library corruption when rerunning patchelf
fix: update DT_VERDEF when sections are relocated