From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26402 invoked by alias); 17 Oct 2008 15:22:08 -0000 Received: (qmail 26390 invoked by uid 22791); 17 Oct 2008 15:22:07 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate6.de.ibm.com (HELO mtagate6.de.ibm.com) (195.212.29.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 17 Oct 2008 15:21:23 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate6.de.ibm.com (8.13.8/8.13.8) with ESMTP id m9HFKdF9609540 for ; Fri, 17 Oct 2008 15:20:39 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m9HFKckR3309616 for ; Fri, 17 Oct 2008 17:20:38 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m9HFKcH5029412 for ; Fri, 17 Oct 2008 17:20:38 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m9HFKcns029400; Fri, 17 Oct 2008 17:20:38 +0200 Message-Id: <200810171520.m9HFKcns029400@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 17 Oct 2008 17:20:38 +0200 Subject: Re: linkmap from PT_DYNAMIC To: aristovski@qnx.com (Aleksandar Ristovski) Date: Fri, 17 Oct 2008 15:22:00 -0000 From: "Ulrich Weigand" Cc: gdb@sources.redhat.com In-Reply-To: from "Aleksandar Ristovski" at Oct 16, 2008 04:56:33 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2008-10/txt/msg00068.txt.bz2 Aleksandar Ristovski wrote: > Currently GDB will scan dyntags from dynamic section only > (solib-svr4.c:scan_dyntag). However, if the section header > does not exist (for example it has been stripped away) then > gdb gives up, even though the section will be present in the > form of dynamic segment. > > When examining core files when having only a stripped > executable (stripped in such a way that it does not contain > section headers), gdb will not be able to do much. > > The attached patch will resort to using PT_DYNAMIC to get > dynamic section and scan dyntag. The patch will only change > default (current) behaviour if bfd_get_section_by_name > returns NULL. Well, the scan_dyntag_auxv routine I added already does attempt to access PT_DYNAMIC if there is no .dynamic section. In fact, it should work even if you do not have any executable file at all, as it directly reads the program headers from the target. Is there some reason why this doesn't work for you? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com