aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
AgeCommit message (Collapse)AuthorFilesLines
1996-12-13Fri Dec 13 13:18:49 1996 Dan Wilder <dan@gasboy.com>Ian Lance Taylor1-2/+14
* coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k if NAMES_HAVE_UNDERSCORE is defined.
1996-09-17 * coffcode.h (coff_slurp_line_table): Warn about illegal symbolIan Lance Taylor1-10/+42
indices, rather than crashing. (coff_slurp_reloc_table): Likewise. Check whether the howto field is NULL.
1996-07-05No longer need to sanitize away h8/s stuff.Jeff Law1-6/+5
1996-06-20 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PEDavid Edelsohn1-6/+86
ifdef to COFF_WITH_PE. (coff_compute_section_file_positions): Likewise. (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE. * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete. * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef COFF_IMAGE_WITH_PE, always include.
1996-05-02 * coffcode.h (styp_to_sec_flags): Handle long symbol namesIan Lance Taylor1-6/+7
when looking for the section symbol.
1996-05-02 * coffcode.h (coff_write_object_contents): In comdat section lookup,David Edelsohn1-14/+21
stop looking when section is found.
1996-05-02 * coffcode.h (STRING_SIZE_SIZE): Define.Ian Lance Taylor1-6/+35
(bfd_coff_backend_data): Add _bfd_coff_long_section_names field. (bfd_coff_long_section_names): Define. (coff_write_object_contents): Handle long section names. (bfd_coff_std_swap_table): Initialize new field. * libcoff.h: Rebuild. * coffgen.c (make_a_section_from_file): Handle long section names. (coff_write_symbols): Handle long section names. * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field. * coff-mips.c (mips_ecoff_backend_data): Likewise. * pe-arm.c (COFF_LONG_SECTION_NAMES): Define. * pei-arm.c (COFF_LONG_SECTION_NAMES): Define. * pe-i386.c (COFF_LONG_SECTION_NAMES): Define. * pei-i386.c (COFF_LONG_SECTION_NAMES): Define. * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define. * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1996-04-17Update for SolarisMichael Meissner1-2/+2
1996-03-31 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.Steve Chamberlain1-18/+0
* coffcode.h (coff_compute_section_file_positions): Likewise. (coff_write_object_contents): Likewise.
1996-03-29 * section.c (SEC_LINK_ONCE): Define.Ian Lance Taylor1-12/+163
(SEC_LINK_DUPLICATES): Define. (SEC_LINK_DUPLICATES_DISCARD): Define. (SEC_LINK_DUPLICATES_ONE_ONLY): Define. (SEC_LINK_DUPLICATES_SAME_SIZE): Define. (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define. * bfd-in2.h: Rebuild. * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT. (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set SEC_LINK_ONCE, and look through the symbol table for the setting for SEC_LINK_DUPLICATES. (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is set for a section, find the section symbol in the symbol table, and set the aux entry based on SEC_LINK_DUPLICATES. * coffgen.c (coff_print_symbol): Add a space before "checksum". * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags. * coff-i386.c (i386coff_vec): Likewise. * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
1996-03-29 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.Jeff Law1-0/+2
* libbfd.h: Rebuilt. * linker.c (generic_link_hash_newfunc): No longer static. * coffcode.h (coff_bfd_link_hash_create): Allow specific targets to override. * coff-h8300.c: Add two derived hash tables and their associated funtions and #defines for use by the h8300 linker. (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in the function vector as needed. Place the address of the function vector entry in the location specified by the R_MEM_INDIRECT reloc. Rewrite the vectors section contents as necessary. (h8300_bfd_link_add_symbols): New function for the h8300 linker. (coff_bfd_link_add_symbols): Define to use h8300 specific version. (coff_bfd_link_hash_table_create): Likewise. Linker changes for function vectors. HMSE.
1996-03-28* coffgen.c (coff_bfd_make_debug_symbol): Improve comment.David Edelsohn1-1/+2
* coffcode.h (coff_new_section_hook): Ditto.
1996-03-22 * coffcode.h (coff_write_object_contents): AllocateSteve Chamberlain1-10/+20
buffers large enough for any FILEHDR or AOUTHDR.
1996-03-14 * coffcode.h: Allow specific backends to override theJeff Law1-8/+6
bfd_link_add_symbols routine. Not used yet, but it will be soon for hmse.
1996-02-05 * archures.c (bfd_mach_i960_hx): Define.Ian Lance Taylor1-2/+7
* bfd-in2.h: Rebuild. * cpu-i960.c (scan_960_mach): Accept machine "hx". (MATRIX): Expand entries for HX. (arch_info_struct): Add i960:hx entry. * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx. * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX. (coff_set_flags): Handle bfd_mach_i960_hx.
1996-01-31Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>Ian Lance Taylor1-23/+70
* coff-aux.c: New file. * hosts/m68kaux.h: New file. * config.bfd (m68*-apple-aux*): New target. * configure.in (m68*-apple-aux*): New native host. (m68kaux_coff_vec): New vector. * configure: Rebuild. * targets.c (m68kaux_coff_vec): Declare. * coffcode.h (bfd_coff_backend_data): Add field _bfd_coff_link_add_one_symbol. (bfd_coff_link_add_one_symbol): Define. (compare_arelent_ptr): New static function if TARG_AUX. (coff_write_relocs): If TARG_AUX, sort the relocs. (coff_write_object_contents): Set A/UX aouthdr magic number. (coff_link_add_one_symbol): Define if not defined. (bfd_coff_std_swap_table): Initialize new field. * libcoff.h: Rebuild. * cofflink.c (coff_link_add_symbols): Call bfd_coff_link_add_one_symbol rather than _bfd_generic_link_add_one_symbol. * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined. * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field. * coff-mips.c (mips_ecoff_backend_data): Likewise. * Makefile.in: Rebuild dependencies. (BFD32_BACKENDS): Add coff-aux.o. (BFD32_BACKENDS_CFILES): Add coff-aux.c.
1996-01-24remove incorrect BFD_ASSERT from last patchIan Lance Taylor1-1/+0
1996-01-23 * coffcode.h (coff_new_section_hook): Don't try to align theIan Lance Taylor1-0/+5
.stabstr section.
1996-01-23tipoIan Lance Taylor1-1/+1
1996-01-23 * coffcode.h (coff_set_section_contents): Fix the handling of theIan Lance Taylor1-6/+38
.lib section to work even if the entire section contents are written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and Robert Lipe <robertl@arnet.com>.
1996-01-19Numerous PowerPC PE fixesKim Knuttila1-0/+4
1996-01-03 * coffcode.h (coff_write_object_contents): If we don't know theIan Lance Taylor1-6/+5
section of the entry point for an XCOFF executable, always set the entry address to -1.
1995-12-15 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, notIan Lance Taylor1-1/+1
s_vaddr. * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not vma. * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
1995-12-12Fixes for .relocKim Knuttila1-0/+4
1995-12-04Removed some debugging prints. duhKim Knuttila1-5/+0
1995-12-01PowerPC DLL SupportKim Knuttila1-0/+28
1995-11-29 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory ifIan Lance Taylor1-28/+7
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-21 * coffcode.h (coff_compute_section_file_positions): Only pad theIan Lance Taylor1-10/+11
previous section to force file alignment when creating an executable. PR 8325.
1995-11-20 * coffcode.h (coff_compute_section_file_positions): IfIan Lance Taylor1-3/+71
RS6000COFF_C, set up the .debug section.
1995-11-12 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.Stan Shebs1-8/+93
* coff-rs6000.c (rs6000coff_vec): Add conditional defines TARGET_SYM and TARGET_NAME for vector and BFD name. * coff-pmac.c (pmac_xcoff_vec): Remove. (TARGET_SYM, TARGET_NAME): Define. * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the machine to 0, not all PowerMacs are 601s.
1995-11-09 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1Ian Lance Taylor1-0/+2
if RS6000COFF_C.
1995-11-07First round ld support for PPC PEKim Knuttila1-1/+38
1995-11-06Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>Ian Lance Taylor1-0/+16
* coff-i860.c: New file, based on coff-i386.c. * cpu-i860.c: New file, based on cpu-i386.c. * hosts/i860mach3.h: New file, based on hosts/i386mach3.h. * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New targets, using i860coff_vec. * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using trad-core.o and hosts/i860mach3.h. (i860coff_vec): Use coff-i860.o and cofflink.o. * configure: Rebuild. * Makefile.in: Rebuild dependencies. (ALL_MACHINES): Add cpu-i860.o. (BFD32_BACKENDS): Add coff-i860.o. (CFILES): Add cpu-i860.c and coff-i860.c. * targets.c (i860coff_vec): Declare. (bfd_target_vector): Add &i860coff_vec. * archures.c (bfd_i860_arch): Declare. (bfd_archures_list): Add &bfd_i860_arch. * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number. (coff_set_flags): Handle bfd_arch_i860. (coff_write_object_contents): Handle I860 a.out magic number.
1995-11-03fix typo in last changeIan Lance Taylor1-1/+1
1995-11-01Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 ↵Ian Lance Taylor1-0/+4
<manfred@lts.sel.alcatel.de> * coff-m88k.c (rtype2howto): New static function. (RTYPE2HOWTO): Use it rather than a macro definition. * coffcode.h (coff_write_object_contents): set internal_a.magic to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS). * configure.in: m68*-motorola-sysv3* does not use ptrace-core.o; define TRAD_HEADER to new file hosts/delta68.h. m88*-motorola-sysv*, however, does use ptrace-core.o. * hosts/delta68.h: New file. * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
1995-10-31 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM andIan Lance Taylor1-0/+2
C_ECOMM storage classes.
1995-10-26 * xcofflink.c: Numerous changes to get closer to a working XCOFFIan Lance Taylor1-25/+41
linker. * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr, toc_section, and entry_section fields. (struct xcoff_section_tdata): Remove ldrel_count field. * libcoff.h: Rebuild. * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data fields. (coff_compute_section_file_positions): If RS6000COFF_C, generate full a.out header if full_aouthdr is set in xcoff_data. (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc based on sections stored in xcoff_data. * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data fields. * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the value stored in ret rather than returning a pointer value.
1995-10-25 * xcofflink.c: Extensive changes to support linking shared objectsIan Lance Taylor1-0/+6
and generating a .loader section. * libcoff-in.h (struct xcoff_tdata): Add import_file_id field. (struct xcoff_section_tdata): Add first_symndx, last_symndx, and ldrel_count fields. * libcoff.h: Rebuild. * coff-rs6000.c (xcoff_howto_table): Correct reloc names. * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD is set. * bfd-in.h (bfd_xcoff_import_symbol): Declare. (bfd_xcoff_export_symbol): Declare. (bfd_xcoff_size_dynamic_sections): Declare. * bfd-in2.h: Rebuild.
1995-10-16 Add start at AIX linker support; no shared libraries yet.Ian Lance Taylor1-19/+123
* xcofflink.c: New file. * configure.in (rs600coff_vec): Use xcofflink.o. * configure: Rebuild. * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices fields. (struct xcoff_section_tdata): Define. (xcoff_section_data): Define macro. (_bfd_xcoff_bfd_link_hash_table_create): Declare. (_bfd_xcoff_bfd_link_add_symbols): Declare. (_bfd_xcoff_bfd_final_link): Declare. (_bfd_ppc_xcoff_relocate_section): Declare. * libcoff.h: Rebuild. * coff-rs6000.c: Clean up a bit. (xcoff_mkobject): Default modtype to 1L, not RE. Initialize cputype, csects, and debug_indices. (xcoff_copy_private_bfd_data): Copy cputype. (xcoff_howto_table): Rename from rs6000coff_howto_table. (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto. (xcoff_reloc_type_lookup): Rename from rs6000coff_reloc_type_lookup. (coff_relocate_section): Define. (_bfd_xcoff_sizeof_headers): Define. (_bfd_xcoff_bfd_get_relocated_section_contents): Define. (_bfd_xcoff_bfd_relax_section): Define. (_bfd_xcoff_bfd_link_split_section): Define. (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not coff. * coffcode.h (coff_compute_section_file_positions): If AIX, increment sofar by SMALL_AOUTSZ if not executable. (coff_write_object_contents): If AIX, always output an a.out header; if not executable, header size of SMALL_AOUTSZ. * hash.c (struct bfd_strtab_hash): Add xcoff field. (_bfd_stringtab_init): Initialize xcoff field. (_bfd_xcoff_stringtab_init): New function. (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length. (_bfd_stringtab_emit): In XCOFF mode, write out length. * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare. * libbfd.h: Rebuild. * Makefile.in: Rebuild dependencies. (BFD32_BACKENDS): Add xcofflink.o. (CFILES): Add xcofflink.c. ld -r works on hello, world.
1995-10-09 * coffcode.h (combined_entry_type): Add fix_line field.Ian Lance Taylor1-3/+41
(coff_slurp_line_table): Warn if we try to set the lineno field of a symbol twice. (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and C_EINCL by setting fix_line. Fix C_BSTAT symbol value. * coffgen.c (coff_mangle_symbols): Handle fix_line. (coff_write_symbol): Only use N_DEBUG if the symbol is in the absolute section. (coff_print_symbol): Print fix_value symbols in a useful fashion. * libcoff.h: Rebuild.
1995-10-09 * libcoff-in.h (struct xcoff_tdata): Define.Ian Lance Taylor1-8/+113
(xcoff_data): Define. * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union. * bfd-in2.h, libcoff.h: Rebuild. * coff-rs6000.c (xcoff_mkobject): New static function. (coff_mkobject): Define. (xcoff_copy_private_bfd_data): New static function. (coff_bfd_copy_private_bfd_data): Define. (rs6000coff_howto_table): Change R_TOC complain_on_overflow from signed to bitfield. (rs6000coff_vec): Add DYNAMIC to object_flags. * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and .loader sections specially. (coff_new_section_hook): If RS6000COFF_C, get the .text and .data section alignment from the XCOFF tdata information. (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on F_SHROBJ, and copy the extra a.out header information into the XCOFF tdata structure. (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ, F_DYNLOAD and the extra a.out header information. (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or C_HIDEXT symbol with attached csect information. * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap in the o_maxdata field. (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields. * coffgen.c (coff_renumber_symbols): Don't move any symbol to the end if BSF_NOT_AT_END is set.
1995-10-09 * coffcode.h (coff_slurp_symbol_table): Set BSF_NOT_AT_END for anIan Lance Taylor1-3/+12
XCOFF XTY_LD symbol.
1995-10-06 * coffcode.h (bfd_coff_backend_data): Add new fieldIan Lance Taylor1-25/+85
_bfd_coff_print_aux. (bfd_coff_print_aux): New static function. (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the scnlen field of an XTY_LD csect aux entry. (coff_print_aux): New static function. (coff_slurp_symbol_table): Don't pointerize scnlen field; now done in coff_pointerize_aux_hook. (bfd_coff_std_swap_table): Initialize new field. * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux. * libcoff.h: Rebuild. * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field. * coff-mips.c (mips_ecoff_backend_data): Likewise.
1995-10-06 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLGIan Lance Taylor1-1/+8
if there are symbols, for native AIX ld compatibility.
1995-10-06 * coffcode.h (bfd_coff_backend_data): Add new fieldIan Lance Taylor1-1/+64
_bfd_coff_pointerize_aux_hook. (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C or I960, and as 0 otherwise. (bfd_coff_std_swap_table): Initialize new field. * libcoff.h: Rebuild. * coffgen.c (coff_pointerize_aux): Change parameters to take symbol pointer instead of type and class, and to take aux index. Call _bfd_coff_pointerize_aux_hook if it is defined. (coff_get_normalized_symtab): Always call coff_pointerize_aux. * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields. * coff-mips.c (mips_ecoff_backend_data): Likewise.
1995-10-06 * coffcode.h (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXTIan Lance Taylor1-4/+0
if RS6000COFF_C.
1995-10-06 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to beIan Lance Taylor1-11/+13
BSF_LOCAL.
1995-10-04 * coffcode.h (coff_write_object_contents): Restore settingIan Lance Taylor1-0/+1
f_timdat to 0, deleted on August 22.
1995-10-03Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-6/+22
* coffcode.h (coff_bfd_copy_private_symbol_data, coff_bfd_copy_private_section_data, coff_bfd_copy_private_bfd_data): ifdef to allow overrides. * peicode.h (coff_bfd_copy_private_bfd_data): New (pe_bfd_copy_private_bfd_data): New. (coff_swap_scnhdr_in): Swap bss size into the right place. (pe_print_private_bfd_data): Add some newlines.
1995-09-28* coffcode.h (coff_new_section_hook): Make sure that the alignmentIan Lance Taylor1-4/+6
of .ctors and .dtors sections is no larger than 2. PR 8086.