LD_PRELOAD on AIX

Can someone here tell me if there is something like LD_PRELOAD in recent versions of AIX? In particular, I need to intercept calls from my binary code during (), returning constant time for testing purposes.

+3
source share
3 answers

AIX 5.3 introduces variables LDR_PRELOAD(for 32-bit programs) and LDR_PRELOAD64(for 64-bit programs). They are similar to LD_PRELOAD for Linux. Both are colon-separated lists of libraries, and characters will be preloaded from the listed shared objects before anything else.

For example, if you have a shared object foo.so:

 LDR_PRELOAD=foo.so

, AIX :

 LDR_PRELOAD="bar.a(shr.so)"

:

 LDR_PRELOAD="foo.so:bar.a(shr.so)"
+8

AIX 5L LDR_PRELOAD.

+1

, . , ( malloc/free ) -

  • ( , ).
  • .
  • .
  • LD_LIBRARY_PATH ( SHLIB_PATH?), .

, , , , .

. , AIX 5L Linux (, L), , .

Alternatively, if you have a source, call time () with mytime () and provide your function. You are not testing exactly the same software, but the differences for such a minimal change should not matter.

0
source

Source: https://habr.com/ru/post/1702455/


All Articles