Le jeu. 10 oct. 2019 à 14:30, Eric Noulard <eric.noul...@gmail.com> a écrit :
> > > Le jeu. 10 oct. 2019 à 14:02, Zakrzewski, Jakub < > jakub.zakrzew...@scheer-group.com> a écrit : > >> ------------------------------ >> *From:* CMake <cmake-boun...@cmake.org> on behalf of Eric Noulard < >> eric.noul...@gmail.com> >> *Sent:* 10 October 2019 12:05 >> *To:* DIXON, MARK C. >> *Cc:* cmake@cmake.org >> *Subject:* [DKIM] Re: [CMake] cmake end user vs. developer rpath handling >> >> >> > No they can't because the maximum size is burried into the binary ELF >> file, >> > that why CMake "reserve" some space with many ";;;" in order to replace >> BUILD_RPATH with INSTALL_RPATH when doing >> > 'install'. >> >> Interesting. >> So you're saying that this: >> https://github.com/NixOS/patchelf/blob/8cc2d64444b0946abb0009058865cd46165b69c4/src/patchelf.cc#L1288-L1319 >> does not really work? (An honest question) >> > > Nope I meant that my manual page forr chrpath says: > -r <path> | --replace <path> > Replace current rpath or runpath setting with the path > given. The new path must be shorter or the same length as the current path. > > patchelf does not seem to have this limitation. > I remember trying and being hit by that issue, but I did not tried it > recently. > I'll try again and come back to you. > with chrpath try to replace an rpath with a longer one I get: new rpath '/../lib:/purposely/too/long/rpath/hdsjds/dshkjhdsk/dsgdjsj' too large; maximum length 104 with patchelf is works with an intriguing warning: warning: working around a Linux kernel bug by creating a hole of 2093056 bytes in ‘/path/to/executable’ which seems to be a resolved issue: https://github.com/NixOS/patchelf/issues/92 after that on the modified executable, chrpath is printing weird output when asking to read rpath. patchelf does properly print modified rpath. I think the SO article gives enough reference for this: https://stackoverflow.com/questions/13769141/can-i-change-rpath-in-an-already-compiled-binary So I was wrong, thank you for your honest question Jakub. I learned something usefull thanks to you. -- Eric
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake