The globals in the main program that does dlopenshould be visible to dynamically loaded code. However, the best advice I've seen so far (especially if you ever wanted to have even vaguely portable code) should only pass function calls through the link delimiter and not export any variables in any direction. It is also best if there is an API for the downloaded code to register interesting parts of my API with the loader (for example, “This is how I provide this SPI for drawing foobars on baz”), since this is a much more reasonable way to make callbacks, and not just knock everything together.
[EDIT]: , , . , , , SPI API, , .so, . , , , (, , - ).