sparc gold support...

David Miller davem@davemloft.net
Mon Mar 31 05:07:00 GMT 2008


From: David Miller <davem@davemloft.net>
Date: Sun, 30 Mar 2008 20:16:45 -0700 (PDT)

> I'm actively working on a sparc port of GOLD and I'll
> post here the generic issues I run into as I hit them.

Ok, next problem is archive handling on systems that
trap on unaligned accesses.

Offsets within and archive into members can have all kinds of odd
offsets.  The object file reader infrastructure in gold assumes it can
just reference views via mmap().

But if the offset is odd, this doesn't work and results on SIGBUS
errors on platforms like Sparc.  This occurs as the ELF bits larger
than a byte in size get dereferenced.

It looks like a buffered version of the file view reader will need to
be implemented, and used instead of mmap() if the offset is not a
multiple of the largest core type size on the host (for sparc this
would need to be something like sizeof(double), but generically I
suppose something like sizeof(unsigned long long) could be used).



More information about the Binutils mailing list