On 05/10/2009 11:08 PM, Robert Collins wrote: > On Mon, 2009-05-11 at 16:12 +1200, Amos Jeffries wrote: >> >> PS. I took another look at the breakage that made me RFC, and I got >> the auth and ACL code mixed up. It's auth that is currently fubar again. >> But the principle holds: model is broken and we do need to fix it. > > I'd be strongly inclined to use a linker script to add references rather > than the reg.cc files; this would mean we don't need to change code, and > should be able to move to dynamic loading if desired (a bunch of .so > files on disk, dlopen to use).
What is a linker script? Do we have the expertise to maintain that? FWIW, I do not think the Reg.cc approach precludes the use of dynamically loadable libraries, especially in the C++ world. For example, eCAP modules auto-register themselves when dynamically loaded. Calling Init() in Reg.cc simply makes sure stuff is initialized before use. If we move to dynamic libraries, the library can call the same Init() method automagically. We may run into initialization order problems, but those are unrelated to Reg.cc approach. Thank you, Alex.
