Mail Archives: cygwin/2005/07/15/20:42:26
Hi all,
I try to integrate --enable-auto-image-base with the Gnome packages.
However I have some problems with the auto-image-base flag.
E.g. the libtool generated link command for the shared atk library:
ccache gcc -shared .libs/atkaction.o .libs/atkcomponent.o \
.libs/atkdocument.o .libs/atkeditabletext.o \
.libs/atkgobjectaccessible.o .libs/atkhyperlink.o \
.libs/atkhypertext.o .libs/atkimage.o .libs/atknoopobject.o \
.libs/atknoopobjectfactory.o .libs/atkobject.o \
.libs/atkobjectfactory.o .libs/atkregistry.o .libs/atkrelation.o \
.libs/atkrelationset.o .libs/atkselection.o .libs/atkstate.o \
.libs/atkstateset.o .libs/atkstreamablecontent.o .libs/atktable.o \
.libs/atktext.o .libs/atkutil.o .libs/atkvalue.o \
.libs/atk-enum-types.o /usr/lib/libgobject-2.0.dll.a -L/usr/lib \
/usr/lib/libgmodule-2.0.dll.a /usr/lib/libglib-2.0.dll.a \
/usr/lib/libintl.dll.a /usr/lib/libiconv.dll.a -Wl,-s \
-Wl,--enable-auto-image-base -o .libs/cygatk-1.0-0.dll \
-Wl,--image-base=0x10000000 \
-Wl,--out-implib,.libs/libatk-1.0.dll.a
I defined -W-,--enable-auto-image-base during configure. The
flag is passed through to the linker, but libtool defines its
own image-base command.
I want that libtool doesn't override my defines, so in case
the user specifies an image-base command libtool sshouldn't
override it.
Since ld --help says:
--enable-auto-image-base Automatically choose image
base for DLLs unless user
specifies one
for this DLL is no auto-image-base calculated but the libtool
specified base is used.
$ objdump -p atk-1.9.1/.build/atk/.libs/cygatk-1.0-0.dll | fgrep ImageBase
ImageBase 10000000
What can I do to convince libtool not to override my definition?
$ ./atk-1.9.1/.build/libtool --version
ltmain.sh (GNU libtool) 1.5.18 (1.1220.2.246 2005/05/16 10:00:18)
$ ld --version
GNU ld version 2.16.91 20050610
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
I modified libtool.m4 to issue auto-image base instead of a predefined
base address (the default 10000000).
*Now*, after applying the attached patch I got the desired link command:
ccache gcc -shared .libs/testrelation.o \
../atk/.libs/libatk-1.0.dll.a -L/usr/lib \
/usr/lib/libgobject-2.0.dll.a /usr/lib/libgmodule-2.0.dll.a \
/usr/lib/libglib-2.0.dll.a /usr/lib/libintl.dll.a \
/usr/lib/libiconv.dll.a -Wl,-s -o .libs/cygtestrelation.dll \
-Wl,--enable-auto-image-base \
-Wl,--out-implib,.libs/libtestrelation.dll.a
*but* it doesn't work:
$ for in in `find atk-1.9.1/ -name "*.dll"` ; do objdump -p $i | fgrep
ImageBase ; done
ImageBase 10000000
ImageBase 10000000
ImageBase 10000000
*or* am I doing s.th. wrong with testing for the real imagebase?
I also did:
$ ccache -c
Cleaned cache
$ ccache -C
Cleared cache
and repeated the build after making clean.
The result is the same:
$ for in in `find atk-1.9.1/ -name "*.dll"` ; do objdump -p $i | fgrep
ImageBase ; done
ImageBase 10000000
ImageBase 10000000
ImageBase 10000000
Though, building perl with the auto-image-base works ok:
$ objdump -p /usr/bin/cygperl5_8.dll | fgrep ImageBase
ImageBase 6d540000
PIBKAC?
Clueless,
Gerrit
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -