<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Recently I've received a request to start bundling the shared library version of libx264 with my Solaris packages.</blockquote><br>I tested the patch on Solaris 2.10 as well as on Ubuntu Hardy Heron. Can someone check it at the very least on mingw and anything else to make sure it doesn't introduce any regressions?<div>
<br>I'm still getting textrel problems with the assembler code in common/x86/ even with this patch (building with --disable-asm works just fine, but then I lose all that wonderful optimization work you folks did!), but this again seems to be specific to Solaris. It's far less tolerant of unresolved references in shared libraries than GNU ld. The gcc manpage states, for Solaris:</div>
<div><br></div><div><dl style="font-family: Times; font-size: medium; "><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
-mimpure-text</blockquote><dd><blockquote><samp><span class="option"><font class="Apple-style-span" face="Times">-mimpure-text</font></span></samp>, used in addition to <samp><span class="option"><font class="Apple-style-span" face="Times">-shared</font></span></samp>, tells the compiler to not pass <samp><span class="option"><font class="Apple-style-span" face="Times">-z text</font></span></samp> to the linker when linking a shared object. Using this option, you can link position-dependent code into a shared object.</blockquote>
<a name="index-mimpure_002dtext-2036"></a><blockquote><samp><span class="option"><font class="Apple-style-span" face="Times">-mimpure-text</font></span></samp> suppresses the “relocations remain against allocatable but non-writable sections” linker error message. However, the necessary relocations will trigger copy-on-write, and the shared object is not actually shared across processes. Instead of using <samp><span class="option"><font class="Apple-style-span" face="Times">-mimpure-text</font></span></samp>, you should compile all source code with <samp><span class="option"><font class="Apple-style-span" face="Times">-fpic</font></span></samp> or <samp><span class="option"><font class="Apple-style-span" face="Times">-fPIC</font></span></samp>.</blockquote>
<div><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="font-size: small;"><font class="Apple-style-span" face="Times"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></span></font></div>
</dd></dl><div>Is copy-on-write something to be concerned about? Is the assembler code in common/x86/ supposed to be at least PIC-friendly on x86_32?</div><div><br></div>Thanks,<br>Sean<br></div>