summaryrefslogtreecommitdiff
path: root/bfd/elf-eh-frame.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2007-07-02 06:51:57 +0000
committerAlan Modra <amodra@bigpond.net.au>2007-07-02 06:51:57 +0000
commitfb113884bc39e25de2309d7128e0573a26651644 (patch)
treeea19dda88d52e2ee47942886e32a1d019a5a6574 /bfd/elf-eh-frame.c
parentd7435fc5857f86d6118c2b869f4196dfab7235b9 (diff)
downloadbinutils-redhat-fb113884bc39e25de2309d7128e0573a26651644.tar.gz
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
symsec != NULL tests.
Diffstat (limited to 'bfd/elf-eh-frame.c')
-rw-r--r--bfd/elf-eh-frame.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 4fc91d2c77..092c2c57ec 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -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;
+ }
}
}