mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Reviving planned ldso changes
Date: Wed, 4 Jan 2017 11:51:09 +0100	[thread overview]
Message-ID: <20170104105108.GD6695@port70.net> (raw)
In-Reply-To: <20170103054351.GA8459@brightrain.aerifal.cx>

* Rich Felker <dalias@libc.org> [2017-01-03 00:43:51 -0500]:
> One item that's been on the agenda for a long time (maybe 1.5 years
> now?) is planned dynamic linker improvements. The thread "Further
> dynamic linker optimizations" from summer 2015 covered parts but maybe
> not all of what I had in mind.
> 
> - Instead of a global flag for each library, have a separate linked
>   list for globally visible libraries. This will speed up symbol
>   lookup (by skipping non-global ones, and skipping checking the
>   global flag) and also makes it so that load order searching can be
>   done based on the order in which the libraries became global, rather
>   than their original load order when they might have been non-global.
> 
> - Dependency-order ctor execution. I think the walk order looks
>   something like, starting at a given node (initially the main app or
>   new library being loaded dynamically), traversing to its first
>   deps[] entry that hasn't been constructed, or, if none remain,
>   executing its ctors then traversing back to its needed_by. This
>   process avoids the need for any call recursion and should be
>   near-optimal (if not optimal) provided the position in a dso's
>   deps[] list is saved in the dso struct.
> 
> - Recursive dlopen improvements. The thread "dlopen deadlock" from
>   January 2016 covers some of the issues. I don't think we reached a
>   complete conclusion/solution, but for reasonable cases where it's
>   clear that dlopen *should* work without deadlock, I think we have a
>   proposed design that works.
> 
> - Possibly other optimizations I've left out...

- symbol lookup logic is duplicated between do_dlsym and find_sym,
  it would be nice to do that with common code path if possible.


  parent reply	other threads:[~2017-01-04 10:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03  5:43 Rich Felker
2017-01-04  6:06 ` Rich Felker
2017-01-04  6:22   ` Rich Felker
2017-01-04 19:36     ` Rich Felker
2017-01-14 21:30       ` A. Wilcox
2017-01-15 17:44         ` Rich Felker
2017-02-26  1:04           ` Szabolcs Nagy
2017-02-26  1:39             ` Rich Felker
2017-02-26 10:28               ` Szabolcs Nagy
2017-02-26 15:20                 ` Rich Felker
2017-02-26 15:34                   ` Szabolcs Nagy
2017-02-26 21:39                     ` Rich Felker
2017-03-03  1:30                       ` Rich Felker
2017-03-04 10:58                         ` Szabolcs Nagy
2017-03-06  1:11                           ` Rich Felker
2017-03-07 22:02                             ` Rich Felker
2017-03-08 18:55                               ` Rich Felker
2017-03-06 16:25                         ` Rich Felker
2017-01-04 10:51 ` Szabolcs Nagy [this message]
2017-02-16  1:58   ` Szabolcs Nagy
2017-02-16  2:39     ` Rich Felker

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=20170104105108.GD6695@port70.net \
    --to=nsz@port70.net \
    --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).