From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8389 invoked by alias); 10 Dec 2003 16:09:18 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 8380 invoked from network); 10 Dec 2003 16:09:16 -0000 Received: from unknown (HELO ata.cs.hacettepe.edu.tr) (193.140.236.6) by sources.redhat.com with SMTP; 10 Dec 2003 16:09:16 -0000 Received: from ata.cs.hacettepe.edu.tr (ata.cs.hacettepe.edu.tr [127.0.0.1]) by ata.cs.hacettepe.edu.tr (8.12.8/8.11.6) with ESMTP id hBAG9D6P029582 for ; Wed, 10 Dec 2003 18:09:13 +0200 Received: (from ibr@localhost) by ata.cs.hacettepe.edu.tr (8.12.8/8.12.8/Submit) id hBAG9Cnr029581 for gdb@sources.redhat.com; Wed, 10 Dec 2003 18:09:12 +0200 Date: Wed, 10 Dec 2003 16:09:00 -0000 From: Baurjan Ismagulov To: gdb@sources.redhat.com Subject: Re: optind Message-ID: <20031210160910.GM23712@ata.cs.hacettepe.edu.tr> Mail-Followup-To: gdb@sources.redhat.com References: <20031210142045.GL23712@ata.cs.hacettepe.edu.tr> <20031210144917.GA9115@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031210144917.GA9115@nevyn.them.org> User-Agent: Mutt/1.5.4i X-SW-Source: 2003-12/txt/msg00162.txt.bz2 Hello, Daniel! That was fast 8) , thanks much! On Wed, Dec 10, 2003 at 09:49:18AM -0500, Daniel Jacobowitz wrote: > The symbol exists in multiple shared objects... Do you mean weak symbols within libc, or multiple definitions in other libraries? ldd shows libc.so.6 and ld-linux.so.2, and nm -D shows that optind exists only in libc. I've also searched glibc 2.3.2 sources and couldn't find multiple optind definitions. Where do you think they are defined? > ... and gdb gets confused about which copy to print. I thought they were resolved during link, and the resulting binary had only one copy. From what you have said I understand the following: each copy declared in different objects gets linked and is preserved in the data section(s), all references to it are set to one address chosen as "main" one, and there is no way to find out which one this "main" is. Is this right? FWIW, I've also tested with gdb 6.0, the result was the same. With kind regards, Baurjan.