aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
AgeCommit message (Collapse)AuthorFilesLines
1996-03-04 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful errorIan Lance Taylor1-4/+17
message rather than calling BFD_ASSERT. * elfcode.h (write_relocs): Check return value of _bfd_elf_symbol_from_bfd_symbol.
1996-02-28 * elf.c (assign_file_positions_for_segments): Adjust the segmentIan Lance Taylor1-3/+5
memory size for the alignment of a SEC_ALLOC section, not just a SEC_LOAD section.
1996-02-24 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if theIan Lance Taylor1-3/+19
format is not bfd_object. (bfd_elf_get_dt_soname): Likewise.
1996-02-15 * elf.c (map_sections_to_segments): If we have a .dynamic section,Ian Lance Taylor1-10/+38
then start a new segment rather than put a writable section in a readonly segment.
1996-02-01 * elf-bfd.h (ELF_LINK_NON_ELF): Define.Ian Lance Taylor1-1/+5
* elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to ELF_LINK_NON_ELF. * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF flag for a newly defined symbol. (NAME(bfd_elf,record_link_assignment)): Likewise. (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to set the DEF or REF_REGULAR flags correctly.
1996-01-29 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:Ian Lance Taylor1-8/+10
* syms.c (BSF_OBJECT): Define. (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT. * bfd-in2.h: Rebuild. * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an STT_OBJECT symbol. * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT is set.
1996-01-26 * syms.c: Include "bfdlink.h".Ian Lance Taylor1-3/+19
(struct stab_find_info): Define. (_bfd_stab_section_find_nearest_line): New function. * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare. * libbfd.h: Rebuild. * elf-bfd.h (struct elf_obj_tdata): Add line_info field. * elf.c (_bfd_elf_find_nearest_line): Try calling _bfd_stab_section_find_nearest_line before searching the ELF symbol table. Find the closest STT_FUNC symbol, not the last one. * libcoff-in.h (coff_data_type): Add line_info field. * libcoff.h: Rebuild. * coffgen.c (coff_find_nearest_line): Try calling _bfd_stab_section_find_nearest_line before searching the COFF symbol table. * Makefile.in: Rebuild dependencies.
1996-01-16 * elf.c (assign_file_positions_for_segments): Don't increment fileIan Lance Taylor1-9/+14
offset for a segment which contains no loadable sections.
1996-01-15update copyrightsIan Lance Taylor1-1/+1
1996-01-12 * elf.c (assign_file_positions_for_segments): If a segmentIan Lance Taylor1-2/+7
contains no sections, don't mark it as readable.
1996-01-12tweak last changeIan Lance Taylor1-2/+2
1996-01-12 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents ofIan Lance Taylor1-34/+136
dynamic section, if there is one. * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field. (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR. (bfd_elf64_swap_dyn_in): Likewise. * elfcode.h (elf_swap_dyn_in): Change type of second parameter to PTR. (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
1996-01-11 * elf32-mips.c: Extensive changes for a start at dynamic linkingIan Lance Taylor1-16/+16
support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>. * elf-bfd.h (struct elf_backend_data): Add type_change_ok field. (struct elf_backend_data): Remove elf_backend_create_program_headers field. Add elf_backend_additional_program_headers and elf_backend_modify_segment_map fields. * elfxx-target.h (elf_backend_type_change_ok): Define if not defined. (elf_backend_additional_program_headers): Likewise. (elf_backend_modify_segment_map): Likewise. (elf_backend_create_program_headers): Don't define. (elfNN_bed): Change to account for field changes. * elf.c (assign_file_positions_for_segments): Call new modify_segment_map backend function. Don't call old create_program_headers backend function. (get_program_header_size): Call additional_program_headers rather than create_program_headers. * elflink.h (elf_link_add_object_symbols): Initialize type_change_ok from new backend field. (elf_link_output_extsym): Don't warn if _rld_new_interface is defined. (elf_reloc_link_order): Treat a reloc against a defined symbol as a reloc against the appropriate section.
1995-12-21* elf.c (copy_private_bfd_data): When attaching sections to segments ignoreKen Raeburn1-1/+3
sections that won't be allocated. Patch from Andreas Schwab.
1995-12-01 * elf.c (assign_file_positions_for_segments): Sort the sections inIan Lance Taylor1-3/+17
each segment. (get_program_header_size): Return the right size if segment_map is not NULL. (copy_private_bfd_data): Don't bother to sort the sections.
1995-12-01 * libbfd.c (bfd_malloc, bfd_realloc): New functions.Ian Lance Taylor1-11/+5
(bfd_zmalloc): Return PTR, not char *. Take size_t, not bfd_size_type. * libbfd-in.h (bfd_malloc, bfd_realloc): Declare. (bfd_zmalloc): Change declaration. * libbfd.h: Rebuild. * Many files: Use bfd_malloc and bfd_realloc rather than malloc and realloc. Don't set bfd_error_no_memory if they fail.
1995-11-30 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based onIan Lance Taylor1-69/+133
p_paddr if p_paddr is zero. (make_mapping): Set includes_filehdr and includes_phdrs for first PT_LOAD segment. (map_sections_to_segments): Set includes_phdrs for PT_PHDR segment. (assign_file_positions_for_segments): Handle includes_filehdr and includes_phdrs. Remove special handling of PT_PHDR and first PT_LOAD segments. (copy_private_bfd_data): Set includes_filehdr and includes_phdr when appropriate. Remove special handling of PT_PHDR segment. Use a more complex condition for when a section is included in a segment to handle Solaris linker oddities.
1995-11-29 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory ifIan Lance Taylor1-74/+18
obstack_alloc fails. (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish fails. * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails. * Many files: don't set bfd_error_no_memory if one of the above routines fails.
1995-11-29 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddrIan Lance Taylor1-3/+119
if p_paddr_valid is set. (copy_private_bfd_data): New static function. (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
1995-11-29 * elf.c (assign_file_positions_for_segments): Fix case where extraIan Lance Taylor1-11/+8
program headers were allocated.
1995-11-29 * elf.c (_bfd_elf_print_private_bfd_data): New function.Ian Lance Taylor1-0/+55
* elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare. * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to _bfd_elf_print_private_bfd_data.
1995-11-28 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.Ian Lance Taylor1-516/+698
* elf.c (make_mapping): New static function. (map_sections_to_segments): New static function. (elf_sort_sections): New static function. (assign_file_positions_for_segments): New static function. (map_program_segments): Remove. (get_program_header_size): Remove sorted_hdrs, count, and maxpagesize parameters. Simplify. (assign_file_positions_except_relocs): When generating an executable, use assign_file_positions_for_segments. (elf_sort_hdrs): Remove. (_bfd_elf_sizeof_headers): Remove eliminated parameters from call to get_program_header_size.
1995-11-01 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if theIan Lance Taylor1-1/+4
BFD is not of the right type. (bfd_elf_get_needed_list): Likewise. * i386linux.c (bfd_linux_size_dynamic_sections): Likewise. * sunos.c (bfd_sunos_get_needed_list): Likewise. * xcofflink.c (XCOFF_XVECP): Define. (bfd_xcoff_link_record_set): Don't do anything if the BFD is not of the right type. (bfd_xcoff_import_symbol): Likewise. (bfd_xcoff_export_symbol): Likewise. (bfd_xcoff_link_count_reloc): Likewise. (bfd_xcoff_record_link_assignment): Likewise. (bfd_xcoff_size_dynamic_sections): Likewise.
1995-10-31 * libelf.h: Rename to elf-bfd.h to avoid conflict withFred Fish1-1/+1
systems that have a system <libelf.h>. * Makefile.in: Globally replace libelf.h with elf-bfd.h. * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c, elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c, elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c, elfxx-target.h: Include elf-bfd.h rather than libelf.h. * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
1995-10-30 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.Ian Lance Taylor1-21/+19
PR 8293.
1995-10-03 * elf.c (_bfd_elf_assign_file_position_for_section): AlwaysJeff Law1-33/+16
align to the section's alignment. "align" argument removed; all callers changed. Loosely based on a patch from dupuy@smarts.com; keeps dbx from losing when debugging programs that have been objcopy'd.
1995-09-12 Extensive minor changes to avoid various gcc warnings. Also:Ian Lance Taylor1-13/+78
* Makefile.in (BFD32_BACKENDS): Remove coff-arm.o. * archures.c (bfd_arch_info_type): Change mach field from long to unsigned long. (bfd_lookup_arch): Change machine parameter from long to unsigned long.
1995-07-11 * libelf.h (struct elf_size_info): Change type of last argument toIan Lance Taylor1-2/+2
swap_symbol_out from char * to PTR. (bfd_elf32_swap_symbol_out): Update declaration. (bfd_elf64_swap_symbol_out): Likewise. * elfcode.h (elf_swap_symbol_out): Change type of cdst from char * to PTR. * elf.c (swap_out_syms): Cast to PTR, not char *, when calling swap_symbol_out routine. * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Likewise. (elf_link_output_sym): Likewise. (elf_link_output_extsym): Likewise. * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Likewise.
1995-07-11Tue Jul 11 12:29:49 1995 Rick Sladkey <jrs@world.std.com>Ian Lance Taylor1-8/+51
* elf.c (_bfd_elf_find_nearest_line): Handle the simple case where there is no debugging information.
1995-07-06Added new files elflink.c, elflink.h, elfcore.h.Ken Raeburn1-4/+2224
Moved some mostly size-independent stuff from elfcode.h to elf.c, adding a data structure to elfcode.h with some misc data and callback functions. Added a pointer to that structure to the target back end data. More work can be done here. Renamed generic elf routines (not cpu-specific stuff) to start with bfd_elf or _bfd_elf. Updated most call sites, sometimes defined some macros. Moved some dynamic linking support code from m68k, sparc, i386 to common files, using target back end flags to control behavior. More work can probably be done here too. Moved core- and linker-support code out of elfcode.h to elf.c, elfcore.h, elflink.h, or elflink.c. Now elfcode.h contains only .o and executable support, plus #includes of elfcore.h and elflink.h. Much of the contents of these other header files can probably still be moved from the .h files to the .c files, to get compiled only once. Cleaned up some "gcc -Wall" warnings regarding unused or uninitialized variables, in generic and cpu-specific code.
1995-07-04 * libelf.h (struct elf_link_hash_table): Add needed field. RemoveIan Lance Taylor1-11/+66
saw_needed field. * elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name is an empty string, don't make a DT_NEEDED entry in the output file. Record all DT_NEEDED entries found in input dynamic objects. (elf_link_output_extsym): Don't check saw_needed when issuing warnings. * elf.c (_bfd_elf_link_hash_table_init): Initialize needed, not saw_needed. (bfd_elf_get_needed_list): New function. * bfd-in.h (struct bfd_elf_link_needed_list): Define. (bfd_elf_get_needed_list): Define. * bfd-in2.h: Rebuild. PR 7083.
1994-07-22 * aoutx.h (aout_link_check_ar_symbols): When changing a symbol toIan Lance Taylor1-2/+14
common, set the alignment. (aout_link_add_symbols): Restrict the alignment of a common symbol to the alignment power given by the architecture. * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize align. Do initialize copy_offset. * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use copy_offset field rather than align field. Get alignment using bfd_log2 rather than switch. * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use copy_offset, not align. * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Likewise.
1994-05-24 Make MIPS ELF use new ELF backend linker. No shared libraryIan Lance Taylor1-14/+21
support yet. * elf32-mips.c (bfd_mips_elf32_swap_gptab_in): New function. (bfd_mips_elf32_swap_gptab_out): New function. (mips_elf_object_p): If last symbol is LOCAL, set elf_bad_symtab. (mips_elf_final_write_processing): Set sh_info field for .gptab.* sections. (mips_elf_fake_sections): Set sh_entsize for .gptab.* sections. (mips_elf_read_ecoff_info): Read and free external symbols last, not first, for clarity. (struct mips_elf_link_hash_entry): Define new structure. (struct mips_elf_link_hash_table): Define new structure. (mips_elf_link_hash_lookup): Define new macro. (mips_elf_link_hash_traverse): Define new macro. (mips_elf_hash_table): Define new macro. (mips_elf_link_hash_newfunc): New static function. (mips_elf_link_hash_table_create): New static function. (mips_elf_add_symbol_hook): New static function. (struct extsym_info): Define new structure. (mips_elf_get_extr, mips_elf_set_index): Remove. (mips_elf_output_extsym): New static function. (gptab_compare): New static function. (mips_elf_final_link): Rewrite to use ELF backend linker, and to merge gptab information in input files. (mips_elf_relocate_hi16): New static function. (mips_elf_relocate_section): New static function. (bfd_elf32_bfd_link_hash_table_create): Define as macro before including elf32-target.h. (elf_backend_relocate_section): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf.c (_bfd_elf_link_hash_newfunc): Rename from elf_link_hash_newfunc and make globally visible. Change caller. (_bfd_elf_link_hash_table_init): New function, broken out of _bfd_elf_link_hash_table_create. (_bfd_elf_link_hash_table_create): Use _bfd_elf_link_hash_table_init. * libelf.h (struct elf_obj_tdata): Add new field bad_symtab. (elf_bad_symtab): Define new accessor macro. (_bfd_elf_link_hash_newfunc): Declare. (_bew_elf_link_hash_table_init): Declare. * elfcode.h (elf_object_p): Call backend object_p hook after swapping in all the section headers. (map_program_segments): Correct typo: Internal for External. (elf_link_add_object_symbols): If elf_bad_symtab is set, read all the symbols. Skip STB_LOCAL symbols rather than giving an error. (elf_bfd_final_link): If elf_bad_symtab is set, allocate space for all symbols, not just locals. (elf_link_output_extsym): Only skip a symbol not mentioned by a regular file if it is mentioned by a dynamic object. (elf_link_input_bfd): If elf_bad_symtab is set, read all the symbols.
1994-05-20 * elf.c (_bfd_elf_make_section_from_shdr): New function, based onIan Lance Taylor1-0/+62
code repeated three times in bfd_section_from_shdr in elfcode.h. * libelf.h (_bfd_elf_make_section_from_shdr): Declare. * elfcode.h (bfd_section_from_shdr): Use new function _bfd_elf_make_section_from_shdr to create BFD sections. If a reloc section does not use the main symbol table, or it is part of the process image, treat it as a normal section, not relocs. * elf32-mips.c (mips_elf_section_from_shdr): Use new function _bfd_elf_make_section_from_shdr.
1994-05-19 Add support for ELF shared libraries. Loosely based on work byIan Lance Taylor1-24/+101
Eric Youngdale <ericy@cais.com>. * libelf.h (struct elf_backend_data): Add new fields for dynamic linking: elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol, elf_backend_size_dynamic_sections, elf_backend_finish_dynamic_symbol, elf_backend_finish_dynamic_sections. (struct elf_link_hash_entry): Change type of align field to bfd_size_type. Add fields dynindx, dynstr_index, weakdef, elf_link_hash_flags. (struct elf_link_hash_table): Add fields dynobj, dynsymcount, dynstr, bucketcount. (bfd_elf32_swap_reloc_in, bfd_elf32_swap_reloc_out): Declare. (bfd_elf32_swap_reloca_in, bfd_elf32_swap_reloca_out): Declare. (bfd_elf32_swap_dyn_in, bfd_elf32_swap_dyn_out): Declare. (bfd_elf32_add_dynamic_entry): Declare. (bfd_elf64_swap_reloc_in, bfd_elf64_swap_reloc_out): Declare. (bfd_elf64_swap_reloca_in, bfd_elf64_swap_reloca_out): Declare. (bfd_elf64_swap_dyn_in, bfd_elf64_swap_dyn_out): Declare. (bfd_elf64_add_dynamic_entry): Declare. * elfcode.h (Elf_External_Dyn): Define. (elf_swap_reloc_in): Define as macro using NAME. Make externally visible. (elf_swap_reloc_out): Likewise. (elf_swap_reloca_in, elf_swap_reloca_out): Likewise. (elf_swap_dyn_in, elf_swap_dyn_out): Define as macro using NAME and as new externally visible function. (elf_fake_sections): Set section type of dynamic sections based on section names. (elf_write_phdrs): Remove. (assign_file_position_for_section): Add new align argument. Change all callers. (get_program_header_size): New static function. (struct seg_info): Remove. (map_program_segments): Completely rewrite. (assign_file_positions_except_relocs): Completely rewrite. (assign_file_positions_for_relocs): Don't set a file position for sections which already have one. Don't bother to align the file position here. (section_from_elf_index): Handle SHT_HASH and SHT_DYNAMIC section types. (elf_section_from_bfd_section): Likewise. (elf_slurp_symbol_table): If section_from_elf_index fails, just use bfd_abs_section rather than returning an error. (elf_sizeof_headers): Make useful. (elf_link_record_dynamic_symbol): New static function. (elf_link_add_object_symbols): Handle dynamic objects. (elf_link_create_dynamic_sections): New static function. (elf_add_dynamic_entry): Define as macro using NAME and as new externally visible function. (NAME(bfd_elf,record_link_assignment)): New function. (elf_buckets): New static variable. (NAME(bfd_elf,size_dynamic_sections)): New function. (struct elf_final_link_info): Add dynsym_sec and hash_sec fields. (elf_bfd_final_link): Handle dynamic linking. Create a section symbol for all ELF sections, not all BFD sections. Store section symbol index in target_index field, not index field. Traverse over global symbols even if stripping. (elf_link_output_extsym): Output dynamic symbols. Mark symbols defined by dynamic objects as undefined. (elf_link_input_bfd): Ignore dynamic objects. Use target_index field for section relocs, and make sure it is set. (elf_reloc_link_order): Use target_index field for section relocs, and make sure it is set. * elf.c (elf_link_hash_newfunc): Initialize dynindx, dynstr_index, weakdef and elf_link_hash_flags fields. (_bfd_elf_link_hash_table_create): Initialize dynobj, dynsymcount, dynstr and bucketcount fields. * elf32-target.h: Initialize new dynamic linking fields. * elf64-target.h: Likewise. * elf32-i386.c: New functions for dynamic linking support. * elf32-sparc.c: Likewise. * bfd-in.h (bfd_elf32_record_link_assignment): Declare. (bfd_elf64_record_link_assignment): Declare. (bfd_elf32_size_dynamic_sections): Declare. (bfd_elf64_size_dynamic_sections): Declare. * bfd-in2.h: Rebuilt.
1993-12-30 Extensive changes to move the bulk of the linker into BFD so thatIan Lance Taylor1-1/+3
more efficient backend code can be written for specific object files. Only existing efficient backend is a.out. * seclet.c, seclet.h: Removed. * hash.c, linker.c, genlink.h: New files. * bfd-in.h: Removed bfd_error_vector. Declared hash table structures and functions. (JUMP_TABLE): Removed bfd_seclet_link, added bfd_link_hash_table_create, bfd_link_add_symbols and bfd_final_link. * All backends: Changed accordingly. * bfd-in2.h: Rebuilt. * bfd.c (struct _bfd): Added link_next and archive_pass fields. Removed ld_symbols field. (bfd_nonrepresentable_section, bfd_undefined_symbol, bfd_reloc_value_truncated, bfd_reloc_is_dangerous, bfd_error_vector): Removed. (bfd_default_error_trap, bfd_error_trap, bfd_error_nonrepresentabltrap): Removed. (bfd_get_relocated_section_contents): Pass link_info. Pass link_order instead of seclet. Pass symbols. (bfd_relax_section): Pass link_info. (bfd_seclet_link): Removed. (bfd_link_hash_table_create, bfd_link_add_symbols, bfd_final_link): New macros. * libbfd-in.h: If __GNUC__ is defined and alloca is not, define alloca as __builtin_alloca. Declare internal linking functions. * libbfd.h: Rebuilt. * libbfd.c (bfd_seek): Comment out fseek assertion. It's worked for months. * reloc.c (reloc_howto_type): Added error_message argument to special_function field. Changed all callers and all definitions. (bfd_get_reloc_size): Make argument a const pointer. (bfd_perform_relocation): Add error_message argument to hold string set if return value if bfd_reloc_dangerous. Changed all callers. (_bfd_final_link_relocate, _bfd_relocate_contents): New functions. * section.c (asection): Renamed seclets_head and seclets_tail to link_order_head and link_order_tail. * targets.c (bfd_target): Replaced seclet argument with link_info and link_order and symbols arguments in bfd_get_relocated_section_contents. Added symbols argument to bfd_relax_section. Removed bfd_seclet_link. Added bfd_link_hash_table_create, bfd_link_add_symbols and bfd_final_link. * libaout.h (struct aoutdata): Added external_syms, external_sym_count, external_strings, sym_hashes fields. (obj_aout_external_syms, obj_aout_external_sym_count, obj_aout_external_strings, obj_aout_sym_hashes): New accessor macros. (WRITE_HEADERS): Only output symbols if outsymbols is not NULL. * aoutx.h: Wrote new back end linker routines. (translate_to_native_sym_flags): Return boolean value. Don't use bfd_error_vector. (NAME(aout,write_syms)): Return boolean value. Check return value of translate_to_native_sym_flags and bfd_write. * aout-target.h (final_link_callback): New function. (MY_bfd_final_link): New function. * aout-adobe.c (aout_adobe_write_object_contents): Check return value of aout_32_write_syms. * hp300hpux.c (MY(write_object_contents)): Likewise. * i386lynx.c (WRITE_HEADERS): Likewise. * libaout.h (WRITE_HEADERS): Likewise. * bout.c: Changed functions to use link_info->callbacks rather than bfd_error_vector, and link_orders rather than seclets. * coff-alpha.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-sh.c: Likewise. * coff-z8k.c: Likewise. * elf32-hppa.c: Likewise. * reloc16.c: Likewise. * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look up _gp in the hash table rather than in outsymbols. * coff-a29k.c (a29k_reloc): Pass errors back in new error_message argument rather than printing them. * coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and link_order arguments rather than seclet. Changed all uses and definitions. (bfd_coff_reloc16_estimate): Pass link_info arguments. Changed all uses and definitions. * libcoff.h: Rebuilt. * ecoff.c (ecoff_get_extr): If symbol is defined by linker, but not by ECOFF, make it scAbs. (ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and rewritten. * elf32-mips.c (mips_elf_final_link): Renamed from mips_elf_seclet_link and rewritten. * elf32-hppa.c (elf32_hppa_stub_description): Added link_info field. (new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub, hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section): Added link_info arguments. Changed all callers. * elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is not NULL. * oasys.c (oasys_write_sections): Return boolean value rather than using bfd_error_vector. (oasys_write_object_contents): Check return value of oasys_write_sections. * hosts/std-host.h: Don't declare qsort or strtol. * Makefile.in: Rebuild dependencies. (BFD_LIBS): Removed seclet.o. Added hash.o and linker.o. (CFILES): Removed seclet.c. Added hash.c and linker.c. (HFILES): Removed seclet.h. Added genlink.h.
1993-12-28 * elf.c (bfd_elf_generic_reloc): If this is not an inplace reloc,Ian Lance Taylor1-21/+16
then skip bfd_perform_relocation even if the addend is non-zero.
1993-07-19* elf.c, elfcode.h, libelf.h: Serious reorganization.Ken Raeburn1-0/+242
Deleted `thunk' structure, merged into tdata, duplicate data eliminated. Rearranged functions, grouping by function. Broke up many functions in elfcode.h, re-ordered many parts of file writing to handle unpredictable state of section relocation table as provided by various applications. Still needs cleanup: Merge functions back together, split out data structure with only data that is used only when writing out object file. * elf.c (bfd_elf_generic_reloc): New function, taken from coff-mips.c. * elf32-sparc.c (elf_sparc_howto_table): Use it, to work around bfd_perform_relocation lossage.
1993-04-13kill it deadKen Raeburn1-2673/+0
1993-02-23 * Minor cleanups provoked by gcc warnings:Ian Lance Taylor1-10/+0
* aoutx.h (NAME(aout, reloc_type_lookup)), cpu-h8300.c (local_bfd_reloc_type_lookup), cpu-z8k.c (local_bfd_reloc_type_lookup): Added default case to switches. * archive.c (do_slurp_bsd_armap, do_slurp_coff_armap), ieee.c (ieee_slurp_section_data), elf.c (elf_make_sections, elf_fake_sections, elf_compute_section_file_positions, elf_write_object_contents): Removed unused variables. * archures.c: Removed /* from within comment. * bout.c (b_out_squirt_out_relocs): Initialize r_extern. * oasys.c (oasys_write_data): Initialize i.
1993-02-23 * bfd-in.h (JUMP_TABLE): Added bfd_reloc_type_lookup andIan Lance Taylor1-17/+5
bfd_make_debug_symbol; they were already in the target structure. * Adjusted all uses of JUMP_TABLE. * coffgen.c, libcoff-in.h (coff_bfd_make_debug_symbol): Renamed from coff_make_debug_symbol. * libcoff.h: Updated accordingly.
1993-02-16Added 1993 copyrights to files that I have changed in 1993. Some wereIan Lance Taylor1-16/+52
missing 1992 copyrights, although they changed in 1992.
1992-12-30fix libbfd.h declaration, by tweaking elf.c comment, so bfd can compileKen Raeburn1-2/+2
1992-12-28 * bfd.c (bfd_get_size): New function that gets an upper boundFred Fish1-34/+73
on the possible size of any object in a bfd. * elf.c (bfd_elf_find_section, elf_get_str_section, elf_get_symtab_upper_bound): Rewrite to avoid NULL pointer dereferences. * elf.c (elf_big_vec, elf_little_vec): Document last three members initialized to NULL.
1992-12-16Various changes to improve archive support. See ChangeLog.Per Bothner1-12/+23
1992-10-15* aout-adobe.c, aoutf1.h, aoutx.h, bout.c coff-m68k.c, coff-z8k.c,John Gilmore1-7/+0
coffcode.h, elf.c, libaout.h, libbfd.h, srec.c: Lint.
1992-10-15* aout-adobe.c, aoutf1.h, archive.c, bout.c, coff-rs6000.c,John Gilmore1-3/+3
coffcode.h, elf.c, ieee.c, libaout.h, libbfd.c, oasys.c, sco-core.c: Lint: Second argument of bfd_seek is always file_ptr. Third argument is SEEK_SET or SEEK_CUR. Result is always 0 or -1.
1992-10-08Some of these are guesses, if you know different, just yell.Steve Chamberlain1-1/+10
Thu Oct 8 08:52:48 1992 Steve Chamberlain (sac@thepub.cygnus.com) Now a bfd knows whether underscores are normally prepended to symbols in its file format. Helps with error messages. * aout-adobe.c, aout-target.h, bout.c, coff-a29k.c, coff-h8300.c, coff-z8k.c: targets set so they have leading underscore * coff-i386.c, coff-i960.c, coff-m68k.c, coff-mips.c, coff-m88k.c, coff-rs6000.c, coff-we32k.c, elf.c, ieee.c, srec.c: targets set without leading underscore flag * targets.c: add symbol leading char to xvec description * bfd-in.h (bfd_get_symbol_leading_char): new macro.
1992-09-25 * elf.c (section_from_elf_index): Return bfd_abs_section, not 0,Brendan Kehoe1-4/+3
since we should never have a NULL section. (elf_slurp_symbol_table): If st_shndx doesn't match any of our tests, set the section to bfd_abs_section.
1992-08-01 * config/stratus.mt (CC): Remove definition.Fred Fish1-154/+115
* elf.c (bfd_section_from_shdr, elf_section_from_bfd_section, section_from_elf_index): Add SHT_BEPROGBITS case for i860 in big endian mode. * elf.c (bfd_section_from_shdr): Test for the possibility that section_from_elf_index returns NULL and don't dereference it.