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")
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.
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.
This is no libelf issue. As correctly said in comment #2, this is rpm's readelf.
elfutils is no longer distributed internal to rpm sources in rpm-4.4.x and later.