aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-07-02 06:51:57 +0000
committerAlan Modra <amodra@gmail.com>2007-07-02 06:51:57 +0000
commit3e5484dbb9c68bd737de32da1e2c7b478dfc3740 (patch)
tree2b92f6dcf631a109fdcbf5179e315e1243fd6b57 /bfd
parent08a40648e532a332549cc0ad0ecd8cbf69ec222a (diff)
downloadgdb-3e5484dbb9c68bd737de32da1e2c7b478dfc3740.zip
gdb-3e5484dbb9c68bd737de32da1e2c7b478dfc3740.tar.gz
gdb-3e5484dbb9c68bd737de32da1e2c7b478dfc3740.tar.bz2
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
symsec != NULL tests.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf-eh-frame.c21
2 files changed, 16 insertions, 10 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 751c993..6994b7f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2007-07-02 Alan Modra <amodra@bigpond.net.au>
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
+ symsec != NULL tests.
+
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
+
PR 4712
* elf.c (assign_file_positions_for_load_sections): Adjust lma
by p_vaddr_offset.
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 4fc91d2..092c2c5 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;
+ }
}
}