From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8857 invoked by alias); 17 Oct 2006 20:53:34 -0000 Received: (qmail 8846 invoked by uid 22791); 17 Oct 2006 20:53:33 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 17 Oct 2006 20:53:27 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GZvwC-0003NQ-PE; Tue, 17 Oct 2006 16:53:24 -0400 Date: Tue, 17 Oct 2006 20:53:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Cc: Eli Zaretskii , Andreas Schwab , brobecker@adacore.com, mark.kettenis@xs4all.nl Subject: Re: [rfc] Clarify shared library warning Message-ID: <20061017205324.GA12643@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org, Eli Zaretskii , Andreas Schwab , brobecker@adacore.com, mark.kettenis@xs4all.nl References: <20061010213438.GC1059@adacore.com> <20061011133756.GB25164@nevyn.them.org> <9704.82.92.89.47.1160598745.squirrel@webmail.xs4all.nl> <20061011203928.GA9409@nevyn.them.org> <20061012055231.GG1059@adacore.com> <20061013151828.GA13648@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061013151828.GA13648@nevyn.them.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00190.txt.bz2 On Fri, Oct 13, 2006 at 11:18:28AM -0400, Daniel Jacobowitz wrote: > Does anyone dislike this version? If not, I will commit it, and > someone can expand on it in the manual if necessary (probably with a > reference to solib-absolute-prefix). > > warning: .dynamic section for "/lib/libc.so.6" is not at the expected > address (wrong library or version mismatch?) I've checked in this patch; feel free to improve it by further patches :-) -- Daniel Jacobowitz CodeSourcery 2006-10-17 Daniel Jacobowitz * solib-svr4.c (LM_ADDR_CHECK): Suggest shared library mismatch. Index: solib-svr4.c =================================================================== RCS file: /cvs/src/src/gdb/solib-svr4.c,v retrieving revision 1.58 diff -u -p -r1.58 solib-svr4.c --- solib-svr4.c 18 May 2006 20:38:56 -0000 1.58 +++ solib-svr4.c 17 Oct 2006 20:51:56 -0000 @@ -187,9 +187,6 @@ LM_ADDR_CHECK (struct so_list *so, bfd * if (dynaddr + l_addr != l_dynaddr) { - warning (_(".dynamic section for \"%s\" " - "is not at the expected address"), so->so_name); - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) { Elf_Internal_Ehdr *ehdr = elf_tdata (abfd)->elf_header; @@ -218,9 +215,16 @@ LM_ADDR_CHECK (struct so_list *so, bfd * if ((l_addr & align) == 0 && ((dynaddr - l_dynaddr) & align) == 0) { l_addr = l_dynaddr - dynaddr; + + warning (_(".dynamic section for \"%s\" " + "is not at the expected address"), so->so_name); warning (_("difference appears to be caused by prelink, " "adjusting expectations")); } + else + warning (_(".dynamic section for \"%s\" " + "is not at the expected address " + "(wrong library or version mismatch?)"), so->so_name); } set_addr: