comp.lang.ada
 help / color / mirror / Atom feed
* assembly generated using gcc -S on a .adb
@ 2002-07-08  2:55 KK
  2002-07-08  3:15 ` Jeffrey Carter
  2002-07-08  6:31 ` sk
  0 siblings, 2 replies; 3+ messages in thread
From: KK @ 2002-07-08  2:55 UTC (permalink / raw)


Could someone elucidate for me just why the assembly language file
generated by something like:

gcc -S test.adb

can't be further compiled when something like the following:

gcc test.s

is invoked?  I get the following errors:

/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x18): undefined reference to `main'

Yet when I compile a c program similarly (first to asm then on to executable
as above) everything is fine.

I realize that gcc *is* a c compiler (among other things) and that the reference
to main in my error message probably has something to do with gcc thinking that
the asm it's trying to assemble was originally a c program.

I also can still see plenty of ada specific stuff in the header & footer of
test.s so there seems to be some indication that even at the level of asm there 
is still quite a bit of language specific stuff going on.  My question is why?
I would think that once you get to the level of asm all that kind of stuff would 
have necessarily fallen away.

BTW, I'm aware of gnatbind and gnatlink, and yes those do work and produce an
executable.  What I'm wondering is if there is a path to a working executable
without using those utilities.  In other words, is there a way for a machine
with just gcc installed, to produce an executable from an asm file that was 
generated from an .adb ??

If you're wondering why such a thing would matter to me, it's for a web project
wherein some assembly is generated and I'm looking for a way for someone to be 
able to finish the process on their own without having the whole GNAT system 
installed on their machine.

Thanks,

Rob



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

end of thread, other threads:[~2002-07-08  6:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-08  2:55 assembly generated using gcc -S on a .adb KK
2002-07-08  3:15 ` Jeffrey Carter
2002-07-08  6:31 ` sk

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