[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#477188: marked as done (libc6: dlopen("libc.so",...) fails)



Your message dated Mon, 21 Apr 2008 13:30:24 -0400
with message-id <20080421173024.GA15850@caradoc.them.org>
and subject line Re: Bug#477188: libc6: dlopen("libc.so",...) fails
has caused the Debian Bug report #477188,
regarding libc6: dlopen("libc.so",...) fails
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
477188: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477188
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc6
Version: 2.3.6.ds1-13etch4
Severity: normal

*** Please type your report below this line ***

When I call the program below with "a.out libc.so", the output is:

dlopen: /usr/lib/libc.so: invalid ELF header

This is apparently because /usr/lib/libc.so contains the following:

---------------------------
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-x86-64.so.2 ) )
---------------------------

and while the ordinary linker seems to have no problem with that,
dlopen does not like it.  The behaviour I would expect is that dlopen
opens /lib/libc.so.6, which is apparently what the ordinary linker
does.

The program I used is:
---------------------
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  void *x = dlopen(argv[1],RTLD_NOW);
  if (x == NULL) {
    fprintf(stderr,"dlopen: %s\n",dlerror());
    exit(1);
  }
  printf("%p\n",x);
  return 0;
}
-----------------------

- anton

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable'), (99, 'testing'), (50, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18perfctr-2.6.31
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libc6 depends on:
ii  tzdata                      2007j-1etch1 Time Zone and Daylight Saving Time

libc6 recommends no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
On Mon, Apr 21, 2008 at 07:06:01PM +0200, Anton Ertl wrote:
> and while the ordinary linker seems to have no problem with that,
> dlopen does not like it.  The behaviour I would expect is that dlopen
> opens /lib/libc.so.6, which is apparently what the ordinary linker
> does.

Sorry, this isn't a bug.  Open the version with the correct SONAME
specified instead.

-- 
Daniel Jacobowitz
CodeSourcery


--- End Message ---

Reply to: