summaryrefslogtreecommitdiff
path: root/bfd/coff64-rs6000.c
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2001-12-31 04:08:23 +0000
committerTom Rix <trix@redhat.com>2001-12-31 04:08:23 +0000
commited1ead0e691bda644d682bb9165072d9753679dd (patch)
tree76f9f52c87c1792e4c61f5585451687f42bc7778 /bfd/coff64-rs6000.c
parent3ba810bdac6a4735884952f0cb4c65ca0d83c2b6 (diff)
downloadgdb-ed1ead0e691bda644d682bb9165072d9753679dd.tar.gz
Fix for xcoff <bigaf> big archive format support.
Diffstat (limited to 'bfd/coff64-rs6000.c')
-rw-r--r--bfd/coff64-rs6000.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index 52d7a226a7a..d66a70e7159 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -143,6 +143,9 @@ static bfd_vma xcoff64_loader_symbol_offset
PARAMS ((bfd *, struct internal_ldhdr *));
static bfd_vma xcoff64_loader_reloc_offset
PARAMS ((bfd *, struct internal_ldhdr *));
+static boolean xcoff64_generate_rtinit
+ PARAMS((bfd *, const char *, const char *));
+
/* coffcode.h needs these to be defined */
/* Internalcoff.h and coffcode.h modify themselves based on these flags. */
@@ -2179,7 +2182,11 @@ xcoff64_generate_rtinit (abfd, init, fini)
data_buffer_size = 0x0058 + initsz + finisz;
data_buffer_size += (data_buffer_size & 7) ? 8 - (data_buffer_size & 7) : 0;
+ data_buffer = NULL;
data_buffer = (bfd_byte *)bfd_malloc (data_buffer_size);
+ if (data_buffer == NULL)
+ return false;
+
memset (data_buffer, 0, data_buffer_size);
if (initsz)
@@ -2337,6 +2344,9 @@ xcoff64_generate_rtinit (abfd, init, fini)
bfd_bwrite (syment_ext, filehdr.f_nsyms * SYMESZ, abfd);
bfd_bwrite (string_table, string_table_size, abfd);
+ free (data_buffer);
+ data_buffer = NULL;
+
return true;
}