From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199801110859.JAA12769@kotter.atko.at> Date: Sun, 11 Jan 1998 09:59:27 +0100 From: Stefan Traby Subject: Re: Solution to --> Re: dlopen() bug on Linux/Alpha Hi ! > ST: 'Try to link the main (!) program with "-export-dynamic -shared"' > > rather than the dynamic library only we got dlopen to work. This > might be the solution to GNU glibc PR number 387. I am not going to > say it is a fix, but it is working for us. To maintainers: I don't have an AXP-machine and currently don't use gibc. Please check another special condition: Make a simple program which does dlopen and dlsym (no, don't call main :-) on itself. Simplified I mean dlopen(argv[0],...) but argv[0] may not contain the full path... Does it work ? If and only if, why ? is (export == dlsym(, "export") in this special case ? Of corse this is a hack and not a real-world solution. On a non glibc GNU-Linux/i386 system, linking with "-shared" makes the program dump core _before_ main is called. SIGSEGV "#0 0x4 in ?? ()" The hack is simply based on a special, simplified point of view: A program is a special case of an dynamic library. (it contains _start and main()). This may not be true and is not portable. -- ciao - Stefan Stefan Traby phone: +43-3133-6107-2 Mitterlasznitzstr. 13 fax: +43-3133-6107-9 8302 Nestelbach mailto://stefan@sime.com Austria -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com