From: Ian Lance Taylor <ian@airs.com>
To: "Charles Hardin" <chardin@2wire.com>
Cc: <gcc-help@gcc.gnu.org>, echristo@apple.com, richard@codesourcery.com
Subject: Re: MIPs Unaligned Relocation Table in libstdc++.so
Date: Sat, 30 Jul 2005 00:39:00 -0000 [thread overview]
Message-ID: <m38xzp5dqm.fsf@gossamer.airs.com> (raw)
In-Reply-To: <FCB63FA5C6B0BA46A4F6A10096F1C3BB026135FA@exchange01.corp.2wire.com>
"Charles Hardin" <chardin@2wire.com> writes:
> I couldn't find an answer to this, so I apologize if this is already known...
>
> For performance reasons, I instrumented the unaligned trap handler on a Linux 2.4.25 MIPs kernel to see when it was used... Oddly enough, the instrumentation triggered on application loads that were dynamically linked to libstdc++.so...
>
> What I know so far... This is a cross compile environment so "mipsel-linux" is the cross compiler...
> Using gcc 3.4.1
> Using glibc 2.3.2
> Using binutils 2.14.90.0.8
>
> # mipsel-linux-objdump -R libstdc++.so | grep "[^048c] R_MIPS"
> 00114fe2 R_MIPS_REL32 __gxx_personality_v0
> 0011598d R_MIPS_REL32 __gxx_personality_v0
> 00115a96 R_MIPS_REL32 __gxx_personality_v0
> 001172b9 R_MIPS_REL32 __gxx_personality_v0
> 0011731a R_MIPS_REL32 __gxx_personality_v0
> 0011d525 R_MIPS_REL32 __gxx_personality_v0
> 0011d5ae R_MIPS_REL32 __gxx_personality_v0
> 00124be1 R_MIPS_REL32 __gxx_personality_v0
> 00124c42 R_MIPS_REL32 __gxx_personality_v0
> 0012507d R_MIPS_REL32 __gxx_personality_v0
> 001250fe R_MIPS_REL32 __gxx_personality_v0
> 00125149 R_MIPS_REL32 __gxx_personality_v0
> 001251a2 R_MIPS_REL32 __gxx_personality_v0
> 001253d1 R_MIPS_REL32 __gxx_personality_v0
> 00125456 R_MIPS_REL32 __gxx_personality_v0
> 001254ed R_MIPS_REL32 __gxx_personality_v0
> 001259e2 R_MIPS_REL32 __gxx_personality_v0
>
> This seems to be a problem to me? and it doesn't happen on an x86 compile...
I've seen this kind of misaligned access too. While I haven't
investigated it fully, I believe the fix is to add this to
config/mips/mips.h:
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
(flag_pic ? DW_EH_PE_aligned : DW_EH_PE_absptr)
You might want to see if there is a bug report in
http://gcc.gnu.org/bugzilla/ about this.
Ian
next prev parent reply other threads:[~2005-07-30 0:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-29 17:51 Charles Hardin
2005-07-30 0:39 ` Ian Lance Taylor [this message]
2005-07-31 15:18 ` Richard Sandiford
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=m38xzp5dqm.fsf@gossamer.airs.com \
--to=ian@airs.com \
--cc=chardin@2wire.com \
--cc=echristo@apple.com \
--cc=gcc-help@gcc.gnu.org \
--cc=richard@codesourcery.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).