freevec.org

  • about
  • benchmarks
Home

Search

Primary links

  • About
    • History of libfreevec
  • Benchmarks
    • libfreevec

Please donate to libfreevec to ensure its continuing development! Donations are done via Paypal.





HOWTO: Using libfreevec using LD_PRELOAD

markos — Tue, 19/08/2008 - 13:18

Ok, let's suppose you've downloaded libfreevec, built it successfully and now you want to use it for the whole system, without recompiling the whole system to use the library! Is it possible? Thanks to a glibc feature you can!

There are two ways to do that:

  • one is to use the LD_PRELOAD environment variable, eg. at boot time, but there is a more elegant way to do this.
  • by use of the /etc/ld.so.preload file, which is most likely distro-agnostic, so that the dynamic loader ld.so loads libfreevec before any other library (including libc.so).

    The 2nd is a much more elegant solution, IMHO, and I've been using it for months with no problems whatsoever. So, after you install the library somewhere (by default it's installed in /usr/local/lib/) you could just do a:

    echo /usr/local/lib/libfreevec_libc.so > /etc/ld.so.preload

    Beware it has to be the libfreevec_libc.so and not the libfreevec.so as the 2nd one prefixes each function with vec_ and is only useful to someone that wants to use the library explicitly -for whatever reason.

    The next application you will load you will use the AltiVec functions in libfreevec! Enjoy! :)

    Note: This has a slight overhead which would reduce some of the performance in the functions, but would still prove a good move in most cases.

  • AltiVec
  • libfreevec
  • Login or register to post comments

loader problems on ps3

Andrei.hu — Tue, 23/09/2008 - 13:31

Hi

I have tried to make libfreevec accessible on my PS3 (it
runs YDL 6.0). When I start gdb, loader gives me the following error:

[andrei@highlander-ps3 hwspe]$ gdb
ERROR: ld.so: object '/usr/local/lib/libfreevec_libc.so' from /etc/ld.so.preload cannot be preloaded: ignored.
GNU gdb Red Hat Linux (6.5-25.1rh)
This GDB was configured as "ppc64-yellowdog-linux-gnu"...

I have created a simple application and check loaded libraries, everything seems ok:

0x10000470 in main ()
(gdb) info sharedlibrary
From        To          Syms Read   Shared Object Library
0x0ffc1960  0x0ffda1a0  Yes         /lib/ld.so.1
0x0ff98680  0x0ff9f060  Yes         /usr/local/lib/libfreevec_libc.so
0xf7e97920  0xf7fb3e70  Yes         /lib/libc.so.6

Does anybody know why i see those messages? Most probably it's not a big issue as i have seen the message only for gdb so far.

  • Login or register to post comments

Not sure, but 32-bit or 64-bit gdb?

markos — Fri, 26/09/2008 - 22:40

So far libfreevec doesn't work with 64-bit binaries, perhaps gdb is a 64-bit binary? Not sure really why this is so with your setup, gdb here works fine (at least on all the 32-bit systems I tested it), I'll try to test with a 64-bit system later on.

  • Login or register to post comments

SIMD

  • Algorithms (31)
    • Algebra (9)
      • Matrix operations (8)
    • Bit operations (0)
    • Codecs (0)
      • Audio (0)
      • Video (0)
    • Comparison (0)
      • image comparison (0)
      • Levenshtein (0)
    • Compression (0)
      • Bzip2 (0)
      • Gzip (0)
      • LZMA (0)
      • LZW (0)
      • Squashfs (0)
      • Zlib (0)
    • Encryption (0)
      • AES (0)
      • DES (0)
      • RSA (0)
      • Salsa (0)
      • SSL (0)
    • Hashing (1)
      • CRC (0)
      • TCP/IP checksum (0)
      • UMAC (0)
    • Memory operations (15)
    • Multiprecision (0)
    • Searching (5)
      • String searching (5)
    • Sorting (0)
  • Software (32)
    • Benchmarking (2)
    • Libraries (30)
      • Eigen2 (0)
      • libfreevec (22)
      • simdX86 (8)
  • Architecture (32)
    • AltiVec (32)
    • ARM NEON (0)
    • CELL SPU (0)
    • SSE (0)
    • VIS (0)

User login

  • Create new account
  • Request new password
  • about
  • benchmarks

Copyright (c)2008 by CODEX.
Powered by Drupal. Using theme Deco.
All Google charts have been created by the CSV Chart and Chart API Drupal modules.