public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>,
	Lv Ying <lvying.system.thoughts@gmail.com>
Cc: libc-help@sourceware.org
Subject: Re: ldconfig is statically linked or dynamiclly linked
Date: Thu, 1 Sep 2022 10:15:13 -0300	[thread overview]
Message-ID: <68b947ba-3957-bce1-d559-c082c38e4c80@linaro.org> (raw)
In-Reply-To: <CAAHN_R0D==9NOkC2aqMGAS5ug+Eq=D0Fp303soDqTERxEOwYxQ@mail.gmail.com>



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
> <libc-help@sourceware.org> 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
$

      reply	other threads:[~2022-09-01 13:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01  9:41 Lv Ying
2022-09-01 12:19 ` Florian Weimer
2022-09-01 12:22 ` Siddhesh Poyarekar
2022-09-01 13:15   ` Adhemerval Zanella Netto [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=68b947ba-3957-bce1-d559-c082c38e4c80@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-help@sourceware.org \
    --cc=lvying.system.thoughts@gmail.com \
    --cc=siddhesh.poyarekar@gmail.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 read-only IMAP folder(s) and NNTP newsgroup(s).