From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13439 invoked by alias); 21 Apr 2008 23:26:39 -0000 Received: (qmail 13428 invoked by uid 22791); 21 Apr 2008 23:26:39 -0000 X-Spam-Check-By: sourceware.org Received: from rv-out-0708.google.com (HELO rv-out-0506.google.com) (209.85.198.249) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 21 Apr 2008 23:26:17 +0000 Received: by rv-out-0506.google.com with SMTP id b17so1055403rvf.48 for ; Mon, 21 Apr 2008 16:26:15 -0700 (PDT) Received: by 10.141.176.4 with SMTP id d4mr3675788rvp.14.1208820375170; Mon, 21 Apr 2008 16:26:15 -0700 (PDT) Received: by 10.141.74.3 with HTTP; Mon, 21 Apr 2008 16:26:15 -0700 (PDT) Message-ID: Date: Tue, 22 Apr 2008 20:09:00 -0000 From: "Ananth Sowda" To: "Ananth Sowda" , gdb@sourceware.org Subject: Re: DSO with relocations and GDB. In-Reply-To: <20080421183241.GA19774@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080419035335.GA22346@caradoc.them.org> <20080421183241.GA19774@caradoc.them.org> 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: 2008-04/txt/msg00190.txt.bz2 > > BFD internal section data structure for .debug_info section is not > > marked with SEC_RELOC in flags and number of relocation records for > > the section is 0. objdump -h output shows that sh_link(points to > > .symtab) and sh_link(points to .debug_info) are set correctly for the > > .rela_debug.info section. > > That's the real problem; you may want to ask the binutils list > or debug how with sh_link/sh_info set there is still no SEC_RELOC > flag. > > -- > Daniel Jacobowitz > CodeSourcery > Thanks for your suggestion. One correction and further observation follows: sh_info points to .debug_info and sh_link is pointing to .dynsym, not .symtab. This is expected outcome in a ET_DYN file. However, the bfd/elf.c code shown below does not handle relocations using .dynsym. /* If this reloc section does not use the main symbol table we don't treat it as a reloc section. BFD can't adequately represent such a section, so at least for now, we don't try. We just present it as a normal section. We also can't use it as a reloc section if it points to the null section, an invalid section, or another reloc section. */ if (hdr->sh_link != elf_onesymtab (abfd) || hdr->sh_info == SHN_UNDEF || (hdr->sh_info >= SHN_LORESERVE && hdr->sh_info <= SHN_HIRESERVE) || hdr->sh_info >= num_sec || elf_elfsections (abfd)[hdr->sh_info]->sh_type == SHT_REL || elf_elfsections (abfd)[hdr->sh_info]->sh_type == SHT_RELA) return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);