LD_PRELOAD work in progress

Michael Terry michael.terry at canonical.com
Tue Feb 24 23:17:14 UTC 2015


On Tue, Feb 24, 2015 at 5:57 PM, Jamie Strandboge <jamie at canonical.com>
wrote:

> Actually, I have a question:
>
> Currently the thinking is that an app may declare its dependency on 0 or
> more
> frameworks and may also itself declare its own overlay, with the overlayfs
> idea,
> the launcher will mount the frameworks in order on top of each other, with
> the
> app overlay on top of that, then exec the program.
>
> It seems like we could achieve this with the LD_PRELOAD idea by requiring
> the
> frameworks to each ship a preloadable library, then the launcher builds up
> the
> LD_PRELOAD list appropriately before launching the app. This could be made
> to
> work, but I wonder if we think hard about multiple frameworks and an app
> overlay
> with LD_PRELOAD in mind, if there is a simpler way.
>
> Michael, had you considered the above use case when investigating your
> idea?


I hadn't considered that case, no.  Currently, my preload library works by
looking at an environment variable for its new overlay root.  But I imagine
that instead of loading multiple libraries, we could instead make that
variable a list of directories.  And whatever code sets that environment
variable could determine the list of overlay directories from the set of
frameworks the app needs.

And that's simpler than a chain of preloaded libraries too.

-- 
-mt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20150224/ee54e0bc/attachment.html>


More information about the snappy-devel mailing list