Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: LD_PRELOAD problem

Re: LD_PRELOAD problem

From: LS Cheng <exriscer_at_gmail.com>
Date: Fri, 1 Sep 2006 08:23:41 +0200
Message-ID: <6e9345580608312323w2a5db7ffs3c5afd25d741287@mail.gmail.com>


Hi Tanel

I have run nm against the file and it gives an output of 12699 lines with this structure:

Symbols from libavanzasiebel.sl:

Name                    Value   Scope  Type    Subspace

$$divI_10           |    464420|extern|milli  |$MILLICODE$
$$divI_12           |    464508|extern|milli  |$MILLICODE$
$$divI_14           |    464944|extern|milli  |$MILLICODE$
$$divI_15           |    464564|extern|milli  |$MILLICODE$
$$divI_16           |    464128|extern|milli  |$MILLICODE$

I guess name is the function name? How can I check what function is being highjacked?

I ran nm against sqlplus and it shows this:

Symbols from /home/oracle/app/oracle/product/9.2.0/bin/sqlplus:

[Index]    Value                  Size    Type  Bind  O Shndx    Name

[0]      |                     0|       0|NOTYP|LOCAL|0|   UNDEF|
[29983]  |   4611686018440130704|       0|MILLI|GLOB |0|   .text|$$div2I
[29986]  |   4611686018440131056|       0|MILLI|GLOB |0|   .text|$$div2U

Probably the best thing is compare the name of both outputs?

Thanks

On 8/31/06, Tanel Poder <tanel.poder.003_at_mail.ee> wrote:
>
> LD_PRELOAD allows you to hijack dynamicly loaded library functions. If
> sqlplus calls function X, then if this function X is exported from your
> /sbl/xxx.sl then this function X is called from /sbl/xxx.sl even if it
> exists in some other dll against which the executable is linked (like
> libclntsh* libraries).
>
> Run: nm /sbl/xxx.sl to see which functions may be hijacked there, this
> could give some more indication what's going on.
>
> And of course, the library's word-size has to match word-size of the
> executable. If the word sizes are different, you have to recompile the
> library.
>
> Tanel.
>
> ------------------------------
> *From:* oracle-l-bounce_at_freelists.org [mailto:
> oracle-l-bounce_at_freelists.org] *On Behalf Of *LS Cheng
> *Sent:* Thursday, August 31, 2006 04:45
>
> *To:* Jesse, Rich
> *Cc:* oracle-l
> *Subject:* Re: LD_PRELOAD problem
>
>
>
> However when I unset LD_PRELOAD sqlplus works but of course the
> application specific program fails.
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Sep 01 2006 - 01:23:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US