This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: sparc gold support...
- From: David Miller <davem at davemloft dot net>
- To: binutils at sourceware dot org
- Cc: iant at google dot com
- Date: Sun, 30 Mar 2008 22:07:16 -0700 (PDT)
- Subject: Re: sparc gold support...
- References: <20080330.201645.17794556.davem@davemloft.net>
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).