Bug 165477

Summary: Weak symbols lost from malloc and friends in libc
Product: Red Hat Enterprise Linux 4 Reporter: Ron Lieberman <lieb>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: drepper
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-20 23:17:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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)
VERSION = 9 
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.