Bug 199357

Summary: eu-strip does not work on sparc
Product: [Fedora] Fedora Reporter: Dennis Gilmore <dennis>
Component: elfutilsAssignee: Roland McGrath <roland>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: drepper
Target Milestone: ---   
Target Release: ---   
Hardware: sparc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-13 22:49:17 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:

Description Dennis Gilmore 2006-07-19 03:04:50 UTC
Description of problem:
debuginfo packages on sparc  dont get built  because eu-strip  doesnt work 
correctly  
build log shows 

eu-strip: while 
writing '/var/tmp/kdelibs-3.5.3-4-buildroot/usr/lib/debug/usr/lib/kde3/kded.so.debug': 
invalid section entry size
extracting debug info 
from /var/tmp/kdelibs-3.5.3-4-buildroot/usr/lib/kde3/kded_kssld.so
Failed to write file: invalid section entry size

Version-Release number of selected component (if applicable):
rpm -q elfutils
elfutils-0.121-1

not 1005 sure whats the best way to debug this.  

How reproducible:
always

Steps to Reproduce:
1.build package on sparc
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jakub Bogusz 2006-08-26 10:49:53 UTC
It can be caused by ".plt" section, which in SPARC ELF32 files have 12-byte
entsize, but after the last entry there is single-instruction (4-byte) NOP
placed, so final section size is count*entsize+4.
elflint and libelf check strictly for sh_size % sh_entsize == 0.
I prepared patch for elflint:
http://cvs.pld-linux.org/SOURCES/elfutils-sparc.patch
and libelf check can be adjusted in similar way.

Comment 2 Dennis Gilmore 2006-10-13 22:49:17 UTC
http://sources.redhat.com/ml/binutils/2006-10/msg00101.html 
applying that patch to binutils and rebuilding elfutils seems to have fixed 
the problem. 

BEFORE
-rw-r--r-- 1 dennis dennis 5.6M Oct 13 16:56 
binutils-2.17.50.0.3-6.sparc.sparc.rpm
-rw-r--r-- 1 dennis dennis  31K Oct 13 16:56 
binutils-debuginfo-2.17.50.0.3-6.sparc.sparc.rpm

AFTER
-rw-r--r-- 1 dennis dennis 3.0M Oct 13 17:28 
binutils-2.17.50.0.3-6.sparc.sparc.rpm
-rw-r--r-- 1 dennis dennis 2.7M Oct 13 17:28 
binutils-debuginfo-2.17.50.0.3-6.sparc.sparc.rpm

I havent tested  that the debuginfo packages work  but they appear to be 
created better