aboutsummaryrefslogtreecommitdiff
path: root/bfd/xcofflink.c
AgeCommit message (Collapse)AuthorFilesLines
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.