Bug 109518 - rpmbuild produces errors on ELF files with no section header
rpmbuild produces errors on ELF files with no section header
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-11-08 17:39 EST by Seth Randall
Modified: 2007-04-18 12:59 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-11-15 19:16:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Seth Randall 2003-11-08 17:39:08 EST
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

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

How reproducible:

Steps to Reproduce:
1. Try to produce an RPM using the precompiled program at


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 14:41:43 EST
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 13:11:59 EST
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 15:31:01 EDT
This is no libelf issue.  As correctly said in comment #2, this is
rpm's readelf.
Comment 4 Jeff Johnson 2005-11-15 19:16:08 EST
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.