1409
1409
/* Prototypes for functions defined in this file. */
1411
static void add_varray_page PARAMS ((varray_t *vp));
1412
static symint_t add_string PARAMS ((varray_t *vp,
1413
struct hash_control *hash_tbl,
1415
shash_t **ret_hash));
1416
static localsym_t *add_ecoff_symbol PARAMS ((const char *str, st_t type,
1417
sc_t storage, symbolS *sym,
1418
bfd_vma addend, symint_t value,
1420
static symint_t add_aux_sym_symint PARAMS ((symint_t aux_word));
1421
static symint_t add_aux_sym_rndx PARAMS ((int file_index,
1422
symint_t sym_index));
1423
static symint_t add_aux_sym_tir PARAMS ((type_info_t *t,
1425
thash_t **hash_tbl));
1426
static tag_t *get_tag PARAMS ((const char *tag, localsym_t *sym,
1428
static void add_unknown_tag PARAMS ((tag_t *ptag));
1429
static void add_procedure PARAMS ((char *func));
1430
static void add_file PARAMS ((const char *file_name, int indx, int fake));
1411
static void add_varray_page (varray_t *vp);
1412
static symint_t add_string (varray_t *vp,
1413
struct hash_control *hash_tbl,
1415
shash_t **ret_hash);
1416
static localsym_t *add_ecoff_symbol (const char *str, st_t type,
1417
sc_t storage, symbolS *sym,
1418
bfd_vma addend, symint_t value,
1420
static symint_t add_aux_sym_symint (symint_t aux_word);
1421
static symint_t add_aux_sym_rndx (int file_index, symint_t sym_index);
1422
static symint_t add_aux_sym_tir (type_info_t *t,
1424
thash_t **hash_tbl);
1425
static tag_t *get_tag (const char *tag, localsym_t *sym, bt_t basic_type);
1426
static void add_unknown_tag (tag_t *ptag);
1427
static void add_procedure (char *func);
1428
static void add_file (const char *file_name, int indx, int fake);
1431
1429
#ifdef ECOFF_DEBUG
1432
static char *sc_to_string PARAMS ((sc_t storage_class));
1433
static char *st_to_string PARAMS ((st_t symbol_type));
1430
static char *sc_to_string (sc_t storage_class);
1431
static char *st_to_string (st_t symbol_type);
1435
static void mark_stabs PARAMS ((int));
1436
static char *ecoff_add_bytes PARAMS ((char **buf, char **bufend,
1437
char *bufptr, unsigned long need));
1433
static void mark_stabs (int);
1434
static char *ecoff_add_bytes (char **buf, char **bufend,
1435
char *bufptr, unsigned long need);
1438
1436
static unsigned long ecoff_padding_adjust
1439
PARAMS ((const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1440
unsigned long offset, char **bufptrptr));
1437
(const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1438
unsigned long offset, char **bufptrptr);
1441
1439
static unsigned long ecoff_build_lineno
1442
PARAMS ((const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1443
unsigned long offset, long *linecntptr));
1440
(const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1441
unsigned long offset, long *linecntptr);
1444
1442
static unsigned long ecoff_build_symbols
1445
PARAMS ((const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1446
unsigned long offset));
1443
(const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1444
unsigned long offset);
1447
1445
static unsigned long ecoff_build_procs
1448
PARAMS ((const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1449
unsigned long offset));
1446
(const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1447
unsigned long offset);
1450
1448
static unsigned long ecoff_build_aux
1451
PARAMS ((const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1452
unsigned long offset));
1453
static unsigned long ecoff_build_strings PARAMS ((char **buf, char **bufend,
1454
unsigned long offset,
1449
(const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1450
unsigned long offset);
1451
static unsigned long ecoff_build_strings (char **buf, char **bufend,
1452
unsigned long offset,
1456
1454
static unsigned long ecoff_build_ss
1457
PARAMS ((const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1458
unsigned long offset));
1455
(const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1456
unsigned long offset);
1459
1457
static unsigned long ecoff_build_fdr
1460
PARAMS ((const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1461
unsigned long offset));
1462
static void ecoff_setup_ext PARAMS ((void));
1463
static page_type *allocate_cluster PARAMS ((unsigned long npages));
1464
static page_type *allocate_page PARAMS ((void));
1465
static scope_t *allocate_scope PARAMS ((void));
1466
static void free_scope PARAMS ((scope_t *ptr));
1467
static vlinks_t *allocate_vlinks PARAMS ((void));
1468
static shash_t *allocate_shash PARAMS ((void));
1469
static thash_t *allocate_thash PARAMS ((void));
1470
static tag_t *allocate_tag PARAMS ((void));
1471
static void free_tag PARAMS ((tag_t *ptr));
1472
static forward_t *allocate_forward PARAMS ((void));
1473
static thead_t *allocate_thead PARAMS ((void));
1474
static void free_thead PARAMS ((thead_t *ptr));
1475
static lineno_list_t *allocate_lineno_list PARAMS ((void));
1458
(const struct ecoff_debug_swap *backend, char **buf, char **bufend,
1459
unsigned long offset);
1460
static void ecoff_setup_ext (void);
1461
static page_type *allocate_cluster (unsigned long npages);
1462
static page_type *allocate_page (void);
1463
static scope_t *allocate_scope (void);
1464
static void free_scope (scope_t *ptr);
1465
static vlinks_t *allocate_vlinks (void);
1466
static shash_t *allocate_shash (void);
1467
static thash_t *allocate_thash (void);
1468
static tag_t *allocate_tag (void);
1469
static void free_tag (tag_t *ptr);
1470
static forward_t *allocate_forward (void);
1471
static thead_t *allocate_thead (void);
1472
static void free_thead (thead_t *ptr);
1473
static lineno_list_t *allocate_lineno_list (void);
1477
1475
/* This function should be called when the assembler starts up. */
1480
ecoff_read_begin_hook ()
1478
ecoff_read_begin_hook (void)
1482
1480
tag_hash = hash_new ();
1483
1481
top_tag_head = allocate_thead ();