[Libav-user] compiling ffmpeg with -fPIC

Chung Leong cleong at cal.berkeley.edu
Tue May 7 04:00:15 CEST 2013


Let me correct myself. The problematic symbol in the situation here is "ff_pd_1", a global variable. It's declared with the attribute visibility("hidden"). The symbol isn't exported. Knowing this, gcc apparently doesn't generate PIC code for accessing it even when you add -fPIC.
By default, gcc assumes your executable isn't going to be larger than 2 gig. Executables are normally loaded within the first 2 gig of the address space, so any global variable ought to be reachable by a 32-bit address.  This doesn't work for shared libraries. The address needs to be 64-bit. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130506/a04dfcaf/attachment.html>


More information about the Libav-user mailing list