linker --whole-archive, --start-group options and noinst_RELOCATABLES
I am working for ODP (OpenDataPlane: http://opendataplane.org) and we
are using autotools (including libtool)
We want to have connectable plug-ins to implements some functions
(actually user-space NIC drivers). These plug-ins would be either
linked dynamicaly (using dlopen()) or staticaly, at build time, that
is, some can be selected at build time, and some other at run time.
All these drivers will register themselves using a driver_register()
function provided by ODP "core" , when booting, i.e. each driver will
call driver_register() from a __constructor__ or .init function
present in each driver. From there a set of function pointers will be
exchanged to achieve the wished functionality.
As many drivers can co-exist, it is not possible for the ODP "core" to
call any known driver symbol (there would be multiple definition of
this symbol when many drivers are included at the same time)
Focusing on the build-time drivers, this means that no obvious
reference will be seen by the linker from ODP core to the drivers's
I have searched a while for a solution to pass the --whole-archive
option to the linker but as autotools reorder the linker options, that
did not work well.
Same problem with the --start-group option...
But the thread status is not clear to me...It just dies... I could not
find what that lead to...
Did the patches reached autotools in some way?
Is there any noinst_RELOCATABLES usable? Or if not, how should such a
situation be handled?