public inbox for bfd@sourceware.org
 help / color / mirror / Atom feed
From: Ken Raeburn <raeburn@cygnus.com>
To: Manfred Hollstein <manfred@s-direktnet.de>
Cc: rth@cygnus.com, bfd@cygnus.com, gas2@cygnus.com
Subject: Re: Bugs in recent snapshots on Solaris
Date: Fri, 13 Mar 1998 16:09:00 -0000	[thread overview]
Message-ID: <tx13egmqgj2.fsf@cygnus.com> (raw)
In-Reply-To: <13576.63996.735032.948934@slsvhmt>

Yes, it appears that the symbol shlib_shlibvar1, which names a
function in the text section that has its address taken at various
points, has gotten moved in the shared library to the .plt section.
(The correct code is still in the text section, just without a name.)

The code at that .plt location, at run time, becomes a very tight
loop.  In the .so file:

DYNAMIC RELOCATION RECORDS
OFFSET   TYPE              VALUE 
...
00010790 R_SPARC_JMP_SLOT  shlib_shlibvar1
...

Disassembly of section .plt:

00010754 <shlib_shlibcalled-30>:
        ...

00010784 <shlib_shlibcalled>:
   10784:       03 00 00 30     sethi  %hi(0xc000), %g1
   10788:       30 bf ff f3     b,a   10754 <_PROCEDURE_LINKAGE_TABLE_>
   1078c:       01 00 00 00     nop 

00010790 <shlib_shlibvar1>:
   10790:       03 00 00 3c     sethi  %hi(0xf000), %g1
   10794:       30 bf ff f0     b,a   10754 <_PROCEDURE_LINKAGE_TABLE_>
   10798:       01 00 00 00     nop 
   1079c:       03 00 00 48     sethi  %hi(0x12000), %g1
   107a0:       30 bf ff ed     b,a   10754 <_PROCEDURE_LINKAGE_TABLE_>
   107a4:       01 00 00 00     nop 
   107a8:       01 00 00 00     nop 

And run time:

(gdb) x/20i &shlib_shlibvar1
0xef7a0790 <shlib_shlibvar1>:   sethi  %hi(0xf000), %g1
0xef7a0794 <shlib_shlibvar1+4>: sethi  %hi(0xef7a0400), %g1
0xef7a0798 <shlib_shlibvar1+8>:
    jmp  %g1 + 0x390    ! 0xef7a0790 <shlib_shlibvar1>
0xef7a079c <shlib_shlibvar1+12>:        sethi  %hi(0x12000), %g1


I'm not familiar with the shared library linker support, so for the
moment, I'll leave the rest to Richard.

Ken

  reply	other threads:[~1998-03-13 16:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-13  0:47 Manfred Hollstein
1998-03-13  1:21 ` Manfred Hollstein
1998-03-13 16:09   ` Ken Raeburn [this message]
1998-03-20  2:30   ` Richard Henderson
1998-03-20  8:19     ` H.J. Lu

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=tx13egmqgj2.fsf@cygnus.com \
    --to=raeburn@cygnus.com \
    --cc=bfd@cygnus.com \
    --cc=gas2@cygnus.com \
    --cc=manfred@s-direktnet.de \
    --cc=rth@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).