[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

linker --whole-archive, --start-group options and noinst_RELOCATABLES

From: Christophe Milard
Subject: linker --whole-archive, --start-group options and noinst_RELOCATABLES
Date: Thu, 13 Oct 2016 12:49:57 +0200


I am working for ODP (OpenDataPlane: 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...

Maybe you understand that I eventually reached the following threads:

The situation described in the following thread:
Part II (motivation), section 3 is pretty much my situation...

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?


Christophe MILARD

reply via email to

[Prev in Thread] Current Thread [Next in Thread]