On Thursday 02 September 2010 15:42:56 you wrote:
> Hi Vijay and Mateusz,
> 
> > On Thursday 02 September 2010 13:52:32 you wrote:
> > > Thanks for the help. I have made quite a few changes to adapt pico to
> > > the plan9 compiler. I don't think there is a compiler flag that let me
> 
> Oh, so this sounds rather tough. Is Plan9 not a POSIX system?

<slightly ot>
It is not by itself. It was written as a Unix replacement, by the fathers of 
Unix. They found full Unix compatibility too constraining at some point.

However, Plan 9 shares a lot of core concepts with Unix; in a way, it just 
takes Unix one logical step further. A lot of semantics and APIs is similar 
enough to POSIX for a thin, straightforward POSIX compatibility environment 
(APE) to exist.

On the other hand, a lot of P9 innovations trickled down to recent Unix 
derivatives and wannabes, for example the clone() syscall, bitblit API, UTF-8 
and so on.

Moreover, a lot of Plan 9 softwari can, and indeed has been, ported to POSIX 
-- `Plan 9 from Userspace' resulted. Some functionality is missing because 
POSIX is very lacking in some areas, but it's pretty useful anyway -- and 
makes up my daily work environment ;)

As a curiosity, there are no shared libraries in P9 -- only what we call 
`static linking'. It's awesome in the longer run <3

Misc resources related to Plan 9: http://cat-v.org/
</slightly ot>
 
> > > align addresses. I have to search further or repeat the changes in the
> > > bigpico and try to compile that. Anyway, have to wait till I get a
> 
> Porting picoLisp to a non-POSIX system might be very difficult, as a lot
> of functionality depends on it. In this regard, miniPicoLisp is much
> easier, as it uses more or less only plain vanilla C.

I was pondering porting picoLisp to P9 for several months, and (with my 
limited understanding of P9) it doesn't seem very problematic. Never expected 
the matter of symbol alignment, thou.

> > I think you could create a C program that reads symbols & their values
> > from a compiled (and possibly linked) executable and writes a new
> > executable with functions aligned `by hand' to desired value. There is a
> > bunch of functions in
> > 
> > http://plan9.bell-labs.com/magic/man2html/2/symbol
> > http://plan9.bell-labs.com/magic/man2html/2/object
> > and
> > http://plan9.bell-labs.com/magic/man2html/2/mach
> > 
> > which let you read and write symbols from & to files.
> 
> Cool. But is it really able to relocate symbols? I couldn't detect that
> from scanning the above resources.
> 
> If it does, what happens to other references from inside the object code
> to those relocated symbols?

I dunno for sure. My understanding is, the linker (2l, as in two-ell) uses 
those APIs to output executables. So it's either `use them to read a compiled 
executable and generate a new executable', or `modify the underlying library 
and/or linker so it outputs stuff aligned'.


-- 
Mateusz Jan Przybylski


``One can't proceed from the informal to the formal by formal means.''
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to