From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32315 invoked by alias); 2 Apr 2003 17:44:14 -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 32241 invoked from network); 2 Apr 2003 17:44:12 -0000 Received: from unknown (63.201.54.26) by sources.redhat.com with QMTP; 2 Apr 2003 17:44:12 -0000 Received: (qmail 21580 invoked by uid 10); 2 Apr 2003 17:44:12 -0000 Received: (qmail 18467 invoked by uid 500); 2 Apr 2003 17:44:07 -0000 Mail-Followup-To: gdb@sources.redhat.com, binutils@sources.redhat.com, nickc@redhat.com, drow@mvista.com To: Daniel Jacobowitz Cc: gdb@sources.redhat.com, binutils@sources.redhat.com, nickc@redhat.com Subject: Re: gdb.mi/mi-cli.exp failures References: <3E88A369.6090403@redhat.com> <3E88AE3F.4030005@redhat.com> <3E89AB79.1060700@redhat.com> <3E89C7DB.3080906@redhat.com> <20030401182249.GB24160@nevyn.them.org> <20030402172825.GA32596@nevyn.them.org> From: Ian Lance Taylor Date: Wed, 02 Apr 2003 17:44:00 -0000 In-Reply-To: <20030402172825.GA32596@nevyn.them.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-04/txt/msg00030.txt.bz2 Daniel Jacobowitz writes: > Well, do you have another suggestion for how to approach this? We're > not actually linking; but I need to get the symbols from the input file > into a symbol table with forged offsets in order to apply relocations > against them. Well, I don't really know the context. If you're not linking, then it seems to me that you'll be better off avoiding the linking calls. The add_symbols() call is the first phase of a link, and is expected to be followed by the second phase of a link; despite the name add_symbols(), it doesn't just add symbols to a hash table. If you really just want to put the symbols into a hash table, can you just get the symbol table generically and add them to a hash table yourself? > > Well, I'm afraid that you will have to deal with a number of other > > cases if you want to avoid adding sections to input files. Take a > > look at elf_link_create_dynamic_sections(). > > In any case I can remove the assumption; it's not hard. I assume that > if I save pointers to the sections present before calling > elf_link_add_object_symbols, that they'll still be valid when it > returns? Probably. But I personally don't think the add_symbols() routine needs to make any guarantees at all, except that if you hook up and the sections and call final_link() you will get a linked output file. Maybe we should change the name add_symbols() to initial_link(). Ian