From: "David S. Miller" <davem@davemloft.net>
To: sparclinux@vger.kernel.org
Subject: Re: PAGE_SIZE and native vs. emulated 32-bit SPARC ABI
Date: Tue, 04 Jan 2005 18:46:56 +0000 [thread overview]
Message-ID: <20050104104656.08e4564c.davem@davemloft.net> (raw)
In-Reply-To: <20041230110707.GC29332@holomorphy.com>
On Thu, 30 Dec 2004 03:07:07 -0800
William Lee Irwin III <wli@holomorphy.com> wrote:
> It seems that most/all 32-bit SPARC programs are written and compiled
> for emulated 32-bit on sun4u, which has an 8KB PAGE_SIZE, and returns
> 8KB for getpagesize(). This is unfortunately causing spectacular
> failures on some of my favorite regression tests for memory management,
> which are interpreters using memory protection-based garbage collectors.
The Sparc ABI states that one may make no assumptions about
the PAGE_SIZE in any way. That's why 32-bit Sparc ELF binaries
compiled before sun4u even existed can execute properly on 8KB
PAGE_SIZE systems.
Not using getpagesize() is a pretty serious programming error.
There are even facilities in the Sparc ELF specification that allow
the binaries to work just fine for up to a 64KB page size. A long
time ago, Kanoj Sarcar played around with changing the default PAGE_SIZE
of sparc64 to be 64K and all 32-bit binaries worked just fine.
next prev parent reply other threads:[~2005-01-04 18:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-30 11:07 PAGE_SIZE and native vs. emulated 32-bit SPARC ABI William Lee Irwin III
2004-12-30 11:50 ` C.Newport
2004-12-30 12:13 ` William Lee Irwin III
2005-01-04 18:46 ` David S. Miller [this message]
2005-01-04 18:54 ` William Lee Irwin III
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=20050104104656.08e4564c.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=sparclinux@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.