public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/275] New: Cannot use RTLD_GLOBAL in dlopen
@ 2004-07-21  3:11 qf0421 at hotmail dot com
  2004-07-21  8:18 ` [Bug libc/275] " schwab at suse dot de
  0 siblings, 1 reply; 2+ messages in thread
From: qf0421 at hotmail dot com @ 2004-07-21  3:11 UTC (permalink / raw)
  To: glibc-bugs

I'll try the following simple code from help dlopen, but failed and got
following information:
: invalid mode for dlopen(): Invalid argument
And the code:
#include <string>
#include <stdio.h>
#include <dlfcn.h>

int main(int argc, char **argv) {
void *handle;
double (*cosine)(double);
char *error;

handle = dlopen (argv[1], RTLD_GLOBAL);
if (!handle) {
fprintf (stderr, "%s\n", dlerror());
exit(1);
}
printf("Got 0x%x from %s.\n", handle, argv[1]);
dlclose(handle);
return 0;
}

Could you help me to check it?

-- 
           Summary: Cannot use RTLD_GLOBAL in dlopen
           Product: glibc
           Version: 2.3.2
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: qf0421 at hotmail dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=275

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libc/275] Cannot use RTLD_GLOBAL in dlopen
  2004-07-21  3:11 [Bug libc/275] New: Cannot use RTLD_GLOBAL in dlopen qf0421 at hotmail dot com
@ 2004-07-21  8:18 ` schwab at suse dot de
  0 siblings, 0 replies; 2+ messages in thread
From: schwab at suse dot de @ 2004-07-21  8:18 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From schwab at suse dot de  2004-07-21 08:18 -------
RTLD_GLOBAL by itself is an invalid argument for dlopen, you must have at least 
RTLD_NOW or RTLD_LAZY. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://sources.redhat.com/bugzilla/show_bug.cgi?id=275

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-21  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-21  3:11 [Bug libc/275] New: Cannot use RTLD_GLOBAL in dlopen qf0421 at hotmail dot com
2004-07-21  8:18 ` [Bug libc/275] " schwab at suse dot de

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).