DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: Robin Jarry <rjarry@redhat.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH] usertools/pmdinfo: remove dependency to ldd
Date: Fri, 14 Oct 2022 16:02:00 +0200	[thread overview]
Message-ID: <Y0lr2AkJjJxFezlQ@platinum> (raw)
In-Reply-To: <20221013134125.448437-1-rjarry@redhat.com>

Hi Robin,

On Thu, Oct 13, 2022 at 03:41:25PM +0200, Robin Jarry wrote:
> Some environments (buildroot) do not have the ldd utility installed by
> default. However, ldd is often only a wrapper shell script that actually
> checks that the arguments are valid ELF files and executes them with
> the LD_TRACE_LOADED_OBJECTS=1 variable set in the environment.
> 
> Since ld.so is the actual ELF interpreter which is loaded first when
> executing a program, executing any dynamic ELF program/library with that
> variable set will cause all dependent dynamic libraries to be printed
> and ld.so will exit before even running main.
> 
> Excerpt from ld.so(7) man page:
> 
>   LD_TRACE_LOADED_OBJECTS
>     If set (to any value), causes the program to list its dynamic
>     dependencies, as if run by ldd(1), instead of running normally.
> 
> Change dpdk-pmdinfo.py to actually "execute" the files provided on the
> command line with LD_TRACE_LOADED_OBJECTS=1 set. Ensure that the files
> are valid dynamically executable ELF programs to avoid obscure and
> confusing errors.
> 
> Reported-by: Olivier Matz <olivier.matz@6wind.com>
> Signed-off-by: Robin Jarry <rjarry@redhat.com>

Tested on buildroot without ldd.

Reviewed-by: Olivier Matz <olivier.matz@6wind.com>

  reply	other threads:[~2022-10-14 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 13:41 Robin Jarry
2022-10-14 14:02 ` Olivier Matz [this message]
2022-10-18  7:40   ` Olivier Matz

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=Y0lr2AkJjJxFezlQ@platinum \
    --to=olivier.matz@6wind.com \
    --cc=dev@dpdk.org \
    --cc=rjarry@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).