* archive64.c (bfd_elf64_archive_write_armap): Fix buffer overrun
[binutils.git] / bfd / ChangeLog
blob41b6cb9714b9f4c4fadb03a3905db716c13fce5e
1 2010-06-23  Nathan Sidwell  <nathan@codesourcery.com>
3         * archive64.c (bfd_elf64_archive_write_armap): Fix buffer overrun
4         when scaning map.
6 2010-06-17  Tristan Gingold  <gingold@adacore.com>
8         * Makefile.am (BFD32_BACKENDS_CFILES): Move vms-alpha.c to ...
9         (BFD64_BACKENDS_CFILES): ... here.
10         (BFD32_BACKENDS): Move vms-alpha.lo to ...
11         (BFD64_BACKENDS): ... here.
12         * Makefile.in: Regenerate.
14 2010-06-15  Joseph Myers  <joseph@codesourcery.com>
16         * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2.
17         * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type,
18         elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes,
19         elf32_tic6x_merge_private_bfd_data): New.
20         (bfd_elf32_bfd_merge_private_bfd_data,
21         elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section,
22         elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor):
23         Define.
24         * elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare.
26 2010-06-15  Joseph Myers  <joseph@codesourcery.com>
28         * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Define.
29         (struct elf_backend_data): Update comment on obj_attrs_order.
30         * elf-attrs.c (vendor_obj_attr_size, vendor_set_obj_attr_contents,
31         _bfd_elf_copy_obj_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
32         instead of hardcoded 4.
33         * elf32-arm.c (elf32_arm_obj_attrs_order): Use
34         LEAST_KNOWN_OBJ_ATTRIBUTE and LEAST_KNOWN_OBJ_ATTRIBUTE + 1
35         instead of hardcoded 4 and 5.
36         (elf32_arm_merge_eabi_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
37         instead of hardcoded 4.
39 2010-06-14  Kevin Buettner  <kevinb@redhat.com>
41         * elf32-h8300.c (elf_symbol_leading_char): Define.
43 2010-06-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
45         * vms-alpha.c (_bfd_vms_write_egsd): Make sname const.
47 2010-06-11  Tristan Gingold  <gingold@adacore.com>
49         * vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute
50         sections to 0.
52 2010-06-11  Tristan Gingold  <gingold@adacore.com>
54         * vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW.
56 2010-06-11  Tristan Gingold  <gingold@adacore.com>
58         * vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const.
59         Adjust cast.
60         (_bfd_vms_output_dump): Make DATA argument const, adjust cast.
61         * vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust.
62         * vms-alpha.c (evax_section_flags): Make it const.
63         (vms_secflag_by_name): Remove unused ABFD argument.
64         Make SECTION_FLAGS and NAME arguments const. Clarify comment.
65         (vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const.
66         (_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name.
67         (_bfd_vms_write_egsd): Remove useless cast.
69 2010-06-10  Tristan Gingold  <gingold@adacore.com>
71         * config.bfd: Remove #if/#endif so that som can be compiled on any
72         host.
73         * targets.c (_bfd_target_vector): Remove #if/#endif so that som
74         can be used on any host.
76 2010-06-10  Tristan Gingold  <gingold@adacore.com>
78         * som.c: Can now be compiled on any host.
79         Include bfd headers instead of system one.
80         (som_compute_checksum): Parameter is now a pointer to a
81         som_external_header structure.  Adjust.
82         (struct section_to_type): Field section is now const.
83         (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Removed conditional
84         definition.
85         (R_LONG_PCREL_MODE, R_N0SEL, R_N1SEL, R_LINETAB): Ditto.
86         (R_LINETAB_ESC, R_LTP_OVERRIDE, R_COMMENT): Ditto.
87         (som_swap_clock_in, som_swap_clock_out): New functions.
88         (som_swap_header_in, som_swap_header_out): Likewise.
89         (som_swap_space_dictionary_in): Likewise.
90         (som_swap_space_dictionary_out): Likewise.
91         (som_swap_subspace_dictionary_in): Likewise.
92         (som_swap_subspace_dictionary_record_out): Likewise.
93         (som_swap_aux_id_in, som_swap_aux_id_out): Likewise.
94         (som_swap_string_auxhdr_out): Likewise.
95         (som_swap_compilation_unit_out): Likewise.
96         (som_swap_exec_auxhdr_in): Likewise.
97         (som_swap_exec_auxhdr_out): Likewise.
98         (som_swap_lst_header_in): Likewise.
99         (som_object_setup): Adjust parameter type using bfd types.
100         (setup_sections): Likewise.  Ditto for object file types.
101         Use intermediate variables for external representation and use the
102         swap functions to convert.
103         (som_object_p): Ditto.  Remove #ifdef/#endif on always defined
104         macros.
105         (som_prep_headers): Likewise.
106         (som_write_symbol_strings): Likewise.
107         (som_begin_writing): Likewise.
108         (som_finish_writing): Likewise.
109         (som_build_and_write_symbol_table): Likewise.
110         (bfd_section_from_som_symbol): Likewise.
111         (som_slurp_symbol_table): Likewise.
112         (som_bfd_print_private_bfd_data): Likewise.
113         (bfd_som_attach_aux_hdr): Likewise.  Clear the padding.
114         (bfd_som_attach_compilation_unit): Likewise.
115         (som_bfd_count_ar_symbols): Likewise.
116         (som_bfd_fill_in_ar_symbols): Likewise.
117         (som_slurp_armap): Likewise.
118         (som_bfd_ar_write_symbol_stuff): Likewise.
119         (som_write_armap): Likewise.  Use _bfd_ar_spacepad instead of
120         sprintf to write header fields.
121         * som.h: Include bfd headers instead of system one.
122         (FILE_HDR_SIZE, AUX_HDR_SIZE): Removed.
123         (struct somdata): Use bfd structures instead of system ones.
124         (struct som_section_data_struct): Likewise.
125         (struct som_subspace_dictionary_record): Removed (now in
126         include/som/internal.h)
128 2010-06-10  Tristan Gingold  <gingold@adacore.com>
130         * targets.c (bfd_target_list): Remove hp/ux compiler work-around
131         as bfd requires an ANSI-C compiler.
133 2010-06-09 Tristan Gingold  <gingold@adacore.com>
135         * bfdio.c (bfd_bread): Fix the code to prevent reading past the
136         end of archive members.
138 2010-06-08  Tristan Gingold  <gingold@adacore.com>
140         * som.c (som_bfd_free_cached_info): Do not free relocations as
141         they were allocated with bfd_zalloc.
143 2010-06-08  Tristan Gingold  <gingold@adacore.com>
145         * vms-lib.c (_bfd_vms_lib_write_archive_contents): Increment
146         for the first block.
148 2010-06-08  Tristan Gingold  <gingold@adacore.com>
150         * vms-lib.c (_bfd_vms_lib_ia64_mkarchive): New function.
151         * libbfd-in.h (_bfd_vms_lib_ia64_mkarchive): Declare.
152         * libbfd.h: Regenerate.
153         * elfxx-ia64.c (bfd_elfNN_write_archive_contents): Redefine for VMS.
154         (bfd_elfNN_mkarchive): Ditto.
156 2010-06-02  Tristan Gingold  <gingold@adacore.com>
158         * vms-alpha.c (alpha_vms_bfd_final_link): Fix 64bit constant.
160 2010-06-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
162         * configure: Regenerate.
164 2010-06-01  Tristan Gingold  <gingold@adacore.com>
166         * vms-alpha.c (struct vms_private_data_struct): Add
167         transfer_address field.  Remove unused dst_info field.
168         (alpha_vms_write_exec): Use transfer_address.
169         (_bfd_vms_write_egsd): Add a comment about LIB$INITIALIZE.
170         (alpha_vms_bfd_final_link): Set transfer_address.
172 2010-05-31  Tristan Gingold  <gingold@adacore.com>
174         * vms-lib.c (credat_lo, credat_hi): New fields.
175         (vms_read_block): Adjust comments.
176         (vms_write_block): New function.
177         (_bfd_vms_lib_archive_p): Decode majorid once.  Replace some
178         hard-coded values with constants.  Set credat_lo and credat_hi.
179         (_bfd_vms_lib_mkarchive): Add argument kind.
180         Set ver, mhd_size and type according to kind.
181         (_bfd_vms_lib_alpha_mkarchive): New function.
182         (struct lib_index): Renamed from struct vms_index
183         (lib_index_cmp): Renamed from vms_index_cmp.  Adjusted.
184         (get_idxlen): Type of idx argument adjusted.  Add is_elfidx
185         argument and handle it.
186         (vms_write_index): Adjust argument idx.  Handle elf indexes.
187         (_bfd_vms_lib_build_map): Adjust type of arguments modules and res.
188         (_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and
189         use it.  Handle elf indexes.  Set credat.
190         * libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ...
191         (_bfd_vms_lib_alpha_mkarchive): ... this.
192         * libbfd.h: Regenerated.
193         * vms-alpha.c (vms_alpha_vec): Adjust after previous renaming.
195 2010-05-28  Sterling Augustine  <sterling@tensilica.com>
197         * elf32-xtensa.c (elf_xtensa_relocate_section): Add a large amount
198         of code to change the bits in the instructions to match the changes
199         in the relocations.  Declare dest_addr and sym_sec to help.
201 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
203         Workaround GCC PR middle-end/4210.
204         * vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
205         and val[3].
207 2010-05-27  Tristan Gingold  <gingold@adacore.com>
209         * vms-misc.c: Define __NEW_STARLET.  Remove trailing spaces.
210         (VMS_TIME_FACTOR, VMS_TIME_OFFSET): New macros.
211         (vms_time_to_time_t): Use them instead of local const.
212         (vms_time_t_to_vms_time): New function.
213         (vms_get_time): Likewise.
214         (vms_raw_get_time): Likewise.
215         * vms.h (vms_time_t_to_vms_time): New declaration.
216         (vms_get_time): Likewise.
217         (vms_raw_get_time): Likewise.
219 2010-05-26  Tristan Gingold  <gingold@adacore.com>
221         * vms-alpha.c: Update comments.
222         (alpha_vms_write_exec): Set lnkflags.  Write the GST.
223         (alpha_vms_link_output_symbol): New function.
224         (alpha_vms_bfd_final_link): Generate the VMS symbol table.
225         Set dst_section private field.
226         (alpha_vms_bfd_final_link): Remove code that set dst_section.
228 2010-05-26  Tristan Gingold  <gingold@adacore.com>
230         * bfdio.c: Declare and define _bfd_memory_iovec.
231         (bfd_bread): Move code for BFD_IN_MEMORY...
232         (bfd_bwrite): ... Ditto ...
233         (bfd_tell): ... Ditto ...
234         (bfd_flush): ... Ditto ...
235         (bfd_stat): ... Ditto ...
236         (bfd_seek): ... Ditto ...
237         (bfd_get_size): ... Ditto ...
238         (bfd_mmap): ... Ditto ...
239         (memory_bread): ... to these new functions.
240         (memory_bwrite): Ditto.
241         (memory_btell): Ditto.
242         (memory_bseek): Ditto.
243         (memory_bflush): Ditto.
244         (memory_bstat): Ditto.
245         (memory_bmmap): Ditto.
246         (memory_bclose): New function.
247         * peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY.
248         * xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto.
249         * opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case.
250         (bfd_make_writable): Use _bfd_memory_iovec.
251         * elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec.
252         * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use
253         _bfd_memory_iovec.
254         (alpha_ecoff_openr_next_archived_file): Use proxy_origin
255         instead of origin.
256         * libbfd.h: Regenerate.
258 2010-05-25  Daniel Jacobowitz  <dan@codesourcery.com>
259             Joseph Myers  <joseph@codesourcery.com>
260             Andrew Stubbs  <ams@codesourcery.com>
262         * config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add
263         bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs.
264         * configure.in: Handle FDPIC vectors.
265         * elf32-sh-relocs.h: Add FDPIC and movi20 relocations.
266         * elf32-sh.c (DEFAULT_STACK_SIZE): Define.
267         (SYMBOL_FUNCDESC_LOCAL): Define.  Use it instead of
268         SYMBOL_REFERENCES_LOCAL for function descriptors.
269         (fdpic_object_p): New.
270         (sh_reloc_map): Add FDPIC and movi20 relocations.
271         (sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid
272         range.
273         (struct elf_sh_plt_info): Add got20 and short_plt.  Update all
274         definitions.
275         (FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define.
276         (fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New.
277         (FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define.
278         (fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le)
279         (fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts):
280         New.
281         (get_plt_info): Handle FDPIC.
282         (MAX_SHORT_PLT): Define.
283         (get_plt_index, get_plt_offset): Handle short_plt.
284         (union gotref): New.
285         (struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to
286         got_type and adjust all uses.  Add GOT_FUNCDESC.
287         (struct sh_elf_obj_tdata): Add local_funcdesc.  Rename
288         local_got_tls_type to local_got_type.
289         (sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type.  All
290         users changed.
291         (sh_elf_local_funcdesc): Define.
292         (struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p,
293         and srofixup.
294         (sh_elf_link_hash_newfunc): Initialize new fields.
295         (sh_elf_link_hash_table_create): Set fdpic_p.
296         (sh_elf_omit_section_dynsym): New.
297         (create_got_section): Create .got.funcdesc, .rela.got.funcdesc
298         and .rofixup.
299         (allocate_dynrelocs): Allocate local function descriptors and space
300         for R_SH_FUNCDESC-related relocations, and for rofixups.
301         Handle GOT_FUNCDESC.  Create fixups.  Handle GOT entries which
302         require function descriptors.
303         (sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize.
304         (sh_elf_modify_program_headers): New.
305         (sh_elf_size_dynamic_sections): Allocate function descriptors for
306         local symbols.  Allocate .got.funcdesc contents.  Allocate rofixups.
307         Handle local GOT entries of type GOT_FUNCDESC.  Create fixups for
308         local GOT entries.  Ensure that FDPIC libraries always have a PLTGOT
309         entry in the .dynamic section.
310         (sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc)
311         (sh_elf_add_rofixup, sh_elf_osec_to_segment)
312         (sh_elf_osec_readonly_p, install_movi20_field): New functions.
313         (sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC,
314         R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC.  Use sh_elf_got_offset
315         and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_.  Add rofixup
316         read-only section warnings.  Handle undefined weak symbols.  Generate
317         fixups for R_SH_DIR32 and GOT entries.  Check for cross-segment
318         relocations and clear EF_SH_PIC.  Handle 20-bit relocations.
319         Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
320         (sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20,
321         R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC.
322         Handle 20-bit relocations.
323         (sh_elf_copy_indirect_symbol): Copy function descriptor reference
324         counts.
325         (sh_elf_check_relocs): Handle new relocations.  Make symbols
326         dynamic for FDPIC relocs.  Account for rofixups.  Error for FDPIC
327         symbol mismatches.  Allocate a GOT for R_SH_DIR32. Allocate fixups
328         for R_SH_DIR32.
329         (sh_elf_copy_private_data): Copy PT_GNU_STACK size.
330         (sh_elf_merge_private_data): Copy initial flags.  Do not clobber
331         non-mach flags.  Set EF_SH_PIC for FDPIC.  Reject FDPIC mismatches.
332         (sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries
333         here.  Rename sgot to sgotplt and srel to srelplt.  Handle short_plt,
334         FDPIC descriptors, and got20.  Create R_SH_FUNCDESC_VALUE for FDPIC.
335         Use install_movi20_field.  Rename srel to srelgot.  Always generate
336         R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
337         (sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup.
338         Do not fill in reserved GOT entries for FDPIC.  Correct DT_PLTGOT.
339         Rename sgot to sgotplt.  Assert that the right number of rofixups
340         and dynamic relocations were allocated.
341         (sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New.
342         (elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym.
343         (elf_backend_can_make_relative_eh_frame)
344         (elf_backend_can_make_lsda_relative_eh_frame)
345         (elf_backend_encode_eh_address): Define.
346         (TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM)
347         (TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed):
348         Redefine for FDPIC vector.
349         * reloc.c: Add SH FDPIC and movi20 relocations.
350         * targets.c (_bfd_target_vector): Add FDPIC vectors.
351         * configure, bfd-in2.h, libbfd.h: Regenerated.
353 2010-05-25  Jay Krell  <jay.krell@cornell.edu>
355         PR ld/11624
356         * archive.c (_bfd_calloc_wrapper): New function.
357         (_bfd_add_bfd_to_archive_cache): Use it.
359         * configure.in: Add alpha*-*-*vms* to list of natives.
360         * configure: Regenerate.
362         * vms-misc.c: Define globalref if necessary.
363         (vms_convert_to_var_unix_filename): Rename to
364         _bfd_vms_convert_to_var_unix_filename and export.
365         * vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
366         * vms-alpha.c (vms_close_and_cleanup): Update invocation of
367         vms_convert_to_var_unix_filename.
369 2010-05-24  Tristan Gingold  <gingold@adacore.com>
371         * vms-alpha.c (add_symbol_entry): New function extrated from ...
372         (add_symbol): ... adjusted.
374 2010-05-24  Tristan Gingold  <gingold@adacore.com>
376         * vms-alpha.c (_bfd_vms_slurp_egsd): Fix indentation.
377         (alpha_vms_write_exec): Add a comment.
378         (_bfd_vms_write_egsd): Ditto.
379         (alpha_vms_convert_symbol): Remove a blank line.
381 2010-05-21  Tristan Gingold  <gingold@adacore.com>
383         * vms-alpha.c (_bfd_vms_slurp_eihs): Do not create a bfd section
384         for the GST.
386 2010-05-21  Tristan Gingold  <gingold@adacore.com>
388         * vms-alpha.c (_bfd_vms_slurp_eisd): Set SEC_HAS_CONTENTS and
389         SEC_LOAD if isect has data.
390         (vms_get_symbol_info): Refine the condition for 'T' type.
392 2010-05-18  Tristan Gingold  <gingold@adacore.com>
394         * vms-alpha.c (_bfd_vms_write_emh): New function.
395         (_bfd_vms_write_lmn): New function.
396         (_bfd_vms_write_eeom): Moved.
397         (hash_string): Likewise.
398         (_bfd_vms_length_hash_symbol): Likewise.
399         (_bfd_vms_write_ehdr): Code moved to _bfd_vms_write_emh
400         and _bfd_vms_write_lmn, and call these functions.
402 2010-05-18  Tristan Gingold  <gingold@adacore.com>
404         * vms-alpha.c (evax_bfd_print_dst): Handle INCR_LINUM_L.
405         Add details in the messages.
406         (evax_bfd_print_image): Change message.
408 2010-05-18  H.J. Lu  <hongjiu.lu@intel.com>
410         PR gas/11600
411         * elf.c (_bfd_elf_make_section_from_shdr): Handle SHF_EXCLUDE
412         (elf_fake_sections): Likewise.
414         * elf32-i370.c (i370_elf_section_from_shdr): Don't handle
415         SHF_EXCLUDE here.
416         * elf32-ppc.c (ppc_elf_fake_sections): Likewise.
418 2010-05-17  Tristan Gingold  <gingold@adacore.com>
420         * vms-alpha.c: Include esgps.h and eidc.h.
421         (_bfd_vms_slurp_egsd): Ignore SPSC and IDC sub-records.
422         (evax_bfd_print_egsd_flags): New function, extracted from ...
423         (evax_bfd_print_egsd): ..., calls evax_bfd_print_egsd_flags.  Handles
424         EGSD__C_SPSC and EGSD__C_IDC.
426 2010-05-14  Tristan Gingold  <gingold@adacore.com>
428         * vms-alpha.c (alpha_vms_object_p): Accept header size of 0.
429         (_bfd_vms_get_object_record): Handle align byte only in the
430         foreign case.
432 2010-05-14  Tristan Gingold  <gingold@adacore.com>
434         * vms-lib.c (_bfd_vms_lib_ia64_archive_p): New function.
435         * libbfd-in.h (_bfd_vms_lib_ia64_archive_p): Add prototype.
436         * libbfd.h: Regenerate.
437         * configure.in (havevecs): Define HAVE_all_vecs when
438         --enable-targets=all is set.  Use AC_SUBST on it.
439         (tdefaults): Do not add havevecs.
440         (bfd_elf64_ia64_vms_vec): Add vms-lib.lo and vms-misc.lo
441         * configure: Regenerate.
442         * Makefile.am (HAVEVECS): New variable.
443         (INCLUDES): Add HAVEVECS.
444         * Makefile.in: Regenerate.
445         * elfxx-ia64.c (INCLUDE_IA64_VMS): New macro, defined if vms
446         target is selected.  Add #ifdef/#endif around vms specific code.
447         (bfd_elfNN_archive_p, bfd_elfNN_archive_slurp_armap,
448         bfd_elfNN_archive_slurp_extended_name_table,
449         bfd_elfNN_archive_construct_extended_name_table,
450         bfd_elfNN_archive_truncate_arname,
451         bfd_elfNN_archive_write_armap,
452         bfd_elfNN_archive_read_ar_hdr,
453         bfd_elfNN_archive_write_ar_hdr,
454         bfd_elfNN_archive_openr_next_archived_file,
455         bfd_elfNN_archive_get_elt_at_index,
456         bfd_elfNN_archive_generic_stat_arch_elt,
457         bfd_elfNN_archive_update_armap_timestamp): Define to use vms archives.
459 2010-05-11  Jie Zhang  <jie@codesourcery.com>
461         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge
462         Tag_ABI_HardFP_use correctly.
464 2010-05-11  Alan Modra  <amodra@gmail.com>
466         * coffcode.h (coff_write_object_contents): Enclose all occurrences
467         of hasdebug and is_reloc_section in #ifdef COFF_IMAGE_WITH_PE.
469 2010-05-07  Daniel Jacobowitz  <dan@codesourcery.com>
471         * elf32-arm.c (struct a8_erratum_reloc): Add hash member.  Move
472         sym_name to improve packing.
473         (cortex_a8_erratum_scan): Check for PLT entries.
474         (elf32_arm_size_stubs): Save the target symbol for a8 relocs.
476 2010-05-07  Tristan Gingold  <gingold@adacore.com>
478         * Makefile.in: Regenerate with automake 1.11.1.
479         * aclocal.m4: Ditto.
481 2010-05-05  Nick Clifton  <nickc@redhat.com>
483         * po/es.po: Updated Spanish translation.
485 2010-05-03  Tristan Gingold  <gingold@adacore.com>
487         * vms-lib.c (vms_lib_bopen): Fix the size threshold to read
488         selective_search flag.
489         Add comments.
490         * vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section
491         before output_has_begun is set.
493 2010-05-03  Tristan Gingold  <gingold@adacore.com>
495         * vms-alpha.c: Add comments.
496         (struct vms_private_data_struct): Remove image_autoextend field.
497         (dst_check_allocation): Removed.
498         (image_write): Remove call to dst_check_allocation.
499         (vms_slurp_debug): Do not set image_autoextend.  Adjust section
500         size.
501         (_bfd_vms_slurp_object_records): Remove useless new_type variable.
502         (alpha_vms_write_exec): Use dst_section to get the dst section.
503         Write the dmt section.
504         (evax_bfd_print_image): Also print the dst size in hexa.  Fix typo.
505         (alpha_vms_read_sections_content): Do not set image_autoextend.
506         (alpha_vms_bfd_final_link): Generate the dst.
508 2010-05-03  Tristan Gingold  <gingold@adacore.com>
510         * vms-lib.c (_bfd_vms_lib_archive_p): Adjust for a possible empty
511         next array.
512         (vms_lib_dcx): Adjust for the above change.
514 2010-04-30  H.J. Lu  <hongjiu.lu@intel.com>
516         PR ld/11542
517         * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): New.
519         * elf32-i386.c (elf_i386_relocate_section): Use it.
520         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
522 2010-04-30  Tristan Gingold  <gingold@adacore.com>
524         * vms-lib.c (vms_read_block): New function.
525         (vms_traverse_index): Use vms_read_block.  Handle long key names.
527 2010-04-30  Tristan Gingold  <gingold@adacore.com>
529         * vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms
530         and syms removed.
531         (struct carsym_mem): New structure.
532         (vms_add_index): New function.
533         (vms_add_indexes_from_list): New function.
534         (vms_traverse_index): Parameter carsym changed to carsym_mem.
535         Code adjusted to handle elfidx.
536         (vms_lib_read_index): Adjusted for vms_traverse_index changes.
537         Parameter NBREL is now a pointer.
538         (_bfd_vms_lib_archive_p): Adjust for above change.  Handle ia64
539         archives.
540         (_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata.
541         (_bfd_vms_lib_find_symbol): Ditto.
542         (vms_lib_bopen): Fix two typos: return FALSE in case of error,
543         check MHD id.
544         (_bfd_vms_lib_get_module): New function.
545         (_bfd_vms_lib_get_elt_at_index): Rewritten using the above
546         function.
547         (_bfd_vms_lib_openr_next_archived_file): Use _bfd_vms_lib_get_module.
548         (_bfd_vms_lib_generic_stat_arch_elt): Handle ia64 archives.
549         (vms_write_index): Adjust for structure renamed.
550         * vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for
551         changes of _bfd_vms_lib_find_symbol.
553 2010-04-28  Kai Tietz  <kai.tietz@onevision.com>
555         * config.bfd: Correct accidential reverted patch
556         about vax*-*-*vms*.
558 2010-04-27  Kai Tietz  <kai.tietz@onevision.com>
560         * pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent
561         to USE_MINGW64_LEADING_UNDERSCORES.
562         * pei-x86_64.c (TARGET_UNDERSCORE): Likewise.
563         * config.bfd: Change underscoring default for x64 mingw
564         to false.
565         * coffcode.h (coff_write_relocs): Add check that dereferenced
566         sym_ptr_ptr isn't NULL.
567         * config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
568         * configure: Regenerated.
569         * configure.in: Add option '--enable-leading-mingw64-underscores'
570         and define config.in variable USE_MINGW64_LEADING_UNDERSCORES.
572 2010-04-27  Nick Clifton  <nickc@redhat.com>
574         PR binutils/11512
575         * coffgen.c (coff_find_nearest_line): Incldue the section address
576         of function name symbols in address comparisons.
578 2010-04-27  Nick Clifton  <nickc@redhat.com>
580         * po/fr.po: Updated French translation.
582 2010-04-23  Alan Modra  <amodra@gmail.com>
584         * elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and
585         ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT
586         throughout file.
587         (assign_file_positions_for_load_sections): Modify section in
588         segment warning to ignore overlay vmas.
589         * elf32-spu.c (spu_elf_object_p): Replace use of
590         ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT.
592 2010-04-22  Nick Clifton  <nickc@redhat.com>
594         * po/bfd.pot: Updated by the Translation project.
595         * po/vi.po: Updated Vietnamese translation.
597 2010-04-22  Alan Modra  <amodra@gmail.com>
599         * elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29
600         change.  Tidy.  Don't error on sections not allocated in segment.
602 2010-04-15  Andrew Haley  <aph@redhat.com>
604         * bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag:
605         merge_exidx_entries.
606         * bfd-in2.h: Likewise.
607         * elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise.  Use it to
608         control merging of exidx entries.
610 2010-04-20  Joseph Myers  <joseph@codesourcery.com>
612         * elf32-tic6x.h: New.
613         * elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA.
614         * elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata,
615         elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel,
616         elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject,
617         elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p,
618         bfd_elf32_mkobject, bfd_elf32_new_section_hook): New.
619         (elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup,
620         elf32_tic6x_relocate_section): Handle REL relocations.
621         (elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel.
623 2010-04-20  Jakub Jelinek  <jakub@redhat.com>
625         * dwarf2.c (find_abstract_instance_name, scan_unit_for_symbols): Treat
626         DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name.
628 2010-04-19  Nick Clifton  <nickc@redhat.com>
630         * archive64.c (bfd_elf64_archive_slurp_armap): Remove unused
631         arhdrpos variable.
632         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused
633         attribute to warned variable.  Remove unused val, type and type2
634         variables.
636 2010-04-16  Andreas Schwab  <schwab@redhat.com>
638         * vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking
639         strict-aliasing rules.
641 2010-04-16  Tristan Gingold  <gingold@adacore.com>
643         * vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo.
644         (_bfd_vms_get_object_record): Always assume there is a pad byte
645         for alignment.
647         * vms-lib.c: Add a few comments.
649 2010-04-15  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
651         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support additions to
652         attributes in v2.08 of the ABI.
654 2010-04-15  Alan Modra  <amodra@gmail.com>
656         * config.bfd (vax*-*-*vms*): Delete.
658 2010-04-14  Tristan Gingold  <gingold@adacore.com>
660         * Makefile.am (BFD32_BACKENDS): Remove vms-gsd.lo, vms-hdr.lo,
661         vms-tir.lo, vms.lo and add vms-alpha.lo
662         (BFD32_BACKENDS_CFILES): Remove vms-gsd.c, vms-hdr.c,
663         vms-tir.c, vms.c and add vms-alpha.c
664         * Makefile.in: Regenerate.
665         * configure.in (TDEFINES): Adjust file list for vms_alpha_vec.
666         Remove vms_vax_vec.
667         * configure: Regenerate.
668         * targets.c (vms_vax_vec): Remove the declaration.
669         (_bfd_target_vector): Remove vms_vax_vec.
670         * vms-alpha.c: New file.
671         * vms-gsd.c: Removed, rewritten in vms-alpha.c
672         * vms-hdr.c: Ditto.
673         * vms-tir.c: Ditto.
674         * vms.c: Ditto.
675         * vms-misc.c: Fix indentation and comments.  Replace most of
676         #if VMS_DEBUG/vms_debug with vms_debug2.
677         (_bfd_vms_hash_newfunc): Moved to vms-alpha.c
678         (hash_string): Ditto.
679         (_bfd_vms_length_hash_symbol): Ditto.
680         (maybe_adjust_record_pointer_for_object): Ditto.
681         (_bfd_vms_get_object_record): Ditto.
682         (vms_get_remaining_object_record): Ditto.
683         (_bfd_vms_push): Ditto.
684         (_bfd_vms_pop): Ditto.
685         (_bfd_vms_get_header_values): Removed.
686         (_bfd_vms_get_first_record): Removed.
687         (vms_get_remaining_image_record): Removed.
688         (new_symbol): Removed.
689         (_bfd_vms_enter_symbol): Removed.
690         (_bfd_vms_save_sized_string): Use memcpy instead of strncpy.
691         (_bfd_vms_output_begin): Remove rechead parameter.  Replace bfd
692         parameter with struct vms_rec_wr.
693         (_bfd_vms_output_push): Removed and replaced by ...
694         (_bfd_vms_output_begin_subrec): ... new function.
695         (_bfd_vms_output_alignment): Replace bfd parameter with
696         struct vms_rec_wr, and adjust.
697         (_bfd_vms_output_check): Ditto
698         (_bfd_vms_output_byte): Ditto.
699         (_bfd_vms_output_short): Ditto.
700         (_bfd_vms_output_long): Ditto.
701         (_bfd_vms_output_quad): Ditto.
702         (_bfd_vms_output_counted): Ditto.
703         (_bfd_vms_output_dump): Ditto.
704         (_bfd_vms_output_fill): Ditto.
705         (_bfd_vms_output_pop): Removed and replaced by ...
706         (_bfd_vms_output_end_subrec): ... new function.
707         (_bfd_vms_output_flush): Removed.
708         (_bfd_vms_output_align): New function.
709         (_bfd_vms_output_end): Add recwr parameter.  Adjust for this new
710         parameter.
711         (vms_convert_to_var): New function imported from vms.c
712         (vms_convert_to_var_1): Ditto.
713         (vms_convert_to_var_unix_filename): Ditto.
714         (vms_get_module_name): Ditto.
715         (get_vms_time_string): Ditto.
716         (vms_time_to_time_t): Ditto.
717         (vms_rawtime_to_time_t): Ditto.
718         * vms.h: All macros for the VMS file format are now in include/vms.
719         Prototypes for vms.c, vms-gsd.c, vms-misc.c, vms-hdr.c, vms-tir.c
720         have been removed.
721         (struct vms_symbol_struct, struct stack_struct): Moved to vms-alpha.c
722         (struct fileinfo, struct srecinfo, struct lineinfo): Ditto.
723         (struct funcinfo, struct vms_private_data_struct): Ditto.
724         (struct vms_section_data_struct): Ditto.
725         (struct vms_rec_rd, stryct vms_rec_wr): New declarations.
726         (vms_get_module_name, get_vms_time_string): New declarations.
727         (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
728         (_bfd_vms_output_begin_subrec, _bfd_vms_output_end_subrec): Ditto.
729         (_bfd_vms_save_sized_string, _bfd_vms_save_counted_string): Adjusted.
730         (_bfd_vms_output_begin, _bfd_vms_output_alignment): Ditto.
731         (_bfd_vms_output_end,_bfd_vms_output_check): Ditto.
732         (_bfd_vms_output_byte, _bfd_vms_output_short): Ditto.
733         (_bfd_vms_output_long, _bfd_vms_output_quad): Ditto.
734         (_bfd_vms_output_counted, _bfd_vms_output_dump): Ditto.
735         (_bfd_vms_output_fill): Ditto.
736         (bfd_vms_set_section_flags): Ditto.
738 2010-04-14  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
740         * elflink.c (_bfd_elf_merge_symbol): Tighten up the test for early
741         exit due to merging the same weak symbol to test that the symbols are
742         actually weak.
744 2010-04-13  Alan Modra  <amodra@gmail.com>
746         * elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location
747         when optimizing high got_tlsgd/ld insns.
749 2010-04-10  H.J. Lu  <hongjiu.lu@intel.com>
751         * hosts/x86-64linux.h (HAVE_PRPSINFO32_T): Undefine before
752         define.
753         (HAVE_PRSTATUS32_T): Likewise.
755 2010-04-10  H.J. Lu  <hongjiu.lu@intel.com>
757         PR corefiles/11467
758         * configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h
759         for x86_64-*-linux*.
760         * config.in: Regenerated.
761         * configure: Likewise.
763         * elf.c: Include CORE_HEADER if it is defined.
765 2010-04-10  H.J. Lu  <hongjiu.lu@intel.com>
766             Jan Kratochvil  <jan.kratochvil@redhat.com>
768         * hosts/x86-64linux.h: New.
770 2010-04-09  Nick Clifton  <nickc@redhat.com>
772         * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count.
773         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused
774         variables htab and hdr_info and mark info parameter as unused.
775         * elf.c (prep_headers): Remove unused variable i_phdrp.
776         (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp.
777         * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned
778         as unused.
779         * peXXigen.c (pe_print_reloc): Remove unused variable datasize.
780         * verilog.c (verilog_write_section): Remove unused variable
781         address.
783 2010-04-07  Alan Modra  <amodra@gmail.com>
785         * warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
786         * configure: Regenerate.
788 2010-04-06  H.J. Lu  <hongjiu.lu@intel.com>
790         PR ld/11434
791         * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally.
793 2010-04-06  Tristan Gingold  <gingold@adacore.com>
795         * vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags.
797 2010-04-05  Jakub Jelinek  <jakub@redhat.com>
799         * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Handle CIE version 4
800         provided that it has the expected address size and zero segment
801         length.
803         * dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
804         (struct line_info): Add op_index field, change end_sequence type to
805         unsigned char.
806         (new_line_sorts_after): For the same address compare op_index.
807         (add_line_info): Add op_index argument, store it into the structure.
808         (decode_line_info): Complain about unknown versions of .debug_line.
809         Initialize maximum_ops_per_insn.  Add op_index state register and
810         track it.
812 2010-04-01  Nathan Sidwell  <nathan@codesourcery.com>
814         * elf32-ppc.c (apuinfo_set): New static var.
815         (ppc_elf_begin_write_processing): Set it here, always create an
816         APUinfo section if there were any in the inputs.
817         (ppc_elf_write_section): Check apuinfo_set.
818         (ppc_elf_final_write_processing): Likewise.
820 2010-04-01  Tristan Gingold  <gingold@adacore.com>
822         * vms.h: Include time.h. Add prototypes for vms_get_module_name,
823         vms_time_to_time_t and vms_rawtime_to_time_t.
824         * vms.c (vms_alpha_vec): Add archives support.
825         * vms-misc.c: Include safe-ctype.h
826         (vms_get_module_name): New function.
827         (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
828         * vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the
829         vms_get_module_name function.  Use this function.
830         * targets.c: Declare vms_lib_txt_vec.  Add it to _bfd_target_vector.
831         * libbfd-in.h: Add prototype for _bfd_append_relative_path.
832         Add prototypes for vms-lib.c
833         * libbfd.h: Regenerate.
834         * configure.in (TDEFINES): Add an entry for vms_lib_txt_vec.  Add
835         vms-lib.lo to vms_alpha_vec.
836         * config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*.
837         * configure: Regenerate.
838         * bfd.c: Add selective_search field.
839         * bfd-in2.h: Regenerate.
840         * archive.c (append_relative_path): Rename to
841         _bfd_append_relative_path and make it public.
842         (_bfd_get_elt_at_filepos): Adjust for above renaming.
843         * Makefile.am (BFD32_BACKENDS): Add vms-lib.lo
844         (BFD32_BACKENDS_CFILES): Add vms-lib.c
845         * Makefile.in: Regenerate.
847 2010-04-01  Jakub Jelinek  <jakub@redhat.com>
849         * dwarf2.c (read_attribute_value): Handle CU version 4
850         for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc
851         and DW_FORM_flag_present.  For unknown form value return NULL.
852         (scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc
853         like DW_FORM_block.
854         (parse_comp_unit): Allow CU version 4.
856 2010-04-01  Hans-Peter Nilsson  <hp@axis.com>
858         * elf32-cris.c (cris_elf_relocate_section): Correct first argument
859         to _bfd_elf_get_dynamic_reloc_section.
860         (elf_cris_discard_excess_dso_dynamics): Ditto.
862 2010-03-31  Kai Tietz  <kai.tietz@onevision.com>
864         * coff-i386.c (in_reloc_p): Check also for R_SECREL32.
865         * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.
867 2010-03-31  Alan Modra  <amodra@gmail.com>
869         * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized
870         TPREL16_HI and TPREL16_HA insns.
872 2010-03-31  Hans-Peter Nilsson  <hp@axis.com>
874         PR ld/11458
875         * elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid
876         assert of empty pcrel_relocs_copied on the direct symbol.  Instead
877         of moving the list from the indirect symbol to the direct symbol,
878         merge into any existing list.
879         (cris_elf_check_relocs): Store the original section in the
880         pcrel_relocs_copied list, not the relocation section.
881         (elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find
882         the relocation section, for reducing its size.  Change the
883         BFD_ASSERT into a check for the section being read-only, and only
884         emit warnings and TEXTREL marker when there's an entry for a
885         read-only section.
887 2010-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
889         * elf32-arm.c (using_thumb_only): Handle v6-M.
891 2010-03-26  Alan Modra  <amodra@gmail.com>
893         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_EMB_RELSDA>): Not pc-relative.
894         * bfd-in.h (elf_discarded_section): Clarify comment.
895         * reloc.c (struct reloc_howto_struct <pc_relative>): Likewise.
896         * bfd-in2.h: Regenerate.
898 2010-03-26  Matt Rice  <ratmice@gmail.com>
900         * archive.c (_bfd_compute_and_write_armap): Allow symbols flagged
901         as unique in the armap.
903 2010-03-26  Alan Modra  <amodra@gmail.com>
905         PR ld/11375
906         * elf64-ppc.c (ppc64_elf_relocate_section): Always look up a
907         possible stub on branches.
909 2010-03-25  Joseph Myers  <joseph@codesourcery.com>
911         * Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo.
912         (ALL_MACHINES_CFILES): Add cpu-tic6x.c.
913         (BFD32_BACKENDS): Add elf32-tic6x.lo.
914         (BFD32_BACKENDS_CFILES): Add elf32-tic6x.c.
915         * Makefile.in: Regenerate.
916         * archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New.
917         (bfd_archures_list): Update.
918         * config.bfd (tic6x-*-elf): New.
919         * configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec):
920         New.
921         * configure: Regenerate.
922         * cpu-tic6x.c, elf32-tic6x.c: New.
923         * reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12,
924         BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7,
925         BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16,
926         BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B,
927         BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W,
928         BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B,
929         BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W,
930         BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H,
931         BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W,
932         BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W,
933         BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31,
934         BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN,
935         BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New.
936         * targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New.
937         (_bfd_target_vector): Update.
938         * bfd-in2.h, libbfd.h: Regenerate.
940 2010-03-24  H.J. Lu  <hongjiu.lu@intel.com>
942         * aout-target.h: Update copyright year.
943         * aout-tic30.c: Likewise.
944         * coff-alpha.c: Likewise.
945         * coff-rs6000.c: Likewise.
946         * coff64-rs6000.c: Likewise.
947         * elf64-mips.c: Likewise.
948         * ieee.c: Likewise.
949         * libecoff.h: Likewise.
950         * mach-o-target.c: Likewise.
951         * mach-o.c: Likewise.
952         * oasys.c: Likewise.
953         * targets.c: Likewise.
955 2010-03-24  H.J. Lu  <hongjiu.lu@intel.com>
957         * libbfd-in.h: Update copyright year.
959 2010-03-21  H.J. Lu  <hongjiu.lu@intel.com>
961         PR ld/11413
962         * elflink.c (_bfd_elf_add_default_symbol): Check !executable
963         instead of shared.
965 2010-03-19  Jie Zhang  <jie@codesourcery.com>
967         * elf32-arm.c (struct section_list): Remove.
968         (section_list): Remove typedef.
969         (record_section_with_arm_elf_section_data): Remove.
970         (find_arm_elf_section_entry): Remove.
971         (get_arm_elf_section_data): Use is_arm_elf.
972         (unrecord_section_with_arm_elf_section_data): Remove.
973         (elf32_arm_new_section_hook): Don't call
974         record_section_with_arm_elf_section_data.
975         (elf32_arm_write_section): Set mapcount to -1 when
976         the map has been used. Don't call
977         unrecord_section_with_arm_elf_section_data.
978         (unrecord_section_via_map_over_sections): Remove.
979         (elf32_arm_close_and_cleanup): Remove.
980         (elf32_arm_bfd_free_cached_info): Remove.
981         (bfd_elf32_close_and_cleanup): Don't define.
982         (bfd_elf32_bfd_free_cached_info): Don't define.
984 2010-03-18  H.J. Lu  <hongjiu.lu@intel.com>
986         PR binutils/11396
987         * libcoff-in.h (pe_tdata): Add dont_strip_reloc.
988         * libcoff.h: Regenerated.
990         * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
991         if dont_strip_reloc is set.
992         (_bfd_XX_bfd_copy_private_bfd_data_common): Set
993         dont_strip_reloc on output if there is no .reloc and
994         IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
996 2010-03-18  Wei Guozhi  <carrot@google.com>
998         PR gas/11323
999         * elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to
1000         R_ARM_GOT_PREL.
1001         * reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation.
1002         * bfd-in2.h: Regenerate.
1003         * libbfd.h: Regenerate.
1005 2010-03-17  H.J. Lu  <hongjiu.lu@intel.com>
1007         * reloc.c (BFD_RELOC_SPU_PIC18): Removed.
1008         (BFD_RELOC_SPU_STUB): Likewise.
1010 2010-03-17  Jie Zhang  <jie@codesourcery.com>
1012         * elf.c (assign_file_positions_for_load_sections): Avoid
1013         overflow.
1015 2010-03-17  Alan Modra  <amodra@gmail.com>
1017         PR binutils/11382
1018         * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
1019         proper type.
1021 2010-03-17  Alan Modra  <amodra@gmail.com>
1023         * elf32-arm.c (cortex_a8_erratum_scan): Warning fix.
1025 2010-03-16  Alan Modra  <amodra@gmail.com>
1027         * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
1028         (ppc64_elf_edit_toc): Set it here.
1029         (ha_reloc_match): New function.
1030         (ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
1032 2010-03-15  Alan Modra  <amodra@gmail.com>
1034         * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
1035         * elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
1037 2010-03-14  Alan Modra  <amodra@gmail.com>
1039         PR ld/11378
1040         * elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
1041         * elf64-ppc.c (call_check_done): Define.
1042         (ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
1043         (ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
1044         (ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
1045         (toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
1046         Simplify return logic.  Iterate over all .init and .fini fragments
1047         by recursion.  Set makes_toc_func_call here..
1048         (ppc64_elf_next_input_section): ..rather than here.
1049         (check_pasted_section, ppc64_elf_check_init_fini): New functions.
1051 2010-03-13  Alan Modra  <amodra@gmail.com>
1053         PR ld/11375
1054         * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
1055         function descriptor symbol if there is one, not just for plt stubs.
1056         (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
1058 2010-03-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1060         * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
1061         version twice.
1062         Skip it when constructing def.vd_next.
1064         * elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
1065         bfd_elf32_i386_sol2_vec.
1066         (TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
1067         (elf32_bed): Redefine to elf32_i386_sol2_bed.
1068         (elf_backend_want_plt_sym): Redefine to 1.
1070         * elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
1071         bfd_elf64_x86_64_sol2_vec.
1072         (TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
1073         (elf64_bed): Redefine to elf64_x86_64_sol2_bed.
1074         (elf_backend_want_plt_sym): Redefine to 1.
1076         * config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
1077         bfd_elf32_i386_sol2_vec.
1078         Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
1079         targ64_selvecs.
1080         (x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
1081         Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
1082         targ_selvecs.
1084         * configure.in: Handle bfd_elf32_i386_sol2_vec,
1085         bfd_elf64_x86_64_sol2_vec.
1086         * configure: Regenerate.
1088         * targets.c (bfd_elf32_i386_sol2_vec): Declare.
1089         (bfd_elf64_x86_64_sol2_vec): Declare.
1090         (_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
1091         bfd_elf64_x86_64_sol2_vec.
1093 2010-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
1095         * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
1096         sections.
1098 2010-03-04  Alan Modra  <amodra@gmail.com>
1100         PR 11302
1101         * dwarf2.c (read_abbrevs): Return NULL on alloc failures.
1102         (read_attribute_value, decode_line_info): Likewise.
1103         (add_line_info, read_rangelist): Return FALSE on alloc failures.
1104         (arange_add, sort_line_sequences): Likewise.
1105         (find_abstract_instance_name): Handle failures from called funcs.
1106         (scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
1107         (find_line): Realloc to a temp, and handle alloc fail.
1109 2010-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
1111         * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
1112         a mapping symbol to an empty section.
1114 2010-03-02  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
1116         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
1117         return value from the call to _bfd_elf_merge_object_attributes.
1119 2010-03-02  Christophe Lyon  <christophe.lyon@st.com>
1120         Alan Modra  <amodra@gmail.com>
1122         * elf32-arm.c (a8_erratum_fix): Add st_type field to record the
1123         destination mode of the a8 stub.
1124         (elf32_arm_link_hash_table): Add top_id field.
1125         (elf32_arm_link_hash_table_create): Initialize top_id.
1126         (arm_type_of_stub): Update prototype, st_type can now be updated
1127         by this function. Actual destination address in case of PLT is
1128         computed here, to help factorizing code.
1129         (elf32_arm_stub_name): Update prototype, use stub_type additional
1130         parameter to build stub name.
1131         (elf32_arm_get_stub_entry): Update prototype, use stub_type
1132         additional parameter to build stub entry.
1133         (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
1134         put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
1135         Call elf32_arm_final_link_relocate to process all in-stub
1136         relocations.
1137         (elf32_arm_setup_section_lists): Update top_id.
1138         (cortex_a8_erratum_scan): Record stub destination mode.
1139         (elf32_arm_size_stubs): Update call to arm_type_of_stub according
1140         to new prototype.
1141         (elf32_arm_final_link_relocate): Enable processing of in-stub
1142         REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
1143         needed, enabling code factorization.
1144         (elf32_arm_final_link): Process stub sections.
1145         (elf32_arm_output_map_sym): Add entry to code/data map.
1147 2010-03-01  David S. Miller  <davem@davemloft.net>
1149         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
1150         h->def_regular, set h->ref_regular.
1151         (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
1152         and dynamic relocations if h->ref_regular.
1154         * elfxx-sparc.c (struct elf_reloc_map): Delete.
1155         (sparc_reloc_map): Delete.
1156         (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
1157         relocation type in switch statements.
1159 2010-02-25  Alan Modra  <amodra@gmail.com>
1161         PR ld/11304
1162         * elf.c (_bfd_elf_init_private_section_data): Rename need_group
1163         to final_link and invert.  For final link allow some flags to
1164         differ.  Don't specially allow flags to be all zero.
1166 2010-02-24  Alan Modra  <amodra@gmail.com>
1168         PR binutils/10858
1169         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
1170         SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
1171         table.
1173 2010-02-23  Andrew Zabolotny  <anpaza@mail.ru>
1175         PR binutils/11297
1176         * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
1177         (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
1179 2010-02-22  Alan Modra  <amodra@gmail.com>
1181         * reloc.c (bfd_check_overflow): When forming addrmask, shift
1182         fieldmask left by rightshift.
1183         (_bfd_relocate_contents): Likewise.  Use rightshift addrmask in all
1184         overflow checks.
1186 2010-02-20  H.J. Lu  <hongjiu.lu@intel.com>
1188         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
1189         STT_GNU_IFUNC on large common symbol.
1191 2010-02-18  H.J. Lu  <hongjiu.lu@intel.com>
1193         * elf32-i386.c (elf_i386_add_symbol_hook): Don't set
1194         has_ifunc_symbols if the symbol comes from a shared library.
1195         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1196         * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1197         * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1198         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1199         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
1201 2010-02-19  Alan Modra  <amodra@gmail.com>
1203         * elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
1204         (_bfd_elf_copy_private_header_data): ..here.
1205         * elflink.c (_bfd_elf_size_group_sections): New function.
1206         (bfd_elf_size_dynamic_sections): Call it.
1207         * elf-bfd.h (_bfd_elf_size_group_sections): Declare.
1208         (_bfd_elf_fixup_group_sections): Declare.
1210 2010-02-18  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
1212         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
1213         merging Tag_DIV_use, Tag_MPextension_use, and
1214         Tag_MPextension_use_legacy tags.
1216 2010-02-18  Alan Modra  <amodra@gmail.com>
1218         * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
1219         commit.  Don't write zeros for removed group members.
1220         (_bfd_elf_copy_private_header_data): Adjust size of group section
1221         when group members are removed by objcopy.
1223 2010-02-15  Dave Korn  <dave.korn.cygwin@gmail.com>
1225         PR binutils/11280
1226         * configure.host (*-*-solaris2.11):  Add host define to select
1227         valid default code page for windres/windmc on solaris.
1229 2010-02-15  Nick Clifton  <nickc@redhat.com>
1231         * po/vi.po: Updated Vietnamese translation.
1233 2010-02-12  Daniel Gutson  <dgutson@codesourcery.com>
1235         * elf32-arm.c (elf32_arm_output_arch_local_syms): add
1236         missing mapping symbol to data only sections.
1238 2010-02-11  David S. Miller  <davem@davemloft.net>
1240         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
1241         and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
1242         symbols.
1243         (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
1244         these relocs on global symbols.
1245         (gdopoff): New.
1246         (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
1247         local symbol references which are not STT_GNU_IFUNC.  Handle
1248         relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
1249         and deal with negative vs. non-negative values properly.
1251 2010-02-09  Tristan Gingold  <gingold@adacore.com>
1253         * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
1254         non-external relocation.
1256 2010-02-09  Alan Modra  <amodra@gmail.com>
1258         * elf64-ppc.c (merge_got_entries): Move earlier in file.
1259         (allocate_dynrelocs): Merge got entries here if not doing multi-toc.
1260         (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
1261         (ppc64_elf_layout_multitoc): Don't resize if we have already
1262         merged got entries.
1264 2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>
1266         * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
1267         elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
1268         elfcore_write_s390_prefix): New.
1269         * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
1270         elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
1271         elfcore_write_s390_prefix): New.
1272         (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
1273         NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
1274         (elfcore_write_register_note): Handle .reg-s390-timer,
1275         .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
1276         .reg-s390-prefix section.
1278 2010-02-09  Alan Modra  <amodra@gmail.com>
1280         * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
1281         unsigned char.  Update variables and code using them throughout file.
1282         (struct ppc_link_hash_entry): Likewise for tls_mask.
1284         * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
1286         * elf64-ppc.c (has_small_toc_reloc): Don't define.
1287         (makes_toc_func_call, call_check_in_progress): Shuffle flags.
1288         (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc.  Update
1289         code setting the flag.
1290         (ppc64_elf_next_toc_section): Group big-toc sections in
1291         0x80008000 chunks.
1293 2010-02-08  David S. Miller  <davem@davemloft.net>
1295         * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
1296         srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
1298         * elfxx-sparc.c (create_got_section): Delete.
1299         (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
1300         section creator does that work for us.  Use ->elf.foo instead of
1301         ->foo where applicable.
1302         (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
1303         where applicable.
1304         (allocate_dynrelocs): Likewise.
1305         (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1306         (_bfd_sparc_elf_relocate_section): Likewise.
1307         (sparc_vxworks_build_plt_entry): Likewise.
1308         (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1309         (sparc_finish_dyn): Likewise.
1310         (sparc_vxworks_finish_exec_plt): Likewise.
1311         (sparc_vxworks_finish_shared_plt): Likewise.
1312         (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
1314         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
1315         macros for visibilty and locality checks.
1316         (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
1317         (allocate_dynrelocs): Likewise.
1318         (_bfd_sparc_elf_relocate_section): Likewise.
1319         (_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
1321         * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
1322         but never used local var 'dynobj'.
1324         * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
1325         nocopyreloc.
1327         * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
1328         (BFD_RELOC_SPARC_IRELATIVE): Likewise.
1329         * bfd-in2.h: Regenerate.
1330         * libbfd.h: Regenerate.
1332         * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
1333         and loc_hash_memory.
1334         (_bfd_sparc_elf_link_hash_table_free): Declare.
1335         * elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
1336         (elf_backend_add_symbol_hook, elf_backend_post_process_headers,
1337         bfd_elf32_bfd_link_hash_table_free): Define.
1338         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
1339         has_ifunc_symbols if STT_GNU_IFUNC.
1340         (bfd_elf64_bfd_link_hash_table_free): Define.
1341         (elf_backend_post_process_headers): Define always.
1342         * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
1343         (sparc_reloc_map): Add entries for new IFUNC relocs.
1344         (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
1345         (_bfd_sparc_elf_info_to_howto_ptr): Likewise.
1346         (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
1347         elf_sparc_get_local_sym_hash): New.
1348         (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
1349         from here...
1350         (_bfd_sparc_elf_link_hash_table_create): ... to here.  Allocate
1351         local hash table.
1352         (_bfd_sparc_elf_link_hash_table_free): New.
1353         (create_ifunc_sections): New.
1354         (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
1355         and call create_ifunc_sections().  For local STT_GNU_IFUNC symbols
1356         cons up a fake local hash table entry for it.  Unconditionally add
1357         a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular.  Count
1358         dyn relocs for ifunc.
1359         (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
1360         (allocate_dynrelocs):  Unconditionally emit a PLT entry when
1361         STT_GNU_IFUNC and h->def_regular.  Count GOT dyn relocs for ifunc.
1362         (allocate_local_dynrelocs): New function.
1363         (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
1364         table.  Emit dynamic relocs to irelplt when not shared.  Treat iplt
1365         like splt.
1366         (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
1367         (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
1368         plt in iplt/irelplt.
1370 2010-02-08  Richard Sandiford  <r.sandiford@uk.ibm.com>
1372         * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
1373         max_contents_size, only consider sections whose contents must
1374         be swapped in.
1376 2010-02-09  Alan Modra  <amodra@gmail.com>
1378         * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
1379         (ppc64_elf_size_dynamic_sections): ..and here..
1380         (merge_got_entries): ..rather than here.
1382 2010-02-09  Alan Modra  <amodra@gmail.com>
1384         * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
1385         (has_small_toc_reloc): Define.
1386         (ppc64_elf_check_relocs): Set the above flags.
1387         (ppc64_elf_edit_opd): Delete obfd param.
1388         (ppc64_elf_tls_optimize): Likewise.
1389         (ppc64_elf_edit_toc): Likewise.
1390         (ppc64_elf_tls_setup): Likewise.  Add no_multi_toc param.
1391         * elf64-ppc.h: Update prototypes.
1393 2010-02-08  Alan Modra  <amodra@gmail.com>
1395         * section.c (struct bfd_section): Delete has_tls_reloc,
1396         has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
1397         Add sec_flg0 thru sec_flg5.
1398         (BFD_FAKE_SECTION): Update for changed flags.
1399         * ecoff.c (bfd_debug_section): Likewise.
1400         * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
1401         * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
1402         (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
1403         * elf32-xtensa.c (reloc_done): Define.
1404         * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
1405         * bfd-in2.h: Regenerate.
1407 2010-02-08  Tristan Gingold  <gingold@adacore.com>
1409         * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
1410         for non-scattered relocations.
1412 2010-02-08  Nathan Sidwell  <nathan@codesourcery.com>
1414         * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
1415         apuinfo sections, only scan input sections once and reuse the
1416         buffer.
1418 2010-02-08  Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
1420         * archures.c (bfd_mach_ppc_titan): Define.
1421         * bfd-in2.h: Regenerate.
1422         * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
1424 2010-02-08  Alan Modra  <amodra@gmail.com>
1426         * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
1428 2010-02-05  Sterling Augustine  <sterling@tensilica.com>
1430         * elf.c (assign_file_positions_for_load_sections) Update lma of
1431         section if necessary.  Fixes Bugzilla 11219.
1433 2010-02-05  H.J. Lu  <hongjiu.lu@intel.com>
1435         * elf32-i386.c: Remove trailing white spaces.
1436         * elf64-x86-64.c: Likewise.
1438 2010-02-03  Nick Clifton  <nickc@redhat.com>
1440         * elf-bfd.h (emum elf_object_id): Rename to elf_target_id.  Add
1441         entries for other architectures.
1442         (struct elf_link_hash_table): Add hash_table_id field.
1443         (elf_hash_table_id): New accessor macro.
1444         * elflink.c (_bfd_elf_link_hash_table_init): Add target_id
1445         parameter.
1446         * elf-m10300.c (elf32_mn10300_hash_table): Check table id before
1447         returning cast pointer.
1448         (elf32_mn10300_link_hash_table_create): Identify new table as
1449         containing MN10300 extensions.
1450         (mn10300_elf_relax_section): Check pointer returned by
1451         elf32_mn10300_hash_table.
1452         * elf32-arm.c: Likewise, except using ARM extensions.
1453         * elf32-avr.c: Likewise, except using AVR extensions.
1454         * elf32-bfin.c: Likewise, except using BFIN extensions.
1455         * elf32-cris.c: Likewise, except using CRIS extensions.
1456         * elf32-frv.c: Likewise, except using FRV extensions.
1457         * elf32-hppa.c: Likewise, except using HPPA32 extensions.
1458         * elf32-i386.c: Likewise, except using I386 extensions.
1459         * elf32-lm32.c: Likewise, except using LM32 extensions.
1460         * elf32-m32r.c: Likewise, except using M32RM extensions.
1461         * elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
1462         * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
1463         * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
1464         * elf32-m68k.c: Likewise, except using M68K extensions.
1465         * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
1466         * elf32-ppc.c: Likewise, except using PPC32 extensions.
1467         * elf32-s390.c: Likewise, except using S390 extensions.
1468         * elf32-sh.c: Likewise, except using SH extensions.
1469         * elf32-spu.c: Likewise, except using SPU extensions.
1470         * elf32-xtensa.c: Likewise, except using XTENSA extensions.
1471         * elf64-alpha.c: Likewise, except using ALPHA extensions.
1472         * elf64-hppa.c: Likewise, except using HPPA64 extensions.
1473         * elf64-ppc.c: Likewise, except using PPC64 extensions.
1474         * elf64-s390.c: Likewise, except using S390 extensions.
1475         * elf64-x86-64.c: Likewise, except using X86_64 extensions.
1476         * elfxx-ia64.c: Likewise, except using IA64 extensions.
1477         * elfxx-mips.c: Likewise, except using MIPS extensions.
1478         * elfxx-sparc.c: Likewise, except using SPARC extensions.
1479         * elfxx-sparc.h: Likewise, except using SPARC extensions.
1480         * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
1481         redundant structure.
1482         (elf32_cr16_hash_table): Delete unused macro.
1483         (elf32_cr16_link_hash_traverse): Delete unused macro.
1484         * elf32-score.c: Likewise.
1485         * elf32-score7.c: Likewise.
1486         * elf32-vax.c: Likewise.
1487         * elf64-sh64.c: Likewise.
1489 2010-02-03  Alan Modra  <amodra@gmail.com>
1491         * elf64-ppc.c (struct plt_entry): Move earlier in file.
1492         (struct got_entry): Likewise.  Add is_indirect and got.ent fields.
1493         (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
1494         Update all uses.
1495         (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
1496         Remove no_multi_toc.
1497         (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
1498         when allocating a new struct got_entry.
1499         (allocate_got): New function, extracted from..
1500         (allocate_dynrelocs): ..here.  Abort on got entry in non-ppc64 bfd.
1501         (ppc64_elf_size_dynamic_sections): Track got relocs allocated in
1502         .reliplt by got_reli_size.  Set owner on ppc64_tlsld_got entries.
1503         (ppc64_elf_setup_section_lists): Remove output_bfd param and
1504         no_multi_toc, add add_stub_section and layout_sections_again.  Stash
1505         new params in htab.  Extract some code to..
1506         (ppc64_elf_start_multitoc_partition): ..here.  New function.
1507         (ppc64_elf_next_toc_section): Check for linker script errors.  Handle
1508         second pass toc scan.
1509         (merge_got_entries, merge_global_got, reallocate_got): New functions.
1510         (ppc64_elf_reinit_toc): Rename to..
1511         (ppc64_elf_finish_multitoc_partition): ..this.
1512         (ppc64_elf_layout_multitoc): New function.
1513         (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
1514         layout_sections_again params.
1515         (ppc64_elf_relocate_section): Handle indirect got entries.
1516         * elf64-ppc.h: Update prototypes.  Declare new functions.
1518 2010-02-02  H.J. Lu  <hongjiu.lu@intel.com>
1520         * elf-bfd.h (elfcore_write_xstatereg): New.
1522         * elf.c (elfcore_grok_xstatereg): New.
1523         (elfcore_write_xstatereg): Likewise.
1524         (elfcore_grok_note): Handle NT_X86_XSTATE.
1525         (elfcore_write_register_note): Handle .reg-xstate section.
1527 2010-02-01  Tristan Gingold  <gingold@adacore.com>
1529         * som.c (som_write_ar_hdr): Define this macro.
1531 2010-01-30  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1533         * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
1534         R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
1535         linkage table pointer to use the global table pointer if not doing
1536         a shared link.
1538 2010-01-29  Joel Brobecker  <brobecker@adacore.com>
1540         * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
1541         if it has already been set.
1543 2010-01-27  Tristan Gingold  <gingold@adacore.com>
1545         * vms.h: Remove trailing spaces.
1546         (struct hdr_struct): Remove unused hdr_c_cpr field.
1547         (enum file_format_enum): Add comments.
1548         * vms.c (vms_bfd_print_private_bfd_data): New function that
1549         replaces the macro.
1550         Remove trailing spaces.
1551         * vms-misc.c: Improve comments.
1552         (_bfd_vms_get_object_record): Also handle files without pads.
1553         * vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
1554         * vms-gsd.c (struct flagdescstruct): Make name field const.
1555         (gsyflagdesc): Fix typo.
1557 2010-01-27  Alan Modra  <amodra@gmail.com>
1559         PR ld/11217
1560         * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
1561         (ppc64_elf_setup_section_lists): Init them.
1562         (ppc64_elf_next_toc_section): Don't partition multi-toc between .got
1563         and .toc on the same input file.
1564         (ppc64_elf_relocate_section): Correct GOT entry offset.
1566 2010-01-26  Tristan Gingold  <gingold@adacore.com>
1568         * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
1569         (bfd_target): Add _bfd_write_ar_hdr_fn field.
1570         * archive.c (is_bsd44_extended_name): New macro.
1571         (_bfd_generic_read_ar_hdr_mag): Use it.  Add extra_size.
1572         (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
1573         name.
1574         (_bfd_archive_bsd44_construct_extended_name_table): New function.
1575         (_bfd_generic_write_ar_hdr): Ditto.
1576         (_bfd_bsd44_write_ar_hdr): Ditto.
1577         (_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
1578         (bsd_write_armap): Adjust firstreal computation.
1579         * libbfd-in.h (struct areltdata): Add extra_size field.
1580         (_bfd_generic_write_ar_hdr): Add prototype.
1581         (_bfd_bsd44_write_ar_hdr): Ditto.
1582         (_bfd_write_ar_hdr): Define.
1583         (_bfd_noarchive_write_ar_hdr): Ditto.
1584         (_bfd_archive_bsd_write_ar_hdr): Ditto.
1585         (_bfd_archive_coff_write_ar_hdr): Ditto.
1586         (_bfd_archive_bsd44_slurp_armap): Ditto.
1587         (_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
1588         (_bfd_archive_bsd44_construct_extended_name_table): New prototype.
1589         (_bfd_archive_bsd44_truncate_arname): Ditto.
1590         (_bfd_archive_bsd44_write_armap): Ditto.
1591         (_bfd_archive_bsd44_read_ar_hdr): Ditto.
1592         (_bfd_archive_bsd44_write_ar_hdr): Ditto.
1593         (_bfd_archive_bsd44_openr_next_archived_file): Ditto.
1594         (_bfd_archive_bsd44_get_elt_at_index): Ditto.
1595         (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
1596         (_bfd_archive_bsd44_update_armap_timestamp): Ditto.
1597         * libbfd.h: Regenerate.
1598         * oasys.c (oasys_write_ar_hdr): Define.
1599         * libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
1600         * ieee.c (ieee_write_ar_hdr): Define.
1601         * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
1602         * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
1603         (bfd_pmac_xcoff_backend_data): Ditto.
1604         * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1605         (bfd_xcoff_aix5_backend_data): Ditto.
1606         * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
1607         * aout-target.h (MY_write_ar_hdr): Define it if not defined.
1608         * aout-tic30.c (MY_write_ar_hdr): Ditto.
1609         * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
1610         (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
1611         (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
1612         (bfd_mach_o_construct_extended_name_table)
1613         (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
1614         (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
1615         (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
1616         * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
1617         (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
1618         (bfd_mach_o_construct_extended_name_table)
1619         (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
1620         (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
1621         (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
1622         * bfd-in2.h: Regenerate.
1624 2010-01-26  Alan Modra  <amodra@gmail.com>
1625             H.J. Lu  <hongjiu.lu@intel.com>
1627         PR ld/11218
1628         * elflink.c (elf_link_output_extsym): Do not ignore undefined
1629         symbols with ref_regular set when gc_sections is active.
1631 2010-01-25  Alan Modra  <amodra@gmail.com>
1633         PR ld/11217
1634         * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
1635         with relocations against undefined weak symbols.
1636         (ppc64_elf_relocate_section): Don't optimize calls to undefined
1637         weak functions if the symbol is dynamic.
1638         (ppc64_elf_relocate_section): Edit tprel tls sequences.
1639         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1640         (_bfd_elf_ppc_at_tprel_transform): New function.
1641         * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
1642         * bfd-in2.h: Regenerate.
1644 2010-01-23  Richard Sandiford  <r.sandiford@uk.ibm.com>
1646         * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
1647         (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
1648         * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
1649         bitsize to 1.
1650         (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
1652 2010-01-21  Nick Clifton  <nickc@redhat.com>
1654         * elflink.c (elf_link_add_object_symbols): Look up name of
1655         undefined symbol both before and after versioning has been
1656         applied.  Do not bother with symbols that are weakly undefined.
1658 2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
1660         * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
1661         (bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
1663 2010-01-19  Cary Coutant  <ccoutant@google.com>
1665         * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
1667 2010-01-19  Daisuke Hatayama  <d.hatayama@jp.fujitsu.com>
1668             Alan Modra <amodra@gmail.com>
1670         * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
1671         (elf_object_p): Read e_phnum extension.
1672         (elf_write_shdrs_and_ehdr): Write e_phnum extension.
1673         * elfcore.h (elf_core_file_p): Read e_phnum extension.  Sanity check
1674         that we can read last program header.
1676 2010-01-19  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
1678         * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
1679         R_ARM_THM_CALL entry.
1680         (elf32_arm_final_link_relocate): Correct calculation of
1681         reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
1682         or R_ARM_THM_JUMP24 relocation.
1684 2010-01-18  Alan Modra  <amodra@gmail.com>
1686         PR 11168
1687         * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
1688         block past vars in COFF_IMAGE_WITH_PE block.  Report error on more
1689         than 32k sections.
1691 2010-01-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1693         Fix compilation warning on gcc-3.4.
1694         * vms-tir.c (start_etir_record, sto_imm): Rename the prototype
1695         parameter index to sec_index according to the function definition.
1697 2010-01-13  Chao-ying Fu  <fu@mips.com>
1699         * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
1700         It is true for all CPUs.
1701         (jal_reloc_p): New function.
1702         (mips_elf_calculate_relocation): Rename require_jalxp to
1703         cross_mode_jump_p.
1704         Update comment for CROSS_MODE_JUMP_P.
1705         Set up cross_mode_jump_p based on the mode change.
1706         (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
1707         Update comment for CROSS_MODE_JUMP_P.
1708         Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
1709         Use !cross_mode_jump_p to guard conversion.
1710         Convert "jr t9" to "b", if possible.
1711         (_bfd_mips_elf_relocate_section): Rename require_jalx to
1712         cross_mode_jump_p.
1713         Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
1714         Pass cross_mode_jump_p to call mips_elf_perform_relocation.
1716 2010-01-13  Nick Clifton  <nickc@redhat.com>
1718         * cpu-m32c.c (m32c_scan): New function.  Ensures that a scan for
1719         "m32c" returns the m32c arch_info_struct and not the m16c
1720         arch_info_struct.
1721         (arch_info_struct): Use the new scan function.
1722         (bfd_m32c_arch): Likewise.
1724 2010-01-13  Tristan Gingold  <gingold@adacore.com>
1726         * config.bfd: Remove duplicated target vector for i386-*-darwin.
1727         Appends new arch instead of overriding.
1728         Use mach_o_x86_64_vec for x86_64-*-darwin.
1729         * configure.in: Add mach_o_x86_64_vec.
1730         * configure: Regenerate.
1731         * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
1732         * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
1733         (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
1734         * Makefile.in: Regenerate.
1735         * mach-o-x86-64.c: New file.
1737 2010-01-13  Tristan Gingold  <gingold@adacore.com>
1739         * reloc.c: Add MACH_O_X86_64 relocations.
1740         * bfd-in2.h: Regenerate.
1741         * libbfd.h: Regenerate.
1743 2010-01-13  Tristan Gingold  <gingold@adacore.com>
1745         * archive.c (normalize): Use lbasename.
1746         (bfd_bsd_truncate_arname): Ditto.
1747         (bfd_gnu_truncate_arname): Ditto.
1749 2010-01-12  Tristan Gingold  <gingold@adacore.com>
1751         * makefile.vms (CFLAGS): Turns warnings into informational messages.
1753 2010-01-11  Tristan Gingold  <gingold@adacore.com>
1755         * mach-o.h: Add x86-64 relocation types.
1757 2010-01-11  Tristan Gingold  <gingold@adacore.com>
1759         * mach-o.h (bfd_mach_o_backend_data): Add arch field.
1760         (bfd_mach_o_set_arch_mach): New prototype.
1761         * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
1762         (bfd_mach_o_set_arch_mach): New function.
1763         (bfd_mach_o_gen_mkobject): New function.
1764         Set TARGET_ARCHITECTURE for the generic back-ends.
1765         * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
1766         Check that TARGET_ARCHITECTURE is defined.
1767         Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
1768         * mach-o-i386.c (TARGET_ARCHITECTURE): Define.
1770 2010-01-11  Tristan Gingold  <gingold@adacore.com>
1772         * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
1774 2010-01-11  Nick Clifton  <nickc@redhat.com>
1776         * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
1777         handling of R_V850_HI16_S relocation.
1779 2010-01-11  Alan Modra  <amodra@gmail.com>
1781         PR 11103
1782         * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
1784 2010-01-11  Alan Modra  <amodra@gmail.com>
1786         PR 6832
1787         * dwarf2.c (struct comp_unit): Add sec_info_ptr.
1788         (find_abstract_instance_name): Use it.
1789         (parse_comp_unit): Set it.
1791 2010-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1793         * Makefile.in: Regenerate.
1794         * configure: Regenerate.
1796 2010-01-08  Tristan Gingold  <gingold@adacore.com>
1798         * archive.c: Remove bfd_special_undocumented_glue.
1800 2010-01-08  Alan Modra  <amodra@gmail.com>
1802         PR ld/11133
1803         * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
1804         * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
1805         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
1807 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
1809         PR ld/11138
1810         * elflink.c (elf_link_check_versioned_symbol): Don't abort if
1811         a symbol referenced by DSO is is defined in a non-shared object
1812         and forced local.
1814 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
1816         PR ld/11133
1817         * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
1818         undefined __start_XXX/__stop_XXX in all input files and set
1819         SEC_KEEP.
1821 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
1823         PR ld/11143
1824         * elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
1826 2010-01-04  Daniel Gutson  <dgutson@codesourcery.com>
1828         * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
1829         before including procfs.h.
1830         (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
1831         * configure.in: Added autoconf probe for the pr_fpreg member.
1832         * configure: Regenerated.
1833         * config.in: Regenerated.
1834         * elf.c: Define _STRUCTURE_PROC before including procfs.h.
1836 2010-01-04  Joel Brobecker  <brobecker@adacore.com>
1838         Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
1839         * dwarf2.c (concat_filename): Rename dirname with dir_name
1840         to void shadowing the dirname function.
1841         Rename subdirname with subdir_name to stay consistent with
1842         the new dir_name variable name.
1844 2010-01-04  Edmar Wienskoski  <edmar@freescale.com>
1846         * archures.c: Add bfd_mach_ppc_e500mc64.
1847         * bfd-in2.h: Regenerate.
1848         * cpu-powerpc.c (bfd_powerpc_archs): Add entry for
1849         bfd_mach_ppc_e500mc64.
1851 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
1853         Fix -Wshadow warnings (seen on ppc-aix)
1854         * xcofflink.c: Replace finfo by flinfo throughout.
1856 For older changes see ChangeLog-2009
1858 Local Variables:
1859 mode: change-log
1860 left-margin: 8
1861 fill-column: 74
1862 version-control: never
1863 End: