9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* plan9 vs aout
@ 2020-06-02 12:36 Jens Staal
  2020-06-09 20:02 ` [9fans] " Jens Staal
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Staal @ 2020-06-02 12:36 UTC (permalink / raw)
  To: 9fans

Dear all,

First a bit of background:
I am currently attempting to update the old i386-plan9 target for binutils/gcc
in order to generate a modern cross compiler targeting plan9.

I have extracted the changes done to gcc 3.0 and binutils 2.11.2 from:
https://9p.io/sources/extra/gcc/

My binutils and gcc attempts can be found at:

https://github.com/staalmannen/gcc
branch plan9 : porting attempt to current gcc (10)
branch gcc-3.0-plan9 : original port added to the 3.0 branch

https://github.com/staalmannen/binutils-gdb
branch plan9: porting attempt to current binutils (2.34)
branch binutils-2_11-plan9 : original port added to the 2.11 branch

Definitely not just a copy-and-paste endeavour unfortunately. The old port
almost 20 years old and some style and structure changes have happened in that
time.

I have built a binutils variant but when I try to compile a "Hello.S" with
i386-lucent-plan9-as and execute it under i386 9front, I get an error about
incorrect file header, so something is wrong.

What I learned from looking at the old port and trying to adapt it to compile in
a modern binutils background is that a lot of it is basically copied from the
generic aout target (I have some uncommitted changes where I am updating the
obj-plan9 files to modern modified obj-aout files with the original changes
applied).

So to my question: what are the differences between the plan9 file format and
what binutils would see as generic aout? 


PS. If someone would be interested to help out, you are more than welcome ;) DS.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] plan9 vs aout
  2020-06-02 12:36 plan9 vs aout Jens Staal
@ 2020-06-09 20:02 ` Jens Staal
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Staal @ 2020-06-09 20:02 UTC (permalink / raw)
  To: 9fans

I have now added 2 more branches for reference from the updated port of gcc and
binutils to i386-plan9 from https://marcus.biz.tm/jail/ :

binutils-2_22-plan9

gcc-4.8-plan9

Hopefully there are some clues there to help making a working current i386-plan9 cross
compiler.


On Tue, Jun 02, 2020 at 02:36:38PM +0200, Jens Staal wrote:
> Dear all,
> 
> First a bit of background:
> I am currently attempting to update the old i386-plan9 target for binutils/gcc
> in order to generate a modern cross compiler targeting plan9.
> 
> I have extracted the changes done to gcc 3.0 and binutils 2.11.2 from:
> https://9p.io/sources/extra/gcc/
> 
> My binutils and gcc attempts can be found at:
> 
> https://github.com/staalmannen/gcc
> branch plan9 : porting attempt to current gcc (10)
> branch gcc-3.0-plan9 : original port added to the 3.0 branch
> 
> https://github.com/staalmannen/binutils-gdb
> branch plan9: porting attempt to current binutils (2.34)
> branch binutils-2_11-plan9 : original port added to the 2.11 branch
> 
> Definitely not just a copy-and-paste endeavour unfortunately. The old port
> almost 20 years old and some style and structure changes have happened in that
> time.
> 
> I have built a binutils variant but when I try to compile a "Hello.S" with
> i386-lucent-plan9-as and execute it under i386 9front, I get an error about
> incorrect file header, so something is wrong.
> 
> What I learned from looking at the old port and trying to adapt it to compile in
> a modern binutils background is that a lot of it is basically copied from the
> generic aout target (I have some uncommitted changes where I am updating the
> obj-plan9 files to modern modified obj-aout files with the original changes
> applied).
> 
> So to my question: what are the differences between the plan9 file format and
> what binutils would see as generic aout? 
> 
> 
> PS. If someone would be interested to help out, you are more than welcome ;) DS.
> 
> 
> 
> 
> 
> ------------------------------------------
> 9fans: 9fans
> Permalink: https://9fans.topicbox.com/groups/9fans/T0d486ca41e37210d-M9cbbb545155e2a1fd2addc16
> Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] plan9 vs aout
       [not found]                   ` <20200619103652.r6cv44eemckqi6zo@Hugin>
@ 2020-06-19 15:52                     ` Conor Williams
  0 siblings, 0 replies; 3+ messages in thread
From: Conor Williams @ 2020-06-19 15:52 UTC (permalink / raw)
  To: Jens Staal, Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 26629 bytes --]

Here you go Jens
If theres a problem with it check the jpg from before
as i transcribed the asm
It should be ok though
Kind Regards
Conor

   .text
.LC0
   .ascii "Hello World\0"
   .balign 4
.global main
main:
    pushl %ebp
    movl  %esp, %ebp
    subl $*, %esp
    call __main
    subl $12, %esb
    pushl  printf
    addl  $16, %esp
    leave
    ret

