Dynamic Linker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Thanks in advance
Navin



--
Navin Kumar Vedagiri
Graduate Teaching Assistant
Department Of Computer Science,
New Mexico State University,
Las Cruces, NM - 88001
Res: (505) 532 1273
Off: (505) 646 3198






[Index of Archives]     [Linux for the Blind]     [Fedora]     [Kernel List]     [Red Hat Install]     [Red Hat Watch List]     [Red Hat Development]     [Gimp]     [Yosemite News]     [Big List of Linux Books]