aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-02-13 06:36:41 +0000
committerJeff Law <law@redhat.com>1994-02-13 06:36:41 +0000
commit5e829a3440363ab8ceee0b7d273600ee1d1af417 (patch)
treeb246f2983177e32235731b1b80d762f975105589 /bfd/elfcode.h
parent45fc3ed43b351139442c41404c482a7da61465e4 (diff)
downloadgdb-5e829a3440363ab8ceee0b7d273600ee1d1af417.zip
gdb-5e829a3440363ab8ceee0b7d273600ee1d1af417.tar.gz
gdb-5e829a3440363ab8ceee0b7d273600ee1d1af417.tar.bz2
* elfcode.h (elf_map_symbols): Fix typo.
(write_object_contents): Check return values from prep_headers and elf_compute_section_file_positions. (set_section_contents): Likewise.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index b5c8d0b..80f6272 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1434,7 +1434,7 @@ DEFUN (elf_map_symbols, (abfd), bfd * abfd)
sect_syms = (asymbol **) bfd_zalloc (abfd, max_index * sizeof (asymbol *));
elf_section_syms (abfd) = sect_syms;
- if (sect_syms != 0)
+ if (sect_syms == 0)
{
bfd_error = no_memory;
return false;
@@ -2362,8 +2362,10 @@ DEFUN (NAME(bfd_elf,write_object_contents), (abfd), bfd * abfd)
if (abfd->output_has_begun == false)
{
- prep_headers (abfd);
- elf_compute_section_file_positions (abfd);
+ if (prep_headers (abfd) == false)
+ return false;
+ if (elf_compute_section_file_positions (abfd) == false)
+ return false;
abfd->output_has_begun = true;
}
@@ -3192,8 +3194,10 @@ DEFUN (elf_set_section_contents, (abfd, section, location, offset, count),
if (abfd->output_has_begun == false) /* set by bfd.c handler? */
{
/* do setup calculations (FIXME) */
- prep_headers (abfd);
- elf_compute_section_file_positions (abfd);
+ if (prep_headers (abfd) == false)
+ return false;
+ if (elf_compute_section_file_positions (abfd) == false)
+ return false;
abfd->output_has_begun = true;
}