aboutsummaryrefslogtreecommitdiff
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
commit330693f5abc336fe08cf5f6fa63e81e5245af6cf (patch)
treefd011de70256c1c24d350aca02ccba547473a3c3 /bfd/coff64-rs6000.c
parent2fff1126bd8bee15125dd064e3dee8dfe8d84b22 (diff)
downloadgdb-330693f5abc336fe08cf5f6fa63e81e5245af6cf.zip
gdb-330693f5abc336fe08cf5f6fa63e81e5245af6cf.tar.gz
gdb-330693f5abc336fe08cf5f6fa63e81e5245af6cf.tar.bz2
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 52d7a22..d66a70e 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;
}