/usr/bin/ld: final link failed: Nonrepresentable section on output

Solution Unverified - Updated -

Issue

Our developers are getting this message when using GCC on RH5.8. It appears to be related to these bug tickets:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22185
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664

It appears its fixed in GCC4.2 which quite obviously isn't in RH5
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52)

Is there any plan for RH to backport this fix to GCC4.1 or is RH6 the only path for resolution?

We tried using g++44 and it gets past the initial problem of this case, but now it complains about the linker.

Redhat ships a binutils220-2.20.51.0.2-5.29.el5 with the gcc44 suite, but only includes the following:

[root@ld-chhfe03 ~]# rpm -q -l binutils220-2.20.51.0.2-5.29.el5
/usr/libexec/binutils220
/usr/libexec/binutils220/as
/usr/libexec/binutils220/objdump
/usr/share/doc/binutils220-2.20.51.0.2
/usr/share/doc/binutils220-2.20.51.0.2/COPYING


The following is what the user is now experiencing after trying to use the g++44 compiler:

This command ... (creates a .o) :
/usr/bin/g++44 -m64 -o rh5a64g4/obj/td5_daterange_dump/td5_daterange_dump.o -c td5_daterange_dump.C -I/tp64/boost/1.47.0/include/boost-1_47 -I/tp64/ICU/4.2.1/include -I/auto/tickdata1/hffi/hdf5/install/hdf5-1.8.10-of20120813/release_st/include -I/devsandbox/hftdat/buildhfe/checkTd5/nthftdat/td5/libtd5/rh5a64g4/hdr -I/devsandbox/hftdat/buildhfe/checkTd5/nthftdat/td5/edstd5data/rh5a64g4/hdr -I/devsandbox/hftdat/buildhfe/checkTd5/nthftdat/td5/td5data/rh5a64g4/hdr -I/devsandbox/hftdat/buildhfe/checkTd5/nthftdat/td5/quickstart/iterators/rh5a64g4/hdr -DPTHREADS -DTHREAD -DH5Eset_auto_vers=1 -DNDEBUG -D_MT -D_REENTRANT -DLINUX -D_GNU_SOURCE -DINCLUDE_TEMPLATE_C -DRH5A64G4 -fexceptions -O2 -march=x86-64 -mfpmath=sse -mmmx -DSPEC_CPU2000_LP64 -Wpointer-arith -Wno-deprecated -Wreturn-type -fmessage-length=0 -I/auto/hfbld/hfbase/HFBASE.20121113.01/hfbase/rh5a64g4/hdr

... results in the following when later the .o is being read by ld:

/usr/bin/ld: rh5a64g4/obj/td5_daterange_dump/td5_daterange_dump.o: invalid string offset 26953528 >= 65 for section .shstrtab'
/usr/bin/ld: rh5a64g4/obj/td5_daterange_dump/td5_daterange_dump.o: invalid string offset 102 >= 65 for section
'
rh5a64g4/obj/td5_daterange_dump/td5_daterange_dump.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status

THE END

Environment

Red Hat Enterprise Linux

5.8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content