This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
fix missing initialization in Xtensa port of BFD
- From: Bob Wilson <bwilson at tensilica dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 20 May 2005 12:53:40 -0700
- Subject: fix missing initialization in Xtensa port of BFD
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 <bob.wilson@acm.org>
* elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
xtensa_default_isa is initialized.
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