[vlc-devel] [PATCH] contrib: rnnoise: prefix common symbols
Rémi Denis-Courmont
remi at remlab.net
Tue Oct 20 18:19:03 CEST 2020
Le tiistaina 20. lokakuuta 2020, 11.48.32 EEST Thomas Guillem a écrit :
> We have the same kind issue with a recent version of libsmb2 on iOS.
>
> There is a crash in the md5 helper (MD5Init(), MD5Update()...).
That is exactly what should happen when there are duplicate symbols in
different libraries imported by different modules, while the modules are
haphazardly linked together without an intermediate partial linking pass.
> These symbols are found in other contribs and VLC.
Well yeah, don't tell me. I've been pointing out that it was unrealistic to
assume otherwise for over a decade by now. It's even less realistic now that
contribs has gotten 2-3 times larger than it was then (i.e., when I rewrote it
for MeeGo).
> The linker doesn't output any errors, but there is a crash from MD5Update().
> I guess smb2 use the symbol of a contrib and it's not expected.
That's the point: this should not cause duplicate symbol errors. It should
work fine if the replicated symbols are compatible, and fail at run-time if
they are not.
> What is the correct solution to fix this issue?
When all is said and done, the correct solution is to hide symbols and link
dynamically. The poor man's alternative is to link modules in two pass with
partial linking to rename or eliminate symbols.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list