/* symtab.c
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Binutils.
#include "cg_arcs.h"
#include "corefile.h"
-static int cmp_addr PARAMS ((const PTR, const PTR));
+static int cmp_addr (const PTR, const PTR);
Sym_Table symtab;
/* Initialize a symbol (so it's empty). */
void
-sym_init (sym)
- Sym *sym;
+sym_init (Sym *sym)
{
memset (sym, 0, sizeof (*sym));
the global symbol survives. */
static int
-cmp_addr (lp, rp)
- const PTR lp;
- const PTR rp;
+cmp_addr (const PTR lp, const PTR rp)
{
const Sym *left = (const Sym *) lp;
const Sym *right = (const Sym *) rp;
void
-symtab_finalize (tab)
- Sym_Table *tab;
+symtab_finalize (Sym_Table *tab)
{
Sym *src, *dst;
bfd_vma prev_addr;
}
if (tab->len > 0 && dst[-1].end_addr == 0)
- dst[-1].end_addr = core_text_sect->vma + core_text_sect->_raw_size - 1;
+ dst[-1].end_addr
+ = core_text_sect->vma + bfd_get_section_size (core_text_sect) - 1;
DBG (AOUTDEBUG | IDDEBUG,
printf ("[symtab_finalize]: removed %d duplicate entries\n",
#ifdef DEBUG
Sym *
-dbg_sym_lookup (sym_tab, address)
- Sym_Table *sym_tab;
- bfd_vma address;
+dbg_sym_lookup (Sym_Table *sym_tab, bfd_vma address)
{
long low, mid, high;
Sym *sym;
/* Look up an address in the symbol-table that is sorted by address.
If address does not hit any symbol, 0 is returned. */
Sym *
-sym_lookup (sym_tab, address)
- Sym_Table *sym_tab;
- bfd_vma address;
+sym_lookup (Sym_Table *sym_tab, bfd_vma address)
{
long low, high;
long mid = -1;