aboutsummaryrefslogtreecommitdiff
path: root/bfd/xcofflink.c
AgeCommit message (Collapse)AuthorFilesLines
1996-08-08 * xcofflink.c (xcoff_link_input_bfd): If we already called theIan Lance Taylor1-2/+19
undefined_symbol callback for a symbol, then don't issue any more warnings about loader relocs. (_bfd_ppc_xcoff_relocate_section): Don't do any further processing after calling the undefined_symbol callback.
1996-08-08 * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.Ian Lance Taylor1-7/+68
(xcoff_link_add_symbols): Permit multiple definitions of a symbol as the AIX linker seems to do. PR 10304.
1996-07-30 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regularIan Lance Taylor1-12/+16
archive search before looking for stripped dynamic objects. PR 10187.
1996-07-26 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefinedIan Lance Taylor1-4/+3
symbol a warning rather than an error. PR 10208.
1996-07-18 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TDIan Lance Taylor1-76/+100
symbol for a magic name. (xcoff_link_input_bfd): Don't change the reloc symbol for an XMC_TD symbol. (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an XMC_TD symbol.
1996-06-12 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitlyIan Lance Taylor1-1/+5
for _ptrgl, and treat it as global linkage code. PR 9860.
1996-06-11 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for aIan Lance Taylor1-7/+27
common symbol defined by the linker. Don't export function code even if export_defineds is set. PR 9856.
1996-04-24 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through theIan Lance Taylor1-24/+454
members of an archive for dynamic objects with no symbols, and pass them directly to check_archive_element. (xcoff_link_check_ar_symbols): Pass dynamic objects to xcoff_link_check_dynamic_ar_symbols. (xcoff_link_check_dynamic_ar_symbols): New static function. The above is for PR 9520. * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC from _bfd_nodynamic to _bfd_xcoff. * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound): Declare. (_bfd_xcoff_canonicalize_dynamic_symtab): Declare. (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare. (_bfd_xcoff_canonicalize_dynamic_reloc): Declare. * libcoff.h: Rebuild. * xcofflink.c (xcoff_swap_ldrel_in): New static function. (xcoff_get_section_contents): New static function. (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function. (_bfd_xcoff_canonicalize_dynamic_symtab): New function. (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function. (xcoff_dynamic_reloc): New static variable. (_bfd_xcoff_canonicalize_dynamic_reloc): New function. (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
1996-04-17 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.Ian Lance Taylor1-3/+12
1996-03-27Remove SEC_LINKER_MARK, and add a linker_mark bitfield to the asectionIan Lance Taylor1-2/+2
structure instead.
1996-03-27 * section.c (SEC_LINKER_MARK): Define.Ian Lance Taylor1-0/+12
* bfd-in2.h: Rebuild. * aoutx.h (NAME(aout,final_link)): Mark sections included in the link. (aout_link_input_bfd): Don't link unmarked sections. * cofflink.c (_bfd_coff_final_link): Mark sections included in the link. (_bfd_coff_link_input_bfd): Don't link unmarked sections. * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in the link. * elflink.h (elf_bfd_final_link): Mark sections included in the link. (elf_link_input_bfd): Don't link unmarked sections. * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included in the link. (xcoff_link_input_bfd): Don't link unmarked sections.
1996-03-22 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCLIan Lance Taylor1-28/+46
symbols.
1996-01-15update copyrightsIan Lance Taylor1-1/+1
1996-01-12 * xcofflink.c (xcoff_link_add_symbols): Create the specialIan Lance Taylor1-12/+39
sections if we see a DYNAMIC object, in case that is the only XCOFF input object we see. PR 8788.
1995-12-01 * libbfd.c (bfd_malloc, bfd_realloc): New functions.Ian Lance Taylor1-62/+32
(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-29 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory ifIan Lance Taylor1-77/+19
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 * xcofflink.c (bfd_xcoff_size_dynamic_sections): ClearIan Lance Taylor1-1/+5
special_sections before returning when called with a non XCOFF BFD.
1995-11-20 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor valueIan Lance Taylor1-11/+38
if it is not large enough to accomodate the entire TOC area with signed 16 bit offsets. (xcoff_write_global_symbol): Handle negative TOC offsets in global linkage code. (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a TOC anchor to use the TOC value used in the output file.
1995-11-09 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C versionIan Lance Taylor1-64/+69
which checks for STYP_OVRFLO sections. (coff_compute_section_file_positions): If RS6000COFF_C, handle reloc and lineno count overflows. (coff_write_object_contents): Call coff_count_linenumbers before coff_compute_section_file_positions. If RS6000COFF_C, handle reloc and lineno count overflows. * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and relocs before dealing with .pad sections. Count overflow section headers when handling .pad sections.
1995-11-09 * xcofflink.c (XCOFF_DESCRIPTOR): Define.Ian Lance Taylor1-5/+284
(struct xcoff_link_hash_table): Add descriptor_section and special_sections fields. (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields. (xcoff_link_add_symbols): Set linkage section alignment. Create descriptor section. Check for magic symbol names (_text, etc.), and record them in special_sections if found. Set XCOFF_DESCRIPTOR flag for a function descriptor, and set its descriptor field to point back to the function code symbol. (xcoff_sweep): Always mark the special descriptor_section. (bfd_xcoff_export_symbol): Check whether the symbol might be a function descriptor, and mark it if it is. (bfd_xcoff_size_dynamic_sections): Add new special_sections parameter, and fill it in. Allocate space for the descriptor section. (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining global linkage code. If an undefined function descriptor is exported, arrange to define it. Warn about any other undefined exported symbol. (_bfd_xcoff_bfd_final_link): Write out the descriptor section. (xcoff_write_global_symbol): Create a function descriptor when necessary. * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration. * bfd-in2.h: Rebuild.
1995-11-08 * xcofflink.c (xcoff_find_reloc): Handle the case of a singleIan Lance Taylor1-1/+6
reloc correctly.
1995-11-08more XCOFF linker hackeryIan Lance Taylor1-26/+58
1995-11-08 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.Ian Lance Taylor1-87/+168
Change all uses. (xcoff_swap_ldhdr_in): New static function. (xcoff_swap_ldsym_in): New static function. (xcoff_link_add_symbols): If we just created a descriptor, pass it to _bfd_generic_link_add_one_symbol, to save a hash lookup. (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols rather than normal symbol table. (xcoff_mark): When considering called symbols, check whether the descriptor is from a dynamic object, rather than the symbol itself. (xcoff_build_ldsyms): Likewise.
1995-11-06 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power ofIan Lance Taylor1-5/+10
the created .tc section to 2. (xcoff_mark): Don't keep a .loader reloc for a call to an undefined symbol when creating a shared library. (xcoff_build_ldsyms): When creating a shared library, generate global linkage code for a call to an undefined symbol.
1995-11-03 * xcofflink.c (xcoff_link_add_symbols): Rename local variable subIan Lance Taylor1-48/+69
to o. Clobber and restore the list of new csects around the call to _bfd_generic_link_add_one_symbol, in case it wants to report a linker error and the linker wants to read the symbol table. Reset the line number count of a real section even if it has no relocs. (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
1995-11-03 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn aboutIan Lance Taylor1-1/+2
an undefined symbol in a shared link.
1995-11-01 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if theIan Lance Taylor1-0/+26
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-11-01 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro toIan Lance Taylor1-1/+5
static function. * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set full_aouthdr flag here... (_bfd_xcoff_bfd_final_link): ...not here.
1995-10-31 * xcofflink.c (xcoff_mark_symbol): New static function, broken outIan Lance Taylor1-227/+211
of xcoff_mark. (xcoff_mark): Call xcoff_mark_symbol. (bfd_xcoff_export_symbol): Call xcoff_mark_symbol. (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than doing it by hand. (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
1995-10-30 * xcofflink.c (struct xcoff_final_link_info): Add new line_fileposIan Lance Taylor1-45/+142
field. (xcoff_find_reloc): New static function. (xcoff_link_add_symbols): Use it. (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos. (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't relocate the value of C_DECL.
1995-10-28 * xcofflink.c (xcoff_link_add_symbols): Handle csects in theIan Lance Taylor1-26/+31
absolute section.
1995-10-27 * xcofflink.c: More improvements, mostly to fix handling ofIan Lance Taylor1-57/+293
constructors and a few other special cases. * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to zero, reverting yesterday's change. * bfd-in.h (bfd_xcoff_link_record_set): Declare. (bfd_xcoff_link_count_reloc): Declare. (bfd_xcoff_record_link_assignment): Declare. * bfd-in2.h: Rebuild.
1995-10-27more XCOFF linker tweaksIan Lance Taylor1-3/+25
1995-10-27fix output location of common symbolsIan Lance Taylor1-1/+4
1995-10-26do not output symbols which need relocs until the endIan Lance Taylor1-8/+0
1995-10-26get symndx right for TOC relative relocsIan Lance Taylor1-15/+60
1995-10-26tweak .loader reloc countingIan Lance Taylor1-1/+7
1995-10-26 * xcofflink.c: Numerous changes to get closer to a working XCOFFIan Lance Taylor1-153/+228
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-25fix XCOFF line number handlingIan Lance Taylor1-16/+41
1995-10-25set l_stoff to 0 if there are no stringsIan Lance Taylor1-4/+8
1995-10-25only read the section relocs if there are someIan Lance Taylor1-40/+44
1995-10-25tweak line number and gc handlingIan Lance Taylor1-1/+11
1995-10-25 * xcofflink.c: Extensive changes to support linking shared objectsIan Lance Taylor1-438/+2468
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-25 * configure.in: Add xcofflink.o to pmac_xcoff_vec.Stan Shebs1-0/+2817
* configure: Rebuild. * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos. * coff-pmac.c: Include coff-rs6000.c instead of duplicating its contents. (pmac_xcoff_vec): Update to use new xcoff support. * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static. (xcoff_write_armap): Declare buf as unsigned char. * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR. * mpw-make.sed: Generalize subdir_do edit.