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