Bug 165477 - Weak symbols lost from malloc and friends in libc
Summary: Weak symbols lost from malloc and friends in libc
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc   
(Show other bugs)
Version: 4.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2005-08-09 18:18 UTC by Ron Lieberman
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-10-20 23:17:18 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Ron Lieberman 2005-08-09 18:18:55 UTC
Description of problem:

I would like to have to report a problem on Redhat regarding how
they are building libc in RH4. In particular, symbols that used to be defined
Weakly (W) like malloc and its related entry points are now defined as 
text (T), this causes static linked program to fail to build on RH4 using HPMPI
because we define our own version of malloc and friends. 

Extra info:

SuSE 9.x defines these symbols as (W).
RH3 defined these symbols as (W) 
but RH4 defines as (T) text.

mpi1620 /mpi3/lieb> cat /etc/SuSE-release 
SUSE LINUX Enterprise Server 9 (ia64)
mpi1620 /mpi3/lieb> nm /usr/lib/libc.a | grep malloc | grep W | more
0000000000008270 W malloc 

cat /etc/redhat-release 
Red Hat Enterprise Linux AS release 3 (Taroon Update 2) 
[lieb@pop ~]$ nm /usr/lib/libc.a | grep malloc | grep W
00000ec4 W malloc 

cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant)
nm /usr/lib64//libc.a | grep malloc | grep -v U 
0000000000003a40 T malloc

Version-Release number of selected component (if applicable):
Linux frac.rsn.hp.com 2.6.9-11.EL #1 SMP Fri May 20 18:25:13 EDT 2005 ia64 
ia64 ia64 GNU/Linux

How reproducible:
nm /usr/lib64//libc.a | grep malloc | grep -v U 

Steps to Reproduce:
1.nm /usr/lib64//libc.a | grep malloc | grep -v U 
Actual results:
0000000000003a40 T malloc

Expected results:
0000000000003a40 W malloc

Additional info:

Comment 2 Ulrich Drepper 2006-10-20 23:17:18 UTC
Static linking is in no way supported.  Relying on weak symbols is bad practice.
 If you want to replace the malloc implementation, replace it all.

Note You need to log in before you can comment on or make changes to this bug.