bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about "invalid string offset" & "could not read symbols: Ma


From: Roger Moore
Subject: Re: question about "invalid string offset" & "could not read symbols: Malformed archive" linker errors (fwd)
Date: Wed, 20 Aug 2008 10:31:46 -0600 (MDT)

Hi,

We built the libxvtmapi.a ourselves.  Yes, I've tried deleting it and 
rebuilding but I still get the file format not recognized error message.  
The following lines show the size of the library file:

address@hidden testapp]$ ls -l 
outdir/debug/libxvtxmapi.a 
-rw-rw-r-- 1 roger roger 358363 Aug 20 10:09 outdir/debug/libxvtxmapi.a

The build procedure seems to work fine otherwise, though there are some 
warning messages.  That said, I haven't seen any warning messages that 
seem to be related to this issue.

Here is what I get when I attempt for perform an object dump:

address@hidden testapp]$ objdump -p 
outdir/debug/libxvtxmapi.a 
In archive outdir/debug/libxvtxmapi.a:
objdump: tapp.o: File format not recognized
objdump: outdir/debug/libxvtxmapi.a: Malformed archive

Here is the tapp.o file:

address@hidden testapp]$ find . -name tapp.o
./xvtdsp55/linux_x86/src/ptk/CMakeFiles/xvtxmapid.dir/tapp.o

XVT is a platform-independent API that we use for our 
application GUI.  We have all the source code for this API.  Any 
suggestions would be greatly appreciated.

Sincerely,

Roger

---------- Forwarded message ----------
Date: Wed, 20 Aug 2008 08:55:25 +0100
From: Nick Clifton <address@hidden>
To: Roger Moore <address@hidden>
Subject: Re: question about "invalid string offset" & "could not read
    symbols: Malformed archive" linker errors

Hi Roger,

> g++ -g ../outdir/debug/testappwin/testappwin.o -o
[...]
> ../outdir/debug/libxvtxmapi.a: could not read symbols: File format not 
> recognized

> How do you tell why a file format is not recognized?  Do you have any 
> suggestions?

Did you build the libxvtmapi.a archive yourself or is it one that has 
been provided to you ?  If you built it yourself, can you try deleting 
it and rebuilding it, and were there any problems during the build 
procedure ?

How big is it ?  (Sometimes a problem in a build process can create a 
zero-length file, which the linker cannot then process).

Try running this command to find out more about the object files inside 
the archive:

   objdump -p ../outdir/debug/libxvtmapi.a

Is the file format of the object files what you would expect it to be ?

Cheers
   Nick

---------- Forwarded message ----------
Date: Mon, 18 Aug 2008 11:24:30 -0600 (MDT)
From: Roger Moore <address@hidden>
To: address@hidden
Subject: question about "invalid string offset" & "could not read symbols:
    Malformed archive" linker errors

Hi,

Presently I am attempting to build an application on Linux with GNU ld
version 2.17.50.0.6-5.el5 20061020.  When I execute make, it compiles but
when it reaches the linker I receive the following error messages,  

make[1]: Entering directory
`/mnt/hgfs/pclinux/trunk/branches/testapp-xvt5.8update/testappwin'
make[1]: Warning: File `../outdir/debug/libtestappwin.a' has modification
time 1.7e+03 s in the future
g++ -g ../outdir/debug/testappwin/testappwin.o -o
../outdir/debug/testappwin.exe -L../outdir/debug -L../winport
-L../outdir/debug/xvtlib -L/usr/X11R6/lib -L../license/lib/license -lflow
-ltestappwin -lcompress -lgeom3d -ltape -ltiff -lfreetype -lwinport
-lxispread -lpwr -lrw -lxvtxmapi -lxvtxmhb500 -lxvtxmba500 -lxvtxmhi500
-lnxpro -lm -lGL -lGLU -lX11 -lXm -llicense -lpthread -lstdc++
/usr/bin/ld: ../outdir/debug/libxvtxmapi.a(tapp.o): invalid string offset
369098752 >= 0 for section `'
/usr/bin/ld: ../outdir/debug/libxvtxmapi.a(tapp.o): invalid string offset
33554432 >= 0 for section `'
/usr/bin/ld: ../outdir/debug/libxvtxmapi.a(tapp.o): invalid string offset
134217728 >= 0 for section `'
/usr/bin/ld: ../outdir/debug/libxvtxmapi.a(tapp.o): invalid string offset
352321536 >= 0 for section `'
../outdir/debug/libxvtxmapi.a: could not read symbols: Malformed archive
collect2: ld returned 1 exit status
make[1]: *** [../outdir/debug/testappwin.exe] Error 1
make[1]: Leaving directory
`/mnt/hgfs/pclinux/trunk/branches/testapp-xvt5.8update/testappwin'
make: *** [debug] Error 2
address@hidden testapp-xvt5.8update]$

Do you have any suggestions as to what may the cause of the problem?
Please let me know if you want to see some of the source from tapp.c.

Any help at all would be greately appreciated.  Thank you for your time 
and I look forward to hearing from you.

Sincerely,

Roger











reply via email to

[Prev in Thread] Current Thread [Next in Thread]