public inbox for cygwin-xfree@sourceware.org help / color / mirror / Atom feed
From: Alexander Gottwald <Alexander.Gottwald@s1999.tu-chemnitz.de> To: cygwin-xfree@cygwin.com Subject: Re: cygwin.rules - Enabling shared libXt finally? Date: Fri, 03 Oct 2003 11:57:00 -0000 [thread overview] Message-ID: <Pine.LNX.4.55.0310031233100.1025@lupus.ago.vpn> (raw) In-Reply-To: <3F7CED50.1060308@msu.edu> [-- Attachment #1: Type: TEXT/PLAIN, Size: 1586 bytes --] Harold L Hunt II wrote: > Alexander, > > I don't understand how your example code relates to the problem at hand. the structs x1 and x2 represent widget classes from libXt and from eg xclock. x1 must be linked into the dll and x2 must be linked into the program. The other problem is the function which compares the callback with _XtInherit. _XtInherit is bound to an address in the dll, but the callback is bound to _XtInherit in the program. Both are at different memory locations. What we would need is a startup function which replaces pointers to the importlib _XtInherit to the pointer of _XtInherit from the dll. func reloc_addr[] = { .... }; unsigned reloc_addr_size = ...; __startup_relocate(void) { unsigned i; func real_func = dlsym("cygXt.dll", "_XtInherit"); for (i = 0; i < reloc_addr_size; i++) *(reloc_addr[i]) = real_func; } This must be added to libXt.dll.a and the linker must fill the reloc_addr array. > I have created a more sophisticated example and I wish that you could > look at it and modify it if it doesn't currently exhibit the problem > either. The code is attached, just 'make' it. > > $ ./xtest > x1.callback: 0x4010e0 > x2.callback: 0x4010e0 Both callbacks are bound to _XtInherit from the program. I've changed the source to match the problem from libXt. The problem is solved if the output is $ ./xtest x1.callback: 0x1000xxx x2.callback: 0x4010e0 test(x1): 1 test(x2): 1 Unfortunately it fails at test(x2). bye ago -- Alexander.Gottwald@informatik.tu-chemnitz.de http://www.gotti.org ICQ: 126018723 [-- Attachment #2: Type: APPLICATION/octet-stream, Size: 1181 bytes --]
next prev parent reply other threads:[~2003-10-03 11:57 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-10-01 0:51 Harold L Hunt II 2003-10-01 12:12 ` Alexander Gottwald 2003-10-01 16:35 ` Harold L Hunt II 2003-10-01 19:55 ` Alexander Gottwald 2003-10-01 20:24 ` Harold L Hunt II 2003-10-02 13:31 ` Alexander Gottwald 2003-10-03 3:31 ` Harold L Hunt II 2003-10-03 11:57 ` Alexander Gottwald [this message] 2003-10-17 0:33 Ralf Habacker 2003-10-17 2:39 ` Harold L Hunt II 2003-10-17 11:15 ` Alexander Gottwald 2003-10-21 7:43 Ralf Habacker 2003-10-21 13:10 ` Harold L Hunt II
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=Pine.LNX.4.55.0310031233100.1025@lupus.ago.vpn \ --to=alexander.gottwald@s1999.tu-chemnitz.de \ --cc=cygwin-xfree@cygwin.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).