Bug 109518 - rpmbuild produces errors on ELF files with no section header
Summary: rpmbuild produces errors on ELF files with no section header
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-08 22:39 UTC by Seth Randall
Modified: 2007-04-18 16:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-11-16 00:16:08 UTC
Embargoed:


Attachments (Terms of Use)
Patch for RPM (943 bytes, patch)
2003-12-07 18:11 UTC, Seth Randall
no flags Details | Diff

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.


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