From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17965 invoked by alias); 20 May 2005 19:53:50 -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 17840 invoked from network); 20 May 2005 19:53:41 -0000 Received: from unknown (HELO mailapp.tensilica.com) (65.205.227.29) by sourceware.org with SMTP; 20 May 2005 19:53:41 -0000 Received: from localhost ([127.0.0.1] ident=amavis) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1DZDYy-0003WH-So for binutils@sources.redhat.com; Fri, 20 May 2005 12:53:40 -0700 Received: from mailapp.tensilica.com ([127.0.0.1]) by localhost (mailapp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13463-02 for ; Fri, 20 May 2005 12:53:40 -0700 (PDT) Received: from heron.hq.tensilica.com ([192.168.11.123]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1DZDYy-0003WB-Ge for binutils@sources.redhat.com; Fri, 20 May 2005 12:53:40 -0700 Received: from [192.168.11.123] (heron.hq.tensilica.com [192.168.11.123]) by heron.hq.tensilica.com (8.13.1/8.13.1) with ESMTP id j4KJretF025144 for ; Fri, 20 May 2005 12:53:40 -0700 Message-ID: <428E4044.5010706@tensilica.com> Date: Fri, 20 May 2005 20:37:00 -0000 From: Bob Wilson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020 MIME-Version: 1.0 To: binutils@sources.redhat.com Subject: fix missing initialization in Xtensa port of BFD Content-Type: multipart/mixed; boundary="------------020503010404050002030406" X-SW-Source: 2005-05/txt/msg00624.txt.bz2 This is a multi-part message in MIME format. --------------020503010404050002030406 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 343 I noticed today that addr2line crashed when I ran it on an unrelocated Xtensa object file. The Xtensa ISA information was not being initialized. I've committed this patch on the mainline to fix it. 2005-05-20 Bob Wilson * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that xtensa_default_isa is initialized. --------------020503010404050002030406 Content-Type: text/x-patch; name="bfd-xtensa-init.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bfd-xtensa-init.patch" Content-length: 712 Index: elf32-xtensa.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v retrieving revision 1.48 diff -u -p -r1.48 elf32-xtensa.c --- elf32-xtensa.c 14 May 2005 00:26:06 -0000 1.48 +++ elf32-xtensa.c 20 May 2005 19:48:14 -0000 @@ -1855,6 +1855,9 @@ bfd_elf_xtensa_reloc (bfd *abfd, asection *reloc_target_output_section; bfd_boolean is_weak_undef; + if (!xtensa_default_isa) + xtensa_default_isa = xtensa_isa_init (0, 0); + /* ELF relocs are against symbols. If we are producing relocatable output, and the reloc is against an external symbol, the resulting reloc will also be against the same symbol. In such a case, we --------------020503010404050002030406--