aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-target.h
AgeCommit message (Collapse)AuthorFilesLines
1994-04-07 * All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector.Ian Lance Taylor1-1/+3
1994-04-06 * targets.c (bfd_target): Rearranged fields in target vector.Ian Lance Taylor1-26/+20
Removed _bfd_debug_info_start, _bfd_debug_info_end and _bfd_debug_info_accumulate, which were never used. (BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined. (BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined. (BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined. (BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined. * All backends: Changed to use the new BFD_JUMP_TABLE_* macros rather than the single JUMP_TABLE macro. Removed many of the weird macro definitions needed to support the monolithic JUMP_TABLE. * bfd-in.h (JUMP_TABLE): Removed. * libbfd-in.h: Define a bunch of macros, and declare a few functions, for use with the new BFD_JUMP_TABLE_* macros. * libbfd.c (_bfd_dummy_new_section_hook): Removed. (bfd_false): Set bfd_error_invalid_operation. (bfd_nullvoidptr): Likewise. (bfd_n1): New function. (_bfd_nocore_core_file_matches_executable_p): Renamed from _bfd_dummy_core_file_matches_executable_p. (_bfd_nocore_core_file_failing_command): Similar rename. Set bfd_error_invalid_operation. (_bfd_nocore_core_file_failing_signal): Likewise. (_bfd_generic_get_section_contents): Renamed from bfd_generic_get_section_contents. Changed all callers. (_bfd_generic_set_section_contents): Similar rename. * ieee.c: #if 0 out ieee_bfd_debug_info_start, ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They were never called. * bfd-in2.h: Rebuilt. * libbfd.h: Rebuilt.
1994-04-01 * targets.c (bfd_target): Add _bfd_free_cached_info field.Ian Lance Taylor1-0/+3
* bfd.c (bfd_free_cached_info): Define. * bfd-in.h (JUMP_TABLE): Add _bfd_free_cached_info. * bfd-in2.h: Rebuilt. * All backends: Initialize bfd_free_cached_info entry point to bfd_true.
1994-03-16 * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.Jeff Law1-0/+12
* bfd-in.h (JUMP_TABLE): Add new entries to the jump table for bfd_copy_private_section_data, bfd_copy_private_bfd_data, and bfd_is_local_label. * targets.c: Add new entries to the bfd_target structure. * bfd.c (bfd_copy_private_bfd_data): New definition. * section.c (bfd_copy_private_section_data): New definition. * syms.c (bfd_is_local_label): New definition. * libbfd-in.h (bfd_generic_is_local_label): Declare. * libbfd.c (bfd_generic_is_local_label): New function. * *-core.c: Provide default definitions for new functions in the target vector which all point to bfd_false. * aout-target.h, coffcode.h, elf32-target.h elf64-target.h, ieee.c libaout.h, libecoff.h, nlm-target.h, oasys.c, srec.c, tekhex.c Default new vectors for copying private backend data to bfd_true. Default new vector for determining if a symbol is a local label to bfd_generic_is_local_label. * som.c (som_bfd_copy_private_section_data): New function. (som_bfd_is_local_label): New function. (som_bfd_copy_private_bfd_data): For now default to bfd_true. * elf32-hppa.c (hppa_elf_is_local_label): New function.
1993-12-30 Extensive changes to move the bulk of the linker into BFD so thatIan Lance Taylor1-3/+10
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-11-18 * libelf.h (struct elf_backend_data): Added fieldsIan Lance Taylor1-18/+26
elf_backend_sym_is_global and elf_backend_final_write_processing. * elf32-target.h (elf32_bed): Added corresponding initializers. * elf64-target.h (elf64_bed): Likewise.
1993-11-09 * elfcode.h (elf_object_p): Rather than looking through an arrayIan Lance Taylor1-0/+5
of architectures, get the ELF EM_xxx code from the backend information. Let the generic ELF target match any EM_xxx code not matched by another ELF target. Call elf_backend_object_p to let the backend do more checks and set global information. * libelf.h (struct elf_backend_data): Added elf_machine_code and elf_backend_object_p fields. (struct bfd_elf_arch_map): Removed. (bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare. * elf32-target.h, elf64-target.h: Initialize elf_machine_code field with ELF_MACHINE_CODE. Initialize elf_backend_object_p field with elf_backend_object_p (if it is defined). * elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c, elf64-gen.c (ELF_MACHINE_CODE): Defined. * elf32-mips.c: Include ecoffswap.h to get ECOFF swapping routines. (mips_elf_object_p): Set the right machine number. (mips_elf_ecoff_debug_swap): Defined. (elf_backend_object_p): Defined to be mips_elf_object_p. (elf_backend_ecoff_debug_swap): Defined to be mips_elf_ecoff_debug_swap. * elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed. * elf32-mips.c (elf_mips_howto_table): Don't complain on overflow for R_MIPS_26. Correct overflow detection requires matching the upper four bits of the destination against the PC. From Ted Lemon <mellon@pepper.ncd.com>. * elf32-hppa.c (elf_hppa_reloc_type_lookup): Return type should point to const data.
1993-11-09 * libelf.h: Added some comments.Ian Lance Taylor1-2/+5
(struct elf_backend_data): Added elf_backend_ecoff_debug_swap field. Removed unused write_relocs field. * elf32-target.h: Adjusted elf_backend_data initialization accordingly. * elf64-target.h: Corrected elf_backend_data initialization to fill in all fields and to set elf_64_p to 1.
1993-10-21 * elf32-mips.c: Include "seclet.h".Ian Lance Taylor1-0/+2
(mips_elf_fake_sections): Force size of .reginfo section to sizeof Elf32_External_RegInfo. (mips_elf_seclet_link): New function. Link the .reginfo section specially, and pass everything else to the generic routine. (bfd_elf32_bfd_seclet_link): Define macro. * elf32-target.h: If bfd_elf32_bfd_seclet_link is already defined, don't override it.
1993-09-23 * section.c (SEC_DEBUGGING): New section flag.Ian Lance Taylor1-2/+2
* elfcode.h (bfd_section_from_shdr): If section is SHT_PROGBITS, and the name starts with .debug, .line or .stab, set SEC_DEBUGGING. * elf32-target.h (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Added SEC_DEBUGGING to section_flags. * elf64-target.h (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Added SEC_DEBUGGING and SEC_CODE to section_flags. * bfd-in2.h: Updated.
1993-09-14 * elf32-i386.c (elf_howto_table): Add bfd_elf_generic_relocIan Lance Taylor1-1/+1
special function for all reloc entries. * elf32-target.h (TARGET_LITTLE_SYM): Add SEC_CODE to section_flags. * libelf.h (elf_symbol_type): Remove desc, type and other fields. * Makefile.in (elf32-*.o): These depend upon elf32-target.h.
1993-09-07 * libbfd-in.h: Removed swapping routines declarations.Ian Lance Taylor1-12/+12
* bfd-in.h: Added swapping routine declarations, and renamed them from _do_* to bfd_*. * libbfd.c: Renamed swapping routines from _do_* to _bfd_*. * Changed all callers. * libbfd.h, bfd-in2.h: Rebuilt.
1993-08-25Merged in changes from Jeff Law and Pete Hoogenboom at Utah for PA ELFKen Raeburn1-0/+25
support. Compiles, not particularly well tested. See ChangeLog for details.
1993-07-26(elfXX_bed): Initialize maxpagesize from ELF_MAXPAGESIZE.Ken Raeburn1-4/+9
(ELF_MAXPAGESIZE): Default to 1.
1993-07-19* elf.c, elfcode.h, libelf.h: Serious reorganization.Ken Raeburn1-0/+1
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-06-24Thu Jun 24 17:25:51 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)Ken Raeburn1-2/+2
* 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.
1993-06-22Use new size-independent versions of elf internal data structures.Ken Raeburn1-1/+1
1993-06-21No longer use dummy new-section-hook.Ken Raeburn1-1/+0
1993-06-02elfcode.hKen Raeburn1-2/+13
1993-05-25Updated for new macro, type, and structure names.Ken Raeburn1-33/+32
Cleaned up some namespace pollution; renamed elf vectors.
1993-04-28allow overrides of armap defaultsKen Raeburn1-0/+4
1993-04-17 * libbfd.c: Add signed versions of bfd_{h_,}{get,put}_signed_<size>.Jim Kingdon1-4/+12
libbfd.c, libbfd-in.h: Add _do*signed*. targets.c, all targets: Add bfd*signed*. bfd-in.h: Add bfd_signed_vma. Add comments.
1993-02-27revised elf supportKen Raeburn1-0/+212