From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22186 invoked by alias); 13 Oct 2004 15:57:48 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 22091 invoked from network); 13 Oct 2004 15:57:47 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 13 Oct 2004 15:57:47 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i9DFvlV3020119 for ; Wed, 13 Oct 2004 11:57:47 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9DFvlr01309; Wed, 13 Oct 2004 11:57:47 -0400 Received: from [172.31.0.98] (vpnuser7.surrey.redhat.com [172.16.9.7]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i9DFvh2m001099; Wed, 13 Oct 2004 11:57:44 -0400 Message-ID: <416D51A7.5000108@redhat.com> Date: Wed, 13 Oct 2004 15:57:00 -0000 From: Nick Clifton User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040803) MIME-Version: 1.0 To: Jan Beulich CC: binutils@sources.redhat.com Subject: Re: stripping symbols needed for relocations References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00206.txt.bz2 Hi Jan, > Wouldn't it make sense to prevent doing such (except when --strip-all) > in the first place (binutils/objcopy.c, filter_symbols) rather than > generating an error message (bfd/elf.c, > _bfd_elf_symbol_from_bfd_symbol)? Or are there specific uses of doing so > that would not result in such an error? I think that the only case where it would not matter is if the relocation is in a section which is going to be discarded. So to answer your first question, yes I think that filter_symbols() should try to preserve reloc-used symbols unless --strip-all or --strip-symbol is in effect. Note that the code does already try to do this by looking for the BSF_KEEP flag. Cheers Nick