Mon Feb 21 09:50:06 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
+ * som.c (som_bfd_count_ar_symbols): Use a pointer and alloca
+ rather than an array of variable size.
+ (som_bfd_fill_in_ar_symbols): Likewise.
+ (som_bfd_ar_write_symbol_stuff): Likewise.
+
* coff-alpha.c (alpha_relocate_section): Rewrite mask and shift
operation to avoid OSF 1.3 cc bug.
* ecoff.c (ecoff_write_object_contents): Make text_size, data_size
symindex *count;
{
unsigned int i;
- unsigned int hash_table[lst_header->hash_size];
+ unsigned int *hash_table =
+ (unsigned int *) alloca (lst_header->hash_size * sizeof (unsigned int));
file_ptr lst_filepos = bfd_tell (abfd) - sizeof (struct lst_header);
/* Don't forget to initialize the counter! */
{
unsigned int i, len;
carsym *set = syms[0];
- unsigned int hash_table[lst_header->hash_size];
- struct som_entry som_dict[lst_header->module_count];
+ unsigned int *hash_table =
+ (unsigned int *) alloca (lst_header->hash_size * sizeof (unsigned int));
+ struct som_entry *som_dict =
+ (struct som_entry *) alloca (lst_header->module_count
+ * sizeof (struct som_entry));
file_ptr lst_filepos = bfd_tell (abfd) - sizeof (struct lst_header);
/* Read in the hash table. The has table is an array of 32bit file offsets
char *strings, *p;
struct lst_symbol_record *lst_syms, *curr_lst_sym;
bfd *curr_bfd = abfd->archive_head;
- unsigned int hash_table[lst.hash_size];
- struct som_entry som_dict[lst.module_count];
- struct lst_symbol_record *last_hash_entry[lst.hash_size];
+ unsigned int *hash_table =
+ (unsigned int *) alloca (lst.hash_size * sizeof (unsigned int));
+ struct som_entry *som_dict =
+ (struct som_entry *) alloca (lst.module_count
+ * sizeof (struct som_entry));
+ struct lst_symbol_record **last_hash_entry =
+ ((struct lst_symbol_record **)
+ alloca (lst.hash_size * sizeof (struct lst_symbol_record *)));
unsigned int curr_som_offset, som_index;
/* Lots of fields are file positions relative to the start