-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 4/8/15 12:32 PM, Mike Frysinger wrote: > On 08 Apr 2015 09:40, Chet Ramey wrote: >> I suspect the problem with malloc is that there are one or more addition al >> symbols in the file (malloc.o) that glibc uses to satisfy some internal >> reference, which causes the rest of the symbols from malloc.o to be >> loaded, which causes conflicts with the already-loaded bash malloc libra ry. > > glibc tries pretty hard to avoid symbol conflicts even when static linkin g. > if you're aware of such conflicts, please let us know. there should be n o > leaking of plain symbols like "foo" or "xmalloc" even w/static libs. > -mike
It's not `plain' symbols, or even weak symbols, that usually cause the problem. Say something in the C library or another library uses `posix_memalign'. The bash malloc doesn't implement that function, but glibc does, and glibc provides its implementation in the same source file as the rest of the malloc functions. The static link will pull in that entire file, resulting in symbol conflicts. Chet - -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlUmmhAACgkQu1hp8GTqdKs5MgCfQ/19Qtgrc+Q4i+d/iuRWC8Fh 0joAoJcZCL3iJHZ+y13kJMoT7ud9AKSw =DbvA -----END PGP SIGNATURE-----