Bug 251935

Summary: objcopy strips build-id NOTE
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: binutilsAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-16 15:18:22 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
Roland's fix from the upstream beta release binutils-2.17.50.0.18. none

Description Jan Kratochvil 2007-08-13 15:30:28 UTC
Description of problem:
binutils ELF file split to binary+.debug strips NT_GNU_BUILD_ID even in the
.debug file.  It has been fixed in upstream binutils-2.17.50.0.18.

Version-Release number of selected component (if applicable):
binutils-2.17.50.0.17-7.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Get a binary with symbols and NT_GNU_BUILD_ID.
2. objcopy --only-keep-debug x x.debug
3. readelf -a x.debug
  
Actual results:
Section Headers:
  [Nr] Name              Type             Address           Offset
  [ 3] .note.gnu.build-i NOBITS           000000000040023c  00000200
       0000000000000024  0000000000000000   A       0     0     4

Expected results:
Section Headers:
  [Nr] Name              Type             Address           Offset
  [ 3] .note.gnu.build-i NOTE             000000000040023c  00000220
       0000000000000024  0000000000000000   A       0     0     4

Additional info:
It may not affect much/any people as rpmbuild uses eu-strip.
I found it during a new GDB testcase development as GDB testsuite uses binutils.

I see it not much a problem if you do not find it worth the backport.

Comment 1 Jan Kratochvil 2007-08-13 15:30:28 UTC
Created attachment 161182 [details]
Roland's fix from the upstream beta release binutils-2.17.50.0.18.

Comment 2 Jakub Jelinek 2007-08-16 15:18:22 UTC
Rawhide has binutils-2.17.50.0.18-1.