bug-glibc
[Top][All Lists]
Advanced

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

inexplicable link error when building glibc


From: Josh Dybnis
Subject: inexplicable link error when building glibc
Date: Thu, 12 Dec 2002 13:04:10 -0800 (PST)

Hi,

I am trying to modify glibc to support profiling multiple shared
libraries.

When I add a call to sprofil() in the file elf/dl-profile.c I get the
following error when building:

gcc   -nostdlib -nostartfiles -r -o
/home/jdybnis/build-glibc/elf/librtld.map.o
'-Wl,-(' /home/jdybnis/build-glibc/elf/dl-allobjs.os
/home/jdybnis/build-glibc/libc_pic.a -lgcc '-Wl,-)'
-Wl,-Map,/home/jdybnis/build-glibc/elf/librtld.mapT
/home/jdybnis/build-glibc/libc_pic.a(init-first.os): In function
`init':
/home/jdybnis/glibc-2.3.1/csu/../sysdeps/unix/sysv/linux/init-first.c:50:
multiple definition of `__libc_multiple_libcs'
/home/jdybnis/build-glibc/elf/dl-allobjs.os:/home/jdybnis/glibc-2.3.1/elf/rtld.c:239:
first defined here
/home/jdybnis/build-glibc/libc_pic.a(_itoa.os): In function `_itoa':
/home/jdybnis/glibc-2.3.1/stdio-common/_itoa.c:173: multiple definition
of `_itoa'
/home/jdybnis/build-glibc/elf/dl-allobjs.os:/home/jdybnis/glibc-2.3.1/elf/dl-minimal.c:295:
first defined here
/usr/bin/ld: Warning: size of symbol `_itoa' changed from 154 to 494 in
/home/jdybnis/build-glibc/libc_pic.a(_itoa.os)
collect2: ld returned 1 exit status

Here is the diff of the change to elf/dl-profile.c that causes the
problem:

/dl-profile.c
33a34
> #include <sys/profil.h>
448c449
<   __profil ((void *) kcount, kcountsize, lowpc, s_scale);
---
>   sprofil (NULL, 0, NULL, 0);


I am building glibc 2.3.1 with gcc 3.2 on redhat 8.0

Thanks,
-Josh Dybnis

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]