Date: Sat, 21 Mar 2009 12:17:52 -0700 From: Marcel Moolenaar <xcllnt@mac.com> To: gerald@freebsd.org Cc: multimedia@freebsd.org Subject: [PATCH] devel/liboil: non-PIC relocations on PowerPC Message-ID: <F97EC20C-8240-4B29-8CF3-7FDCAD9094B1@mac.com>
index | next in thread | raw e-mail
[-- Attachment #1 --]
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
[-- Attachment #2 --]
--- 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
[-- Attachment #3 --]
--- 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.
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F97EC20C-8240-4B29-8CF3-7FDCAD9094B1>
