2009-06-09 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index b7cf0effe0288e56d27aa37b30ad0d38657a96f7..296493b19e4a5a6f26a00bbaf66c5cf92c55b418 100644 (file)
@@ -1,3 +1,296 @@
+2009-06-09  Tristan Gingold  <gingold@adacore.com>
+
+       * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
+       and stabstr_segment fields.
+       (mach_o_be_vec, mach_o_le_vec): Removed
+       (bfd_mach_o_version): New prototype.
+
+       * mach-o.c (bfd_mach_o_version): Make this function public.
+       (mach_o_wide_p): New function.
+       (bfd_mach_o_wide_p): Ditto.
+       (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
+       weird names.
+       (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
+       Search in the list only if the name starts with a dot.
+       (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
+       test.  Check bfd_seek status.
+       (bfd_mach_o_scan_write_thread): Check bfd_seek status.
+       (bfd_mach_o_scan_write_section_32): Ditto.
+       (bfd_mach_o_scan_write_section_64): Ditto.
+       (bfd_mach_o_scan_write_section): Removed.
+       (bfd_mach_o_scan_write_segment): Split into ...
+       (bfd_mach_o_scan_write_segment_32): ... this and ...
+       (bfd_mach_o_scan_write_segment_64): ... this.  Check bfd_seek status.
+       (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
+       (bfd_mach_o_scan_write_symtab): ... this.  Write symtab from BFD
+       symbol table.  Now returns a boolean.
+       (bfd_mach_o_write_contents): Set filetype.  Check bfd_seek status.
+       Adjust for status type.
+       (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
+       test.  Write symbol table.  Numbers the sections.
+       (bfd_mach_o_read_header): Check bfd_seek status.
+       Use mach_o_wide_p instead of hard-coded test.
+       (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
+       (bfd_mach_o_scan_read_section_64): Ditto.
+       (bfd_mach_o_scan_read_symtab_symbol): Ditto.  Check bfd_seek status.
+       Use BFD_MACH_O_N_TYPE instead of hard-coded value.  Correctly
+       handled common symbols.
+       (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
+       (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
+       (bfd_mach_o_scan_read_dylinker): Ditto.
+       (bfd_mach_o_scan_read_dylib): Ditto.
+       (bfd_mach_o_scan_read_thread): Ditto.
+       (bfd_mach_o_scan_read_symtab): Ditto.
+       Do not create a section for the stabs.
+       (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
+       (bfd_mach_o_scan_read_segment): Ditto.
+       (bfd_mach_o_scan_read_command): Ditto.
+       (bfd_mach_o_scan_start_address): Ditto.
+       (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
+       (bfd_mach_o_archive_p): Check bfd_seek status.
+       (bfd_mach_o_core_fetch_environment): Ditto.
+
+       * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
+
+2009-06-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
+       (elf_i386_link_hash_table_create): Initialize irelifunc.
+       (elf_i386_check_relocs): Updated.  Set up irelifunc for
+       shared objects.
+       (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
+       relocation for non-GOT reference of STT_GNU_IFUNC symbol in
+       shared objects.
+       (elf_i386_relocate_section): Likewise.
+
+       * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
+       (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
+       (elf64_x86_64_check_relocs): Updated.  Set up irelifunc for
+       shared objects.
+       (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
+       relocation for non-GOT reference of STT_GNU_IFUNC symbol in
+       shared objects.
+       (elf64_x86_64_relocate_section): Likewise.
+
+       * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
+       ...
+       (_bfd_elf_create_ifunc_sections): This.
+
+       * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
+       ...
+       (_bfd_elf_create_ifunc_sections): This.  Create .rel[a].ifunc
+       for shared objects.
+
+2009-06-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
+       relocation for R_386_32 against STT_GNU_IFUNC symbol when
+       building shared object.  Check info->executable instead of
+       !info->shared when setting non_got_ref.
+       (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
+       for non-GOT reference of STT_GNU_IFUNC symbol in shared
+       object. Allocate GOT relocation agsinst STT_GNU_IFUNC
+       symbol if needed.
+       (elf_i386_relocate_section): Output dynamic relocation for
+       R_386_32 against STT_GNU_IFUNC symbol to get the real
+       function address when building shared object.
+       (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
+       relocation for STT_GNU_IFUNC symbol in shared object.
+
+       * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
+       dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
+       symbol when building shared object.  Check info->executable
+       instead of !info->shared when setting non_got_ref.
+       (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
+       for non-GOT reference of STT_GNU_IFUNC symbol in shared
+       library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
+       if needed.
+       (elf64_x86_64_relocate_section): Output dynamic relocation
+       for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
+       function address when building shared object.
+       (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
+       relocation for STT_GNU_IFUNC symbol in shared object.
+
+2009-06-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * Makefile.am: Run "make dep-am".
+       (BFD32_BACKENDS): Add mach-o-i386.lo.
+       (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
+       * Makefile.in: Regenerate.
+
+2009-06-06  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-spu.c (spu_elf_relocate_section): Match overlay number
+       when looking for soft-icache stubs.
+
+2009-06-05  Tristan Gingold  <gingold@adacore.com>
+
+       * mach-o.h: Update copyright year.
+       (bfd_mach_o_mach_header_magic): New enum.
+       (bfd_mach_o_cpu_subtype): Now an enum.
+       (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
+       (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
+       (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
+       (bfd_mach_o_load_command): Field type_required is now a boolean.
+       Reindent prototypes.
+       (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
+       (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
+       (bfd_mach_o_bfd_copy_private_section_data): Ditto.
+       (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
+       (bfd_mach_o_get_symtab_upper_bound): Ditto.
+       (bfd_mach_o_canonicalize_symtab): Ditto.
+       (bfd_mach_o_get_symbol_info): Ditto.
+       (bfd_mach_o_print_symbol): Ditto.
+       (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
+       (bfd_mach_o_make_empty_symbol): Ditto.
+       (bfd_mach_o_write_contents): Ditto.
+
+       * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
+       bfd_mach_o_mkobject): Defines.
+       (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
+       Do not check with target vector but with flavour.
+       (struct mach_o_section_name_xlat): New declaration.
+       (dwarf_section_names_xlat): Ditto.
+       (text_section_names_xlat): Ditto.
+       (data_section_names_xlat): Ditto.
+       (struct mach_o_segment_name_xlat): Ditto.
+       (segsec_names_xlat): Ditto.
+       (bfd_mach_o_convert_section_name_to_bfd): New function.
+       (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
+       (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
+       (bfd_mach_o_bfd_copy_private_section_data): Ditto.
+       (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
+       Accept any input and output flavour.  Do not share private data
+       anymore.
+       (bfd_mach_o_count_symbols): Add a comment.
+       (bfd_mach_o_get_symtab_upper_bound): Make it public.
+       (bfd_mach_o_canonicalize_symtab): Ditto.
+       (bfd_mach_o_get_symbol_info): Ditto.
+       (bfd_mach_o_print_symbol): Ditto.
+       (bfd_mach_o_write_header): Now returns a boolean instead of an int.
+       Use constants instead of hard-coded values.
+       (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
+       values.
+       (bfd_mach_o_scan_write_section_64): Ditto.
+       (bfd_mach_o_scan_write_segment): Ditto.
+       Do not copy sections anymore.
+       (bfd_mach_o_write_contents): Make it public.
+       Remove dead code.  Rewrite typeflag assignment.
+       (bfd_mach_o_build_commands): New function.
+       (bfd_mach_o_set_section_contents): Ditto.
+       (bfd_mach_o_make_empty_symbol): Make it public.
+       (bfd_mach_o_read_header): Make it static.
+       Convert to bfd_boolean.
+       Use constants instead of hard-coded values.
+       (bfd_mach_o_make_bfd_section): Call
+       bfd_mach_o_convert_section_name_to_bfd to create name.
+       (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
+       values.
+       (bfd_mach_o_scan_read_section_64): Ditto.
+       (bfd_mach_o_scan_read_segment): Do not create a bfd section for
+       a segment anymore.  Use constants instead of hard-coded values.
+       (bfd_mach_o_scan_read_command): Fix style.
+       (bfd_mach_o_scan): Use constants instead of hard-coded values.
+       Get rid of BFD_IO_FUNCS.
+       (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
+       (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
+       (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
+       (bfd_mach_o_object_p): Removed.
+       (bfd_mach_o_gen_core_p): New function, replaces ...
+       (bfd_mach_o_core_p): ... deleted.
+       (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
+
+       * mach-o-i386.c: New file.
+       * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
+       * configure.in (TDEFINES): Add mach_o_i386_vec.
+       * configure: Regenerated.
+       * targets.c: Add mach_o_i386_vec.
+
+       * mach-o.c: Update copyright years.
+       (BFD_IO_FUNCS): Remove (was not used).
+       (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
+       bfd_mach_o_slurp_extended_name_table,
+       bfd_mach_o_construct_extended_name_table,
+       bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
+       bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
+       bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
+       bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
+       bfd_mach_o_get_section_contents_in_window,
+       bfd_mach_o_bfd_is_local_label_name,
+       bfd_mach_o_bfd_is_target_special_symbol,
+       bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
+       bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
+       bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
+       bfd_mach_o_minisymbol_to_symbol,
+       bfd_mach_o_bfd_get_relocated_section_contents,
+       bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
+       bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
+       bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
+       bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
+       bfd_mach_o_bfd_merge_private_bfd_data,
+       bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
+       bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
+       bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
+       bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
+       bfd_mach_o_bfd_copy_private_header_data,
+       bfd_mach_o_core_file_matches_executable_p): Move these defines ...
+       * mach-o-target.c: ... here.
+       Update copyright years.
+
+2009-06-04  Alan Modra  <amodra@bigpond.net.au>
+
+       * dep-in.sed: Don't use \n in replacement part of s command.
+       * Makefile.am (DEP1): LC_ALL for uniq.
+       Run "make dep-am".
+       * Makefile.in: Regenerate.
+
+2009-06-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
+       h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
+       * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
+
+2009-06-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
+       GOT entry for STT_GNU_IFUNC symbol with pointer equality.
+       (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
+       against STT_GNU_IFUNC symbols for static executables.
+       (elf_i386_finish_dynamic_symbol): Load GOT entry with
+       PLT entry for STT_GNU_IFUNC symbol with pointer equality.
+
+       * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
+       GOT entry for STT_GNU_IFUNC symbol with pointer equality.
+       (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
+       PLT entry for STT_GNU_IFUNC symbol with pointer equality.
+
+2009-06-02  Richard Sandiford  <r.sandiford@uk.ibm.com>
+
+       * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
+       symbols to be left unimported when linking statically.
+       * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
+       code when linking statically.
+
+2009-06-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_check_relocs): Increment
+       got.refcount for R_386_GOT32/R_386_GOTOFF relocations
+       against STT_GNU_IFUNC symbol.
+       (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
+       local STT_GNU_IFUNC definition is used.
+       (elf_i386_relocate_section): Handle got.offset != -1 for
+       R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
+       symbol.
+
+       * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
+       got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
+       relocations against STT_GNU_IFUNC symbol.
+       (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
+       local STT_GNU_IFUNC definition is used.
+       (elf64_x86_64_relocate_section): Handle got.offset != -1
+       for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
+       STT_GNU_IFUNC symbol.
+
 2009-06-01  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/10205
 2009-04-21  H.J. Lu  <hongjiu.lu@intel.com>
 
        * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
-       
+
        * coffcode.h (coff_compute_section_file_positions): Clear
        D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
 
 
 2009-04-02  Sterling Augustine  <sterling@jaw.hq.tensilica.com>
 
-       * elf32-xtensa.c (relax_property_section): Always set r_offset 
+       * elf32-xtensa.c (relax_property_section): Always set r_offset
        to zero.
 
 2009-04-02  Christophe Lyon  <christophe.lyon@st.com>
 
        * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
        hidden symbols into the GOT or PLT.GOT.
-       (elf_vax_relocate_section): Do not emit a PCREL reloc 
+       (elf_vax_relocate_section): Do not emit a PCREL reloc
        into a shared object if it is against a hidden symbol.
 
 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
This page took 0.035405 seconds and 4 git commands to generate.