Bug 133734 - Stripping prelinked binaries produces programs that segfault
Summary: Stripping prelinked binaries produces programs that segfault
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-09-26 23:46 UTC by W. Michael Petullo
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: binutils-
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-12 11:28:09 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Copy of ash that I stripped; causes a segfault on my iBook (115.12 KB, application/x-executable)
2004-10-01 04:48 UTC, W. Michael Petullo
no flags Details

Description W. Michael Petullo 2004-09-26 23:46:54 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.2)
Gecko/20040809 Epiphany/1.3.8

Description of problem:
When I run strip on my iBook (32 bit PowerPC), the program generates
executable images that segfault.

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

How reproducible:

Steps to Reproduce:
[mike@imp tmp]$ cp /bin/ash .
[mike@imp tmp]$ strip ash
[mike@imp tmp]$ ./ash
Segmentation fault
[mike@imp tmp]$ /bin/ash
shopt: not found
shopt: not found
$ exit
[mike@imp tmp]$

Actual Results:  The copy of ash that I stripped caused a segfault. 
The copy of ash that was installed by the ash RPM executes properly.

Additional info:

Comment 1 Jakub Jelinek 2004-09-28 08:31:11 UTC
Can't reproduce, even the stripped ash works just fine.
md5sum /bin/ash
5898a1de8e16f89c9ad838fa578c7c5f  /bin/ash
strip actually doesn't change anything on the file and returns success.

Comment 2 W. Michael Petullo 2004-09-28 11:22:06 UTC
Did you notice that the architecture is PowerPC?

[mike@imp tmp]$ cp /bin/ash .
[mike@imp tmp]$ strip ash
[mike@imp tmp]$ diff ash /bin/ash
Binary files ash and /bin/ash differ

Another wierd thing is that /bin/ash is already stripped.

Comment 3 Jakub Jelinek 2004-09-30 10:31:11 UTC
Of course I have tested on ppc.
It is certainly not weird that (most) binaries and libraries in the
distro are stripped, that's on purpose (they are stripped into
files in *-debuginfo* packages).
You haven't mentioned what exact ash version you used.  Alternatively
please attach your /bin/ash before and after stripping.

Comment 4 W. Michael Petullo 2004-09-30 19:07:52 UTC
My statement was a little ambiguous.  I didn't mean that it was odd
that ash was already stripped, per se.  I meant that it was odd that
the stripped ash provided by the RPM did not crash but the copy I
stripped myself did.

Anyway, I'll try submit the additional information asked for when I
get a chance.

Comment 5 W. Michael Petullo 2004-10-01 04:45:27 UTC
Here are my current binutils and ash versions, along with a
demonstration that the packages' files are still legitimate:

[root@imp /]# rpm -q binutils
[root@imp /]# rpm -V binutils
[root@imp /]# rpm -q ash
[root@imp /]# rpm -V ash

Comment 6 W. Michael Petullo 2004-10-01 04:48:57 UTC
Created attachment 104615 [details]
Copy of ash that I stripped; causes a segfault on my iBook

Comment 7 Jakub Jelinek 2004-10-10 18:26:24 UTC
Ok, reproduced even on x86-64.  The important difference why I have
not been able to reproduce this was that my /bin/ash was not prelinked.
strip apparently messes up the .gnu.liblist section.

Comment 8 W. Michael Petullo 2004-10-13 15:34:46 UTC
Confirmed fixed with binutils- and prelink-0.3.2-11.

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