Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2004-06

compiling on openbsd 3.5

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Lee Bowyer

After bodging my way thru the snapshot src, I discovered that the prt0_10.as for openbsd is wrong... (I get undefined reference's..)

I have _no_ idea myself how to fix this, can anybody help?

May need a new elf-based prt0?

If anybody can give me any pointers...

Lee Bowyer www.networkpenetration.com

Reply by email

Marco van de Voort
to Lee Bowyer
After bodging my way thru the snapshot src, I discovered that the prt0_10.as for openbsd is wrong... (I get undefined reference's..) I have _no_ idea myself how to fix this, can anybody help?

It's quite a lot of work to get OpenBSD on the rails again, I currently don't have time to this. I was told that the FreeBSD binaries worked ok on OpenBSD.

The problem is that OpenBSD development never went further than the initial port due to lack of users, and lack of interest on my behalf (I use FreeBSD, and even NetBSD myself, but I did OpenBSD on the side)

May need a new elf-based prt0?

Probably yes.

If anybody can give me any pointers...

We'd need a OpenBSD maintainer, someone that really uses OpenBSD, and can do most work alone.

I can still assist, but I'm not going to do the bulk of the work anymore, I simply don't have the time.

Reply by email

Lee Bowyer
to Marco van de Voort
It's quite a lot of work to get OpenBSD on the rails again, I currently don't have time to this. I was told that the FreeBSD binaries worked ok on OpenBSD.

I shall try this...

Show quoted text 12 lines
> May need a new elf-based prt0? Probably yes. > If anybody can give me any pointers... We'd need a OpenBSD maintainer, someone that really uses OpenBSD, and can do most work alone. I can still assist, but I'm not going to do the bulk of the work anymore, I simply don't have the time.

All I use is openbsd, if you can give some help over the prt0 problem, I can certainly send you any openbsd fixes...

The amount of fixing needed for 1.9.x/2.0 doesn't seem that heavy (except for the prt0..)

Lee Bowyer www.networkpenetration.com

Reply by email

Marco van de Voort
to Lee Bowyer
Show quoted text 9 lines
> > I can still assist, but I'm not going to do the bulk of the work anymore, > I simply don't have the time. All I use is openbsd, if you can give some help over the prt0 problem, I can certainly send you any openbsd fixes... The amount of fixing needed for 1.9.x/2.0 doesn't seem that heavy (except for the prt0..)

The basic idea is:

prt0:

- compile the original crt<x>.c code that comes with the OS.
- move the argc, argv and environ variables to Pascal space (1.0.x SYSBSD$identifier, 1.9.x: SYSTEM$identifier)
- remove all libc initialisation and finalisation code.
- copy the initcode of the coprocessor (the fstcw code)
- Remove the pushes of parameter before main, replace it with a xorl %ebp,%ebp
- Change the name of main (IIRC 1.9.x: PASCALMAIN (capitals), older: main)
- copy the code to exit the program (a syscall to exit in asm, load the program exitcode from pascal space)
- Sometimes one has to add ELF identifiers too.

cprt0.as: (prt0.as for shared linking to libc programs)

Pretty much the same, except that removing the libc init/finalisation stuff is not necessary.

Reply by email

Lee Bowyer
to Marco van de Voort

okay, cheers marco, expect pleas for help ;-)

Marco van de Voort wrote 37 lines
> > > > I can still assist, but I'm not going to do the bulk of the work > anymore, > > I simply don't have the time. > > All I use is openbsd, if you can give some help over the prt0 problem, I > can certainly send you any openbsd fixes... > > The amount of fixing needed for 1.9.x/2.0 doesn't seem that heavy > (except > for the prt0..) The basic idea is: prt0: - compile the original crt<x>.c code that comes with the OS. - move the argc, argv and environ variables to Pascal space (1.0.x SYSBSD$identifier, 1.9.x: SYSTEM$identifier) - remove all libc initialisation and finalisation code. - copy the initcode of the coprocessor (the fstcw code) - Remove the pushes of parameter before main, replace it with a xorl %ebp,%ebp - Change the name of main (IIRC 1.9.x: PASCALMAIN (capitals), older: main) - copy the code to exit the program (a syscall to exit in asm, load the program exitcode from pascal space) - Sometimes one has to add ELF identifiers too. cprt0.as: (prt0.as for shared linking to libc programs) Pretty much the same, except that removing the libc init/finalisation stuff is not necessary. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel
Lee Bowyer www.networkpenetration.com

Reply by email