Bug 249461

Summary: build-id: Created .so files are too large
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: binutilsAssignee: Roland McGrath <roland>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: high    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: binutils-2.17.50.0.17-5.x86_64 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-24 20:15:39 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 Jan Kratochvil 2007-07-24 20:07:56 UTC
Description of problem:
Created -shared files are now at least 2MB (they still work).

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

How reproducible:
Always.

Steps to Reproduce:
1. touch empty.c; gcc -o empty.so empty.c -Wl,-build-id -shared 
2. ls -l empty.so

Actual results:
-rwxrwxr-x 1 jkratoch jkratoch 2102589 2007-07-24 22:06 empty.so*

Expected results:
-rwxrwxr-x 1 jkratoch jkratoch ~5269 2007-07-24 22:06 empty.so*

Additional info:
Section Headers:
[Nr] Name                 Type         Addr             Off      Size     ES
Flags Lk Inf Al
[ 0]                      NULL         0000000000000000 00000000 00000000  0   
    0   0  0
[ 1] .note.gnu.build-id   NOTE         0000000000000000 00200000 00000024  0 A 
    0   0  4

Program Headers:
  Type           Offset   VirtAddr           PhysAddr           FileSiz  MemSiz
  Flg Align
  LOAD           0x200000 0x0000000000000000 0x0000000000000000 0x0004fc
0x0004fc R E 0x200000
  LOAD           0x200500 0x0000000000200500 0x0000000000200500 0x0001e8
0x0001f8 RW  0x200000

I also had problems overcoming this alignment problem before. ;-)