From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1388A00C2; Fri, 14 Oct 2022 16:02:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6D4E42E00; Fri, 14 Oct 2022 16:02:06 +0200 (CEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id 4070042DF5 for ; Fri, 14 Oct 2022 16:02:06 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id l14-20020a05600c1d0e00b003c6ecc94285so99119wms.1 for ; Fri, 14 Oct 2022 07:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=dKbCgRZ4mxy5UcwNp9ZhvQhXKkJmXpLcXB22v9lpFQs=; b=Co873k87zUyEMKYg2XC4xaQAeQjkAVUMwy9+q9OTGGaheo06l2sDK7lU3C1N9uz1yQ tsWBu1UYU7kp+QMHoVV8/lvJRU82QReNbm5P9sERbjgbcik9VIpbNWshfBA+BB1FJFZk u9tL6HhWcpe9jP6vC4mCrm3HiL911CC0kOHk+kx3zWh7w/jbSVCwHhNfOcBwG6aJOkdL KlSJcZMH9ujWlXZQdR1twYOg4xwhmh519lUOCmiQ7BEqEh0ntGwZwJOId6akCrccTZ2Q EmCK5oc4sfC/PGcqRjaEQCCVssJUzJ6CQn3Z8RW4FZXeL8BDxwvI7EwipCjA9NMi7rSt XVXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dKbCgRZ4mxy5UcwNp9ZhvQhXKkJmXpLcXB22v9lpFQs=; b=EaTywPkOGyASSj0H8SyzIynRGIHHF/K31tpYeQokSiJDTj5RwcdQVG/L9qSYxB/VAJ t3EzWPl6atj93vcK2m99bOEMBSOZoSIhHYs5McvZC/lQgmcoVyeoHSKSSxdkxE42CuK8 +AgiavxrQr6hHb2pboNlIMxohvhrt+8Nt2YueZjOfeEkSpdN4uWaZ4SZ7Y8ociTlPewt /MMi8RJR4YNqdedb88CWO5tmQbxkXHOi0/EbZzIQDfi88/teltyLb661KLEZM5YTxJ8P D5ETXB86b/nHvqON3GeMn3zeV0L0BTotpCFiODrfXNvdHTfKJcEi3ut2bH6je3m6IicH cceA== X-Gm-Message-State: ACrzQf3IN/k3lauVhWn4qM+X4JdChIsOAhNOc3nUkxO0VOUeYHqi+T7x 0mNjJHS+kxlbA4Mv9KX1l+NrcNDlvEFO6Q== X-Google-Smtp-Source: AMsMyM4c7lvNPpuoFWPufqqEaYWyQ7PQdg8QGRdG2PVNKfSsWU9wQP2rTIqVrjsXSxAJR3kfz7DYZw== X-Received: by 2002:a05:600c:1987:b0:3b4:9b03:c440 with SMTP id t7-20020a05600c198700b003b49b03c440mr3560163wmq.14.1665756122514; Fri, 14 Oct 2022 07:02:02 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id c188-20020a1c35c5000000b003b4a68645e9sm7247131wma.34.2022.10.14.07.02.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 07:02:01 -0700 (PDT) Date: Fri, 14 Oct 2022 16:02:00 +0200 From: Olivier Matz To: Robin Jarry Cc: dev@dpdk.org Subject: Re: [PATCH] usertools/pmdinfo: remove dependency to ldd Message-ID: References: <20221013134125.448437-1-rjarry@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221013134125.448437-1-rjarry@redhat.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 > Signed-off-by: Robin Jarry Tested on buildroot without ldd. Reviewed-by: Olivier Matz