From: SourceForge.net <no...@so...> - 2004-01-09 21:01:11
|
Bugs item #873717, was opened at 2004-01-10 01:57 Message generated for change (Comment added) made by dannysmith You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=873717&group_id=2435 Category: ld Group: None Status: Open Resolution: None Priority: 5 Submitted By: Timo Hartmann (thartmann) Assigned to: Danny Smith (dannysmith) Summary: --enable-runtime-pseudo-reloc broken Initial Comment: --enable-runtime-pseudo-reloc does not work correctly if one links directly against a dll in certain cases, but if one links against a input-library, it works. the problematic case is: -one build a dll with c++-classes -one uses virtual methods -one uses a static object of one of these classes see test-dll.tgz and readme.txt therin for more details source of problem: the vtable of these classes are not linked properly if one links direct against a dll. my version: gcc 3.3.1 (mingw special 20030804-1) ld 2.13.90 20030111 mingw-runtime-3.2.tar.gz ---------------------------------------------------------------------- >Comment By: Danny Smith (dannysmith) Date: 2004-01-10 09:42 Message: Logged In: YES user_id=11494 Thanks for the useful testcase. The bug is fixed in gcc and binutils sources by changes in the handling of readonly data. With GCC-3.3.3 (patched with backports of the trunk changes) g++-3.3.3 -I./ -Wall -g -c test.cpp -o test.o g++-3.3.3 -I./ -Wall -g -c test-dll.cpp -o test-dll.o g++-3.3.3 -shared -o test-dll.dll test-dll.o -Wl,--out- implib,libtest-a.a g++-3.3.3 -o a-dll.exe test.o -ltest-dll -L./ -Wl,--enable- runtime-pseudo-reloc Info: resolving __ZN4test2b2E by linking to __imp___ZN4test2b2E (auto-import) Info: resolving __ZTV2B2 by linking to __imp___ZTV2B2 (auto- import) g++-3.3.3 -o a-a.exe test.o -ltest-a -L./ -Wl,--enable- runtime-pseudo-reloc Info: resolving __ZN4test2b2E by linking to __imp___ZN4test2b2E (auto-import) Info: resolving __ZTV2B2 by linking to __imp___ZTV2B2 (auto- import) and both exes seem to run fine Danny ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=873717&group_id=2435 |