mailing list of musl libc
 help / color / mirror / code / Atom feed
* Reviving planned ldso changes
@ 2017-01-03  5:43 Rich Felker
  2017-01-04  6:06 ` Rich Felker
  2017-01-04 10:51 ` Szabolcs Nagy
  0 siblings, 2 replies; 21+ messages in thread
From: Rich Felker @ 2017-01-03  5:43 UTC (permalink / raw)
  To: musl

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

Rich


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-03-08 18:55 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-03  5:43 Reviving planned ldso changes 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
2017-02-16  1:58   ` Szabolcs Nagy
2017-02-16  2:39     ` Rich Felker

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