osprey/cygnus/bfd/hash.c File Reference

#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "objalloc.h"
#include "libiberty.h"

Include dependency graph for hash.c:

Go to the source code of this file.

Data Types

type  strtab_hash_entry
type  bfd_strtab_hash

Defines

#define DEFAULT_SIZE   4051
#define strtab_hash_lookup(t, string, create, copy)

Functions/Subroutines

bfd_boolean bfd_hash_table_init_n (struct bfd_hash_entry **struct bfd_hash_table *, struct bfd_hash_entry **newfunc, unsigned int size)
bfd_boolean bfd_hash_table_init (struct bfd_hash_entry **struct bfd_hash_table *, struct bfd_hash_entry **newfunc)
void bfd_hash_table_free (struct bfd_hash_table *table)
struct bfd_hash_entrybfd_hash_lookup (struct bfd_hash_table *table, const char *string, bfd_boolean create, bfd_boolean copy)
void bfd_hash_replace (struct bfd_hash_table *table, struct bfd_hash_entry *old, struct bfd_hash_entry *nw)
struct bfd_hash_entrybfd_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_hash_table *table, string)
PTR bfd_hash_allocate (struct bfd_hash_table *table, unsigned int size)
void bfd_hash_traverse (struct bfd_hash_table *table, bfd_boolean *func, PTR info)
void bfd_hash_set_default_size (bfd_size_type hash_size)
static struct bfd_hash_entry
*strtab_hash_newfunc 
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *))
static struct bfd_hash_entrystrtab_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_hash_table *table, const char *string)
struct bfd_strtab_hash_bfd_stringtab_init ()
struct bfd_strtab_hash_bfd_xcoff_stringtab_init ()
void _bfd_stringtab_free (struct bfd_strtab_hash *table)
bfd_size_type _bfd_stringtab_add (struct bfd_strtab_hash *tab, const char *str, bfd_boolean hash, bfd_boolean copy)
bfd_size_type _bfd_stringtab_size (struct bfd_strtab_hash *tab)
bfd_boolean _bfd_stringtab_emit (bfd *abfd, struct bfd_strtab_hash *tab)

Variables

static size_t bfd_default_hash_table_size = DEFAULT_SIZE


Define Documentation

#define DEFAULT_SIZE   4051

Definition at line 307 of file hash.c.

Referenced by hash_table_init().

#define strtab_hash_lookup ( t,
string,
create,
copy   ) 

Value:

((struct strtab_hash_entry *) \
   bfd_hash_lookup (&(t)->table, (string), (create), (copy)))

Definition at line 605 of file hash.c.

Referenced by _bfd_stringtab_add().


Function Documentation

bfd_size_type _bfd_stringtab_add ( struct bfd_strtab_hash tab,
const char *  str,
bfd_boolean  hash,
bfd_boolean  copy 
)

bfd_boolean _bfd_stringtab_emit ( bfd abfd,
struct bfd_strtab_hash tab 
)

void _bfd_stringtab_free ( struct bfd_strtab_hash table  ) 

struct bfd_strtab_hash* _bfd_stringtab_init ( void   )  [read]

bfd_size_type _bfd_stringtab_size ( struct bfd_strtab_hash tab  ) 

struct bfd_strtab_hash* _bfd_xcoff_stringtab_init ( void   )  [read]

Definition at line 640 of file hash.c.

References _bfd_stringtab_init(), NULL, ret, TRUE, and bfd_strtab_hash::xcoff.

Referenced by _bfd_xcoff_bfd_link_hash_table_create().

PTR bfd_hash_allocate ( struct bfd_hash_table table,
unsigned int  size 
)

Definition at line 474 of file hash.c.

References bfd_error_no_memory, bfd_set_error(), memset, NULL, objalloc_alloc, PTR, and ret.

Referenced by _bfd_coff_debug_merge_hash_newfunc(), _bfd_coff_link_hash_newfunc(), _bfd_elf_add_default_symbol(), _bfd_elf_link_hash_newfunc(), _bfd_generic_link_add_one_symbol(), _bfd_generic_link_hash_newfunc(), _bfd_link_hash_newfunc(), _bfd_link_section_stabs(), _bfd_stringtab_add(), _bfd_vms_hash_newfunc(), already_linked_newfunc(), aout_link_check_ar_symbols(), aout_link_includes_newfunc(), aout_link_write_symbols(), archive_hash_newfunc(), bfd_hash_newfunc(), bfd_section_already_linked_table_insert(), bfd_section_hash_newfunc(), branch_hash_newfunc(), coff_link_add_symbols(), cref_hash_newfunc(), ecoff_link_hash_newfunc(), elf32_mn10300_link_hash_newfunc(), elf64_alpha_link_hash_newfunc(), elf64_hppa_new_dyn_hash_entry(), elf_cris_link_hash_newfunc(), elf_m68k_link_hash_newfunc(), elf_strtab_hash_newfunc(), elf_vax_link_hash_newfunc(), elfNN_ia64_new_elf_hash_entry(), funcvec_hash_newfunc(), generic_link_check_archive_element(), hppa_link_hash_newfunc(), lang_definedness_newfunc(), link_hash_newfunc(), linux_link_hash_newfunc(), m32r_elf_link_hash_newfunc(), mips_elf_link_hash_newfunc(), NAME(), new_fixup(), ppc_coff_link_hash_newfunc(), ppc_elf_link_hash_newfunc(), sec_merge_hash_newfunc(), sh64_elf64_link_hash_newfunc(), sh_elf_link_hash_newfunc(), sparc64_elf_add_symbol_hook(), sparc64_elf_size_dynamic_sections(), stab_link_includes_newfunc(), string_hash_newfunc(), strtab_hash_newfunc(), stub_hash_newfunc(), sunos_link_hash_newfunc(), and xcoff_link_hash_newfunc().

struct bfd_hash_entry* bfd_hash_lookup ( struct bfd_hash_table table,
const char *  string,
bfd_boolean  create,
bfd_boolean  copy 
) [read]

struct bfd_hash_entry* bfd_hash_newfunc ( struct bfd_hash_entry entry,
struct bfd_hash_table table,
string   
) [read]

Definition at line 460 of file hash.c.

References bfd_hash_allocate(), and NULL.

void bfd_hash_replace ( struct bfd_hash_table table,
struct bfd_hash_entry old,
struct bfd_hash_entry nw 
)

Definition at line 434 of file hash.c.

References abort, bfd_hash_entry::hash, index(), bfd_hash_entry::next, and NULL.

Referenced by _bfd_generic_link_add_one_symbol().

void bfd_hash_set_default_size ( bfd_size_type  hash_size  ) 

Definition at line 512 of file hash.c.

References ARRAY_SIZE, bfd_default_hash_table_size, and index().

Referenced by main().

void bfd_hash_table_free ( struct bfd_hash_table table  ) 

bfd_boolean bfd_hash_table_init ( struct bfd_hash_entry **  struct bfd_hash_table *,
struct bfd_hash_entry **  newfunc 
)

Definition at line 346 of file hash.c.

References bfd_default_hash_table_size, and bfd_hash_table_init_n().

bfd_boolean bfd_hash_table_init_n ( struct bfd_hash_entry **  struct bfd_hash_table *,
struct bfd_hash_entry **  newfunc,
unsigned int  size 
)

Definition at line 313 of file hash.c.

References bfd_error_no_memory, bfd_set_error(), FALSE, memset, NULL, objalloc_alloc, objalloc_create(), PTR, and TRUE.

void bfd_hash_traverse ( struct bfd_hash_table table,
bfd_boolean *  func,
PTR  info 
)

Definition at line 492 of file hash.c.

References func, i, bfd_hash_entry::next, NULL, and p.

static struct bfd_hash_entry* strtab_hash_newfunc PARAMS ( (struct bfd_hash_entry *, struct bfd_hash_table *, const char *)   )  [static, read]

static struct bfd_hash_entry* strtab_hash_newfunc ( struct bfd_hash_entry entry,
struct bfd_hash_table table,
const char *  string 
) [static, read]


Variable Documentation

size_t bfd_default_hash_table_size = DEFAULT_SIZE [static]

Definition at line 308 of file hash.c.

Referenced by bfd_hash_set_default_size(), and bfd_hash_table_init().


Generated on Wed Apr 8 14:49:33 2009 for Open64 by  doxygen 1.5.6