Comment 11 for bug 899315

Revision history for this message
Albert Damen (albrt) wrote :

Hi Micah,
I have tried several ways to get the package working without --no-as-needed, but no joy.
To my understanding the problem is:
- the plugins are needed to initialize structures in ebtables/libebtc. They do this via their magic _init functions, which run when the plugins are loaded, by calling ebt_register_target. ebt_register_target allocates memory and sets a pointer in libebtc (ebt_targets).
- ebtables does not use any symbols from the plugins, so linking with --as-needed will not actually link ebtables with the plugins. So, when ebtables is built with --as-needed, the plugins are not loaded, the structs are not initialized and the ebt_targets pointer is left to 0x0 --> crash when ebt_targets is used.

So in my opinion we need a way to force the plugins to be loaded when ebtables is run. Forcing the linking with --no-as-needed works, but maybe there are other ways?

As a side note, I wonder if using --no-as-needed is a big problem in this specific case. It only adds linking to plugins built from the same source package and shipped in the same binary package as ebtables itself. So this does not seem to cause problems with additional dependencies or complicate transitions?