Hi,
This patch initializes the target_addend and the orig_insn fields
of the newly created entry in stub_hash_entry. Previously, some
stubs pointed to random locations because target_addend was not
initialized. I ran the binutils testsuites for target arm-none-eabi
on host x86_64-unknown-linux-gnu. The patch did not introduce any new
regressions.
OK to check in?
-Doug
2009-07-08 Doug Kwan <dougkwan@google.com>
* elf32-arm.c (stub_hash_newfunc): Initialize fields
target_addend and orig_insn.
----------------------------------------------------
Index: bfd/elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.203
diff -u -p -r1.203 elf32-arm.c
--- bfd/elf32-arm.c 1 Jul 2009 14:48:26 -0000 1.203
+++ bfd/elf32-arm.c 8 Jul 2009 18:33:59 -0000
@@ -2716,6 +2716,8 @@ stub_hash_newfunc (struct bfd_hash_entry
eh->stub_offset = 0;
eh->target_value = 0;
eh->target_section = NULL;
+ eh->target_addend = 0;
+ eh->orig_insn = 0;
eh->stub_type = arm_stub_none;
eh->stub_size = 0;
eh->stub_template = NULL;