Re: cygwin, libtool, dlpreopen, and .rdata

2004-09-23 Thread Shankar Unni
Charles Wilson wrote: Actually, *function* addresses are fine; they don't get relocated (at least, not by the runtime-pseudo-reloc gobbledygook). It's only the addresses of DATA items exported by DLLs that get relocated in this way. AND, they get relocated IF AND ONLY IF you are linking to a DL

Re: cygwin, libtool, dlpreopen, and .rdata

2004-09-22 Thread Charles Wilson
Shankar Unni wrote: Brian Ford wrote: Yes, I see. I hope Danny Smith might weigh in here? http://sources.redhat.com/ml/binutils/2004-02/msg3.html I would argue that this is gcc's responsibility. If a const structure variable contains *any* code or data addresses, it's not safe to put it in

Re: cygwin, libtool, dlpreopen, and .rdata

2004-09-22 Thread Charles Wilson
Gerrit P. Haase wrote: Note, I found this problem in libtool-1.5.x, but it exists in HEAD, too. The following patch is against HEAD... I'll try if it works ok with this solution. Unless you have a reason to use CVS HEAD libtool, first try the 1.5.10-1 release I just put on the mirrors. CVS HEA

Re: cygwin, libtool, dlpreopen, and .rdata

2004-09-22 Thread Charles Wilson
Brian Ford wrote: On Wed, 22 Sep 2004, Charles Wilson wrote: [cygwin list: I'm CC'ing this so that it goes into the archives, but it's pretty technical about the innards of libtool...] This doesn't seem libtool related at all to me (other than it's a gcc bug that affects libtool). Oh, except for

Re: cygwin, libtool, dlpreopen, and .rdata

2004-09-22 Thread Shankar Unni
Brian Ford wrote: Yes, I see. I hope Danny Smith might weigh in here? http://sources.redhat.com/ml/binutils/2004-02/msg3.html I would argue that this is gcc's responsibility. If a const structure variable contains *any* code or data addresses, it's not safe to put it in .rdata (or .rodata, w

Re: cygwin, libtool, dlpreopen, and .rdata

2004-09-22 Thread Reini Urban
Gerrit P. Haase schrieb: But it can't, because .rdata is non-writable. However, this is a *runtime* error; the *link* succeeds. But when you run the app, you get a popup window declaring: "The application failed to initialize properly (0xc005). Click on OK to terminate the application." Ah

Re: cygwin, libtool, dlpreopen, and .rdata

2004-09-22 Thread Brian Ford
On Wed, 22 Sep 2004, Charles Wilson wrote: > [cygwin list: I'm CC'ing this so that it goes into the archives, but > it's pretty technical about the innards of libtool...] This doesn't seem libtool related at all to me (other than it's a gcc bug that affects libtool). > With newer gcc's (cygwin v

Re: cygwin, libtool, dlpreopen, and .rdata

2004-09-22 Thread Gerrit P. Haase
Hello Charles, [...] > But it can't, because .rdata is non-writable. However, this is a > *runtime* error; the *link* succeeds. But when you run the app, you get > a popup window declaring: > "The application failed to initialize properly (0xc005). Click on OK > to terminate the applicati

Re: cygwin, libtool, dlpreopen, and .rdata

2004-09-22 Thread Reini Urban
Charles Wilson schrieb: With newer gcc's (cygwin version numbers 3.3.3-3, 3.4.1-1, but not 3.3.1-3), const variables are placed in an .rdata section. This causes problems when those variables contain references to OTHER vars that are imported from a dll -- because the runtime relocation machine

Re: cygwin, libtool, dlpreopen, and .rdata

2004-09-22 Thread Gary V . Vaughan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Chuck! On 22 Sep 2004, at 07:31, Charles Wilson wrote: Because lt_preloaded_symbols[] is an array of const structs, it is placed in .rdata. However, the "nothing" symbol is a DATA export from cyghello-2.dll -- so the runtime psuedo-reloc machinery

cygwin, libtool, dlpreopen, and .rdata

2004-09-21 Thread Charles Wilson
[cygwin list: I'm CC'ing this so that it goes into the archives, but it's pretty technical about the innards of libtool...] With newer gcc's (cygwin version numbers 3.3.3-3, 3.4.1-1, but not 3.3.1-3), const variables are placed in an .rdata section. This causes problems when those variables co