|
--image-base options of ld broken?
|
|
2007-07-14, 06:41 AM
Post: #1
|
|||
|
|||
|
--image-base options of ld broken?
I use autoconf/automake with libtool to build my shared-library demo. libtool leads g to pass --image-base option to ld, but it seems broken no mater what the actual addres is given.
SUA version : 6.0 libtool version: 1.5.22 $ g -shared *.o -o libkfoo.so.0.0.0 -Wl,--image-base=1b3c0000 $ ./lt-demo ./lt-demo: error in loading shared libraries /dev/fs/C/Users/KirbyZhou/suawork/attest/.libs/libkfoo.so: system cannot load image $ g -shared *.o -o libkfoo.so.0.0.0 -Wl,--image-base=1b3c0000 $ ./lt-demo ./lt-demo: error in loading shared libraries /dev/fs/C/Users/KirbyZhou/suawork/attest/.libs/libkfoo.so: system cannot load image $ g -shared *.o -o libkfoo.so.0.0.0 $ ./lt-demo v:100 |
|||
|
2007-07-14, 04:57 PM
Post: #2
|
|||
|
|||
|
RE: --image-base options of ld broken?
You have to prefix the number given to the '--image-base' with "0x".
|
|||
|
2007-07-15, 08:29 AM
Post: #3
|
|||
|
|||
|
RE: --image-base options of ld broken?
it works!
Thanks, but why the libtool doesnot take "0x"? Below is what the libtool do: g -shared .libs/libimpl.o -L/usr/local/lib -L/usr/local/ssl/lib -L/opt/gcc.3.3/lib/gcc-lib/i586-pc-interix3/3.3 -L/opt/gcc.3.3/lib/gcc-lib/i586-pc-interix3/3.3/../../../../i586-pc-interix3/lib -L/opt/gcc.3.3/lib/gcc-lib/i586-pc-interix3/3.3/../../.. -Wl,-h,libkfoo.so.0 -Wl,--image-base,`/usr/lib/print_base .libs/libkfoo.so.0.0.0` -o .libs/libkfoo.so.0.0.0 and /usr/lib/print_base prints "10000000" without "0x". |
|||
|
2007-07-15, 10:48 PM
Post: #4
|
|||
|
|||
|
RE: --image-base options of ld broken?
Sorry, my error for /usr/lib/print_base.
I'll post a correction and then post here after. |
|||
|
2007-07-16, 12:59 AM
Post: #5
|
|||
|
|||
|
RE: --image-base options of ld broken?
The update (1.5.22.1) can now be installed ("pkg_update -L libtool").
|
|||
|
2007-07-16, 03:50 AM
Post: #6
|
|||
|
|||
|
RE: --image-base options of ld broken?
Is it possible this will fix the strange issues we where looking at a while back with libs and exe refusing to run Rodney?
|
|||
|
2007-07-16, 11:50 AM
Post: #7
|
|||
|
|||
|
RE: --image-base options of ld broken?
Could be... I usually post any fixes I have for packages. But clearly I made
an internal fix and it didn't get into the package. So, yeah, give it another whirl if you have time. I did find out when I've been trying to pack shared libraries into the user space as tightly as possible that if the start address of the image base is not right then a loading error will happen with either the named library or the first one it depends on. But I remember looking at objdump output and thought it looked right (though maybe I'm not remembering right). |
|||
|
2007-07-16, 12:26 PM
Post: #8
|
|||
|
|||
|
RE: --image-base options of ld broken?
WINNER!!!
That fixed it Rodney so must have been the cause all along. Thanks for all your hard work again Rodney. |
|||
|
2007-07-16, 10:20 PM
Post: #9
|
|||
|
|||
|
RE: --image-base options of ld broken?
You're welcome.
BTW: The package for Interix 6.0 is fine and didn't need to get updated. |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)


Search
Member List
Calendar
Help



