From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24348 invoked by alias); 18 Jun 2007 15:58:02 -0000 Received: (qmail 24332 invoked by uid 71); 18 Jun 2007 15:58:01 -0000 Resent-Date: 18 Jun 2007 15:58:01 -0000 Resent-Message-ID: <20070618155801.24331.qmail@sourceware.org> Resent-From: gdb-gnats@sources.redhat.com (GNATS Filer) Resent-To: nobody@sources.redhat.com Resent-Cc: gdb-prs@sources.redhat.com Resent-Reply-To: gdb-gnats@sources.redhat.com, c.gers@jenoptik-si.de Received: (qmail 23033 invoked by uid 48); 18 Jun 2007 15:54:55 -0000 Message-Id: <20070618155455.23032.qmail@sourceware.org> Date: Mon, 18 Jun 2007 15:58:00 -0000 From: c.gers@jenoptik-si.de Reply-To: c.gers@jenoptik-si.de To: gdb-gnats@sources.redhat.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/2274: loading elf generates error msg Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2007-q2/txt/msg00074.txt.bz2 >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: