[Buildroot] [git commit] package/patchelf: keep RPATH entries even without DT_NEEDED libraries
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Tue Aug 25 19:27:40 UTC 2020
On Tue, 25 Aug 2020 18:16:59 +0200
"Yann E. MORIN" <yann.morin.1998 at free.fr> wrote:
> > -+ if (!libFoundInRPath(canonicalPath, neededLibs, neededLibFound)) {
> > -+ debug("removing directory '%s' from RPATH because it does not contain needed libs\n",
> > -+ dirName.c_str());
> > -+ continue;
>
> I'd rather that we keep that as a warning, because in some cases it
> really is an error to keep an RPATH with no DT_NEEDED.
>
> debug("keeping directory %s in RPATH, even though it contains no needed library\n", dirName.c_str())
Such debug() messages are not even printed by default, only when you
pass --debug to patchelf. So essentially in the context of Buildroot,
those messages would never be seen. With that information, does it
still make sense ?
Also, it would IMO still be wrong to output a warning. Having a RPATH
to resolve dlopen() library paths is a perfectly valid and legitimate
situation, there is nothing to warn about. Excessive warnings make
warnings useless I believe.
See the dlopen() man page where they explain how dlopen() behaves when
the library path doesn't start with a /.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the buildroot
mailing list