On Wednesday 15 April 2009 13:08:37, Johnny Willemsen wrote:
> Hi
> 
> The cygwin people also use _image_base, see
> http://www.cygwin.com/ml/cygwin-developers/2009-01/msg00014.html

__image_base__ is a linker defined symbol.  Since WinCE ARM doesn't
prepend an extra underscore on C symbol names, you reference it
from C as:

 extern char __image_base__;

On systems where C adds an extra underscore to the external
symbol name, you'll have to reference it as:

 extern char _image_base__;

In both cases, you'll see that the compiler outputs 
a reference to __image_base__ in the assembly.

> 
> Johnny
> 
> > I am looking why mingw doesn't link with x86.
> > 
> > I think the issue is in
> > cegcc/src/mingw/pseudo-reloc.c
> > 
> > This file has a comment that it is ported to wince arm, but when I
> > check
> > Cegcc/src/newlib/newlib/libc/sys/wince/pseudo-reloc_t.c
> > 
> > Then the extern is different
> > 
> > Where the mingw version has:
> > extern char __U(_image_base__);
> > 
> > The newlib file has
> > extern char __image_base__;
> > 
> > When I search the web I find some references to _image_base. When I
> > change
> > the mingw file to
> > 
> > extern char _image_base__;
> > 
> > Then mingw does link. My questions are:
> > - Why is the signature in the mingw file changed?
> > - Could it be that somewhere an _ is added to much, the original linker
> > error has also 3 underscores in the error message.
> > 
> > Maybe this gives hint to other people about what we have to change.
> > 
> > The next error I now have is below.
> > 
> > Johnny
> > 
> > multilib.out is unchanged
> > Configuring in i386-mingw32ce/libstdc++-v3
> > configure: loading cache ./config.cache
> > checking build system type... (cached) x86_64-unknown-linux-gnu
> > checking host system type... (cached) i386-pc-mingw32ce
> > [snip]
> > 
> > checking for fcntl.h... yes
> > checking for ld that supports -Wl,-z,relro... no
> > checking for main in -lm... configure: error: Link tests are not
> > allowed
> > after GCC_NO_EXECUTABLES.
> > make[1]: *** [configure-target-libstdc++-v3] Error 1
> > make[1]: Leaving directory
> > `/home/build/ACE/cegcc/cegcc/src/scripts/i386/gcc'
> > make: *** [all] Error 2
> > 
> > 
> > 
> > 
> > 
> > -----------------------------------------------------------------------
> > -------
> > This SF.net email is sponsored by:
> > High Quality Requirements in a Collaborative Environment.
> > Download a free trial of Rational Requirements Composer Now!
> > http://p.sf.net/sfu/www-ibm-com
> > _______________________________________________
> > Cegcc-devel mailing list
> > Cegcc-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/cegcc-devel
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer Now!
> http://p.sf.net/sfu/www-ibm-com
> _______________________________________________
> Cegcc-devel mailing list
> Cegcc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cegcc-devel
> 



-- 
Pedro Alves

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to