From owner-freebsd-multimedia@FreeBSD.ORG Sat Mar 21 20:18:55 2009 Return-Path: Delivered-To: multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C7FF1065674; Sat, 21 Mar 2009 20:18:55 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout014.mac.com (asmtpout014.mac.com [17.148.16.89]) by mx1.freebsd.org (Postfix) with ESMTP id 341438FC28; Sat, 21 Mar 2009 20:18:54 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_+cSDf8Uie3Dos32b+6DQxg)" Received: from ajain-lt.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp014.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KGV00779EXSE930@asmtp014.mac.com>; Sat, 21 Mar 2009 12:17:53 -0700 (PDT) Message-id: From: Marcel Moolenaar To: gerald@freebsd.org Date: Sat, 21 Mar 2009 12:17:52 -0700 X-Mailer: Apple Mail (2.930.3) Cc: multimedia@freebsd.org Subject: [PATCH] devel/liboil: non-PIC relocations on PowerPC X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Mar 2009 20:18:55 -0000 --Boundary_(ID_+cSDf8Uie3Dos32b+6DQxg) Content-type: text/plain; charset=US-ASCII; format=flowed Content-transfer-encoding: 7BIT Gerald, Attached 2 diff files that 1) fix a non-PIC call, and 2) properly define the global symbols as functions with a non-zero size. With at least the first, gstreamer works. It would otherwise fail to load some plugins because rtld would complain about non-PIC relocations. If you want I can file a PR. Or if you're ok with it, I can do the commit myself. FYI, -- Marcel Moolenaar xcllnt@mac.com --Boundary_(ID_+cSDf8Uie3Dos32b+6DQxg) Content-type: application/octet-stream; x-unix-mode=0700; name=patch-vec_memcpy.diff Content-transfer-encoding: 7bit Content-disposition: attachment; filename=patch-vec_memcpy.diff --- liboil/motovec/vec_memcpy.S 2007-11-15 18:53:47.000000000 -0800 +++ liboil/motovec/vec_memcpy.S 2009-03-20 20:07:55.000000000 -0700 @@ -249,9 +249,11 @@ memcpy: #else .globl vec_memmove + .type vec_memmove, @function vec_memmove: nop // IU1 Only way I know to preserve both labels .globl _vec_memcpy + .type _vec_memcpy, @function _vec_memcpy: #endif subf. DMS,SRC,DST // IU1 Compute dst-src difference @@ -291,7 +293,9 @@ stbu Rt,-1(DBC) // LSU Store it bdnz Byte_cpy_bwd blr - + .size vec_memmove, . - vec_memmove + .size _vec_memcpy, . - _vec_memcpy + #ifdef __MWERKS__ .align 16 #else @@ -863,6 +867,7 @@ bcopy: #else .globl vec_bcopy + .type vec_bcopy, @function vec_bcopy: #endif mr Rt,DST // temp storage for what is really source address (r3) @@ -871,6 +876,7 @@ #ifdef LIBMOTOVEC b memcpy // b to memcpy with correct args in r3 and r4 #else - b _vec_memcpy // b to vec_memcpy with correct args in r3 and r4 + b _vec_memcpy@plt // b to vec_memcpy with correct args in r3 and r4 #endif + .size vec_bcopy, . - vec_bcopy // End of bcopy in AltiVec --Boundary_(ID_+cSDf8Uie3Dos32b+6DQxg) Content-type: application/octet-stream; x-unix-mode=0700; name=patch-vec_memset.diff Content-transfer-encoding: 7bit Content-disposition: attachment; filename=patch-vec_memset.diff --- liboil/motovec/vec_memset.S 2007-11-15 18:53:47.000000000 -0800 +++ liboil/motovec/vec_memset.S 2009-03-20 20:10:56.000000000 -0700 @@ -142,6 +142,7 @@ memset: #else .globl _vec_memset + .type _vec_memset, @function _vec_memset: #endif @@ -161,6 +162,7 @@ bdnz Byte_set blr + .size _vec_memset, . - _vec_memset v_memset: // Byte count < MIN_VEC bytes will have been set by scalar code above, @@ -347,6 +349,7 @@ bzero: #else .globl vec_bzero + .type vec_bzero, @function vec_bzero: #endif @@ -355,8 +358,9 @@ #ifdef LIBMOTOVEC b memset #else - b _vec_memset + b _vec_memset@plt #endif + .size vec_bzero, . - vec_bzero // cacheable_memzero will employ dcbz to clear 32 bytes at a time // of cacheable memory. Like bzero, second entering argument will be BC. --Boundary_(ID_+cSDf8Uie3Dos32b+6DQxg)--