This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
elf-eh-frame.c tidy
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Mon, 2 Jul 2007 16:21:36 +0930
- Subject: elf-eh-frame.c tidy
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
symsec != NULL tests.
Index: bfd/elf-eh-frame.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-eh-frame.c,v
retrieving revision 1.59
diff -u -p -r1.59 elf-eh-frame.c
--- bfd/elf-eh-frame.c 25 May 2007 23:06:11 -0000 1.59
+++ bfd/elf-eh-frame.c 2 Jul 2007 06:15:26 -0000
@@ -712,17 +712,18 @@ _bfd_elf_discard_section_eh_frame
sym = &cookie->locsyms[r_symndx];
sym_sec = (bfd_section_from_elf_index
(abfd, sym->st_shndx));
- if (sym_sec != NULL
- && sym_sec->kept_section != NULL)
- sym_sec = sym_sec->kept_section;
- if (sym_sec != NULL
- && sym_sec->output_section != NULL)
+ if (sym_sec != NULL)
{
- val = (sym->st_value
- + sym_sec->output_offset
- + sym_sec->output_section->vma);
- cie->personality.val = val;
- cie->local_personality = 1;
+ if (sym_sec->kept_section != NULL)
+ sym_sec = sym_sec->kept_section;
+ if (sym_sec->output_section != NULL)
+ {
+ val = (sym->st_value
+ + sym_sec->output_offset
+ + sym_sec->output_section->vma);
+ cie->personality.val = val;
+ cie->local_personality = 1;
+ }
}
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre