On Wed, 30 Sep 2015, Sean McGovern wrote:

Currently, if I want to build shared libraries with suncc, I can complete
the build from the following command line:

./configure --disable-static --enable-shared --cc='suncc -m64'
--disable-debug

If I remove --disable-debug, it complains about undefined symbols in
several libraries that are ff_ prefixed -- which makes sense as the linker
script is removing them from global scope. I'm not sure why this doesn't
affect the gcc build.

Could you give a more concrete example on functions it complains about (and in which libraries)? Your other post mentioned ff_log2_tab, but we do manually include this symbol separately in all of the libraries that use it, so it shouldn't be an issue that it is hidden between the shared libraries (which is exactly how it is supposed to work).

What _might_ be an issue, though, is if the static inline functions in headers still generate references to the functions, even though e.g. nothing in libavfilter uses ff_log2/av_log2.


There also seems to be a bit of confusion between two different details; symbol versioning and symbol exporting scripts (which may or may not happen in symbol versioning scripts, depending on your linker). On e.g. windows, there's no such thing as symbol versioning (e.g. having multiple instances of the same symbol but pointing to different implementations), but you still generate a .def file which lists which symbols are exported at all.

Likewise on linux, if you do a shared build with --disable-symver, it still does the symbol hiding (and still actually adds versions to symbols as well). --disable-symver only used to have an effect on symbol version wrappers that used to be necessary when symbols were moved from one library to another. (E.g., if a binary wants av_fast_realloc@@LIBAVCODEC_55, we still should provide that even if the actual implementation of the function is in libavutil these days, until the next major bump. See d63443b9684 for more details on this.)

That said, I don't mind much if you want to have --disable-symver to disable the whole symbol hiding business on that particular target, but keep in mind that it is different than what we do on e.g. linux. (That's why I was confused when I saw that this patch tries to disable symbol versioning, which I initially didn't understand what it had to do with symbol visibility.)

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to