/* Generic symbol-table support for the BFD library.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
All storage for the symbols themselves is in an objalloc
connected to the BFD; it is freed when the BFD is closed.
-
INODE
Writing Symbols, Mini Symbols, Reading Symbols, Symbols
SUBSECTION
*/
-
-
/*
DOCDD
INODE
Return the actual number of symbol pointers, not
including the NULL.
-
.#define bfd_canonicalize_symtab(abfd, location) \
. BFD_SEND (abfd, _bfd_canonicalize_symtab,\
. (abfd, location))
*/
-
/*
FUNCTION
bfd_set_symtab
: ((type & BSF_OBJECT) ? 'O' : ' '))));
}
-
/*
FUNCTION
bfd_make_empty_symbol
};
/* Return the single-character symbol type corresponding to
- section S, or '?' for an unknown COFF section.
+ section S, or '?' for an unknown COFF section.
Check for any leading string which matches, so .text5 returns
't' as well as .text */
{
CONST struct section_to_type *t;
- for (t = &stt[0]; t->section; t++)
+ for (t = &stt[0]; t->section; t++)
if (!strncmp (s, t->section, strlen (t->section)))
return t->type;
/*
FUNCTION
- bfd_is_undefined_symclass
+ bfd_is_undefined_symclass
DESCRIPTION
Returns non-zero if the class symbol returned by
symbol_info *ret;
{
ret->type = bfd_decode_symclass (symbol);
-
+
if (bfd_is_undefined_symclass (ret->type))
ret->value = 0;
else
ret->value = symbol->value + symbol->section->vma;
-
+
ret->name = symbol->name;
}
static int
cmpindexentry (a, b)
- const PTR *a;
- const PTR *b;
+ const PTR a;
+ const PTR b;
{
const struct indexentry *contestantA = (const struct indexentry *) a;
const struct indexentry *contestantB = (const struct indexentry *) b;
if (bfd_get_32 (abfd, stab + STRDXOFF) == 0)
continue;
- /* if we did not see a function def, leave space for one. */
+ /* if we did not see a function def, leave space for one. */
if (saw_fun == 0)
++info->indextablesize;
if (saw_fun == 0)
++info->indextablesize;
-
+
if (info->indextablesize == 0)
return true;
++info->indextablesize;
/* The following code creates a new indextable entry with
a NULL function name if there were no N_FUNs in a file.
Note that a N_SO without a file name is an EOF and
- there could be 2 N_SO following it with the new filename
- and directory. */
+ there could be 2 N_SO following it with the new filename
+ and directory. */
if (saw_fun == 0)
{
info->indextable[i].val = bfd_get_32 (abfd, last_stab + VALOFF);
++i;
}
saw_fun = 0;
-
+
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
if (*file_name == '\0')
{
*pfound = true;
- if (file_name[0] == '/' || directory_name == NULL)
+ if (IS_ABSOLUTE_PATH(file_name) || directory_name == NULL)
*pfilename = file_name;
else
{