Bug 109518

Summary: rpmbuild produces errors on ELF files with no section header
Product: [Retired] Red Hat Linux Reporter: Seth Randall <natasha>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED UPSTREAM QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: herrold
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-16 00:16:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for RPM none

Description Seth Randall 2003-11-08 22:39:08 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031018

Description of problem:
When building an RPM that has an ELF format file with no section
header,  rpmbuild will produce a bogus error.  This seems to be
associated with the file source that is included with it.  Another
case has been logged with the file program too.  (See bug #109509
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109509)

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

How reproducible:
Always

Steps to Reproduce:
1. Try to produce an RPM using the precompiled program at
http://www.epsxe.com/files/epsxe160lin.zip

    

Actual Results:  rpmbuild: corrupted program header size.


Expected Results:  RPM should finish building.

Additional info:

The epsxe binary was compressed with the UPX file packer which
produces an ELF executable without a section header.  (Also, the error
should read "rpmbuild: corrupted section header size")

Comment 1 Jeff Johnson 2003-12-06 19:41:43 UTC
That's a elfutils message, reassigning.

Manwhile you can disable the use of elfutils when building
by configuring
   # Use internal dependency generator rather than external helpers?
   %_use_internal_dependency_generator     0
There is a minor loss of functionality because dependencies
will not be attached to files, only to packages, but I doubt
you will notice.


Comment 2 Seth Randall 2003-12-07 18:11:59 UTC
Created attachment 96389 [details]
Patch for RPM

The error seems to be in the readelf.c file in the file directory of rpm 
(source from the file program that's been added to rpm)  I've attached a patch
that fixes the problem for me.

Comment 3 Ulrich Drepper 2004-09-25 19:31:01 UTC
This is no libelf issue.  As correctly said in comment #2, this is
rpm's readelf.

Comment 4 Jeff Johnson 2005-11-16 00:16:08 UTC
elfutils is no longer distributed internal to rpm sources in rpm-4.4.x and later.