From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: law@redhat.com
Cc: binutils@sources.redhat.com
Subject: Re: Special names tha ld needs to recognize for hppa64-hp-hpux11.X
Date: Tue, 12 Feb 2002 14:09:00 -0000 [thread overview]
Message-ID: <200202122119.g1CLJTab026840@hiauly1.hia.nrc.ca> (raw)
In-Reply-To: <7581.1013548146@porcupine.cygnus.com> from "law@redhat.com" at Feb 12, 2002 02:09:06 pm
> > Thus, The problem must be that we are doing the relocations for
> > R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_FPTR14DR incorrectly.
> Maybe.
Here is a fix. My simple static link now runs correctly and I have confirmed
that do_exitcu is called correctly during exit.
> > It would appear that we are using the function address rather than the
> > address of the .opd entry.
> Most likely.
>
> > I think I see the problem. See line 1654 in elf-hppa.h. I think we
> > need to use the .opd address for the LTOFF relocations, not the DLT
> > offset.
> Odd. According to my reading of the the ABI, I believe that code is
> correct. The LTOFF_FPTR21L and LTOFF_FPTR14DR relocs should be referencing
> the DLT, not accessing the .opd directly.
You are correct. The patch fixes the value put in the DLT entry. We
were loading the function address into the DLT entry in all cases. We
are supposed to load fptr () for the LTOFF_FPTR relocations.
> My ABI is V1.43 Oct 6, 1997.
I looked quite recently and that's what I got.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
* elf-hppa.h (elf_hppa_final_link_relocate): Use address of .opd
entry as value for the DLT entry in R_PARISC_LTOFF_FPTR relocations.
--- elf-hppa.h.save Tue Feb 12 14:20:47 2002
+++ elf-hppa.h Tue Feb 12 15:19:24 2002
@@ -1646,11 +1646,7 @@
a local function which had its address taken. */
if (dyn_h->h == NULL)
{
- bfd_put_64 (hppa_info->dlt_sec->owner,
- value,
- hppa_info->dlt_sec->contents + dyn_h->dlt_offset);
-
- /* Now handle .opd creation if needed. */
+ /* Now do .opd creation if needed. */
if (r_type == R_PARISC_LTOFF_FPTR14R
|| r_type == R_PARISC_LTOFF_FPTR14DR
|| r_type == R_PARISC_LTOFF_FPTR14WR
@@ -1674,7 +1670,16 @@
bfd_put_64 (hppa_info->opd_sec->owner, value,
(hppa_info->opd_sec->contents
+ dyn_h->opd_offset + 24));
+
+ /* DLT value is the address of the .opd entry. */
+ value = (dyn_h->opd_offset
+ + hppa_info->opd_sec->output_offset
+ + hppa_info->opd_sec->output_section->vma);
}
+
+ bfd_put_64 (hppa_info->dlt_sec->owner,
+ value,
+ hppa_info->dlt_sec->contents + dyn_h->dlt_offset);
}
/* We want the value of the DLT offset for this symbol, not
next prev parent reply other threads:[~2002-02-12 21:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200202111958.g1BJwRAQ022031@hiauly1.hia.nrc.ca>
2002-02-11 15:35 ` law
2002-02-11 18:40 ` John David Anglin
2002-02-12 11:01 ` law
2002-02-12 11:07 ` John David Anglin
2002-02-12 13:19 ` law
2002-02-12 14:09 ` John David Anglin [this message]
[not found] <no.id>
2002-02-09 17:47 ` John David Anglin
2002-02-12 16:14 ` John David Anglin
2002-02-12 17:38 ` law
2002-02-26 15:20 ` John David Anglin
2002-02-26 21:58 ` Alan Modra
2002-02-27 0:32 ` John David Anglin
2002-03-05 9:57 ` law
2002-01-22 11:34 John David Anglin
2002-01-22 12:10 ` DJ Delorie
2002-01-22 13:39 ` law
2002-01-22 13:58 ` John David Anglin
2002-02-07 14:10 ` John David Anglin
2002-02-08 17:55 ` amodra
2002-02-08 15:27 ` John David Anglin
2002-02-11 9:27 ` law
2002-02-11 10:07 ` John David Anglin
2002-02-11 13:48 ` law
2002-02-12 14:53 ` John David Anglin
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=200202122119.g1CLJTab026840@hiauly1.hia.nrc.ca \
--to=dave@hiauly1.hia.nrc.ca \
--cc=binutils@sources.redhat.com \
--cc=law@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).