public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* fix missing initialization in Xtensa port of BFD
@ 2005-05-20 20:37 Bob Wilson
  0 siblings, 0 replies; only message in thread
From: Bob Wilson @ 2005-05-20 20:37 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 343 bytes --]

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.


[-- Attachment #2: bfd-xtensa-init.patch --]
[-- Type: text/x-patch, Size: 712 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-20 19:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-20 20:37 fix missing initialization in Xtensa port of BFD Bob Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).