On Fri, Jun 19, 2020 at 11:36 AM Jens Staal <staal1978@gmail.com> wrote:

> Well the thing is still to figure out how to make a functional cross
> compiler
> from the recent binutils and gcc. I have gone through the code that I
> moved from
> the old 2.11/3.0 ports to binutils/gcc and it seems like I have covered it
> all.
>
> I suppose I should try to export the output from the old gcc 3.0
> gcc -S Hello.c and then use that output to try to test the newer binutils
> as and
> ld using the old libgcc and libc from the 3.0 port.
>
> Could you send the Hello.S you got from gcc 3.0?
>
> If the new binutils is working to make a functional i386-plan9 executable,
> I
> should focus on trying to make the new gcc compile and then test that one
> too in
> the same way as cross compiler using the old libc and new binutils, and
> then
> compile a new libc using the new gcc.
>
> I ended up in the mess of the as because I wanted to do an intermediate
> test of
> the binutils before moving on to gcc...
>
> On Fri, Jun 19, 2020 at 10:16:35AM +0100, Conor Williams wrote:
> > where to next Jens or are you ok again?...
> >
> > On Wed, Jun 17, 2020 at 4:45 PM Conor Williams <conor.williams@gmail.com
> >
> > wrote:
> >
> > > yes, the 3.0 port...
> > >
> > >
> > >
> > > On Wed, Jun 17, 2020 at 1:17 PM Jens Staal <staal1978@gmail.com>
> wrote:
> > >
> > >> Great
> > >>
> > >> This was with the old 3.0 port?
> > >>
> > >> On Wed, Jun 17, 2020 at 10:25:46AM +0100, Conor Williams wrote:
> > >> > wahoo i got it compiled in stages...
> > >> >
> > >> > i386...gcc -S hello.c
> > >> > i386...as  -o hello.o hello.S
> > >> > i386....ld crt0.o hello.o -L. -lgcc -lc -lgcc
> > >> >
> > >> > # ./a.out
> > >> > Hello World!
> > >> > #
> > >> >
> > >> >
> > >> > On Wed, Jun 17, 2020 at 9:40 AM Conor Williams <
> > >> conor.williams@gmail.com>
> > >> > wrote:
> > >> >
> > >> > > ok, kewl...
> > >> > >
> > >> > > it turns out that as creates an intermediate object file which
> > >> happens to
> > >> > > be, i feel, incorrectly
> > >> > > called a.out...
> > >> > >
> > >> > > im not quite there but you send this file to
> 'i386-lucent-plan9-ld'
> > >> and
> > >> > > link them all
> > >> > >
> > >> > > something like this:
> > >> > >
> > >> > > i386-lucent-plan9-ld -o print3 libgcc.a libc.a print3.o
> > >> > >
> > >> > > (where print3.o is the output from i386-lucent-plan9-ld)
> > >> > > (i got the i386-lucent-plan9-gcc from
> > >> > > https://9p.io/sources/extra/gcc/gnubin.tgz)
> > >> > >
> > >> > > On Wed, Jun 17, 2020 at 9:26 AM Jens Staal <staal1978@gmail.com>
> > >> wrote:
> > >> > >
> > >> > >> The reason I tested as on and asm file was because I have
> managed to
> > >> build
> > >> > >> binutils with i386-plan9 target, but not gcc yet.
> > >> > >>
> > >> > >> On Wed, Jun 17, 2020 at 09:09:46AM +0100, Conor Williams wrote:
> > >> > >> > i got gcc to create an a.out and it is 18k in size so i think
> > >> > >> > 'i386-lucent-plan9-as'
> > >> > >> > should be passed command line params to get it to load some
> > >> external
> > >> > >> libs
> > >> > >> > etc...
> > >> > >> >
> > >> > >> > attached is asm generated by plan9 gcc on plan 9 using the same
> > >> gcc that
> > >> > >> > created a proper a.out
> > >> > >> >
> > >> > >> > a quick question - why are you 'as' to do this and not gcc?...
> > >> > >> >
> > >> > >> > On Wed, Jun 17, 2020 at 8:03 AM Conor Williams <
> > >> > >> conor.williams@gmail.com>
> > >> > >> > wrote:
> > >> > >> >
> > >> > >> > > do a gcc -S hello.c
> > >> > >> > > with a printf("helo world"); in it...
> > >> > >> > >
> > >> > >> > > On Wed, Jun 17, 2020 at 4:27 AM Jens Staal <
> staal1978@gmail.com>
> > >> > >> wrote:
> > >> > >> > >
> > >> > >> > >> This is really weird. The only thing I can think of is that
> > >> > >> something is
> > >> > >> > >> wrong
> > >> > >> > >> with the Hello.S example that I downloaded from here:
> > >> > >> > >> https://www.tldp.org/HOWTO/Assembly-HOWTO/hello.html
> > >> > >> > >>
> > >> > >> > >> basically the same here:
> > >> > >> > >> https://en.wikipedia.org/wiki/GNU_Assembler
> > >> > >> > >>
> > >> > >> > >> but I now noticed something: I think the 0x80 is a 32 bit
> > >> > >> Linux-specific
> > >> > >> > >> thing so the
> > >> > >> > >> code is perhaps non-portable....
> > >> > >> > >>
> > >> > >> > >> I have now tested as from the old binutils 2.22 and 2.11
> that
> > >> were
> > >> > >> native
> > >> > >> > >> on
> > >> > >> > >> Plan9. I know for a fact that they should work but both also
> > >> gave
> > >> > >> the same
> > >> > >> > >> error, so most likely the example asm file that I have been
> > >> trying
> > >> > >> is not
> > >> > >> > >> appropriate.
> > >> > >> > >>
> > >> > >> > >> No idea what the i386-plan9 variant of 0x80 would be.
> > >> > >> > >>
> > >> > >> > >> Grrr!
> > >> > >> > >>
> > >> > >> > >> On Tue, Jun 16, 2020 at 11:24:08PM +0100, Conor Williams
> wrote:
> > >> > >> > >> > i386-as-plan9 -march i386 Hello.S
> > >> > >> > >> >
> > >> > >> > >> > doesnt create an i386 binary my friend...
> > >> > >> > >> >
> > >> > >> > >> > On Tue, Jun 16, 2020 at 11:09 PM Conor Williams <
> > >> > >> > >> conor.williams@gmail.com>
> > >> > >> > >> > wrote:
> > >> > >> > >> >
> > >> > >> > >> > > it turns out that, that a.out is a 68020 binary
> > >> > >> > >> > >
> > >> > >> > >> > > On Tue, Jun 16, 2020 at 10:03 PM Conor Williams <
> > >> > >> > >> conor.williams@gmail.com>
> > >> > >> > >> > > wrote:
> > >> > >> > >> > >
> > >> > >> > >> > >> ok... i agree...
> > >> > >> > >> > >>
> > >> > >> > >> > >> On Tue, Jun 16, 2020 at 8:02 PM Jens Staal <
> > >> staal1978@gmail.com
> > >> > >> >
> > >> > >> > >> wrote:
> > >> > >> > >> > >>
> > >> > >> > >> > >>> ok that is weird. I got the same error with the
> > >> > >> > >> i386-lucent-plan9-as on
> > >> > >> > >> > >>> Plan9
> > >> > >> > >> > >>> (a.out attached)
> > >> > >> > >> > >>>
> > >> > >> > >> > >>> I only copied the as so there is no strip involved.
> > >> > >> > >> > >>>
> > >> > >> > >> > >>>
> > >> > >> > >> > >>> On Tue, Jun 16, 2020 at 06:12:08PM +0100, Conor
> Williams
> > >> wrote:
> > >> > >> > >> > >>> > one thing before i delve into a linux vdi - that
> a.out
> > >> is
> > >> > >> > >> stripped,
> > >> > >> > >> > >>> can you
> > >> > >> > >> > >>> > send me the non-stripped version...
> > >> > >> > >> > >>> >
> > >> > >> > >> > >>> > On Tue, Jun 16, 2020 at 6:04 PM Conor Williams <
> > >> > >> > >> > >>> conor.williams@gmail.com>
> > >> > >> > >> > >>> > wrote:
> > >> > >> > >> > >>> >
> > >> > >> > >> > >>> > > right...
> > >> > >> > >> > >>> > >
> > >> > >> > >> > >>> > > On Tue, Jun 16, 2020 at 5:56 PM Jens Staal <
> > >> > >> staal1978@gmail.com
> > >> > >> > >> >
> > >> > >> > >> > >>> wrote:
> > >> > >> > >> > >>> > >
> > >> > >> > >> > >>> > >> yes that is plan9 asm from the i386 compiler 8c.
> > >> > >> > >> > >>> > >>
> > >> > >> > >> > >>> > >> Unfortunately, there are different asm dialects
> and
> > >> gcc
> > >> > >> uses
> > >> > >> > >> gas. It
> > >> > >> > >> > >>> > >> would otherwise have been awesome if one could
> just
> > >> > >> replace 8c
> > >> > >> > >> with
> > >> > >> > >> > >>> gcc and
> > >> > >> > >> > >>> > >> use the regular native stuff under it.
> > >> > >> > >> > >>> > >>
> > >> > >> > >> > >>> > >> Den tis 16 juni 2020 18:23Conor Williams <
> > >> > >> > >> conor.williams@gmail.com>
> > >> > >> > >> > >>> > >> skrev:
> > >> > >> > >> > >>> > >>
> > >> > >> > >> > >>> > >>> let me know what you think of the attached
> > >> picture...
> > >> > >> > >> > >>> > >>>
> > >> > >> > >> > >>> > >>> On Tue, Jun 16, 2020 at 3:37 PM Conor Williams <
> > >> > >> > >> > >>> conor.williams@gmail.com>
> > >> > >> > >> > >>> > >>> wrote:
> > >> > >> > >> > >>> > >>>
> > >> > >> > >> > >>> > >>>> ok...
> > >> > >> > >> > >>> > >>>>
> > >> > >> > >> > >>> > >>>> i setup an anonymous ftp server on my windows
> box
> > >> to
> > >> > >> transfer
> > >> > >> > >> > >>> files...
> > >> > >> > >> > >>> > >>>> (the new version of VirtualBox does
> > >> > >> > >> > >>> > >>>> not easily support file sharing)
> > >> > >> > >> > >>> > >>>>
> > >> > >> > >> > >>> > >>>>
> > >> > >> > >> > >>> > >>>>
> > >> > >> > >> > >>> > >>>> On Tue, Jun 16, 2020 at 3:23 PM Jens Staal <
> > >> > >> > >> staal1978@gmail.com>
> > >> > >> > >> > >>> wrote:
> > >> > >> > >> > >>> > >>>>
> > >> > >> > >> > >>> > >>>>> I noticed that the "gnubin" tarball linked on
> > >> > >> > >> > >>> > >>>>> https://marcus.biz.tm/jail/ is on
> > >> > >> > >> > >>> > >>>>> google drive so it is not as slow download as
> > >> > >> everything
> > >> > >> > >> else
> > >> > >> > >> > >>> from
> > >> > >> > >> > >>> > >>>>> that site.
> > >> > >> > >> > >>> > >>>>>
> > >> > >> > >> > >>> > >>>>>
> > >> > >> > >>
> https://drive.google.com/open?id=0B6YNt0aHfaA0TkREcmdQdWVhY0E
> > >> > >> > >> > >>> > >>>>>
> > >> > >> > >> > >>> > >>>>> He has packaged it a bit strange as /usr/pkg/
> > >> which
> > >> > >> does not
> > >> > >> > >> > >>> make sense
> > >> > >> > >> > >>> > >>>>> considering the plan9 directory structure, but
> > >> perhaps
> > >> > >> one
> > >> > >> > >> can
> > >> > >> > >> > >>> test
> > >> > >> > >> > >>> > >>>>> the output
> > >> > >> > >> > >>> > >>>>> from that "as" too when run under Plan9.
> > >> > >> > >> > >>> > >>>>>
> > >> > >> > >> > >>> > >>>>> I have an issue moving stuff between my plan9
> > >> systems
> > >> > >> and my
> > >> > >> > >> > >>> Linux
> > >> > >> > >> > >>> > >>>>> system at the
> > >> > >> > >> > >>> > >>>>> moment (dual booting 9front, put stuff I want
> to
> > >> move
> > >> > >> > >> between the
> > >> > >> > >> > >>> > >>>>> systems in the
> > >> > >> > >> > >>> > >>>>> ESP partition = limited space, run 9front in
> > >> > >> Virtualbox, no
> > >> > >> > >> idea
> > >> > >> > >> > >>> how
> > >> > >> > >> > >>> > >>>>> to share files between my
> > >> > >> > >> > >>> > >>>>> Linux host and the VM).
> > >> > >> > >> > >>> > >>>>>
> > >> > >> > >> > >>> > >>>>> On Tue, Jun 16, 2020 at 03:02:40PM +0100,
> Conor
> > >> > >> Williams
> > >> > >> > >> wrote:
> > >> > >> > >> > >>> > >>>>> > ok, thanks Jens, im going to run a hex
> editor,
> > >> 'od',
> > >> > >> on
> > >> > >> > >> a.out
> > >> > >> > >> > >>> and
> > >> > >> > >> > >>> > >>>>> have a
> > >> > >> > >> > >>> > >>>>> > look as im getting:
> > >> > >> > >> > >>> > >>>>> >          "exec: header invalid"
> > >> > >> > >> > >>> > >>>>> > also.
> > >> > >> > >> > >>> > >>>>> >
> > >> > >> > >> > >>> > >>>>> > On Tue, Jun 16, 2020 at 10:49 AM Jens Staal
> <
> > >> > >> > >> > >>> staal1978@gmail.com>
> > >> > >> > >> > >>> > >>>>> wrote:
> > >> > >> > >> > >>> > >>>>> >
> > >> > >> > >> > >>> > >>>>> > > this is what I get when I do
> > >> i386-lucent-plan9-as
> > >> > >> with
> > >> > >> > >> my new
> > >> > >> > >> > >>> > >>>>> binutils on
> > >> > >> > >> > >>> > >>>>> > > Hello.S.
> > >> > >> > >> > >>> > >>>>> > >
> > >> > >> > >> > >>> > >>>>> > > I have not tried the old gcc/binutils
> ports
> > >> > >> running on
> > >> > >> > >> Plan9
> > >> > >> > >> > >>> on
> > >> > >> > >> > >>> > >>>>> this asm
> > >> > >> > >> > >>> > >>>>> > > file.
> > >> > >> > >> > >>> > >>>>> > >
> > >> > >> > >> > >>> > >>>>> > > On Tue, Jun 16, 2020 at 09:54:07AM +0100,
> > >> Conor
> > >> > >> Williams
> > >> > >> > >> > >>> wrote:
> > >> > >> > >> > >>> > >>>>> > > > ok, cool cool... and you translate this
> > >> assembler
> > >> > >> > >> file to
> > >> > >> > >> > >>> binary
> > >> > >> > >> > >>> > >>>>> on Plan
> > >> > >> > >> > >>> > >>>>> > > 9,
> > >> > >> > >> > >>> > >>>>> > > > how?...
> > >> > >> > >> > >>> > >>>>> > > >
> > >> > >> > >> > >>> > >>>>> > > > does the cross compiler not create a
> > >> binary?...
> > >> > >> could
> > >> > >> > >> you
> > >> > >> > >> > >>> send
> > >> > >> > >> > >>> > >>>>> me that
> > >> > >> > >> > >>> > >>>>> > > > too?...
> > >> > >> > >> > >>> > >>>>> > > >
> > >> > >> > >> > >>> > >>>>> > > > Kind Regards
> > >> > >> > >> > >>> > >>>>> > > > Conor
> > >> > >> > >> > >>> > >>>>> > > >
> > >> > >> > >> > >>> > >>>>> > > > On Tue, Jun 16, 2020 at 4:45 AM Jens
> Staal <
> > >> > >> > >> > >>> staal1978@gmail.com>
> > >> > >> > >> > >>> > >>>>> wrote:
> > >> > >> > >> > >>> > >>>>> > > >
> > >> > >> > >> > >>> > >>>>> > > > > Hi Conor
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > > > > I am currently focusing on getting the
> > >> modern
> > >> > >> gcc
> > >> > >> > >> and
> > >> > >> > >> > >>> binutils
> > >> > >> > >> > >>> > >>>>> to work
> > >> > >> > >> > >>> > >>>>> > > as
> > >> > >> > >> > >>> > >>>>> > > > > cross
> > >> > >> > >> > >>> > >>>>> > > > > compilers, so I build on Linux at the
> > >> moment.
> > >> > >> As
> > >> > >> > >> can be
> > >> > >> > >> > >>> seen
> > >> > >> > >> > >>> > >>>>> on the
> > >> > >> > >> > >>> > >>>>> > > > > comparison
> > >> > >> > >> > >>> > >>>>> > > > > below:
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> https://github.com/staalmannen/gcc/pull/3/files
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> https://github.com/staalmannen/binutils-gdb/pull/3/files
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > > > > there are several other changes
> needed to
> > >> > >> build on
> > >> > >> > >> Plan9
> > >> > >> > >> > >>> > >>>>> related to
> > >> > >> > >> > >>> > >>>>> > > missing
> > >> > >> > >> > >>> > >>>>> > > > > flags in the APE utilities (mv -f, ls
> > >> -di). I
> > >> > >> think
> > >> > >> > >> the
> > >> > >> > >> > >>> > >>>>> cleaner way to
> > >> > >> > >> > >>> > >>>>> > > > > deal with
> > >> > >> > >> > >>> > >>>>> > > > > those would be to make some rc script
> > >> wrappers
> > >> > >> that
> > >> > >> > >> > >>> catches
> > >> > >> > >> > >>> > >>>>> those
> > >> > >> > >> > >>> > >>>>> > > flags and
> > >> > >> > >> > >>> > >>>>> > > > > change them to something reasonable
> (mv,
> > >> ls -d)
> > >> > >> > >> rather
> > >> > >> > >> > >>> than
> > >> > >> > >> > >>> > >>>>> changing
> > >> > >> > >> > >>> > >>>>> > > the
> > >> > >> > >> > >>> > >>>>> > > > > source
> > >> > >> > >> > >>> > >>>>> > > > > code of gcc in a way that would
> interfere
> > >> with
> > >> > >> > >> building
> > >> > >> > >> > >>> it on
> > >> > >> > >> > >>> > >>>>> other
> > >> > >> > >> > >>> > >>>>> > > hosts.
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > > > > There are i386-Plan9 gcc/binutils +
> APE
> > >> library
> > >> > >> > >> binaries
> > >> > >> > >> > >>> for
> > >> > >> > >> > >>> > >>>>> > > > > 3.0
> > >> > >> > >> > >>> > >>>>> > > > > https://9p.io/sources/extra/gcc/
> > >> > >> > >> > >>> > >>>>> > > > > and 4.8.3
> > >> > >> > >> > >>> > >>>>> > > > > https://marcus.biz.tm/jail/
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > > > > Perhaps the 4.8.3 variant will be
> able to
> > >> > >> build gcc
> > >> > >> > >> 10 /
> > >> > >> > >> > >>> > >>>>> binutils 2.34
> > >> > >> > >> > >>> > >>>>> > > > > natively
> > >> > >> > >> > >>> > >>>>> > > > > on Plan9, but my bet is on a cross
> > >> compiler
> > >> > >> first,
> > >> > >> > >> which
> > >> > >> > >> > >>> then
> > >> > >> > >> > >>> > >>>>> can be
> > >> > >> > >> > >>> > >>>>> > > used
> > >> > >> > >> > >>> > >>>>> > > > > to
> > >> > >> > >> > >>> > >>>>> > > > > cross compile gcc/binutils to Plan9
> for
> > >> gcc as
> > >> > >> > >> native
> > >> > >> > >> > >>> compiler.
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > > > > I will set up a repo for the APE
> > >> libraries for
> > >> > >> gcc,
> > >> > >> > >> but
> > >> > >> > >> > >>> of
> > >> > >> > >> > >>> > >>>>> course we
> > >> > >> > >> > >>> > >>>>> > > first
> > >> > >> > >> > >>> > >>>>> > > > > need
> > >> > >> > >> > >>> > >>>>> > > > > to get binutils and gcc working
> before we
> > >> can
> > >> > >> try to
> > >> > >> > >> > >>> compile
> > >> > >> > >> > >>> > >>>>> anything,
> > >> > >> > >> > >>> > >>>>> > > > > including
> > >> > >> > >> > >>> > >>>>> > > > > the c library...
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > > > > Attached is the Hello.S I used for
> testing
> > >> > >> (copied
> > >> > >> > >> from
> > >> > >> > >> > >>> > >>>>> Internet)
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > > > > On Mon, Jun 15, 2020 at 08:02:21PM
> +0100,
> > >> Conor
> > >> > >> > >> Williams
> > >> > >> > >> > >>> wrote:
> > >> > >> > >> > >>> > >>>>> > > > > > hello Jens
> > >> > >> > >> > >>> > >>>>> > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > I have my Plan 9 virtual machine up
> and
> > >> > >> running...
> > >> > >> > >> > >>> > >>>>> > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > to start me off, can you send me the
> > >> "Hello.
> > >> > >> S"
> > >> > >> > >> binary
> > >> > >> > >> > >>> > >>>>> > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > also, to clarify, you are running
> the
> > >> > >> compiler on
> > >> > >> > >> a
> > >> > >> > >> > >>> *Linux*
> > >> > >> > >> > >>> > >>>>> box
> > >> > >> > >> > >>> > >>>>> > > creating
> > >> > >> > >> > >>> > >>>>> > > > > > the binary for Plan 9?
> > >> > >> > >> > >>> > >>>>> > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > Regards
> > >> > >> > >> > >>> > >>>>> > > > > > Conor (Williams)
> > >> > >> > >> > >>> > >>>>> > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > Regards
> > >> > >> > >> > >>> > >>>>> > > > > > Conor
> > >> > >> > >> > >>> > >>>>> > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > On Tue, Jun 9, 2020 at 9:03 PM Jens
> > >> Staal <
> > >> > >> > >> > >>> > >>>>> staal1978@gmail.com>
> > >> > >> > >> > >>> > >>>>> > > wrote:
> > >> > >> > >> > >>> > >>>>> > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > I have now added 2 more branches
> for
> > >> > >> reference
> > >> > >> > >> from
> > >> > >> > >> > >>> the
> > >> > >> > >> > >>> > >>>>> updated
> > >> > >> > >> > >>> > >>>>> > > port of
> > >> > >> > >> > >>> > >>>>> > > > > > > gcc and
> > >> > >> > >> > >>> > >>>>> > > > > > > binutils to i386-plan9 from
> > >> > >> > >> > >>> https://marcus.biz.tm/jail/ :
> > >> > >> > >> > >>> > >>>>> > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > binutils-2_22-plan9
> > >> > >> > >> > >>> > >>>>> > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > gcc-4.8-plan9
> > >> > >> > >> > >>> > >>>>> > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > Hopefully there are some clues
> there
> > >> to
> > >> > >> help
> > >> > >> > >> making a
> > >> > >> > >> > >>> > >>>>> working
> > >> > >> > >> > >>> > >>>>> > > current
> > >> > >> > >> > >>> > >>>>> > > > > > > i386-plan9 cross
> > >> > >> > >> > >>> > >>>>> > > > > > > compiler.
> > >> > >> > >> > >>> > >>>>> > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > On Tue, Jun 02, 2020 at 02:36:38PM
> > >> +0200,
> > >> > >> Jens
> > >> > >> > >> Staal
> > >> > >> > >> > >>> wrote:
> > >> > >> > >> > >>> > >>>>> > > > > > > > Dear all,
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > > First a bit of background:
> > >> > >> > >> > >>> > >>>>> > > > > > > > I am currently attempting to
> update
> > >> the
> > >> > >> old
> > >> > >> > >> > >>> i386-plan9
> > >> > >> > >> > >>> > >>>>> target for
> > >> > >> > >> > >>> > >>>>> > > > > > > binutils/gcc
> > >> > >> > >> > >>> > >>>>> > > > > > > > in order to generate a modern
> cross
> > >> > >> compiler
> > >> > >> > >> > >>> targeting
> > >> > >> > >> > >>> > >>>>> plan9.
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > > I have extracted the changes
> done
> > >> to gcc
> > >> > >> 3.0
> > >> > >> > >> and
> > >> > >> > >> > >>> > >>>>> binutils 2.11.2
> > >> > >> > >> > >>> > >>>>> > > > > from:
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> https://9p.io/sources/extra/gcc/
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > > My binutils and gcc attempts
> can be
> > >> > >> found at:
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> https://github.com/staalmannen/gcc
> > >> > >> > >> > >>> > >>>>> > > > > > > > branch plan9 : porting attempt
> to
> > >> > >> current gcc
> > >> > >> > >> (10)
> > >> > >> > >> > >>> > >>>>> > > > > > > > branch gcc-3.0-plan9 : original
> port
> > >> > >> added to
> > >> > >> > >> the
> > >> > >> > >> > >>> 3.0
> > >> > >> > >> > >>> > >>>>> branch
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> https://github.com/staalmannen/binutils-gdb
> > >> > >> > >> > >>> > >>>>> > > > > > > > branch plan9: porting attempt to
> > >> current
> > >> > >> > >> binutils
> > >> > >> > >> > >>> (2.34)
> > >> > >> > >> > >>> > >>>>> > > > > > > > branch binutils-2_11-plan9 :
> > >> original
> > >> > >> port
> > >> > >> > >> added
> > >> > >> > >> > >>> to the
> > >> > >> > >> > >>> > >>>>> 2.11
> > >> > >> > >> > >>> > >>>>> > > branch
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > > Definitely not just a
> copy-and-paste
> > >> > >> endeavour
> > >> > >> > >> > >>> > >>>>> unfortunately.
> > >> > >> > >> > >>> > >>>>> > > The old
> > >> > >> > >> > >>> > >>>>> > > > > > > port
> > >> > >> > >> > >>> > >>>>> > > > > > > > almost 20 years old and some
> style
> > >> and
> > >> > >> > >> structure
> > >> > >> > >> > >>> changes
> > >> > >> > >> > >>> > >>>>> have
> > >> > >> > >> > >>> > >>>>> > > > > happened
> > >> > >> > >> > >>> > >>>>> > > > > > > in that
> > >> > >> > >> > >>> > >>>>> > > > > > > > time.
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > > I have built a binutils variant
> but
> > >> when
> > >> > >> I
> > >> > >> > >> try to
> > >> > >> > >> > >>> > >>>>> compile a
> > >> > >> > >> > >>> > >>>>> > > "Hello.S"
> > >> > >> > >> > >>> > >>>>> > > > > > > with
> > >> > >> > >> > >>> > >>>>> > > > > > > > i386-lucent-plan9-as and
> execute it
> > >> > >> under i386
> > >> > >> > >> > >>> 9front, I
> > >> > >> > >> > >>> > >>>>> get an
> > >> > >> > >> > >>> > >>>>> > > error
> > >> > >> > >> > >>> > >>>>> > > > > > > about
> > >> > >> > >> > >>> > >>>>> > > > > > > > incorrect file header, so
> something
> > >> is
> > >> > >> wrong.
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > > What I learned from looking at
> the
> > >> old
> > >> > >> port
> > >> > >> > >> and
> > >> > >> > >> > >>> trying
> > >> > >> > >> > >>> > >>>>> to adapt
> > >> > >> > >> > >>> > >>>>> > > it to
> > >> > >> > >> > >>> > >>>>> > > > > > > compile in
> > >> > >> > >> > >>> > >>>>> > > > > > > > a modern binutils background is
> > >> that a
> > >> > >> lot of
> > >> > >> > >> it is
> > >> > >> > >> > >>> > >>>>> basically
> > >> > >> > >> > >>> > >>>>> > > copied
> > >> > >> > >> > >>> > >>>>> > > > > > > from the
> > >> > >> > >> > >>> > >>>>> > > > > > > > generic aout target (I have some
> > >> > >> uncommitted
> > >> > >> > >> > >>> changes
> > >> > >> > >> > >>> > >>>>> where I am
> > >> > >> > >> > >>> > >>>>> > > > > updating
> > >> > >> > >> > >>> > >>>>> > > > > > > the
> > >> > >> > >> > >>> > >>>>> > > > > > > > obj-plan9 files to modern
> modified
> > >> > >> obj-aout
> > >> > >> > >> files
> > >> > >> > >> > >>> with
> > >> > >> > >> > >>> > >>>>> the
> > >> > >> > >> > >>> > >>>>> > > original
> > >> > >> > >> > >>> > >>>>> > > > > > > changes
> > >> > >> > >> > >>> > >>>>> > > > > > > > applied).
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > > So to my question: what are the
> > >> > >> differences
> > >> > >> > >> > >>> between the
> > >> > >> > >> > >>> > >>>>> plan9
> > >> > >> > >> > >>> > >>>>> > > file
> > >> > >> > >> > >>> > >>>>> > > > > > > format and
> > >> > >> > >> > >>> > >>>>> > > > > > > >  what binutils would see as
> generic
> > >> aout?
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > > > PS. If someone would be
> interested
> > >> to
> > >> > >> help
> > >> > >> > >> out,
> > >> > >> > >> > >>> you are
> > >> > >> > >> > >>> > >>>>> more than
> > >> > >> > >> > >>> > >>>>> > > > > > > welcome ;) DS.
> > >> > >> > >> > >>> > >>>>> > > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > > > >
> > >> ------------------------------------------
> > >> > >> > >> > >>> > >>>>> > > > > > > 9fans: 9fans
> > >> > >> > >> > >>> > >>>>> > > > > > > Permalink:
> > >> > >> > >> > >>> > >>>>> > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > >
> > >> > >> > >> > >>> > >>>>>
> > >> > >> > >> > >>>
> > >> > >> > >>
> > >> > >>
> > >>
> https://9fans.topicbox.com/groups/9fans/T0d486ca41e37210d-M8f436975b50638e15cf50fdd
> > >> > >> > >> > >>> > >>>>> > > > > > > Delivery options:
> > >> > >> > >> > >>> > >>>>> > >
> > >> > >> https://9fans.topicbox.com/groups/9fans/subscription
> > >> > >> > >> > >>> > >>>>> > > > > > >
> > >> > >> > >> > >>> > >>>>> > > > >
> > >> > >> > >> > >>> > >>>>> > >
> > >> > >> > >> > >>> > >>>>>
> > >> > >> > >> > >>> > >>>>
> > >> > >> > >> > >>>
> > >> > >> > >> > >>
> > >> > >> > >>
> > >> > >> > >
> > >> > >>
> > >> > >>
> > >> > >>
> > >>
> > >
>

