public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/2274: loading elf generates error msg
@ 2007-06-18 18:00 drow
0 siblings, 0 replies; 4+ messages in thread
From: drow @ 2007-06-18 18:00 UTC (permalink / raw)
To: c.gers, gdb-prs, nobody
Synopsis: loading elf generates error msg
State-Changed-From-To: open->closed
State-Changed-By: drow
State-Changed-When: Mon Jun 18 18:00:08 2007
State-Changed-Why:
We established that this was a linker or object file format problem.
http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2274
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/2274: loading elf generates error msg
@ 2007-06-18 17:28 Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2007-06-18 17:28 UTC (permalink / raw)
To: nobody; +Cc: gdb-prs
The following reply was made to PR c++/2274; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@false.org>
To: "C.Gers" <c.gers@Jenoptik-si.de>
Cc: gdb-gnats@sourceware.org
Subject: Re: c++/2274: loading elf generates error msg
Date: Mon, 18 Jun 2007 13:19:14 -0400
On Mon, Jun 18, 2007 at 06:59:13PM +0200, C.Gers wrote:
> I think the linker/debugger combination was verry smart because the same stuff worked with
> gcc 3.4.6 / gdb 6.3. I was able to debug mixed modul code without
> problems. Now gcc 4.1.1 gdb 6.5 combination is not able to handle
> the same thing ? I could not remove debug info because i need it to
> debug my prog !
Then you will have to figure out what is going on. There is
absolutely no way that GDB can handle a DWARF section containing both
big and little endian data; the underlying format is endian-sensitive.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/2274: loading elf generates error msg
@ 2007-06-18 16:08 Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2007-06-18 16:08 UTC (permalink / raw)
To: nobody; +Cc: gdb-prs
The following reply was made to PR c++/2274; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@false.org>
To: c.gers@jenoptik-si.de
Cc: gdb-gnats@sources.redhat.com
Subject: Re: c++/2274: loading elf generates error msg
Date: Mon, 18 Jun 2007 12:08:00 -0400
On Mon, Jun 18, 2007 at 03:54:55PM -0000, c.gers@jenoptik-si.de wrote:
> i think this is a problem of mixed little and big endian modules in
my app. The boot module for the ppc has to be in big endian. After
init i switch endianess and jum into other modules now compiled as
little endian.
This is not a GDB bug; I suggest you remove all debug info from the
little endian files, since your final file is presumably big-endian.
Otherwise you will need a very smart linker.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* c++/2274: loading elf generates error msg
@ 2007-06-18 15:58 c.gers
0 siblings, 0 replies; 4+ messages in thread
From: c.gers @ 2007-06-18 15:58 UTC (permalink / raw)
To: gdb-gnats
>Number: 2274
>Category: c++
>Synopsis: loading elf generates error msg
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Jun 18 15:58:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: c.gers@jenoptik-si.de
>Release: unknown-1.0
>Organization:
>Environment:
gcc 4.1.1, binutils 2.16.0 cross development pc as host ppc as target (xilinx environment + tools)
>Description:
loading an elf file causes the message :
Error: Dwarf Error: wrong version in compilation unit header (is 512, should be 2) [in module /cygdrive/x/Projekte/VCI_2_Project/FPGAs/EDK/_BL/BL_PPC_0/executable.elf]
i think this is a problem of mixed little and big endian modules in my app. The boot module for the ppc has to be in big endian. After init i switch endianess and jum into other modules now compiled as little endian.
I tried readelf -wi and saw :
The section .debug_info contains:
Compilation Unit @ offset 0x0:
Length 20300443136
Version 512
:
readelf -a brings up
.debug_info offset = 021913
:
Now i tried to repair the fault :
Hexeditor offset 021913
00 00 00 79 00 02 -> changed to 79 00 00 00 02 00
and heureca things work again.
i dont know if this is a problem of gdb or of the compiler/linker so please forward this information if you think other people shoud handle this.
tks
>How-To-Repeat:
Use readelf -wi executable.elf
>Fix:
Hexeditor offset 021913
00 00 00 79 00 02 -> changed to 79 00 00 00 02 00
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-06-18 18:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-18 18:00 c++/2274: loading elf generates error msg drow
-- strict thread matches above, loose matches on Subject: below --
2007-06-18 17:28 Daniel Jacobowitz
2007-06-18 16:08 Daniel Jacobowitz
2007-06-18 15:58 c.gers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).