public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/516] New: dlopen() error message could be improved when loading different elf class
@ 2004-11-04 19:38 dgm69@us.ibm.com
  2004-11-04 20:06 ` [Bug libc/516] " jakub@redhat.com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dgm69@us.ibm.com @ 2004-11-04 19:38 UTC (permalink / raw)
  To: glibc-bugs

When a ppc application calls dlopen() on a ppc64 DL or vice versa the subsequent
call to dlerror() gives
"cannot open shared object file: No such file or directory"

In a similar situation on a Solaris machine the error is one of
"wrong ELF class: ELFCLASS32"
"wrong ELF class: ELFCLASS64"

Can the glibc dlopen()/dlerror() be changes to give an more helpful message?

-- 
           Summary: dlopen() error message could be improved when loading
                    different elf class
           Product: glibc
           Version: 2.3.3
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: dgm69 at us dot ibm dot com
                CC: glibc-bugs at sources dot redhat dot com
  GCC host triplet: powerpc-linux


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

------- 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] 8+ messages in thread

* [Bug libc/516] dlopen() error message could be improved when loading different elf class
  2004-11-04 19:38 [Bug libc/516] New: dlopen() error message could be improved when loading different elf class dgm69@us.ibm.com
@ 2004-11-04 20:06 ` jakub@redhat.com
  2004-11-04 20:14 ` dgm69@us.ibm.com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub@redhat.com @ 2004-11-04 20:06 UTC (permalink / raw)
  To: glibc-bugs

------- Additional Comments From jakub at redhat dot com  2004-11-04 20:06 -------
The glibc dynamic linker if it sees different ELF class shared object skips it
and keeps searching for other shared objects.
So the error reported really matches the problem why the library has not been
loaded.


-- 


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

------- 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] 8+ messages in thread

* [Bug libc/516] dlopen() error message could be improved when loading different elf class
  2004-11-04 19:38 [Bug libc/516] New: dlopen() error message could be improved when loading different elf class dgm69@us.ibm.com
  2004-11-04 20:06 ` [Bug libc/516] " jakub@redhat.com
@ 2004-11-04 20:14 ` dgm69@us.ibm.com
  2004-11-04 20:16 ` jakub@redhat.com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dgm69@us.ibm.com @ 2004-11-04 20:14 UTC (permalink / raw)
  To: glibc-bugs

------- Additional Comments From dgm69 at us dot ibm dot com  2004-11-04 20:14 -------
Understood.

Suppose that after all objects have been searched and no others found. Could we
give a more specific error message in that case?

-- 


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

------- 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] 8+ messages in thread

* [Bug libc/516] dlopen() error message could be improved when loading different elf class
  2004-11-04 19:38 [Bug libc/516] New: dlopen() error message could be improved when loading different elf class dgm69@us.ibm.com
  2004-11-04 20:06 ` [Bug libc/516] " jakub@redhat.com
  2004-11-04 20:14 ` dgm69@us.ibm.com
@ 2004-11-04 20:16 ` jakub@redhat.com
  2004-11-04 20:33 ` dgm69@us.ibm.com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub@redhat.com @ 2004-11-04 20:16 UTC (permalink / raw)
  To: glibc-bugs

------- Additional Comments From jakub at redhat dot com  2004-11-04 20:16 -------
Surely we can, but it would certainly not be a one-liner.
So the question is if this is worth it.

-- 


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

------- 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] 8+ messages in thread

* [Bug libc/516] dlopen() error message could be improved when loading different elf class
  2004-11-04 19:38 [Bug libc/516] New: dlopen() error message could be improved when loading different elf class dgm69@us.ibm.com
                   ` (2 preceding siblings ...)
  2004-11-04 20:16 ` jakub@redhat.com
@ 2004-11-04 20:33 ` dgm69@us.ibm.com
  2004-11-11 18:34 ` dgm69@us.ibm.com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dgm69@us.ibm.com @ 2004-11-04 20:33 UTC (permalink / raw)
  To: glibc-bugs

------- Additional Comments From dgm69 at us dot ibm dot com  2004-11-04 20:33 -------
Right. I have looked at it some but have not figured out _dl_signal_error and
_dl_signal_cerror sufficiently yet.

-- 


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

------- 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] 8+ messages in thread

* [Bug libc/516] dlopen() error message could be improved when loading different elf class
  2004-11-04 19:38 [Bug libc/516] New: dlopen() error message could be improved when loading different elf class dgm69@us.ibm.com
                   ` (3 preceding siblings ...)
  2004-11-04 20:33 ` dgm69@us.ibm.com
@ 2004-11-11 18:34 ` dgm69@us.ibm.com
  2005-04-27 19:31 ` uttamp at us dot ibm dot com
  2005-09-26 15:58 ` drepper at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: dgm69@us.ibm.com @ 2004-11-11 18:34 UTC (permalink / raw)
  To: glibc-bugs

------- Additional Comments From dgm69 at us dot ibm dot com  2004-11-11 18:34 -------
Still working on a patch. In the meantime can we discuss the preferred error
message for this case? Is

"wrong ELF class: ELFCLASS32"
"wrong ELF class: ELFCLASS64"

acceptable or would something else be preferred? I ask because we have some
software that will be taking action based on the error and they would like to
prepare ahead for the error message in their code.

-- 


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

------- 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] 8+ messages in thread

* [Bug libc/516] dlopen() error message could be improved when loading different elf class
  2004-11-04 19:38 [Bug libc/516] New: dlopen() error message could be improved when loading different elf class dgm69@us.ibm.com
                   ` (4 preceding siblings ...)
  2004-11-11 18:34 ` dgm69@us.ibm.com
@ 2005-04-27 19:31 ` uttamp at us dot ibm dot com
  2005-09-26 15:58 ` drepper at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: uttamp at us dot ibm dot com @ 2005-04-27 19:31 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From uttamp at us dot ibm dot com  2005-04-27 19:31 -------
(In reply to comment #1)
> The glibc dynamic linker if it sees different ELF class shared object skips it
> and keeps searching for other shared objects.
> So the error reported really matches the problem why the library has not been
> loaded.
> 

Generally this works out fine, but what if an application tries to load a
specific library which is present but happen to be of different ELF class. In
that case, the current error message doesn't make much sense infact it is little
confusing. In this case, the message should say exactly, what the error is and
that is application is trying to load a wrong (ELF class) library.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uttamp at us dot ibm dot com


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

------- 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] 8+ messages in thread

* [Bug libc/516] dlopen() error message could be improved when loading different elf class
  2004-11-04 19:38 [Bug libc/516] New: dlopen() error message could be improved when loading different elf class dgm69@us.ibm.com
                   ` (5 preceding siblings ...)
  2005-04-27 19:31 ` uttamp at us dot ibm dot com
@ 2005-09-26 15:58 ` drepper at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: drepper at redhat dot com @ 2005-09-26 15:58 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2005-09-26 15:58 -------
Despite of the wrong and stupid argumentation in this bug I applied a change
which should provide better messages.

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


http://sourceware.org/bugzilla/show_bug.cgi?id=516

------- 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] 8+ messages in thread

end of thread, other threads:[~2005-09-26 15:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-04 19:38 [Bug libc/516] New: dlopen() error message could be improved when loading different elf class dgm69@us.ibm.com
2004-11-04 20:06 ` [Bug libc/516] " jakub@redhat.com
2004-11-04 20:14 ` dgm69@us.ibm.com
2004-11-04 20:16 ` jakub@redhat.com
2004-11-04 20:33 ` dgm69@us.ibm.com
2004-11-11 18:34 ` dgm69@us.ibm.com
2005-04-27 19:31 ` uttamp at us dot ibm dot com
2005-09-26 15:58 ` drepper at redhat dot com

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