Date: Wed, 4 Jan 2017 01:06:40 -0500 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: Reviving planned ldso changes On Tue, Jan 03, 2017 at 12:43:51AM -0500, Rich Felker wrote: > - 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. Attached is a proposed, completely untested patch to implement dependency order loading, posted for review/comments. In order to work, I think it also needs p->deps to be setup unconditionally (right now it's only setup for dynamically loaded libs). Rich View attachment "ctor_dep_order.diff" of type "text/plain" (1541 bytes)
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.