public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* GNU Linker and mips...
@ 1999-02-11  6:48 Koundinya.K
  1999-02-11  8:20 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: Koundinya.K @ 1999-02-11  6:48 UTC (permalink / raw)
  To: ian; +Cc: bfd, gas2

Hi,
	Here is some info on my debugging the GNU linker with gdb as suggested.

I just took the small test program of "hello" to avoid those thousands of 
assembly instructions. 

As you know the output that I get is 

hello
dynamic linker: ./tt: unidentifiable procedure reference (address = 
0x40062cd8)
Killed

Now what is there at this location and from where is this message coming...

O.K From the assembly I could see the following...

0x40062cd8 [_exithandle+0x6c]:	lw %t0,0(%s)

This message is coming from the function _binder when a call to this 
function is made as ...

_binder(0x23,0x40062cd8,0x400bf2fo,0x40052fd0)

I do have access to DDE-MIPS SVR4.2 Sources here and that is how I could 
locate where this message is coming from.

I am attaching the file binder.c which is part of the libc and  rtld for 
mipsr4000. The base for the mips-dde-sysv4.2MP port seems to have mainly 
come from i386 as base.

- ---- Some clip from that (although I am attaching that file at end ) -----

unsigned long _binder( unsigned long sym_index, unsigned long pc)
{
        struct rt_private_map *nlm, *first_lm, *lm;
        char *symname;


- - - - - - 
- - - - - - 
Some  line go here .....

        /* Note that since the MIPS ABI doesn't provide a means for passing
         * lm from the stub routines, so we must get this information
         * someplace else.  Here we just start with the head of the list
         * which is stored in the global variable _ld_loaded.  This may
         * not be correct for objects which have DT_SYMBOLIC set.
         * FIXME!
         */
        lm = _rt_address_to_lm(_ld_loaded,pc);

        if (!lm) {
                _rtfprintf(2, "%s: %s: unidentifiable procedure reference 
(addre
ss = 0x%x)\n",(char*) _rt_name,_proc_name,pc);
                (void)_rtkill(_rtgetpid(), SIGKILL);
        }

- ------------------ End of the clip .. later stuff not here 
- -------------------


So here is the message that I am getting .

But how and why is it happening , I could not think.

Any pointers on this....

Could there be any problems with the start up file like crti, crt1 and crtn used. This is how the linking is done ...

--------------------------------------------------------------------------
 /usr/local/mips-dde-sysv4.2MP/bin/ld /usr/lib/ld.so.1 /usr/local/mips-dde-sysv4.2MP/lib/crt1.o /usr/local/mips-dde-sysv4.2MP/lib/crti.o /usr/local/mips-dde-sysv4.2MP/lib/values-Xa.o -L/usr/local/lib/gcc-lib/mips-dde-sysv4.2MP/egcs-2.91.57 -L/usr/local/mips-dde-sysv4.2MP/lib -L/usr/local/lib /var/tmp/ccrLBNAM.o -lgcc -L/usr/lib -lc -lgcc /usr/local/mips-dde-sysv4.2MP/lib/crtn.o
GNU ld version 2.9.4 (with BFD 990118)
  Supported emulations:
   elf32bsmip
--------------------------------------------------------------------------

Could using the crtbegin and crtend help. Why don't the MIPS targets use them..


Thanks for any help and information in advance.

With best regards

Koundinya

Here is the file binder.c (which is a part of the native libc source )that I am attaching...







Thanks for any help in advance.

Koundinya

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

end of thread, other threads:[~1999-02-18  6:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-11  6:48 GNU Linker and mips Koundinya.K
1999-02-11  8:20 ` Ian Lance Taylor
1999-02-18  6:57   ` Problem with GNU Linker on mips Koundinya.K

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).