[-- Attachment #2: Type: text/html, Size: 56597 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-19 15:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02 12:36 plan9 vs aout Jens Staal
2020-06-09 20:02 ` [9fans] " Jens Staal
     [not found] <CAL6pNZ98fBry0Q8wmBhLDLYWnwv0Sr-MV1X_P+jCTbn4RHJPVg@mail.gmail.com>
     [not found] ` <20200617032730.tj6dxckg444u5czq@Hugin>
     [not found]   ` <CAL6pNZ-gv3qMSKH3ubyEaaeP5SvT6MzDy3hVayHnAXrSFXuHTw@mail.gmail.com>
     [not found]     ` <CAL6pNZ8NC+E_1FyYQ5i5kDTOC6DiZ_GuQwAu9A1gEWYJXBXH2Q@mail.gmail.com>
     [not found]       ` <20200617082616.qg5jv66tbpsgpy6r@Hugin>
     [not found]         ` <CAL6pNZ89Zfi8Lqb30Jvpyb3TKTE6ZAvr0yOnyVgV-LOnVyTyQg@mail.gmail.com>
     [not found]           ` <CAL6pNZ9Obue7WDGwCYmdRCGO2Otz-Y76CFQB2eVZ8L9dJJPzNw@mail.gmail.com>
     [not found]             ` <20200617121723.3kwgd45fgwv6cwg5@Hugin>
     [not found]               ` <CAL6pNZ-OJP_sZGHb2VSbk+_qYfbBGQcfmPffD--hYoz_Z+pkxg@mail.gmail.com>
     [not found]                 ` <CAL6pNZ9mvYx3_qf9gNSKbZFb8LWXCcdByH9rjcAv6HN_RZu-2Q@mail.gmail.com>
     [not found]                   ` <20200619103652.r6cv44eemckqi6zo@Hugin>
2020-06-19 15:52                     ` Conor Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).