[FFmpeg-devel] [PATCH] r11100: linkage fix.
Uoti Urpala
uoti.urpala
Fri Nov 30 00:58:20 CET 2007
On Fri, 2007-11-30 at 02:14 +0300, Pavlov Konstantin wrote:
> On Fri, Nov 30, 2007 at 12:50:13AM +0200, Uoti Urpala wrote:
> > On Fri, 2007-11-30 at 01:32 +0300, Pavlov Konstantin wrote:
> > > This seems to break shared library builds here on x86_64:
> > > /usr/bin/ld: i386/dsputil_mmx.o: relocation R_X86_64_PC32 against
> > > `ff_pw_20' can not be used when making a shared object; recompile with
> >
> > > Suggestions on how to fix it?
> >
> > Try adding __attribute__((visibility("hidden"))) to the variable
> > declarations in dsputil_mmx.h.
>
> Thanks, the attached patch seems to be fixing the issue.
I wouldn't expect it to be accepted in that form (using raw
__attribute__ syntax). I think it would be worth adding visibility
information more generally to libav*. The details were discussed earlier
in
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-May/029197.html
and
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-May/029289.html
The main decision is whether to use a pragma to change the default
visibility or a per-symbol qualifier. The pragma only requires a few
changes per header but OTOH adds "magic" state and doesn't show the
status clearly when looking at a single declaration. The alternative is
to a define a macro like FF_PRIVATE (or maybe LAVC_PRIVATE, LAVF_PRIVATE
etc to show more clearly what the symbol is limited to?) and use that in
headers for every non-public function or variable declaration.
More information about the ffmpeg-devel
mailing list