Linker problems with arm-wince, need help/info
pedro.alves at domatica.pt
Wed Jun 14 10:50:23 PDT 2006
Hi Chad and all,
Chad J wrote:
> David Friedman wrote:
>> Something I noticed in the original message:
>> undefined reference to `main'
>> Looking at the nm output, all global symbols a prefixed with an
>> underscore. It looks like the main in crt0.o doesn't have an
>> underscore (I don't think GNU ld removes prefixes for error
>> messages.) That might be the problem. Does the gcc built along with
>> gdc have the same problem? Where does EntryPoint/Console/crt0.o come
> It works for C and C plus plus, both for console apps and windows GUI
> apps. Compiles without problems and runs correctly too, not sure about
> anything more advanced then that (like exception handling). I should
> mention there is also an EntryPoint/Windows/crt0.o. I wrote a dummy
> linker that tries to determine which kind of program you are writing,
> and calls the real linker with the appropriate startfile. The
> startfiles themselves originate from some of the files Mamaich used in
> his arm-wince-pe C plus plus cross compiler.
Yes, it seems that wrong target underscoring is the problem here. I have
seen this problem too when moving Mamaich's toolchain into gcc4.
You should check cegcc's (http://cegcc.berlios.de) start files. They are
similar, but not the same.
There are other problems that I fixed for c++ and for binutils related
to underscoring. I have fixes (some are already in binutils mainline),
to enable the generation of correct dlls.
You will find patches for that at cegcc's file section.
I don't know if d is debuggable with gdb, but I have also improved on
arm-wince-pe. For that you will need to get gdb from cegcc's svn.
That being said, are can try adding a
-fno-leading-underscore to TARGET_LIBGCC2_CFLAGS in
More information about the D.gnu