lkml.org 
[lkml]   [1999]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Solaris/Intel binary emulation; lcall27 handler.
On Fri, 23 Jul 1999, David Woodhouse wrote:

> My Solaris 'hello world' now runs. To get the dynamically linked version to
> run, I had to modify the behaviour of ibcs_mmap(). Currently, it returns zero
> if a MAP_FIXED mmap() call succeeds - but Solaris' ld.so expects it to return
> <addr>, just like Linux does.
>
> What systems require this behaviour? Do we need add PER_SOLARIS to distinguish
> between them? We could separate the lcall7 handler from the lcall27 handler
> and set current->personality to PER_SOLARIS iff the latter is called. (We
> might already need to have separate handlers anyway - I assume they changed
> for a reason.)

According to my current source (or, at least, the source I have
here) the fudging for MAP_FIXED only happens for PER_SVR4. I almost
certainly added it because INTERACTIVE SVR4 required it, that being
the only SVR4 I had. It seems you need to add PER_SOLARIS (are the
syscall and errno tables the same as SVR4 anyway?). There are
three options that I can think of off hand:

1. Change the Linux binfmt_elf.c to spot a Solaris binary (somehow)
and set the personality to PER_SOLARIS rather than PER_SVR4.

2. See if there is some syscall coming from the crt*.o that can
be used to trigger a change to PER_SOLARIS (we do that for
SCO OS5 which has a funky sysi86() in the start up)

3. Have the default lcall27 handler attempt to switch personality
to PER_SOLARIS and then pass on the call. The current no_lcall7
already does this to try PER_SVR4 if something not recognised
as other than Linux does an lcall7(27?) since it's needed to
get static ELF binaries working.

Mike

--
A train stops at a train station, a bus stops at a bus station.
On my desk I have a work station...
.----------------------------------------------------------------------.
| Mike Jagdis | Internet: mailto:mike@roan.co.uk |
| Roan Technology Ltd. | |
| 2 Markham Mews, Broad Street | Telephone: +44 118 989 0403 |
| Wokingham ENGLAND | Fax: +44 118 989 1195 |
`----------------------------------------------------------------------'


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.048 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site