Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 3 Jan 2017 00:43:51 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Reviving planned ldso changes

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.