gcc on an OS less system

Dan Kegel dank@kegel.com
Thu Oct 23 07:21:00 GMT 2003


Viswanathan Sankararam wrote:
>>>>    The question is how will I override the system calls that come with
>>>>libc.a with my implementation of the syscalls. Do I just remove 
>>>> syscalls.o from the archive and add mine. Would that work?
>>>
>>>   Having on the one hand, gcc-generated code that makes posix system
>>>calls, and on the other, a raw target with some arbitrary set of service
>>>functions, it's a bit optimistic to expect the two to be aware of the
>>>existence of each other, let alone be able to interwork. What usually
>>>ends up happening is a set of wrapper functions which accept the
>>>caller's argument list, and invoke the most appropriate service function
>>>available, mapping the arguments.  ...
>
> Actually the system I am using has no set of service functions at all. In
> fact there is no board at all. This is a system model that is in VHDL. It
> has the xscale model and the entire system peripherals including a memory
> model in VHDL/Verilog. I am able to execute xscale assembly on this with the
> use of gnu as assembler. Now I would like to be able to directly use C++
> programs on this software model. So there are absolutely no service
> routines. I would like to resolve the symbols emitted by gcc when it creates
> an object prior to linking with libc. It seems that the libc that exists in
> newlib is for someother board architecture. I would like advice on how I can
> approach this problem.

I don't understand why you don't just build a new toolchain
that's better suited to your needs.  Ditch glibc, and use newlib...
surely the code you're running doesn't need an operating
system to be present, or you wouldn't be trying to run
it on a 'board' with no OS...

- Dan

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list