This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Dynamic Linker
- To: glibc-linux at ricardo dot ecn dot wfu dot edu
- Subject: Dynamic Linker
- From: Navin Kumar Vedagiri <nvedagir at cs dot nmsu dot edu>
- Date: Tue, 16 Oct 2001 23:07:23 -0600
- Organization: NMSU
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
Well! I downloaded the latest glibc and working on
that. In that I want to know the exact use of
rtld.c file. Its is in the elf directory. So what
happpends to ld.so when a make is done in elf
directory.
I inserted my own function in rtld.c file and did
a make in elf directory.
Iam trying to call that function in one my program
located in some other directory. For that i'm
using the make file as follows
CC = gcc
CFLAGS = -Wall
all: test-ld test-reg
test.o: test.c
gcc -c test.c
test-ld: test.o
/trutta2/srg/projects/dynamic-loader/glibc-2.2.4/elf/ld.so
gcc
-Wl,-dynamic-linker,/trutta2/srg/projects/dynamic-loader/glibc-2.2.4/elf/ld.so
test.o -o test-ld -ldl
test-reg: test.o
gcc test.o -o test-reg
But it gives me the following error
gcc test.o -o test-reg
test.o: In function `main':
test.o(.text+0x11): undefined reference to
`dlopen'
test.o(.text+0x41): undefined reference to
`dlerror'
test.o(.text+0x51): undefined reference to `dlsym'
test.o(.text+0x5c): undefined reference to
`dlerror'
test.o(.text+0x91): undefined reference to
`dlclose'
collect2: ld returned 1 exit status
make: *** [test-reg] Error 1
I was wondering what's happening.
If you could help in this regard It would be great
help in my project
progress.
Thanks in advance
Navin