From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x31.google.com (mail-oa1-x31.google.com [IPv6:2001:4860:4864:20::31]) by sourceware.org (Postfix) with ESMTPS id D6DCF3858D1E for ; Thu, 1 Sep 2022 13:15:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D6DCF3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-11ba6e79dd1so31377212fac.12 for ; Thu, 01 Sep 2022 06:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date; bh=LKQAdRHD5rg17/ZTBFRmXo/TBelBlhlebi28BI/hnZo=; b=B+VCytNAbRN3RV3nKlF7bjWIGOpVOnHfsVtwEnc7IiQsFF8Qr5ZE6RY/6iiJuu3H6L ot845TzSaqE2/T/V/A+yg/85suz3PpV/c+NClvT9hNAwbMs9NSI8eS2dVFmERsTuDLtY iwnXNxa3939slYDVwgw67uwquGxjhc74v5fNDhTiXdnET6Y5o34S0UVWSNFZQN7sFKIj A4+vp0PVHvrWzDvsvgwOlGI8rNnpqwGY9qRZ2lrmFoupOullzLU24B4HJvVwbv3YGBd0 2tb2Yo/udLAXNGudGpahZo6tvoPocPaceKyHNp2B6s5bY7vhgFLDWluNEkLfwWHswtE3 uV2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=LKQAdRHD5rg17/ZTBFRmXo/TBelBlhlebi28BI/hnZo=; b=e7b2qtvcloVRVy3hlrQY/TX2AwjywdgEi3Ze1APV69SAICPF5af7eMhh0tDXn+7ksv Glh+wi8OWidLdmHShEaBidN3/QeKa9Q9yk9Q5D8pA0i7zENRSRhRJYUJOt+Zuee8Jchi AK3aBjREvA42z4tXoKNaEFm1zvhrfNDkvMLFD2QdVXO9A2ferhTCxcIm9eZudHcWIhCA Siac+obW5RQ8tAJvzGqoTVBxzO9xDtfIYcyQFPDedyb+lnCK2FI3tRaDm7OTlRU3LVPY tPPNl7+G2Fds1TK/IlzMM6boCKnCaObBjsGljtneqRAqzGruAREG3VPr3O/zsKj7qIxu T5Qw== X-Gm-Message-State: ACgBeo22G+RFs2sJfNJcei518WD0sadZHGuXazJcZaPMQi/7Cnk7yc5t 9dFcJKe6Rz6t3nGUHKDp0cHMGg== X-Google-Smtp-Source: AA6agR4BdMuO+fNMzeRLx9gBYlkGzrq5r+3TuyYbmnsEWXASQ+SGDG4XG1KQ2vxr54jCA3rnwJaBqg== X-Received: by 2002:a05:6870:348d:b0:10d:f499:93cb with SMTP id n13-20020a056870348d00b0010df49993cbmr4182086oah.224.1662038116078; Thu, 01 Sep 2022 06:15:16 -0700 (PDT) Received: from [192.168.15.31] ([187.34.212.254]) by smtp.gmail.com with ESMTPSA id y5-20020a056830070500b0063b2875246dsm7483860ots.49.2022.09.01.06.15.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Sep 2022 06:15:15 -0700 (PDT) Message-ID: <68b947ba-3957-bce1-d559-c082c38e4c80@linaro.org> Date: Thu, 1 Sep 2022 10:15:13 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: ldconfig is statically linked or dynamiclly linked Content-Language: en-US To: Siddhesh Poyarekar , Lv Ying Cc: libc-help@sourceware.org References: <3f822786-189c-1c45-9415-be3f1abe916b@gmail.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 01/09/22 09:22, Siddhesh Poyarekar via Libc-help wrote: > On Thu, Sep 1, 2022 at 5:42 AM Lv Ying via Libc-help > wrote: >> I am confused when exec file ldconfig and ldd ldconfig on CentOS 8(glibc-2.28): >> >> # which ldconfig >> /usr/sbin/ldconfig >> # file /usr/sbin/ldconfig >> /usr/sbin/ldconfig: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, for GNU/Linux 3.2.0, BuildID[sha1]=90ddd9a3e194fb2ec4edd5184d9fca4df45af636, not stripped > > ldconfig is a statically linked PIE executable. The file command > tends to claim that PIE executables are shared objects, which is what > you're seeing here. > > Sid I think the issue is the file command, using a more recent one it does show that ldconfig is a static-pie: $ file elf/ldconfig elf/ldconfig: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), static-pie linked, for GNU/Linux 3.2.0, with debug_info, not stripped $ readelf -l elf/ldconfig | grep INTERP $