From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1351 invoked by alias); 3 Sep 2009 13:03:15 -0000 Received: (qmail 1167 invoked by uid 22791); 3 Sep 2009 13:03:14 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org Received: from ey-out-1920.google.com (HELO ey-out-1920.google.com) (74.125.78.144) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Sep 2009 13:03:09 +0000 Received: by ey-out-1920.google.com with SMTP id 4so911461eyg.0 for ; Thu, 03 Sep 2009 06:03:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.2.78 with SMTP id 56mr442702wee.2.1251982985817; Thu, 03 Sep 2009 06:03:05 -0700 (PDT) Date: Thu, 03 Sep 2009 13:03:00 -0000 Message-ID: Subject: Manually checking build id in elf files From: Alex Bennee To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes 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: 2009-09/txt/msg00037.txt.bz2 Hi, I'm trying to track down a weird failure in oprofile due to bad CRC's in debug files [1]. As has been noted in the bug report gdb should complain. However I'm able to load the symbol-file with nary a harsh word from gdb. The manual says gdb uses one of two methods to verify a symbol file is the correct one. The second method mentions "Build Id" and the ld man page seems to imply I should see a "note" section in the library to indicate the build id. I'd like to manually check it but readelf doesn't show any such notes: vnms@vnms:~$ readelf -n /usr/lib/libcairo.so.2.17.3 vnms@vnms:~$ readelf -n /usr/lib/debug/usr/lib/libcairo.so.2.17.3 vnms@vnms:~$ Am I missing something? Is there a way to use readelf to read this information? [1] https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/415424 -- Alex, homepage: http://www.bennee.com/~alex/ http://www.half-llama.co.uk