delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/01/14:48:48

X-Spam-Check-By: sourceware.org
Message-ID: <20060201194832.36649.qmail@web30610.mail.mud.yahoo.com>
Date: Wed, 1 Feb 2006 14:48:32 -0500 (EST)
From: Martin <linkscrazy AT yahoo DOT com>
Subject: 1.5.19-4: global constructors not working with dlopen()
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Note-from-DJ: This may be spam

--0-1769892214-1138823312=:17869
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Id: 
Content-Disposition: inline

I'm having trouble with global constructors/destructors not
executing/crashing within a dlopened DLL.

I've attached a test-case.
FYI: This works fine with 1.5.13-1.

Thanks for your help.
Martin

ps:
Here's my shell log.

Martin AT viper[523]$ make clean
/bin/rm -f T1_dl *.exe *.dll *.so *~ mapfile
Martin AT viper[524]$ make; ./T1_dl
g++ -Wall -Wl,-Map,mapfile -shared T1.cpp T1_inst.cpp -o T1_inst.dll
gcc -Wall T1_dl.c -o T1_dl
opening...
Martin AT viper[525]$ make nocygwin; ./T1_dl
g++ -Wall -mno-cygwin -shared T1.cpp T1_inst.cpp -o T1_inst.dll
gcc -Wall T1_dl.c -o T1_dl
opening...
T1 object created.
opened successfully
closing...
T1 object deleted.
closed
Martin AT viper[526]$ make t1inst; ./T1_inst
g++ -Wall -DT1_INST_EXE T1.cpp T1_inst.cpp -o T1_inst
T1 object created.
running
exiting...
T1 object deleted.
Martin AT viper[527]$


	

	
		
__________________________________________________________ 
Find your next car at http://autos.yahoo.ca
--0-1769892214-1138823312=:17869
Content-Type: application/octet-stream; name=Makefile
Content-Transfer-Encoding: base64
Content-Description: 402397780-Makefile
Content-Disposition: attachment; filename=Makefile

Y3lnd2luOgoJZysrIC1XYWxsIC1XbCwtTWFwLG1hcGZpbGUgLXNoYXJlZCBU
MS5jcHAgVDFfaW5zdC5jcHAgLW8gVDFfaW5zdC5kbGwKCWdjYyAtV2FsbCBU
MV9kbC5jIC1vIFQxX2RsCgpub2N5Z3dpbjoKCWcrKyAtV2FsbCAtbW5vLWN5
Z3dpbiAtc2hhcmVkIFQxLmNwcCBUMV9pbnN0LmNwcCAtbyBUMV9pbnN0LmRs
bAoJZ2NjIC1XYWxsIFQxX2RsLmMgLW8gVDFfZGwKCmxpbnV4OgoJQCAvYmlu
L3JtIC1mIFQxX2RsLmV4ZQoJZysrIC1XYWxsIC1zaGFyZWQgVDEuY3BwIFQx
X2luc3QuY3BwIC1vIFQxX2luc3Quc28KCWdjYyAtV2FsbCBUMV9kbC5jIC1v
IFQxX2RsIC1sZGwKCnQxaW5zdDoKCWcrKyAtV2FsbCAtRFQxX0lOU1RfRVhF
IFQxLmNwcCBUMV9pbnN0LmNwcCAtbyBUMV9pbnN0CgpjbGVhbjoKCS9iaW4v
cm0gLWYgVDFfZGwgKi5leGUgKi5kbGwgKi5zbyAqfiBtYXBmaWxlCg==

--0-1769892214-1138823312=:17869
Content-Type: application/octet-stream; name="T1.cpp"
Content-Transfer-Encoding: base64
Content-Description: 2580513814-T1.cpp
Content-Disposition: attachment; filename="T1.cpp"

