Bug 117006 - binaries built against dietlibc segfault
binaries built against dietlibc segfault
Product: Fedora
Classification: Fedora
Component: dietlibc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Depends On:
Blocks: FC2Blocker
  Show dependency treegraph
Reported: 2004-02-27 05:52 EST by Bernd Kischnick
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-05-07 13:55:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bernd Kischnick 2004-02-27 05:52:14 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/124 (KHTML, 
like Gecko) Safari/125

Description of problem:
programs built with "diet gcc" don't run because the startup object file 
is stripped by the brp-strip script during the RPM build.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. echo "int main () { return 0; }" > a.c
2. diet gcc a.c
3. ./a.out
4. nm /usr/lib/dietlibc/lib-%{arch}/start.o

Actual Results:  After step 2:
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048074

After step 3:
Segmentation fault

After step 4:
no symbols

Expected Results:  
2. no warning from ld
3. ./a.out should run
         U __vsyscall
00000000 T _start
         U environ
         U exit
         U main

Additional info:

This can be fixed in the spec file:
%define __os_install_post /usr/lib/rpm/brp-compress

(thereby disabling the scripts brp-strip and brp-strip-comment-note).

The library itself, apart from start.o, will still be stripped.
This is already performed by the Makefile.
Comment 1 Jeremy Katz 2004-03-04 18:29:01 EST
Fixed in -4
Comment 2 Colin Charles 2004-05-07 13:53:46 EDT
Just tried this:
[byte@potter byte]$ echo "int main () {return 0; }" >a.c
[byte@potter byte]$ diet gcc a.c
[byte@potter byte]$ ./a.out
[byte@potter byte]$ nm /usr/lib/dietlibc/lib-i386/start.o
         U environ
         U exit
         U main
00000000 T _start
         U __vsyscall

This in dietlibc-0.24-4, from fedora development tree.

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