public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Regarding Dynamic Linker
@ 2001-10-16 15:47 Navin Kumar Vedagiri
  2001-10-18  9:42 ` Aaron J. Grier
  0 siblings, 1 reply; 2+ messages in thread
From: Navin Kumar Vedagiri @ 2001-10-16 15:47 UTC (permalink / raw)
  To: binutils

Hi,
I downloaded glib2.2.4 and did install that. I have written a small
function in rtld.c and also did a make in glibc-2.2.4/elf directory and
there were no errors and compilation was succesful. I have writtena
program in another directory and my Makefile looks like this

test.o: test.c
	gcc -c test.c
test-ld: test.o /trutta2/srg/projests/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


The file test.c has just got a function call that is located in rtld.c
When i do a make it gives me follwing error

test.o(.test+0x11): undefined reference to 'dlopen'
test.o(.test+0x11): undefined reference to 'dlerror'
test.o(.test+0x11): undefined reference to 'dlsym'
test.o(.test+0x11): undefined reference to 'dlerror'
test.o(.test+0x11): undefined reference to 'dlclose'
collect2: ld returned 1 exit status.

Can anyone help in solving this, I would appericate their effort
Thx
Navin

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Regarding Dynamic Linker
  2001-10-16 15:47 Regarding Dynamic Linker Navin Kumar Vedagiri
@ 2001-10-18  9:42 ` Aaron J. Grier
  0 siblings, 0 replies; 2+ messages in thread
From: Aaron J. Grier @ 2001-10-18  9:42 UTC (permalink / raw)
  To: binutils

On Tue, Oct 16, 2001 at 04:47:45PM -0600, Navin Kumar Vedagiri wrote:

> test-reg: test.o
> 	gcc test.o -o test-reg
> 
> 
> The file test.c has just got a function call that is located in rtld.c
> When i do a make it gives me follwing error
> 
> test.o(.test+0x11): undefined reference to 'dlopen'
> test.o(.test+0x11): undefined reference to 'dlerror'
> test.o(.test+0x11): undefined reference to 'dlsym'
> test.o(.test+0x11): undefined reference to 'dlerror'
> test.o(.test+0x11): undefined reference to 'dlclose'
> collect2: ld returned 1 exit status.
> 
> Can anyone help in solving this, I would appericate their effort

gcc test.o -o test-reg -ldl

-- 
  Aaron J. Grier  |   Frye Electronics, Tigard, OR   |  aaron@frye.com
     "In a few thousand years people will be scratching their heads
       wondering how on earth the first computer was invented and
          bootstrapped without a prior computer to do it with."
                    --  Chris Malcolm, on comp.arch

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-18  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-16 15:47 Regarding Dynamic Linker Navin Kumar Vedagiri
2001-10-18  9:42 ` Aaron J. Grier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).