I2luY2x1ZGUgIlQxLmhwcCIKClQxOjpUMShjb25zdCBzdGQ6OnN0cmluZyYg
bikKewogIHN0ZDo6Y291dCA8PCAiVDEgb2JqZWN0IGNyZWF0ZWQuIiA8PCBz
dGQ6OmVuZGw7CiAgLy9wcmludGYoIlQxIG9iamVjdCBjcmVhdGVkLlxuIik7
CiAgbmFtZSA9IG47Cn0KClQxOjp+VDEodm9pZCkKewogIHN0ZDo6Y291dCA8
PCAiVDEgb2JqZWN0IGRlbGV0ZWQuIiA8PCBzdGQ6OmVuZGw7CiAgLy9wcmlu
dGYoIlQxIG9iamVjdCBkZWxldGVkLlxuIik7Cn0KCnN0ZDo6c3RyaW5nClQx
OjpnZXROYW1lKCkKewogIHJldHVybiBuYW1lOwp9Cg==

--0-1769892214-1138823312=:17869
Content-Type: application/octet-stream; name="T1.hpp"
Content-Transfer-Encoding: base64
Content-Description: 2954177392-T1.hpp
Content-Disposition: attachment; filename="T1.hpp"

I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKY2xhc3Mg
VDEgewpwdWJsaWM6CiAgc3RkOjpzdHJpbmcgbmFtZTsKCiAgVDEoY29uc3Qg
c3RkOjpzdHJpbmcgJik7CiAgflQxKCk7CiAgc3RkOjpzdHJpbmcgZ2V0TmFt
ZSh2b2lkKTsKfTsK

--0-1769892214-1138823312=:17869
Content-Type: application/octet-stream; name="T1_dl.c"
Content-Transfer-Encoding: base64
Content-Description: 190956446-T1_dl.c
Content-Disposition: attachment; filename="T1_dl.c"

LyogQ1lHV0lOOiBnY2MgVDFfZGwuYyAtbyBUMV9kbCAqLwovKiBMSU5VWDog
IGdjYyBUMV9kbC5jIC1vIFQxX2RsIC1sZGwgKi8KI2luY2x1ZGUgPGRsZmNu
Lmg+CiNpbmNsdWRlIDxzdGRpby5oPgojaW5jbHVkZSA8c3RkbGliLmg+Cgoj
aWZkZWYgX19DWUdXSU5fXwojZGVmaW5lIERMTE5BTUUgIlQxX2luc3QuZGxs
IgojZWxzZQojZGVmaW5lIERMTE5BTUUgIi9tbnQvZGV2ZWwvdGVzdGNhc2Vz
L1QxX2luc3Quc28iCiNlbmRpZgoKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIg
KmFyZ3ZbXSkKewogIHZvaWQgKmhkbDsKICBwcmludGYoIm9wZW5pbmcuLi5c
biIpOwogIGhkbCA9IGRsb3BlbihETExOQU1FLCBSVExEX05PVyk7CiAgaWYg
KGhkbD09TlVMTCkgewogICAgcHJpbnRmKCIlc1xuIiwgZGxlcnJvcigpKTsK
ICAgIGV4aXQoMSk7CiAgfQogIHByaW50Zigib3BlbmVkIHN1Y2Nlc3NmdWxs
eVxuIik7CiAgcHJpbnRmKCJjbG9zaW5nLi4uXG4iKTsKICBkbGNsb3NlKGhk
bCk7CiAgcHJpbnRmKCJjbG9zZWRcbiIpOwogIGV4aXQoMCk7Cn0K

--0-1769892214-1138823312=:17869
Content-Type: application/octet-stream; name="T1_inst.cpp"
Content-Transfer-Encoding: base64
Content-Description: 2018291270-T1_inst.cpp
Content-Disposition: attachment; filename="T1_inst.cpp"

I2luY2x1ZGUgIlQxLmhwcCIKVDEgbXlUMSgiaGkiKTsKCiNpZmRlZiBUMV9J
TlNUX0VYRQojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5o
PgppbnQgbWFpbiAoaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkKewogIHByaW50
ZigicnVubmluZ1xuIik7CiAgcHJpbnRmKCJleGl0aW5nLi4uXG4iKTsKICBl
eGl0KDApOwp9CiNlbmRpZgo=


--0-1769892214-1138823312=:17869
Content-Type: text/plain; charset=us-ascii

--
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/
--0-1769892214-1138823312=:17869--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019