Bug 117006 - binaries built against dietlibc segfault
Summary: binaries built against dietlibc segfault
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dietlibc
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC2Blocker
TreeView+ depends on / blocked
 
Reported: 2004-02-27 10:52 UTC by Bernd Kischnick
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-05-07 17:55:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bernd Kischnick 2004-02-27 10:52:14 UTC
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 
/usr/lib/dietlibc/lib-%{arch}/start.o
is stripped by the brp-strip script during the RPM build.

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

How reproducible:
Always

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
4. 
         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 23:29:01 UTC
Fixed in -4

Comment 2 Colin Charles 2004-05-07 17:53:46 UTC
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.