* 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.
This commit is contained in:
parent
ef76742fc5
commit
2ab0b7f3e3
@ -5,6 +5,11 @@ Mon Feb 21 10:12:02 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||
|
||||
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
|
||||
|
21
bfd/som.c
21
bfd/som.c
@ -4250,7 +4250,8 @@ som_bfd_count_ar_symbols (abfd, lst_header, count)
|
||||
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! */
|
||||
@ -4327,8 +4328,11 @@ som_bfd_fill_in_ar_symbols (abfd, lst_header, syms)
|
||||
{
|
||||
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
|
||||
@ -4685,9 +4689,14 @@ som_bfd_ar_write_symbol_stuff (abfd, nsyms, string_size, lst)
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user