public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Fergus Dall <sidereal@google.com>
Cc: libc-alpha@sourceware.org, clumptini <clumptini@google.com>,
	chromeos-toolchain@google.com
Subject: Re: [PATCH v3 1/2] rtld: Add --no-default-paths option
Date: Wed, 9 Jun 2021 01:43:30 -0400	[thread overview]
Message-ID: <YMBVAo/yaeZbdjNp@vapier> (raw)
In-Reply-To: <CAAjxMxeoMHuOQJ1K95pBfby_egSWM0w717O5b_nw73-kAqyfKA@mail.gmail.com>

On 07 Jun 2021 20:28, Fergus Dall via Libc-alpha wrote:
> This option causes the default library search path to be skipped,
> using only the paths in DT_RPATH, LD_LIBRARY_PATH, and
> DT_RUNPATH. This option implies --inhibit-cache, as there is no point
> in searching a cache of system libraries when we are not using the
> system libraries at all.

in docs, should we be overly pedantic for clarity sake ?  for example:
-search the default system paths
+search the default (compiled in) system paths

> --- a/elf/rtld.c
> +++ b/elf/rtld.c
> @@ -1204,6 +1205,15 @@ dl_main (const ElfW(Phdr) *phdr,
>  	    _dl_argc -= 2;
>  	    _dl_argv += 2;
>  	  }
> +        else if (! strcmp (_dl_argv[1], "--no-default-paths"))
> +          {
> +            GLRO(dl_search_default_paths) = 0;
> +            GLRO(dl_inhibit_cache) = 1;

bad indentation

> --- a/sysdeps/generic/ldsodefs.h
> +++ b/sysdeps/generic/ldsodefs.h
> @@ -551,6 +551,9 @@ struct rtld_global_ro
>    /* Do we read from ld.so.cache?  */
>    EXTERN int _dl_inhibit_cache;
>  
> +  /* Do we search the default system paths? */

two spaces before */
-mike

      reply	other threads:[~2021-06-09  5:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  2:25 [PATCH] " Fergus Dall
2021-05-25  3:22 ` Mike Frysinger
2021-05-25 12:01   ` Carlos O'Donell
2021-05-26  8:10     ` Fergus Dall
2021-05-25 17:34 ` Joseph Myers
2021-06-07 10:28 ` [PATCH v3 1/2] " Fergus Dall
2021-06-09  5:43   ` Mike Frysinger [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=YMBVAo/yaeZbdjNp@vapier \
    --to=vapier@gentoo.org \
    --cc=chromeos-toolchain@google.com \
    --cc=clumptini@google.com \
    --cc=libc-alpha@sourceware.org \
    --cc=sidereal@google.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).