Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [git commit] package/patchelf: keep RPATH entries even without DT_NEEDED libraries
Date: Tue, 25 Aug 2020 21:27:40 +0200	[thread overview]
Message-ID: <20200825212740.46eabe58@windsurf.home> (raw)
In-Reply-To: <20200825161659.GE2246@scaer>

On Tue, 25 Aug 2020 18:16:59 +0200
"Yann E. MORIN" <yann.morin.1998@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

      reply	other threads:[~2020-08-25 19:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 11:11 [Buildroot] [git commit] package/patchelf: keep RPATH entries even without DT_NEEDED libraries Thomas Petazzoni
2020-08-25 16:16 ` Yann E. MORIN
2020-08-25 19:27   ` Thomas Petazzoni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200825212740.46eabe58@windsurf.home \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox