[x264-devel] Possible fix for loader error while building OS X x86_64 dynamic shared library libx264.dylib

Paul Sterne make4ppc at gmail.com
Mon May 6 21:44:02 CEST 2013


I see the following error while building OS X x86_64 dynamic shared library
libx264.dylib:

*ld: pointer in read-only segment not allowed in slidable image, used in
coeff_last_sse2 from common/x86/cabac-a.o*

*
*

*I think in the case of a dynamic shared library that pointers to
relocatable code may not be stored in read-only memory because the dynamic
loader dyld needs to update those pointers when the library image virtual
address is changed.
*

*
*

**

*diff --git a/common/x86/cabac-a.asm b/common/x86/cabac-a.asm*

*index 74dbf93..d7afe83 100644*

*--- a/common/x86/cabac-a.asm*

*+++ b/common/x86/cabac-a.asm*

*@@ -62,6 +62,10 @@ cextern coeff_last64_sse2*

* cextern coeff_last64_sse2_lzcnt*

* cextern coeff_last64_avx2_lzcnt*

* *

*+%ifidn __OUTPUT_FORMAT__,macho64*

*+    SECTION .data ALIGN=8*

*+%endif*

*+*

* coeff_last_sse2:       COEFF_LAST_TABLE       mmx2,       sse2,
sse2, 16, 15, 16, 4, 15, 64, 16, 15, 16, 64, 16, 15, 16, 64*

* coeff_last_sse2_lzcnt: COEFF_LAST_TABLE mmx2_lzcnt, sse2_lzcnt,
sse2_lzcnt, 16, 15, 16, 4, 15, 64, 16, 15, 16, 64, 16, 15, 16, 64*

* coeff_last_avx2_lzcnt: COEFF_LAST_TABLE mmx2_lzcnt, avx2_lzcnt,
sse2_lzcnt, 16, 15, 16, 4, 15, 64, 16, 15, 16, 64, 16, 15, 16, 64*
*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20130506/81dae206/attachment.html>


More information about the x264-devel mailing list