Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 79732

Summary: Not enough room for program headers (allocated 4, need 5)
Product: [Retired] Red Hat Raw Hide Reporter: Tim Waugh <twaugh>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 1.0CC: mitr
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-30 19:30:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 79579    

Description Tim Waugh 2002-12-16 11:12:40 UTC
Description of problem:
When building Omni-0.7.2-1 I get this:

/bin/sh ../libtool --mode=link g++  -DUSE_STANDARD_NAMES=1 -DRETAIL=1  -Wall
-Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -fno-builtin
-fno-common   -o libKyocera_FS_3700.la -rpath /opt/Omni/lib -version-info 2:0:0
Kyocera_PCL_PrintModes.lo Kyocera_FS_1600__Resolutions.lo
Kyocera_Orientations.lo Kyocera_PCL_Commands.lo Kyocera_FS_1000_Trays.lo
Kyocera_FS_1700_Forms.lo Kyocera_PCL_Instance.lo Kyocera_PCL_Blitter.lo
Kyocera_F_1000A_F_1000_Medias.lo Kyocera_FS_3700.lo  -lsupc++
rm -fr .libs/libKyocera_FS_3700.la .libs/libKyocera_FS_3700.*
.libs/libKyocera_FS_3700.*
gcc -shared  Kyocera_PCL_PrintModes.lo Kyocera_FS_1600__Resolutions.lo
Kyocera_Orientations.lo Kyocera_PCL_Commands.lo Kyocera_FS_1000_Trays.lo
Kyocera_FS_1700_Forms.lo Kyocera_PCL_Instance.lo Kyocera_PCL_Blitter.lo
Kyocera_F_1000A_F_1000_Medias.lo Kyocera_FS_3700.lo  -lsupc++  -Wl,-soname
-Wl,libKyocera_FS_3700.so.2 -o .libs/libKyocera_FS_3700.so.2.0.0
/usr/bin/ld: .libs/libKyocera_FS_3700.so.2.0.0: Not enough room for program
headers (allocated 4, need 5)
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [libKyocera_FS_3700.la] Error 1

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

How reproducible:
100%

Steps to Reproduce:
1. On test161.test, chroot to the build root; cd /tmp/omni/Omni
2. make
    
Making the soname shorter, or taking out arguments from the link line, gives no
error.

Comment 1 Tim Waugh 2002-12-16 12:11:23 UTC
$ cat test.cpp
class Enumeration {
  public:
    virtual bool hasMoreElements () = 0;
};
                                                                                
Enumeration *
getEnumeration ()
{
   class PrintModeEnumerator : public Enumeration
   {
   public:
      virtual bool hasMoreElements ()
      {
        return false;
      }
   };
                                                                                
   return new PrintModeEnumerator ();
}
$ g++ -c test.cpp -fPIC -DPIC -o test.lo
$ readelf -Wa test.lo |  | grep linkonce\.r
  [15] .gnu.linkonce.r._ PROGBITS        00000000 0001cc 00002c 00  WA  0   0  4
  [20] .gnu.linkonce.r._ PROGBITS        00000000 000210 000010 00  WA  0   0  4

Comment 2 Tim Waugh 2002-12-16 13:04:10 UTC
.s output is wrong; changing component.

Comment 3 Tim Waugh 2002-12-16 13:04:51 UTC
gcc-3.2.1-2

Comment 4 Tim Waugh 2003-01-28 13:06:10 UTC
This is still preventing a rebuild of Omni on ppc.

Comment 6 Jakub Jelinek 2003-01-30 19:30:11 UTC
Fixed in gcc-3.2.1-5.