comp.lang.ada
 help / color / mirror / Atom feed
* Re: Curiousity: pragma No_Run_Time for Gnat
@ 2001-09-25 14:09 M. A. Alves
  2001-09-25 13:05 ` chris.danx
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: M. A. Alves @ 2001-09-25 14:09 UTC (permalink / raw)
  To: comp.lang.ada

or... The Meanings of "Pure"

Sergey Koshcheyev wrote:
> I don't know exactly what you [Marin Condic] mean by "pure" x86 code.
> What you get from the compiler on x86 is a 32-bit executable in the
> platform-specific executable format (ELF on Linux, PE on Win32)

You man the _target_ platform? (If so then code not pure.)

> which isn't linked to GNAT libraries, though I think it may be linked
> dynamically to the C library. Linker switch -nostdlib can be used to
> overcome this and get a completely stand-alone executable (tested on
> Linux). Another linker switch can be used to link the C library in
> statically (also tested on Linux).

You mean _compiled_ on Linux or _executed_ on Linux? (If the latter then
code not pure.)

> GNAT doesn't insert any BIOS calls in the generated code when pragma
> No_Run_Time is used.

Good.

But note that for OS execution it would be acceptable to depend on the
BIOS (at least early on the startup process); after all the BIOS is there
and it is running before the OS.  *** But it is not acceptable at all for
execution to depend on another OS. ***

In fact, I have been thinking in terms of a MIOS (Minimal Input/Output
System) package providing access to the "minimal system" I have suggested
before (Ada_OS talk) as a starting target (floppy, keyboard, screen): MIOS
would probably be implemented with BIOS services: hence, in part, the
tribute in its name.

BTW, what is GRUB?  And where is GNORT?

Thanks,

-- 
   ,
 M A R I O   data miner, LIACC, room 221   tel 351+226078830, ext 121
 A M A D O   Rua Campo Alegre, 823         fax 351+226003654
 A L V E S   P-4150 PORTO, Portugal        mob 351+939354002





^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: Curiousity: pragma No_Run_Time for Gnat
@ 2001-09-25 17:07 M. A. Alves
  0 siblings, 0 replies; 22+ messages in thread
From: M. A. Alves @ 2001-09-25 17:07 UTC (permalink / raw)
  To: comp.lang.ada

Samuel Tardieu wrote:
> . . . If you want to use GNAT in bare-board mode and get a file that
> you can for example put into a eprom

or a boot sector...

> you can convert any decent format (ELF, coff, ...) to srec or plain
> binary.

Thanks, all is clear now.

-- 
   ,
 M A R I O   data miner, LIACC, room 221   tel 351+226078830, ext 121
 A M A D O   Rua Campo Alegre, 823         fax 351+226003654
 A L V E S   P-4150 PORTO, Portugal        mob 351+939354002





^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: Curiousity: pragma No_Run_Time for Gnat
@ 2001-09-25 16:49 M. A. Alves
  2001-09-25 15:05 ` chris.danx
  0 siblings, 1 reply; 22+ messages in thread
From: M. A. Alves @ 2001-09-25 16:49 UTC (permalink / raw)
  To: comp.lang.ada

The Meanings of "Pure" II

Sergey wrote:
> Well, GNAT has to generate the object files in *some* format, and
> unless you have a cross-compiling version, it'll be ELF on Linux and
> PE (COFF) on Win32.

You mean there is no plain x86 code?  A simple sequence of machine code
instructions?  "Pure" code?

Is the good old Van Neuman architecture at risk?

(I am no guru with object code formats, but there must be a neutral one,
with no "brand" on it (except the processor's).  I assume ELF or PE or
COFF is not such a thing, or else this discussion is meaningless.)

Personally for the hobby OS in Ada I am only interested in a "pure"
approach.  No fancy loaders, no branded formats, in sum no dependencies:
pure = truly free.

Cheers,

-- 
   ,
 M A R I O   data miner, LIACC, room 221   tel 351+226078830, ext 121
 A M A D O   Rua Campo Alegre, 823         fax 351+226003654
 A L V E S   P-4150 PORTO, Portugal        mob 351+939354002





^ permalink raw reply	[flat|nested] 22+ messages in thread
[parent not found: <Pine.LNX.4.33.0109251630310.3066-100000@lagoa.niaad.liacc.up.pt>]
[parent not found: <Pine.LNX.4.33.0109251343310.2841-100000@lagoa.niaad.liacc.up.pt>]
* Curiousity: pragma No_Run_Time for Gnat
@ 2001-09-24 19:02 Marin David Condic
  2001-09-24 21:14 ` Sergey Koshcheyev
  0 siblings, 1 reply; 22+ messages in thread
From: Marin David Condic @ 2001-09-24 19:02 UTC (permalink / raw)


The GNAT reference manual says this about pragma No_Run_Time:

====================================
pragma No_Run_Time
Syntax:
pragma No_Run_Time;

This is a configuration pragma that makes sure the user code does not use
nor need anything from the GNAT run time. This is mostly useful in context
where code certification is required. Please consult the GNORT product
documentation for additional information.
=======================================

Would this mean that the Gnat 3.13p I have installed on my PC here would
generate code that assumes nothing about the environment other than the
processor it is targeting? (Assuming that the code did not contain
constructs for which runtime is required.) That is to say - if I write a
procedure that contains a "pragma No_Run_Time" directive, that if I can get
it past the compiler, I'll have raw machine code with no OS calls, no
runtime calls, nothing except x86 machine code?

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/






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

end of thread, other threads:[~2001-09-26  9:04 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-25 14:09 Curiousity: pragma No_Run_Time for Gnat M. A. Alves
2001-09-25 13:05 ` chris.danx
2001-09-25 13:07 ` Jacob Sparre Andersen
2001-09-25 13:37 ` Sergey Koshcheyev
  -- strict thread matches above, loose matches on Subject: below --
2001-09-25 17:07 M. A. Alves
2001-09-25 16:49 M. A. Alves
2001-09-25 15:05 ` chris.danx
2001-09-25 15:38   ` Marin David Condic
     [not found] <Pine.LNX.4.33.0109251630310.3066-100000@lagoa.niaad.liacc.up.pt>
2001-09-25 14:48 ` Samuel Tardieu
     [not found] <Pine.LNX.4.33.0109251343310.2841-100000@lagoa.niaad.liacc.up.pt>
2001-09-25 13:20 ` David C. Hoos
2001-09-24 19:02 Marin David Condic
2001-09-24 21:14 ` Sergey Koshcheyev
2001-09-24 21:54   ` Marin David Condic
2001-09-25  7:32     ` Sergey Koshcheyev
2001-09-25 14:00       ` Marin David Condic
2001-09-25 14:14         ` Lutz Donnerhacke
2001-09-25 19:40           ` Robert Dewar
2001-09-26  9:04             ` Lutz Donnerhacke
2001-09-25 15:20         ` Sergey Koshcheyev
2001-09-25  7:36     ` Jean-Marc Bourguet
2001-09-25  7:43   ` Peter Amey
2001-09-25 14:02     ` Marin David Condic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox