comp.lang.ada
 help / color / mirror / Atom feed
From: jan.de.kruyf@gmail.com
Subject: Re: gnat compiler issues with a partial build
Date: Wed, 10 Jun 2015 08:34:13 -0700 (PDT)
Date: 2015-06-10T08:34:13-07:00	[thread overview]
Message-ID: <295e0eb8-4779-4c72-ba98-3fb0c507640d@googlegroups.com> (raw)
In-Reply-To: <1e1e5cf8-5535-4e9f-9d85-261466ad9ce2@googlegroups.com>

On Wednesday, June 10, 2015 at 12:11:43 PM UTC+2, Mark Lorenzen wrote:
> On Tuesday, June 9, 2015 at 8:57:51 PM UTC+2, jan.de...@gmail.com wrote:
> 
> > you would not see anything because as I said above your program will run until you call the undefined symbol. and that chance is very small. (Only when you have been dumb that happens)
> > 
> > But a kernel module will not load when there are undefined symbols, period.
> > 
> > And perhaps ask, yes, how I cook my runtimes . . .
> > It helps the discussion.
> > 
> > cheers,
> > 
> > j.
> 
> I just checked using the nm utility (leon3-elf-nm) and there are no undefined symbols in the executable when building with the GNAT Ravenscar runtime library (otherwise it of course would'nt succeed to link), so I still think you must be configuring your runtime wrong.
> 
> Regards,
> 
> MarkL

I will follow that up Mark, on the stm32 Arm board and Ravenscar, but that _is_ 
a different compiler in the sense that it is a cross compiler. I am working native.

In any case: the runtime cooking business is like this (in its most basic form)
1. extract something very basic from ravenscar or zfp.
2. compile little test programs with (1) in a subdirectory and no libraries.
3. run nm to look for 'U' symbols. and use grep to find where they originate and where they are defined in any runtime.
4. Then adapt that piece of code where they are defined, one way or another, to you new runtime.
   Normally of course either ravenscar or zfp will have a piece of code that   fits without hacking too much. 
only for heap memory I had to modify s-memory quite a bit to fit the kernel environment so it is all strictly controlled and not pageable. (one of my requirements)
5. repeat 2,3,4 until satisfied that it is usable now. Then you can build the runtime subdirectory into a runtime library.

So in that process I discovered those pesky undefined symbols, that _should_ disappear with some compiler switch, either in System.ads or on the command line. Since it is superfluous code that is generated by the compiler, for which there are no symbols in the arm ravenscar profile, that I am sure of.

---- Ah, the talking worked. I should next make the compiler commandline visible in the arm cross compile environment. Good. Thank you.

Ok, at the moment I am on another mission, but in some idle half hour I will do that.

Thanks again

j.


  reply	other threads:[~2015-06-10 15:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 11:12 gnat compiler issues with a partial build jan.de.kruyf
2015-06-04 19:03 ` Lucretia
2015-06-09  8:11   ` jan.de.kruyf
2015-06-09 10:21 ` Mark Lorenzen
2015-06-09 11:28   ` jan.de.kruyf
2015-06-09 13:03     ` Mark Lorenzen
2015-06-09 18:57       ` jan.de.kruyf
2015-06-10 10:11         ` Mark Lorenzen
2015-06-10 15:34           ` jan.de.kruyf [this message]
2015-06-10 16:59             ` Simon Wright
2015-06-10 17:01               ` Simon Wright
2015-06-10 20:36                 ` jan.de.kruyf
2015-06-11  5:01                   ` Simon Wright
2015-06-11 14:08                     ` jan.de.kruyf
2015-06-11 16:10 ` rrr.eee.27
2015-06-11 19:38   ` Simon Wright
2015-06-12 14:37     ` jan.de.kruyf
2015-06-12 15:05       ` Simon Wright
2015-06-12 15:12         ` jan.de.kruyf
2015-06-12 15:31   ` jan.de.kruyf
replies disabled

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