#1 2014-10-03 18:04:19

Langley
Member
Registered: 2014-08-29
Posts: 4

Confusion over the behavior of the example code

I know I'm missing something, so I'll just say that at the outset.

The example code in the 2.1.0 branch has a great little driver that is wonderful for exploring the behavior of the framework. However, it exhibits a behavior that I'm having a hard time replicating on my own.

When I use the example code, I can load the dictionaryclient service and somehow the dictionaryservice gets loaded. The problem is I don't know how. It's as though autoloading is working, but I'm reasonably certain that this isn't the case because when autoloading "kicks in" there are log messages printed to the console and in the case of the example driver, that doesn't happen. I know all the libmoduleXXX.so files are located in the same directory and I've included that in my "test scenario" where I'm trying to replicate the behavior.

Am I missing some special relationship between the dictionaryclient and the dictionaryservice?

Another way of expressing my confusion is to ask how the relationship between the dictionaryclient and dictionaryservice is different from a scenario where autoloading is needed.

Thanks in advance!

- Langley

Offline

#2 2014-10-03 18:26:43

sascha
Administrator
Registered: 2012-05-04
Posts: 45

Re: Confusion over the behavior of the example code

Offline

#3 2014-10-03 19:29:10

Langley
Member
Registered: 2014-08-29
Posts: 4

Re: Confusion over the behavior of the example code

You are absolutely right!

I used readelf to look at the dynamic section of libdictionaryclient.so and saw a reference to libdictionaryservice.so, so I made an explicit link in my example (using -l as I built it) to create the same relationship and voila, it recreated the behavior I saw in the example driver. Without the link during build time of course it requires autoloading or explicit library loading to get them both in memory.

Thank you!

- Langley

Offline

Board footer

Powered by FluxBB