mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jameson Nash <vtjnash@gmail.com>
To: "Bob B." <bob66@gmx.com>
Cc: musl@lists.openwall.com, ararslan@comcast.net, jakub@jirutka.cz
Subject: Re: dl_iterate_phdr() behaves differently on musl and glibc
Date: Mon, 28 May 2018 19:16:16 -0400	[thread overview]
Message-ID: <CADnnjUUfK-SaXANRjZeCYYGFS2qH8qbKLEyMs8BJWM+sWQa8sw@mail.gmail.com> (raw)
In-Reply-To: <trinity-be7ed1b3-6035-48fd-90ee-2feaa1da929e-1527546718312@3c-app-mailcom-bs04>

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

Cool, my motivation for creating `libwhich` in part was to be able to
inspect how different systems handle dynamic libraries and this reflection
method.

So seems like the main difference is just that on Ubuntu the first entry
doesn't have a name, and those are explicitly skipped in my code (
https://github.com/vtjnash/libwhich/blob/a11efad57d90fdb95790312d90c8f66d803125cf/libwhich.c#L200
)

Indeed, the example in the Ubuntu manpage also clarifies that: "The first
shared object for which output is displayed (where the name is an empty
string) is the main program"

Which seems to suggest that users should just unconditionally skip the
first entry if they aren't interested in the program name. Does that sound
right?

-Jameson


On Mon, May 28, 2018 at 6:32 PM Bob B. <bob66@gmx.com> wrote:

> > Rather than special-casing knowledge of particular systems I think the
> > code should just be fixed so that it doesn't break if the main program
> > is included.
>
> I'm CC'ing the libwhich people so let them know and discuss.
> For context - http://www.openwall.com/lists/musl/2018/05/28/1
>

[-- Attachment #2: Type: text/html, Size: 1714 bytes --]

  reply	other threads:[~2018-05-28 23:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-28 13:44 Bob B.
2018-05-28 20:02 ` Rich Felker
2018-05-28 21:39   ` Bob B.
2018-05-28 22:16     ` Rich Felker
2018-05-28 22:31       ` Bob B.
2018-05-28 23:16         ` Jameson Nash [this message]
2018-05-30 12:33           ` Bob B.
2018-05-28 22:34   ` Luc Van Oostenryck

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=CADnnjUUfK-SaXANRjZeCYYGFS2qH8qbKLEyMs8BJWM+sWQa8sw@mail.gmail.com \
    --to=vtjnash@gmail.com \
    --cc=ararslan@comcast.net \
    --cc=bob66@gmx.com \
    --cc=jakub@jirutka.cz \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).