[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Workaround for Alpha libstc++ unaligned access problem



On 21 Feb 2000, David Huggins-Daines wrote:

> After staring at the exception handling code in the C runtime
> environment a bit harder I have decided that, until the issues of the
> DWARF2 frame info format can be resolved in gcc (which they will have
> to be eventually - think IA-64), the only way to deal with this
> problem is simply to have ld.so on the Alpha treat RELATIVE
> relocations as potentially unaligned.
> 
> If you look at the exception handling code in the runtime environment
> (in gcc/frame.c in the gcc source) you'll notice that it's already
> assumed that any data in the DWARF2 frame info is potentially
> unaligned ... I've been searching in vain for a reference to this
> particular data structure in the DWARF2 spec but it's entirely
> possible that it's just broken by design.

Great work!  BTW, the offending code is also in binutils' source and is
quite a bit more explicit (see gas/ehopt.c).  I need to look at the DWARF2
spec, but I don't see why it would require such a fixed alignment.  FYI,
the ehopt.c code is specifically there to optimise gcc's EH frame
relocations, so that may be another worthwhile avenue for you to
pursue.  Being the binutils maintainer, I really wish I could work on this
more right now, but it's a bad time (today's my first day back from my
2-week-long vacation/honeymoon).  Let me know if you need me to patch
something, though, as I'm equally interested in solving the problem for
good.

C


Reply to: