Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: Paul Bame <bame@fc.hp.com>
Cc: parisc-linux@parisc-linux.org
Subject: [parisc-linux] Re: new g++/exceptions problem
Date: Sun, 17 Jun 2001 15:13:36 +0930	[thread overview]
Message-ID: <20010617151336.A16044@bubble.local> (raw)
In-Reply-To: <E15B4IO-000111-00@noam.fc.hp.com>; from bame@fc.hp.com on Fri, Jun 15, 2001 at 06:50:36PM -0600

On Fri, Jun 15, 2001 at 06:50:36PM -0600, Paul Bame wrote:
> 
> so it's inside the exception-handler frame.  My wild guess is the
> dynamic linker is trying to handle a new type of symbol which refers
> to the new exception stuff which is for some reason not 4-byte
> aligned

Yes, the new exception code puts R_PARISC_DIR32 relocs at unaligned
addresses.  "objdump -r libstdc++.so" reveals

Relocation section '.rela.eh_frame' at offset 0x37024 contains 1611 entries:
  Offset    Info  Type            Symbol's Value  Symbol's Name          Addend
  000c167e  4da01 R_PARISC_DIR32        00056914  __gxx_personality_v0      + 0
  000c1690  00d01 R_PARISC_DIR32        0003fe40  .text                     + 5114
  000c1699  01301 R_PARISC_DIR32        000cede4  .gcc_except_table         + 0
etc.

Seems like a change in the dynamic linker is needed to handle this
situation.  Something like the following should do it for you.

--- sysdeps/hppa/dl-machine.h~	Sun Jun 17 15:03:59 2001
+++ sysdeps/hppa/dl-machine.h	Sun Jun 17 15:05:11 2001
@@ -536,7 +536,16 @@
       if (map == &_dl_rtld_map)
 	return;
 #endif
-      /* Otherwise, nothing more to do here. */
+      /* .eh_frame can have unaligned relocs.  */
+      if (reloc_addr & 3)
+	{
+	  char *rel_addr = (char *) reloc_addr;
+	  rel_addr[0] = value >> 24;
+	  rel_addr[1] = value >> 16;
+	  rel_addr[2] = value >> 8;
+	  rel_addr[3] = value >> 0;
+	  return;
+	}
       break;
 
     case R_PARISC_PLABEL32:

      parent reply	other threads:[~2001-06-17  5:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-16  0:50 [parisc-linux] new g++/exceptions problem Paul Bame
2001-06-16  0:57 ` Paul Bame
2001-06-16  1:16 ` John David Anglin
2001-06-17  5:43 ` Alan Modra [this message]

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=20010617151336.A16044@bubble.local \
    --to=amodra@bigpond.net.au \
    --cc=bame@fc.hp.com \
    --cc=parisc-linux@parisc-linux.org \
    /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