This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPs Unaligned Relocation Table in libstdc++.so


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]