Use unsigned hash values for better hashing.
(hash): Hash in the string length for long strings.
* aoutx.h (compare): Replace 3 if's with a subtraction.
(translate_to_native_sym_flags, add_to_stringtab): Reorder tests
in decreasing order of success, as an optimization.
(hash): Take a length arg; ignore chars after #25, for speed.
(add_to_stringtab): Pass length to hash.
* elfcode.h (elf_new_section_hook): Do nothing for now.
(elf_write_object_contents): Output common symbols the way ELF
wants them.
Wed Jun 23 16:20:07 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
* libelf.h (struct elf_obj_tdata and associated macros): Moved
here from elfcode.h. A couple of size-specific structure pointers
were changed to PTR; uses fixed appropriately.
(elf32_symbol_type, elf64_symbol_type): Separated definitions.
(bfd_elf_mkobject): Renamed from bfd_elf32_mkobject.
(bfd_elf32_mkobject, bfd_elf64_mkobject, elf_mkobject): New
temporary macros to ease name change.
* elf.c (elf_read, elf_mkobject, elf_get_str_section,
elf_string_from_elf_section, bfd_elf_find_section): Moved here
from elfcode.h.
* doc/Makefile.in (libbfd.h): Process elf.c too.
* Makefile.in (elf.o): Note new dependencies.
* elfcode.h: Lots of stuff moved elsewhere. Deleted some unused
code, tweaked some debug hooks.
(elf_slurp_reloca_table): Translate ELF section symbols into BFD
section symbols.
(bfd_section_from_shdr, case SHT_PROGBITS): If section already exists, still
use its address to fill in the rawdata slot.
(section_from_elf_index): Abort if section pointer is null.
(put_word, get_word): Define as appropriate for architecture word size.
Structure swapping functions changed to use them as appropriate.
(bfd_add_to_strtab): Now static.
(sym_is_global): New function.
(elf_map_symbols): Call it. Now returns void. Removed unused local variable.
(bfd_section_from_shdr): Mark string tables other than for section and symbol
names as normal sections having contents.
(fix_up_strtabs): New function; fixes up ELF header fields for stab sections
with string tables associated.
(elf_write_object_contents): Map fix_up_strtabs over all BFD sections.
Reordered condition tests for symbol flags; default to local-object value
instead of global-object.
(elf_symbol_from_bfd_symbol): Hid conditionally-used variable inside condition
test.
(elf_print_symbol): Use fprintf_vma.
(elf_idx_of_sym, bfd_shdr_from_section): Unused functions commented out.
(sym_is_global): New function.
(bfd_section_from_shdr): Makr stirng tables other than for section and symbol
names as normal sections having contents.
(fix_up_strtabs): New function; fixes up ELF header fields for stab sections
with string tables associated.
(elf_write_object_contents): Map fix_up_strtabs over all BFD sections.
Reordered condition tests for symbol flags; default to local-object value
instead of global-object.
* elfcode.h (new_section_hook): Define here.
from sysdep.h (and nothing else) and inserting it into bfd-in2.h.
Remove ../include/bfd.h if found, in case it's left over from previous
versions of this code.