public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Multiple definition of __libc_multiple_libcs
@ 2000-01-10  8:35 Andreas Jaeger
  2000-01-10  9:09 ` Andreas Schwab
  2000-01-24 14:46 ` Ralf Baechle
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Jaeger @ 2000-01-10  8:35 UTC (permalink / raw)
  To: GNU libc hacker

With the current glibc 2.2, I received the following error message:
/opt/egcs1.1.2/bin/gcc   -nostdlib -nostartfiles -r -o /build-glibc-dl-wip/20000110/elf/librtld.os '-Wl,-(' /build-glibc-dl-wip/20000110/elf/dl-allobjs.os /build-glibc-dl-wip/20000110/libc_pic.a -lgcc '-Wl,-)'
/build-glibc-dl-wip/20000110/libc_pic.a(init-first.os): In function `init':
/libc-dl-wip/csu/../sysdeps/unix/sysv/linux/init-first.c:61: multiple definition of `__libc_multiple_libcs'
/build-glibc-dl-wip/20000110/elf/dl-allobjs.os(.data+0xe4):/libc-dl-wip/elf/rtld.c: first defined here

Why do we have in sysdeps/generic/dl-sysdep.c:
int __libc_multiple_libcs = 0;	/* Defining this here avoids the inclusion
				   of init-first.  */

and also in sysdeps/unix/sysv/linux/init-first.c:
/* Set nonzero if we have to be prepared for more then one libc being
   used in the process.  Safe assumption if initializer never runs.  */
int __libc_multiple_libcs = 1;

and why is this a problem on Linux/MIPS and not on Linux/ix86?  I'm a
little bit confused and appreciate your help.

Is this a bug in binutils?  On Linux/MIPS I use:
$ ld --version
GNU ld 2.9.5


Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

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

* Re: Multiple definition of __libc_multiple_libcs
  2000-01-10  8:35 Multiple definition of __libc_multiple_libcs Andreas Jaeger
@ 2000-01-10  9:09 ` Andreas Schwab
  2000-01-24 14:46 ` Ralf Baechle
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2000-01-10  9:09 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: GNU libc hacker

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

Andreas Jaeger <aj@suse.de> writes:

|> With the current glibc 2.2, I received the following error message:
|> /opt/egcs1.1.2/bin/gcc   -nostdlib -nostartfiles -r -o /build-glibc-dl-wip/20000110/elf/librtld.os '-Wl,-(' /build-glibc-dl-wip/20000110/elf/dl-allobjs.os /build-glibc-dl-wip/20000110/libc_pic.a -lgcc '-Wl,-)'
|> /build-glibc-dl-wip/20000110/libc_pic.a(init-first.os): In function `init':
|> /libc-dl-wip/csu/../sysdeps/unix/sysv/linux/init-first.c:61: multiple definition of `__libc_multiple_libcs'
|> /build-glibc-dl-wip/20000110/elf/dl-allobjs.os(.data+0xe4):/libc-dl-wip/elf/rtld.c: first defined here
|> 
|> Why do we have in sysdeps/generic/dl-sysdep.c:
|> int __libc_multiple_libcs = 0;	/* Defining this here avoids the inclusion
|> 				   of init-first.  */
|> 
|> and also in sysdeps/unix/sysv/linux/init-first.c:
|> /* Set nonzero if we have to be prepared for more then one libc being
|>    used in the process.  Safe assumption if initializer never runs.  */
|> int __libc_multiple_libcs = 1;
|> 
|> and why is this a problem on Linux/MIPS and not on Linux/ix86?

Probably because init-first.os is spuriously included during linking due
to some unresolved references.  It should not be part of ld.so.  Please
check the link map.

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg

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

* Re: Multiple definition of __libc_multiple_libcs
  2000-01-10  8:35 Multiple definition of __libc_multiple_libcs Andreas Jaeger
  2000-01-10  9:09 ` Andreas Schwab
@ 2000-01-24 14:46 ` Ralf Baechle
  2000-01-24 23:46   ` Andreas Jaeger
  1 sibling, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2000-01-24 14:46 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: GNU libc hacker

On Mon, Jan 10, 2000 at 05:35:01PM +0100, Andreas Jaeger wrote:

> With the current glibc 2.2, I received the following error message:
> /opt/egcs1.1.2/bin/gcc   -nostdlib -nostartfiles -r -o /build-glibc-dl-wip/20000110/elf/librtld.os '-Wl,-(' /build-glibc-dl-wip/20000110/elf/dl-allobjs.os /build-glibc-dl-wip/20000110/libc_pic.a -lgcc '-Wl,-)'
> /build-glibc-dl-wip/20000110/libc_pic.a(init-first.os): In function `init':
> /libc-dl-wip/csu/../sysdeps/unix/sysv/linux/init-first.c:61: multiple definition of `__libc_multiple_libcs'
> /build-glibc-dl-wip/20000110/elf/dl-allobjs.os(.data+0xe4):/libc-dl-wip/elf/rtld.c: first defined here
> 
> Why do we have in sysdeps/generic/dl-sysdep.c:
> int __libc_multiple_libcs = 0;	/* Defining this here avoids the inclusion
> 				   of init-first.  */
> 
> and also in sysdeps/unix/sysv/linux/init-first.c:
> /* Set nonzero if we have to be prepared for more then one libc being
>    used in the process.  Safe assumption if initializer never runs.  */
> int __libc_multiple_libcs = 1;
> 
> and why is this a problem on Linux/MIPS and not on Linux/ix86?  I'm a
> little bit confused and appreciate your help.
> 
> Is this a bug in binutils?  On Linux/MIPS I use:
> $ ld --version
> GNU ld 2.9.5

Is this vanilla 2.9.5 or the one from oss.sgi.com with my patches applied?
I remember having fixed various bugs like this but it's too long since then,
forgot all the details.

  Ralf

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

* Re: Multiple definition of __libc_multiple_libcs
  2000-01-24 14:46 ` Ralf Baechle
@ 2000-01-24 23:46   ` Andreas Jaeger
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Jaeger @ 2000-01-24 23:46 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: GNU libc hacker

>>>>> Ralf Baechle writes:
[...]
Ralf> Is this vanilla 2.9.5 or the one from oss.sgi.com with my patches applied?
One with your patches applied.
Ralf> I remember having fixed various bugs like this but it's too long since then,
Ralf> forgot all the details.

Here's the ChangeLog entry for the patch - it's fixed in current glibc
2.2 CVS.

Andreas

2000-01-11  Andreas Schwab  <schwab@suse.de>

        * sysdeps/mips/__longjmp.c (__longjmp): Change call to abort into
        infinite loop to avoid pulling in stdio in the dynamic linker.
        * sysdeps/mips/mips64/__longjmp.c (__longjmp): Likewise.

- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

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

end of thread, other threads:[~2000-01-24 23:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-10  8:35 Multiple definition of __libc_multiple_libcs Andreas Jaeger
2000-01-10  9:09 ` Andreas Schwab
2000-01-24 14:46 ` Ralf Baechle
2000-01-24 23:46   ` Andreas Jaeger

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