public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: Richard Henderson <rth@redhat.com>
Cc: binutils@sources.redhat.com
Subject: Re: powerpc new PLT and GOT
Date: Thu, 12 May 2005 06:13:00 -0000	[thread overview]
Message-ID: <20050512060814.GG29302@bubble.grove.modra.org> (raw)
In-Reply-To: <20050512053747.GA5254@redhat.com>

On Wed, May 11, 2005 at 10:37:47PM -0700, Richard Henderson wrote:
> If the program does in fact use different got registers, then there
> will have to be more than one PLTresolve.

Not if the plt call stubs are modified to copy their got pointer to,
say, r12.  Or better, if PLTresolve loads its own got pointer, like
this:

  PLTresolve:
	addis 11,11,(got-plt)@ha
	addi 11,11,(got-plt)@l
	mflr 0
	bcl 20,31,1f
     1: mflr 12
	addis 12,12,(got-1b)@ha
	addi 12,12,(got-1b)@l		# r12 = _GLOBAL_OFFSET_TABLE_
	mtlr 0
	sub 11,11,12			# r11 = index * 4
	add 0,11,11
	add 11,0,11			# r11 = index * 12 = reloc offset.
	lwz 0,4(12)			# got[1] address of dl_runtime_resolve
	mtctr 0
	lwz 12,8(12)			# got[2] contains the map address
	bctr

>  At which point it doesn't
> make sense to have DT_PPC_GLINK pick out any one of them.  I suggest
> simply setting this entry to 1, as with DT_TEXTREL.

I agree however that the dynamic linker doesn't need to know where
Pltresolve is, so any non-zero value in DT_PPC_GLINK will do.  (It did
need to know when I was still considering a BSS PLT.)

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

  reply	other threads:[~2005-05-12  6:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-11 14:22 Alan Modra
2005-05-11 14:29 ` Daniel Jacobowitz
2005-05-11 14:59   ` Alan Modra
2005-05-11 15:10     ` Andreas Schwab
2005-05-11 15:39       ` Alan Modra
2005-05-11 15:16     ` Daniel Jacobowitz
2005-05-11 16:37       ` Richard Earnshaw
2005-05-11 14:45 ` Andreas Schwab
2005-05-12  6:08 ` Richard Henderson
2005-05-12  6:13   ` Alan Modra [this message]
2005-05-12  7:47     ` Richard Henderson
2005-05-12  9:02       ` Alan Modra
2005-05-12 16:10         ` Alan Modra
2005-05-12 18:07         ` Richard Henderson
2005-05-14  5:57           ` Alan Modra
2005-05-17 14:16             ` Alan Modra
2005-05-19  8:32               ` Alan Modra

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=20050512060814.GG29302@bubble.grove.modra.org \
    --to=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=rth@redhat.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).