problem create shared dll and -shared option
longchuan
longchuan@koretide.com.cn
Thu Mar 27 04:20:00 GMT 2003
Hi craig:
Firstly, i want to say thanks to you and Kai Ruottu.
I think the key point is the .base.
Documents said that this file contains relocation info and is
generated by ld.exe. I have try your 5 step after compiled .cc file,
but my arm-pe gcc seems doesn't create such base file, just create a
file with the expected name but zero size at step 1. This also happen to
my mingw32 win32 target gcc.
So I wonder if is only meaningful for arm-wince-pe target?
By the way, dlltool create export file for dll does contain relocation
info, i assume
this by objdump -x xxx.exp, the header information said it HAS_RELOC,
HAS_DEBUG, HAS_SYMS, HAS_LOCALS
why this .base file necessary? seemed that ld strip such info by
default.
Could you copy and paste the output of "make -n"?
you know , i working under win2k, i try to run make
script from cygwin but some macro is not expended,
i wonder if there is any special option of ld to create .base file.
this is the actual command line i run for step 1.
ld --dll --subsystem console --base-file helloworld.base -o
helloworld.dll HelloWorld.o
you know, get a zero size file helloworld.base. :((
Any ideas?
Meanwhile , i would download and run wince-pe toolchain on Linux
to see what is going on.
regards
wreckor
> -----Original Message-----
> From: Craig A. Vanderborgh [mailto:craigv@voxware.com]
> Sent: Wednesday, March 26, 2003 22:34
> To: longchuan
> Cc: crossgcc@sources.redhat.com
> Subject: Re: problem create shared dll and -shared option
>
>
> Hello,
>
> We got dll's using GCC compiled with arm-wince-pe working last year.
> The main trick is that the "-shared" option does not work
> correctly for the arm-wince-pe target. With the help of Kai
> Ruotto (on crossgcc) we arrived at the conclusion that a
> special 5 step linking process is required to create dll's
> with the relocations done properly on arm-wince-pe.
>
> I have attached an example (with an all-important
> "project.mk") that shows you how to do the link so that the
> result will run on wince. This example creates a "Hello
> World" type of thing that can function as a JNI component for
> java. We hope this helps you.
>
> Also, a fully operational toolchain for arm-wince-pe
> (gcc-3.2/binutils2.13) is available "ready-to-run" for
> x86linux (RedHat 7.1+). Just make sure you have "-march" set
> for your platform. You can get the toolchain from this url:
>
> http://www.atomiser.org/open_source_wince/wincegcc031303.tar.bz2
>
> This toolchain will build an operational dll from the sources
> I've attached.
>
> regards,
> craig vanderborgh
> voxware incorporated
>
------
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