From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24870 invoked by alias); 21 Apr 2004 07:09:12 -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 24858 invoked from network); 21 Apr 2004 07:09:09 -0000 Received: from unknown (HELO gateway.sf.frob.com) (64.81.54.130) by sources.redhat.com with SMTP; 21 Apr 2004 07:09:09 -0000 Received: from magilla.sf.frob.com (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id EAAE8357B; Wed, 21 Apr 2004 00:09:08 -0700 (PDT) Received: from magilla.sf.frob.com (localhost.localdomain [127.0.0.1]) by magilla.sf.frob.com (8.12.9/8.12.9) with ESMTP id i3L798Oi002976; Wed, 21 Apr 2004 00:09:08 -0700 Received: (from roland@localhost) by magilla.sf.frob.com (8.12.9/8.12.9/Submit) id i3L795Cx002971; Wed, 21 Apr 2004 00:09:05 -0700 Date: Wed, 21 Apr 2004 10:37:00 -0000 Message-Id: <200404210709.i3L795Cx002971@magilla.sf.frob.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Randolph Chung Cc: gdb@sources.redhat.com Subject: Re: add-symbol-file-from-memory patch breaks non-elf targets? In-Reply-To: Randolph Chung's message of Tuesday, 20 April 2004 21:58:17 -0700 <20040421045817.GE17842@tausq.org> X-Windows: don't get frustrated without it. X-SW-Source: 2004-04/txt/msg00118.txt.bz2 When this was all discussed originally (deciding the bfd interface), people didn't seem concerned about non-ELF targets and seemed to prefer avoiding a adding a bfd target function rather than just an ELF-specific interface. Unless bfd maintainers change their minds, that's what we have for the bfd interface--so callers of it are inherently ELF-specific. In gdb, I could not find, and still cannot find, a reasonable way to conditionalize something at compile time on "will there be ELF". Hence the runtime check for bfd_target_elf_flavour, and the unconditional link-time reference to bfd_elf_bfd_from_remote_memory. AFAICT, elfread.c is always built into gdb even for non-ELF targets, as a further example telling me there really is no good way to conditionalize this correctly. It happens not to use any bfd_elf_* interfaces and so links ok and is just dead code in ELFless configurations. I am open to suggestions. Thanks, Roland