[ltt-dev] UST todo: link with liburcu statically (or protected ?)

Mathieu Desnoyers compudj at krystal.dyndns.org
Thu Mar 3 10:21:28 EST 2011


Hi,

Yesterday, Yannick fell into a trap: he linked apache with libust and
liburcu (rather than liburcu-bp). So liburcu probably did override the
synchronize_rcu() symbol that libust should have used, and his
application crashed.

Normally, the application should be able to link with the flavor of URCU
it wants, and libust should use its own internal flavor of URCU. So the
quick way would be to have libust link with liburcu-bp statically rather
than dynamically. Another way to do it would be to find a way to force
the linking to be done privately with the library, without letting the
application override the symbol (but I'm not sure exactly wich of the
gcc linking option would allow this).

Just to be clear: it would be perfectly acceptable for an application to
use liburcu while liburcu-bp use liburcu-bp internally. It's all OK as
long as the respective symbols don't clash.

So I think it would make sense to go for the static linking here. Anyone
is willing to look at the build system to figure out how to do this ?
Any other ideas ?

Thanks,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list