[FFmpeg-devel] [PATCH] r11100: linkage fix.
Pavlov Konstantin
thresh
Fri Nov 30 00:14:52 CET 2007
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.
--
A debugged program is one for which you have not yet found the conditions
that make it fail.
-- Jerry Ogdin
-------------- next part --------------
diff --git a/libavcodec/i386/dsputil_mmx.h b/libavcodec/i386/dsputil_mmx.h
index 8c92c83..b38ce8a 100644
--- a/libavcodec/i386/dsputil_mmx.h
+++ b/libavcodec/i386/dsputil_mmx.h
@@ -22,32 +22,32 @@
#ifndef FFMPEG_DSPUTIL_MMX_H
#define FFMPEG_DSPUTIL_MMX_H
-extern const uint64_t ff_bone;
-extern const uint64_t ff_wtwo;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_bone;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_wtwo;
-extern const uint64_t ff_pdw_80000000[2];
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pdw_80000000[2];
-extern const uint64_t ff_pw_3;
-extern const uint64_t ff_pw_4;
-extern const uint64_t ff_pw_5;
-extern const uint64_t ff_pw_8;
-extern const uint64_t ff_pw_15;
-extern const uint64_t ff_pw_16;
-extern const uint64_t ff_pw_20;
-extern const uint64_t ff_pw_32;
-extern const uint64_t ff_pw_42;
-extern const uint64_t ff_pw_64;
-extern const uint64_t ff_pw_96;
-extern const uint64_t ff_pw_128;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_3;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_4;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_5;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_8;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_15;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_16;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_20;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_32;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_42;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_64;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_96;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pw_128;
-extern const uint64_t ff_pb_1;
-extern const uint64_t ff_pb_3;
-extern const uint64_t ff_pb_7;
-extern const uint64_t ff_pb_3F;
-extern const uint64_t ff_pb_A1;
-extern const uint64_t ff_pb_FC;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pb_1;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pb_3;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pb_7;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pb_3F;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pb_A1;
+extern const uint64_t __attribute__((visibility("hidden"))) ff_pb_FC;
-extern const double ff_pd_1[2];
-extern const double ff_pd_2[2];
+extern const double __attribute__((visibility("hidden"))) ff_pd_1[2];
+extern const double __attribute__((visibility("hidden"))) ff_pd_2[2];
#endif /* FFMPEG_DSPUTIL_MMX_H */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071130/7bb08a71/attachment.pgp>
More information about the ffmpeg-devel
mailing list