gcc: Undefined references while linking (2)
William A. Gatliff
Mon Sep 23 19:31:00 GMT 2002
On Tue, Sep 24, 2002 at 12:56:30AM +0200, CJ wrote:
> I ;) wrote:
> > Funny enough this is exactly the same problem that occurs when I try
> > to build libgloss.
> > I examined the mentioned source files and it seems that f.ex. the
> > "_exit"-routine is supposed to be provided by the OS. My target will
> > be a satellite receiver with no OS (I plan to implement that on a very
> > very low level since there is only 1 MB of ROM space ;) ).
> > So I guess I have to provide some stubs or at least my own idea of an
> > implementation, but how and where do I do that?
> > My forgiveness if a RTFM could cure this. ;)
> OK, hours later, also tried GCC 2.95.3, same result. But by now I found
> a valuable description at http://www.redhat.com/docs/manuals/gnupro/
> that gave me some insight how the whole thing is supposed to work.
> So if I understand this correctly then I miss the C-runtime ("crt0.S").
> Now since I didn't give a target-OS (just m68k-coff) it would appear
> logical that no runtime can be supplied since the compiler cannot guess
> what my runtime is going to be. Is that the reason why configuring
> Libgloss fails because it assumes that I already have a m68-coff-GCC
> that is able to create executables?
Hmmm, I don't think that libgloss was always broken. But it sure
appears to be now. Seems like not too long ago, m68k built without a
Anyway, you could just throw in stubs for _exit, sbrk, kill and getpid
to get around the unresolved symbols. Yes, those would be provided by
an OS or reasonable facsimile thereof. Completely unnecessary unless
you need them.
I don't get the EH_FRAME_BEGIN thing yet, though. What happens if
your test module has:
(two underscores) in it?
Also, try invoking your m68k-*-gcc with a -v option, and study the output
GNU-based embedded development, training and consulting services.
See http://billgatliff.com for details.
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to firstname.lastname@example.org
More information about the crossgcc