[so] tema 2 linux

Alex Oprea so@cursuri.cs.pub.ro
Fri, 19 Nov 2004 15:31:18 +0200


This message is in MIME format.

------=_NextPart_mymail.ro_Delimiter_0000.1111
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

   1. Daca folosesc LD_PRELOAD=3Dlibtid.so imi da erori la executarea
   ls/cat/orice program facut de mine
   [root@localhost tema2]# export LD_PRELOAD=3Dlibtid.so
   [root@localhost tema2]# ls
   ls: relocation error: ./libtid.so: undefined symbol: dlopen
   (pt compilare libtid.so execut gcc -shared -o libtid.so libtid.c)
=20
   2. Daca folosesc LD_LIBRARY_PATH=3D. imi da eroare la compilare
   gcc -shared -o libtid.so libtid.c
   gcc -o tester tester.c -L. -I. -ltid
   ./libtid.so: undefined reference to `dlopen'
   ./libtid.so: undefined reference to `dlsym'
   collect2: ld returned 1 exit status
   make: *** [tester] Error 1
   (in libtid.c/libtid.h am inclus <dlfnc.h>)
=20
   3. Daca am doar kernel 2.4 cum aflu` numele procesului si CPUtime ?
   (care pe kernel 2.6 se puteau afla din /proc/pid/stat)


---------------------------------------------------------------
Posteaza gratuit anunturi de orice dimensiune si ai audienta de sute de mii, lunar.

------=_NextPart_mymail.ro_Delimiter_0000.1111
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

1. Daca folosesc LD_PRELOAD=3Dlibtid.so imi da erori la executarea<BR>
ls/cat/orice program facut de mine<BR>
[root@localhost tema2]# export LD_PRELOAD=3Dlibtid.so<BR>
[root@localhost tema2]# ls<BR>
ls: relocation error: ./libtid.so: undefined symbol: dlopen<BR>
(pt compilare libtid.so execut gcc -shared -o libtid.so libtid.c)<BR>
<BR>
2. Daca folosesc LD_LIBRARY_PATH=3D. imi da eroare la compilare<BR>
gcc -shared -o libtid.so libtid.c<BR>
gcc -o tester tester.c -L. -I. -ltid<BR>
./libtid.so: undefined reference to `dlopen'<BR>
./libtid.so: undefined reference to `dlsym'<BR>
collect2: ld returned 1 exit status<BR>
make: *** [tester] Error 1<BR>
(in libtid.c/libtid.h am inclus &lt;dlfnc.h&gt;)<BR>
<BR>
3. Daca am doar kernel 2.4 cum aflu` numele procesului si CPUtime ?<BR>
(care pe kernel 2.6 se puteau afla din /proc/pid/stat)
<BR>
<BR>
<HR>
<a href=3D"http://anunturi.acasa.ro/">Posteaza un anunt gratuit</a><br>Posteaza gratuit anunturi de orice dimensiune si ai audienta de sute de mii, lunar.

------=_NextPart_mymail.ro_Delimiter_0000.1111--