From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11550 invoked by alias); 1 Jul 2010 15:43:45 -0000 Received: (qmail 11540 invoked by uid 22791); 1 Jul 2010 15:43:44 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_MIME_NO_TEXT,T_RP_MATCHES_RCVD,T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Jul 2010 15:43:39 +0000 Received: (qmail 17077 invoked from network); 1 Jul 2010 15:43:37 -0000 Received: from unknown (HELO dirichlet.schwinge.homeip.net) (thomas@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Jul 2010 15:43:37 -0000 From: Thomas Schwinge To: Jan Kratochvil Cc: Andrew Stubbs , gdb@sourceware.org Subject: Re: debug problem with prelinked libraries References: <4BE16915.7080501@codesourcery.com> <20100505143213.GA4735@caradoc.them.org> <4BE187D8.4050804@codesourcery.com> <20100507132310.GA6374@host0.dyn.jankratochvil.net> Date: Thu, 01 Jul 2010 15:43:00 -0000 In-Reply-To: <20100507132310.GA6374@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Fri, 7 May 2010 15:23:10 +0200") Message-ID: <87sk431a3j.fsf@dirichlet.schwinge.homeip.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-07/txt/msg00002.txt.bz2 --=-=-= Content-length: 2718 Hello! On 2010-05-07 13:23, Jan Kratochvil wrote: > On Wed, 05 May 2010 16:59:36 +0200, Andrew Stubbs wrote: >> > prelink includes code to manipulate the contents of the debug info. > [...] >> Maybe prelink has failed to relocate the debug info in this case? > > The attached patch should fix it. > > Although SHT_MIPS_DWARF value should be recognized only for e_machine as > EM_MIPS or EM_MIPS_RS3_LE or EM_MIPS_X? Or are there some other rules? > --- prelink/src/dso.c-orig 2010-04-13 16:41:15.000000000 +0200 > +++ prelink/src/dso.c 2010-05-07 15:16:25.000000000 +0200 > @@ -1381,6 +1381,7 @@ adjust_dso (DSO *dso, GElf_Addr start, G > switch (dso->shdr[i].sh_type) > { > case SHT_PROGBITS: > + case SHT_MIPS_DWARF: > name = strptr (dso, dso->ehdr.e_shstrndx, dso->shdr[i].sh_name); > if (strcmp (name, ".stab") == 0 > && adjust_stabs (dso, i, start, adjust)) Unfortunately, this patch causes the following regression for about every test of the prelink testsuite, in -mabi=64 configurations (only): mips-wrs-linux-gnu-prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=. --dynamic-linker=./ld.so.1 -vm ./reloc1 Laying out 4 libraries in virtual address space 0000005800000000-0000009800000000 Assigned virtual address space slots for libraries: ./ld.so.1 0000005800000000-0000005800032328 ./libc.so.6 0000005800040000-00000058001cbdb0 ./reloc1lib1.so 00000058001d0000-00000058001e0b10 ./reloc1lib2.so 00000058001f0000-00000058002009d0 Prelinking /scratch/thomas/issue8927/obj/test-4.3a-294-mips-wrs-linux-gnu/host-i686-pc-linux-gnu/mabi_64/prelink.d/ld-2.8.so mips-wrs-linux-gnu-prelink: /scratch/thomas/issue8927/obj/test-4.3a-294-mips-wrs-linux-gnu/host-i686-pc-linux-gnu/mabi_64/prelink.d/ld-2.8.so: 64-bit DWARF not supported mips-wrs-linux-gnu-prelink: Could not prelink ./libc.so.6 because its dependency ./ld.so.1 could not be prelinked mips-wrs-linux-gnu-prelink: Could not prelink ./reloc1lib1.so because its dependency ./libc.so.6 could not be prelinked mips-wrs-linux-gnu-prelink: Could not prelink ./reloc1lib2.so because its dependency ./reloc1lib1.so could not be prelinked mips-wrs-linux-gnu-prelink: Could not prelink ./reloc1 because its dependency ./reloc1lib2.so could not be prelinked I'll try to hunt down where this ``64-bit DWARF not supported'' is coming from, and why handling SHT_MIPS_DWARF in prelink can be responsible for it, but if anyone has any ideas already, please tell me. Regards, Thomas --=-=-= Content-Type: application/pgp-signature Content-length: 197 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkwst6AACgkQC9ZuxbdEiFgaQgCg2znGHZSk1Ypuqs2T2/t7MABc zNsAoIsIdlCpsmxVt2wLICV36iyQMfdl =VuL0 -----END PGP SIGNATURE----- --=-=-=--