From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20549 invoked by alias); 26 Nov 2011 20:56:56 -0000 Received: (qmail 20541 invoked by uid 22791); 26 Nov 2011 20:56:55 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from shards.monkeyblade.net (HELO shards.monkeyblade.net) (198.137.202.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 Nov 2011 20:56:38 +0000 Received: from localhost (cpe-66-65-61-233.nyc.res.rr.com [66.65.61.233]) (authenticated bits=0) by shards.monkeyblade.net (8.14.4/8.14.4) with ESMTP id pAQKuYuh008213 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 26 Nov 2011 12:56:35 -0800 Date: Sat, 26 Nov 2011 20:56:00 -0000 Message-Id: <20111126.155633.969368403874195827.davem@davemloft.net> To: gdb@sourceware.org Subject: symbol versioning... From: David Miller 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: 2011-11/txt/msg00116.txt.bz2 I figured I'd ask about this here before I get too deep into trying to fix this problem. There are several test cases in the gdb suite which set a breakpoint on 'printf' and then continue until it hits (f.e. annota1 and annota3). These all fail on my sparc systems because my libc.so has two printf symbols, each with a different ELF version. The older version appears first in the dynamic symbol table, so that's the one which GDB uses, and it's therefore not the one the executable will actually call. I can think of two ways to handle this: 1) Look in the executable for dynamic references to the given symbol, and record the symbol version, and this is the version we'll use when doing symbol lookups of that symbol. 2) Set the breakpoint in the PLT entry, and using target specific code that understands how the PLT hopping works, look at how the dynamic linker resolves the symbol and then record that in the minimal symbol table and elsewhere. Has anyone else worked on trying to handle this properly?