This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [wince-devel] Link .o generated by GCC(arm-wince-pe) from EmbededVC ???
- From: Dmitry Semyonov <Dmitry dot Semyonov at oktet dot ru>
- To: Simon Wu <mountain_sprite at yahoo dot com>
- Cc: <gcc at gcc dot gnu dot org>, <wince-devel at yahoogroups dot com>
- Date: Sat, 3 Jan 2004 14:13:45 +0300 (MSK)
- Subject: Re: [wince-devel] Link .o generated by GCC(arm-wince-pe) from EmbededVC ???
- Reply-to: <Dmitry dot Semyonov at oktet dot ru>
Hello Simon,
(I posted the letter to wince-devel several days ago, but it seems it
was not delivered properly by some reason. By the way, your questions
are related more to binutils rather than gcc, so binutils mailing
list should be used instead of gcc.)
On Tue, 30 Dec 2003, Simon Wu wrote:
> I compiled a .obj by GCC and tried to call it from EVC. But the linker
> does not support and print the following message:
Older GNU binutils produce incorrect object files from the point of MS
linker's view. I have recently submitted a number of patches for
binutils that address the problem of linking GCC compiled code using MS
linker, as well as some other WinCE related issues. Most of the patches
are already applied. One is still under review of maintainers. You could
find more information in binutils mailing list archives. (Search for
"wince" in subject).
> perf.obj : warning LNK4078: multiple ".text" sections found with
> different attributes (E0000020)
This warning is fixed in current binutils snapshot.
> cmd.obj : error LNK2019: unresolved external symbol CopyBlock
> referenced in function WinMain
> ARMRel/cmd.exe : fatal error LNK1120: 1 unresolved externals
Use 'nm' to see whether your object contains required symbol or not.
Most likely you need to add -fno-leading-underscore option to CFLAGS.
> It seems that the code generated by GCC has stripped the RELOC info.
> So EVC does not recognize it and how to keep the RELOC info of obj
> generated by GCC?
You can see reloc info with -r option of objdump.
Alternatively you can use 'dumpbin /relocations <obj>' on MS platform.
Although I think, the problem is not with stripped relocations.
> Are there some good slutions?
Wait some time until all of my patches are applied to binutils. They
should solve most of the problems. Then download and compile current
snapshot of binutils (and probably gcc 3.4?) for arm-wince-pe target. If
you only want to use object files compiled by gcc in MS environment,
then you needn't use arm-wince-pe suite mentioned in this mailing list
earlier.
...Bye..Dmitry.