This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: openmotif, .rdata, shared libs and runtime linking/loading problem
- From: "Avi Cohen Stuart" <avics at xs4all dot nl>
- To: cygwin at cygwin dot com
- Date: Wed, 16 Aug 2006 23:51:44 +0200
- Subject: Re: openmotif, .rdata, shared libs and runtime linking/loading problem
- References: <ebtb3s$l2a$1@sea.gmane.org> <44E3153B.5080304@byu.net>
- Reply-to: "Avi Cohen Stuart" <avi dot cohenstuart at ssaglobal dot com>
Hi Eric,
>> Please let me know if this is the correct newsgroup.
>
> Actually, it is officially a mailing list (in spite of the fact that there
> are some newsgroup frontends that people have created on the web).
I'm indeed using the gmane.os.cygwin as a frontend...
>> When using windbg it reports a access violation here, apperantly during
>> the
>> resolving of shared libaries.
>
> The cygwin and libtool archives document an issue where exporting a
> library variable can cause problems, because initializing a const pointer
> variable with its address will cause the const variable to live .rodata
> but need a dynamic adjustment when the library is loaded; hence a SIGSEGV.
> I'm not fully sure of the details (so I hope I described the windows .dll
> limitation correctly), but it sounds like you may have run into this
> issue. Perhaps you can find the place that takes the address of a library
> variable and make that pointer non-const (so it won't be in .rodata). A
> more generic solution is to NEVER export variables in libraries, only
> accessor functions.
This might indeed be the problem where the Xm library is trying to use
XtStrings from the Xt library.
I'll try a recompile tomorrow where these const strings of Xt are not used
in Xm.
Avi.
--
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/