Oberon Community Platform Forum

Development => UnixAOS => Topic started by: Bernhard T. on November 26, 2013, 10:08:29 AM



Title: linux executable ?
Post by: Bernhard T. on November 26, 2013, 10:08:29 AM
this is a cross posting from the oberon Mailing list:

Zdenek asked:

> is it possible in aos to create standalone executable for linux without
> need of running "aos -x ... " ?
>
> I mean like compiling module test.Mod in aos and then running executable
> test in any linux shell without aos installed.

my answer is:

no, as far as I know there is no linker, which is able to create Linux (ELF)
executables, but I might be wrong ...

There is an ELF-linker for Blackbox/Component Pascal (Oberon-2 derivative),
which is able to create shared object  libraries but not yet executables. It might
be used as a starting point when combined with WinAOS PELinker ...

regards
--
  Bernhard


Title: Re: linux executable ?
Post by: fld on December 10, 2013, 01:19:09 PM
Yes it is possible to create applications which can be started
without LinusAos installed. LinuxAosCore is such a beast. You
can extend it in the following way:
 
Compiler.Compile Test.Mod ~

 BootLinker.Link  SolarisAosCore :=
   Trace  Glue  Unix  Machine  Heaps  Modules  Objects  Kernel  KernelLog 
   Streams  Commands  TrapWriters  Reflection  StdIO  Traps 
   Files  UnixFiles  Loader  BootConsole     ~


Title: Re: linux executable ?
Post by: fld on December 10, 2013, 01:27:48 PM
Sorry. I sent the my first reply before it was finished.

Yes it is possible to create applications which can be started
without LinusAos installed. LinuxAosCore is such a beast. You
can extend it in the following way:
 
 Compiler.Compile Test.Mod ~

 BootLinker.Link  ApplName :=
   Trace  Glue  Unix  Machine  Heaps  Modules  Objects  Kernel  KernelLog
   Streams  Commands  TrapWriters  Reflection  StdIO  Traps
   Files  UnixFiles  Loader  BootConsole   ... (modules imported by Test)  Test ~

In the Linux shell the application can be started as follows:

   aos.linux  ApplName -x Test.Do

-- Guenter