This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][ARM] Add missing initialization of stub hash entry fields.

It looks obvious, indeed. (don't consider this as an approval, for I am not entitled to do so ;-)

Maybe a valgrind pass would help catching other similar missing initializations?


On 08.07.2009 20:43, Doug Kwan (???) wrote:

    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

OK to check in?


2009-07-08 Doug Kwan <>

	* 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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]