public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: "Koundinya.K" <kk@ddeorg.soft.net>
To: ian@cygnus.com
Cc: bfd@cygnus.com, gas2@cygnus.com
Subject: GNU Linker and mips...
Date: Thu, 11 Feb 1999 06:48:00 -0000	[thread overview]
Message-ID: <199902111430.UAA16259@bombay.ddeorg.soft.net> (raw)

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

             reply	other threads:[~1999-02-11  6:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-11  6:48 Koundinya.K [this message]
1999-02-11  8:20 ` Ian Lance Taylor
1999-02-18  6:57   ` Problem with GNU Linker on mips Koundinya.K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199902111430.UAA16259@bombay.ddeorg.soft.net \
    --to=kk@ddeorg.soft.net \
    --cc=bfd@cygnus.com \
    --cc=gas2@cygnus.com \
    --cc=ian@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).