Hi all, I have the following scenario:
prog1 --links--> lib1 --dlopens--> module1 With dinamic linking, everything works. I was expecting that if I used -static on libtool, the "dlopen" would work as a "dlpreopen" so I could end up with a statically-linked prog1 which worked the same way. However, I find: 1) when linking "lib1", the preopened symbols file lib1S.o is generated and added into lib1.a, but it does not cointain the symbols from the module. 2) when linking prog1, the preopened symbols file prog1S.o is generated, and includes symbols from module1 (the come through lib1.la which lists module1 as a dlopened module), but is then not linked in the final executable (following libtool script logic, I see "preopen" variable is false so @SYMFILE@ is removed during link). I am trying to fix this and prepare a patch, but I am dubious of the way this *should* work. Should A) modules dlopened by a library be considered as dlpreopened when linking the library statically, or B) still noted as dlopened only considered as "dlpreopened" when linking the final program? I can think of arguments in either direction (I slightly lean towards B) and I am sure this has more implications than the ones in my mind. Is there consensus about this? Thanks! Carlos _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool