Home | History | Annotate | Download | only in info

Lines Matching full:hash

438        /* A hash table for section names.  */
942 #define bfd_link_hash_table_free(abfd, hash) \
943 BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
1173 * Hash Tables::
1874 Clears the section list, and also resets the section count and hash
5848 /* Create a hash table for the linker. Different backends store
5853 /* Release the memory associated with the linker hash table. */
5856 /* Add symbols from this object file into the hash table. */
7131 File: bfd.info, Node: Linker Functions, Next: Hash Tables, Prev: File Caching, Up: BFD front end
7142 The first routine creates a hash table used by the other routines.
7143 The second routine adds the symbols from an object file to the hash
7153 information relevant to the link, including the linker hash table
7165 * Creating a Linker Hash Table::
7166 * Adding Symbols to the Hash Table::
7170 File: bfd.info, Node: Creating a Linker Hash Table, Next: Adding Symbols to the Hash Table, Prev: Linker Functions, Up: Linker Functions
7172 2.17.1 Creating a linker hash table
7175 The linker routines must create a hash table, which must be derived
7176 from `struct bfd_link_hash_table' described in `bfdlink.c'. *Note Hash
7177 Tables::, for information on how to create a derived hash table. This
7181 initialize an instance of the desired hash table. If the back end does
7183 the hash table, the entry point may simply create a `struct
7187 For example, with each entry in the hash table the a.out linker
7192 functions for a hash table derived from `struct bfd_link_hash_table'.
7193 The a.out linker hash table is created by the function
7195 hash table, initializes it, and returns a pointer to it.
7199 finished. You should simply create a new hash table which defines no
7203 File: bfd.info, Node: Adding Symbols to the Hash Table, Next: Performing the Final Link, Prev: Creating a Linker Hash Table, Up: Linker Functions
7205 2.17.2 Adding symbols to the hash table
7213 the hash table. For an archive, BFD must determine which elements of
7226 File: bfd.info, Node: Differing file formats, Next: Adding symbols from an object file, Prev: Adding Symbols to the Hash Table, Up: Adding Symbols to the Hash Table
7235 hash
7238 function can assume about the hash table is that it is derived from
7242 information in the hash table entry to be used by the `_bfd_final_link'
7244 sure that the hash table was created by an object file of the same
7247 The `_bfd_final_link' routine must be prepared to handle a hash
7249 `_bfd_link_add_symbols' function. A hash entry without extra
7251 to create a symbol. Note that, regardless of how a hash table entry is
7253 the hash table entry initialization function.
7257 symbol debugging information) in a hash table entry.
7260 File: bfd.info, Node: Adding symbols from an object file, Next: Adding symbols from an archive, Prev: Differing file formats, Up: Adding Symbols to the Hash Table
7266 must add all externally visible symbols in that object file to the hash
7267 table. The actual work of adding the symbol to the hash table is
7294 `aout_link_add_symbols'. The latter saves pointers to the hash tables
7297 hash table lookup routine to locate the entry.
7300 File: bfd.info, Node: Adding symbols from an archive, Prev: Adding symbols from an object file, Up: Adding Symbols to the Hash Table
7309 must add the symbols from the object file to the linker hash table.
7313 This function builds a hash table from the archive symbol table and
7318 the linker hash table.
7325 be added to the linker hash table just as though the element had itself
7336 actually add the symbols to the linker hash table.
7340 contain a hash table of symbols. The ECOFF back end searches the
7341 archive itself to avoid the overhead of creating a new hash table.
7344 File: bfd.info, Node: Performing the Final Link, Prev: Adding Symbols to the Hash Table, Up: Linker Functions
7355 symbols from the hash table. When producing relocatable output, it must
7438 the global hash table. This must be controlled by the `strip' and
7442 the linker hash table. The `_bfd_final_link' routine must consider
7447 The `_bfd_final_link' routine must also traverse the global hash
7451 to traverse the hash table since the linker script may have defined
7457 of the `bfd_link_info' structure is a hash table of symbols to keep;
7458 each symbol should be looked up in this hash table, and only symbols
7470 global hash table with the function `aout_link_write_other_symbol'. It
7498 File: bfd.info, Node: Hash Tables, Prev: Linker Functions, Up: BFD front end
7500 2.18 Hash Tables
7503 BFD provides a simple set of hash table functions. Routines are
7504 provided to initialize a hash table, to free a hash table, to look up a
7505 string in a hash table and optionally create an entry for it, and to
7506 traverse a hash table. There is currently no routine to delete an
7507 string from a hash table.
7509 The basic hash table does not permit any data to be stored with a
7510 string. However, a hash table is designed to present a base class from
7511 which other types of hash tables may be derived. These derived types
7512 may store additional information with the string. Hash tables were
7514 a hash table entry, because they were designed for use by the linker
7515 back ends. The linker may create thousands of hash table entries, and
7519 The basic hash table code is in `hash.c'.
7523 * Creating and Freeing a Hash Table::
7525 * Traversing a Hash Table::
7526 * Deriving a New Hash Table Type::
7529 File: bfd.info, Node: Creating and Freeing a Hash Table, Next: Looking Up or Entering a String, Prev: Hash Tables, Up: Hash Tables
7531 2.18.1 Creating and freeing a hash table
7534 To create a hash table, create an instance of a `struct bfd_hash_table'
7541 use to create new entries. For a basic hash table, use the function
7542 `bfd_hash_newfunc'. *Note Deriving a New Hash Table Type::, for why
7550 allocated for a hash table. This will not free up the `struct
7553 Use `bfd_hash_set_default_size' to set the default size of hash
7557 File: bfd.info, Node: Looking Up or Entering a String, Next: Traversing a Hash Table, Prev: Creating and Freeing a Hash Table, Up: Hash Tables
7563 hash table and to create a new entry.
7572 the hash table if it is not already there. Either way a pointer to a
7579 hash table objalloc or not. If COPY is passed as `FALSE', you must be
7580 careful not to deallocate or modify the string as long as the hash table
7584 File: bfd.info, Node: Traversing a Hash Table, Next: Deriving a New Hash Table Type, Prev: Looking Up or Entering a String, Up: Hash Tables
7586 2.18.3 Traversing a hash table
7589 The function `bfd_hash_traverse' may be used to traverse a hash table,
7594 `void *' pointer. The function is called with a hash table entry (a
7597 indicates whether to continue traversing the hash table. If the
7602 File: bfd.info, Node: Deriving a New Hash Table Type, Prev: Traversing a Hash Table, Up: Hash Tables
7604 2.18.4 Deriving a new hash table type
7607 Many uses of hash tables want to store additional information which
7608 each entry in the hash table. Some also find it convenient to store
7609 additional information with the hash table itself. This may be done
7610 using a derived hash table.
7612 Since C is not an object oriented language, creating a derived hash
7614 differences specific to the type of hash table you want to create.
7616 An example of a derived hash table is the linker hash table. The
7620 You may also derive a hash table from an already derived hash table.
7621 For example, the a.out linker backend code uses a hash table derived
7622 from the linker hash table.
7631 File: bfd.info, Node: Define the Derived Structures, Next: Write the Derived Creation Routine, Prev: Deriving a New Hash Table Type, Up: Deriving a New Hash Table Type
7636 You must define a structure for an entry in the hash table, and a
7637 structure for the hash table itself.
7639 The first field in the structure for an entry in the hash table must
7640 be of the type used for an entry in the hash table you are deriving
7641 from. If you are deriving from a basic hash table this is `struct
7643 structure for the hash table itself must be of the type of the hash
7645 hash table, this is `struct bfd_hash_table'.
7647 For example, the linker hash table defines `struct
7653 File: bfd.info, Node: Write the Derived Creation Routine, Next: Write Other Derived Routines, Prev: Define the Derived Structures, Up: Deriving a New Hash Table Type
7659 the hash table. This routine is passed as the function argument to
7662 In order to permit other hash tables to be derived from the hash
7665 The first argument to the creation routine is a pointer to a hash
7668 been allocated by a hash table type derived from this one.
7671 routine of the hash table type it is derived from, passing in a pointer
7673 by the base hash table.
7676 the new hash table type.
7680 hash table you are creating. BASE_NEWFUNC is the name of the creation
7681 routine of the hash table type your hash table is derived from.
7708 The creation routine for the linker hash table, which is in `linker.c',
7712 hash table.
7715 linker hash table entry: `type', `written' and `next'.
7718 File: bfd.info, Node: Write Other Derived Routines, Prev: Write the Derived Creation Routine, Up: Deriving a New Hash Table Type
7723 You will want to write other routines for your new hash table, as well.
7726 initialization routine of the hash table you are deriving from and
7727 initializes any other local fields. For the linker hash table, this is
7731 hash table you are deriving from and casts the result. The linker hash
7737 traversal routine of the hash table you are deriving from with
7738 appropriate casts. The linker hash table uses `bfd_link_hash_traverse'
7742 a.out backend linker hash table, which is derived from the linker hash
9310 * _bfd_link_add_symbols in target vector: Adding Symbols to the Hash Table.
9314 * _bfd_link_hash_table_create in target vector: Creating a Linker Hash Table.
9437 * bfd_hash_allocate: Creating and Freeing a Hash Table.
9441 * bfd_hash_newfunc: Creating and Freeing a Hash Table.
9443 * bfd_hash_set_default_size: Creating and Freeing a Hash Table.
9445 * bfd_hash_table_free: Creating and Freeing a Hash Table.
9447 * bfd_hash_table_init: Creating and Freeing a Hash Table.
9449 * bfd_hash_table_init_n: Creating and Freeing a Hash Table.
9451 * bfd_hash_traverse: Traversing a Hash Table.
10742 * Hash tables: Hash Tables. (line 6)
10751 * target vector (_bfd_link_add_symbols): Adding Symbols to the Hash Table.
10753 * target vector (_bfd_link_hash_table_create): Creating a Linker Hash Table.
10795 Hash Table258865
10796 Node: Adding Symbols to the Hash Table260603
10804 Node: Hash Tables274982
10805 Node: Creating and Freeing a Hash Table276180
10807 Node: Traversing a Hash Table278683
10808 Node: Deriving a New Hash Table Type279472