Results 1 to 2 of 2

Thread: LD_PRELOAD for an object with undefined symbols (Solaris v9)

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Posts
    1

    LD_PRELOAD for an object with undefined symbols (Solaris v9)

    We have a big executable, affectionately called "a big" that we run with a "special" object added to it. Basically, we do this...

    Code:
     $ ld -t -G -o $runcs_lib/cs.o $DEV_OBJS 
    $ export LD_PRELOAD=$runcs_lib/cs.o 
    $ big.tsk x
    If I try and run it under totalview...
    Code:
     $ export  LD_PRELOAD=$runcs_lib/cs.o 
    $ tv8 big.tsk -a x 
    ld.so.1: /bin/sh: fatal: relocation error: file $runcs_lib/cs.o: symbol xxxxxx: referenced symbol not found
    The results is as one would expect, because tv8 doesn't have any of our unresolved symbols handy.

    Now what do I do?

    Thx -CTH

  2. #2
    Senior Member
    Join Date
    Jun 2006
    Location
    Natick MA
    Posts
    145

    Re: [cth350] LD_PRELOAD for an object with undefined symbols (Solaris v9)

    The problem is that by exporting the LD_PRELOAD variable into your environment it causes all processes to pre-load the object file. In this case all that is wanted is the process created from ibig.tsk to preload the object file. We got this working by setting the environment variable in the process rather than in TVD. One could do this in TVD's New Program window or on the command line using:

    Code:
      totalview -env LD_PRELOAD=$runcs_lib/cs.o ibig.tsk -a



    Josh Carlson

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •