public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/12987] New: Problems with linking application that calls JVM
@ 2003-11-10 8:04 oyvind dot harboe at zylin dot com
2003-11-10 8:06 ` [Bug java/12987] " oyvind dot harboe at zylin dot com
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: oyvind dot harboe at zylin dot com @ 2003-11-10 8:04 UTC (permalink / raw)
To: gcc-bugs
This problem is described in:
http://gcc.gnu.org/ml/java/2003-11/msg00055.html
I tried the patch referred to in this thread, and my application links, but it
crashes when I try to call one of the functions in the DLL.
--
Summary: Problems with linking application that calls JVM
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: oyvind dot harboe at zylin dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug java/12987] Problems with linking application that calls JVM
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
@ 2003-11-10 8:06 ` oyvind dot harboe at zylin dot com
2003-11-10 8:10 ` [Bug java/12987] [Mingw] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: oyvind dot harboe at zylin dot com @ 2003-11-10 8:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From oyvind dot harboe at zylin dot com 2003-11-10 08:06 -------
More info:
http://gcc.gnu.org/ml/java/2003-11/msg00112.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug java/12987] [Mingw] Problems with linking application that calls JVM
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
2003-11-10 8:06 ` [Bug java/12987] " oyvind dot harboe at zylin dot com
@ 2003-11-10 8:10 ` pinskia at gcc dot gnu dot org
2003-11-10 14:08 ` [Bug java/12987] Incompatibility with VC++ oyvind dot harboe at zylin dot com
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-10 8:10 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|Problems with linking |[Mingw] Problems with
|application that calls JVM |linking application that
| |calls JVM
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug java/12987] Incompatibility with VC++
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
2003-11-10 8:06 ` [Bug java/12987] " oyvind dot harboe at zylin dot com
2003-11-10 8:10 ` [Bug java/12987] [Mingw] " pinskia at gcc dot gnu dot org
@ 2003-11-10 14:08 ` oyvind dot harboe at zylin dot com
2003-11-10 14:09 ` oyvind dot harboe at zylin dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: oyvind dot harboe at zylin dot com @ 2003-11-10 14:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From oyvind dot harboe at zylin dot com 2003-11-10 14:08 -------
This appears to be a more general(not Java specific) compatibility problem
between Visual C++ 6.0 and GCC.
I'll attach foo.c and bar.c
1. gcc -shared -o bar.dll -Wl,--out-implib,foo.lib bar.c
2. gcc -o foo foo.c bar.lib
When I compile 2. from VC++, I get an error message and the application crashes
when it tries to invoke bar():
--------------------Configuration: test2 - Win32 Debug--------------------
Compiling...
foo.c
Linking...
bar.lib(d000001.o) : warning LNK4078: multiple ".text" sections found with
different attributes (E0000020)
test2.exe - 0 error(s), 1 warning(s)
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[Mingw] Problems with |Incompatibility with VC++
|linking application that |
|calls JVM |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug java/12987] Incompatibility with VC++
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
` (2 preceding siblings ...)
2003-11-10 14:08 ` [Bug java/12987] Incompatibility with VC++ oyvind dot harboe at zylin dot com
@ 2003-11-10 14:09 ` oyvind dot harboe at zylin dot com
2003-11-10 14:09 ` oyvind dot harboe at zylin dot com
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: oyvind dot harboe at zylin dot com @ 2003-11-10 14:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From oyvind dot harboe at zylin dot com 2003-11-10 14:09 -------
Created an attachment (id=5106)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5106&action=view)
First example file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug java/12987] Incompatibility with VC++
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
` (3 preceding siblings ...)
2003-11-10 14:09 ` oyvind dot harboe at zylin dot com
@ 2003-11-10 14:09 ` oyvind dot harboe at zylin dot com
2003-11-10 14:12 ` [Bug java/12987] Incompatibility with VC++ in -Wl,--out-implib code oyvind dot harboe at zylin dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: oyvind dot harboe at zylin dot com @ 2003-11-10 14:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From oyvind dot harboe at zylin dot com 2003-11-10 14:09 -------
Created an attachment (id=5107)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5107&action=view)
Second example file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug java/12987] Incompatibility with VC++ in -Wl,--out-implib code
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
` (4 preceding siblings ...)
2003-11-10 14:09 ` oyvind dot harboe at zylin dot com
@ 2003-11-10 14:12 ` oyvind dot harboe at zylin dot com
2003-11-10 14:48 ` oyvind dot harboe at zylin dot com
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: oyvind dot harboe at zylin dot com @ 2003-11-10 14:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From oyvind dot harboe at zylin dot com 2003-11-10 14:12 -------
I tested with GCC 3.3 and the VC++ application still crashes when it tries to
invoke bar().
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|Incompatibility with VC++ |Incompatibility with VC++ in
| |-Wl,--out-implib code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug java/12987] Incompatibility with VC++ in -Wl,--out-implib code
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
` (5 preceding siblings ...)
2003-11-10 14:12 ` [Bug java/12987] Incompatibility with VC++ in -Wl,--out-implib code oyvind dot harboe at zylin dot com
@ 2003-11-10 14:48 ` oyvind dot harboe at zylin dot com
2003-11-10 18:44 ` [Bug target/12987] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: oyvind dot harboe at zylin dot com @ 2003-11-10 14:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From oyvind dot harboe at zylin dot com 2003-11-10 14:48 -------
Created an attachment (id=5108)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5108&action=view)
If I generate bar.lib from VC++, everything works
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/12987] Incompatibility with VC++ in -Wl,--out-implib code
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
` (6 preceding siblings ...)
2003-11-10 14:48 ` oyvind dot harboe at zylin dot com
@ 2003-11-10 18:44 ` pinskia at gcc dot gnu dot org
2003-11-10 19:42 ` dannysmith at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-10 18:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-10 18:44 -------
The --out-implib part is not a gcc bug but rather a binutils bug, report it to them also.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|java |target
Ever Confirmed| |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2003-11-10 18:44:19
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/12987] Incompatibility with VC++ in -Wl,--out-implib code
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
` (7 preceding siblings ...)
2003-11-10 18:44 ` [Bug target/12987] " pinskia at gcc dot gnu dot org
@ 2003-11-10 19:42 ` dannysmith at gcc dot gnu dot org
2003-11-10 19:48 ` oyvind dot harboe at zylin dot com
2003-11-15 9:02 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: dannysmith at gcc dot gnu dot org @ 2003-11-10 19:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dannysmith at gcc dot gnu dot org 2003-11-10 19:42 -------
This is a known bug in the MS linker: it does not understand GNU ld import
libs.
To workaround, build an import lib for MS using a .def file containing the
exports and the MS programme (I think it is called lib.exe) that does what
GNU dlltool does.
I think that this also applies in general to any other windows linker
programme.
Danny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/12987] Incompatibility with VC++ in -Wl,--out-implib code
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
` (8 preceding siblings ...)
2003-11-10 19:42 ` dannysmith at gcc dot gnu dot org
@ 2003-11-10 19:48 ` oyvind dot harboe at zylin dot com
2003-11-15 9:02 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: oyvind dot harboe at zylin dot com @ 2003-11-10 19:48 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
------- Additional Comments From oyvind dot harboe at zylin dot com 2003-11-10 19:48 -------
>This is a known bug in the MS linker: it does not understand GNU ld import
>libs.
Will this be fixed at some point?
(If not, shouldn't this option be removed from GCC?)
>To workaround, build an import lib for MS using a .def file containing the
>exports and the MS programme (I think it is called lib.exe) that does what
>GNU dlltool does.
For now I just used GetProcAddress() explicitly, moving on. :-)
Øyvind
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/12987] Incompatibility with VC++ in -Wl,--out-implib code
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
` (9 preceding siblings ...)
2003-11-10 19:48 ` oyvind dot harboe at zylin dot com
@ 2003-11-15 9:02 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-15 9:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-15 09:02 -------
Not a GCC bug but rather a binutils bug, report it to them.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-11-15 9:02 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-10 8:04 [Bug java/12987] New: Problems with linking application that calls JVM oyvind dot harboe at zylin dot com
2003-11-10 8:06 ` [Bug java/12987] " oyvind dot harboe at zylin dot com
2003-11-10 8:10 ` [Bug java/12987] [Mingw] " pinskia at gcc dot gnu dot org
2003-11-10 14:08 ` [Bug java/12987] Incompatibility with VC++ oyvind dot harboe at zylin dot com
2003-11-10 14:09 ` oyvind dot harboe at zylin dot com
2003-11-10 14:09 ` oyvind dot harboe at zylin dot com
2003-11-10 14:12 ` [Bug java/12987] Incompatibility with VC++ in -Wl,--out-implib code oyvind dot harboe at zylin dot com
2003-11-10 14:48 ` oyvind dot harboe at zylin dot com
2003-11-10 18:44 ` [Bug target/12987] " pinskia at gcc dot gnu dot org
2003-11-10 19:42 ` dannysmith at gcc dot gnu dot org
2003-11-10 19:48 ` oyvind dot harboe at zylin dot com
2003-11-15 9:02 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).