Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25720 - glibc-2.3.2-r1 breaks static binaries
Summary: glibc-2.3.2-r1 breaks static binaries
Status: RESOLVED DUPLICATE of bug 25299
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: Normal major
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-01 11:33 UTC by Corey Shields
Modified: 2005-07-17 13:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Corey Shields 2003-08-01 11:33:32 UTC
I have 2 cases where statically built binaries have seg faulted with
glibc-2.3.2-r1.  These work fine in other distributions with the same glibc so
I'm not sure what the problem is.

One of them is an hsi program, and running with strace on a gentoo box with
glibc-2.3.2-r1 produces the following output:

close(3)                                = 0
open("/lib/ld-linux.so.2", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\t\0"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=89699, ...}) = 0
old_mmap(NULL, 80812, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4015b000
mprotect(0x4016e000, 2988, PROT_NONE)   = 0
old_mmap(0x4016e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x12000) = 0x4016e000
close(3)                                = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

On a different gentoo machine, but still running glibc-2.3.2-r1, running strace
with statically linked condor (http://www.cs.wisc.edu/condor) produces the
following:

close(3)                                = 0
open("/lib/ld-linux.so.2", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260y\221"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=89296, ...}) = 0
old_mmap(0x4a917000, 75404, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4a917000
mprotect(0x4a929000, 1676, PROT_NONE)   = 0
old_mmap(0x4a929000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x12000) = 0x4a929000
close(3)                                = 0
brk(0x82a8000)                          = 0x82a8000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

These both work on gentoo boxes with earlier versions of glibc.

Please let me know if there is any more info that would be useful to this!

Thanks
Comment 1 SpanKY gentoo-dev 2003-08-01 15:23:44 UTC
you sure they're statically linked ? 
if they were, they wouldnt have opened ld-linux.so ... 
`ldd <file>` 
Comment 2 Olle Hällnäs 2003-08-06 00:43:46 UTC
This is confirmed. Happens for me on QT static binaries and basically the same strace results.
Comment 3 jani 2003-08-13 03:16:43 UTC
The same problem here:I had to reemerge netcat which is static after upgrading to glibc 2.3.2  or it segfaulted. Another that does no longer work for me is p4v the perforce visual client which is binary only, compiled against earlier glibc.
I saw on google that LFS folks had the same problem with the transition.
Comment 4 SpanKY gentoo-dev 2003-08-16 16:04:46 UTC

*** This bug has been marked as a duplicate of 25299 ***