* elf-bfd.h (struct elf_backend_data <merge_symbol>): Update proto.
[platform/upstream/binutils.git] / bfd / ChangeLog
1 2013-03-25  Alan Modra  <amodra@gmail.com>
2
3         * elf-bfd.h (struct elf_backend_data <merge_symbol>): Update proto.
4         (_bfd_elf_init_reloc_shdr): Delete.
5         * elf.c (_bfd_elf_init_reloc_shdr): Make static.
6         * elf64-x86-64.c (elf_x86_64_merge_symbol): Trim parameters to
7         just what is needed.
8         * elflink.c (_bfd_elf_merge_symbol): Update bed->merge_symbol call.
9
10 2013-03-23  Alan Modra  <amodra@gmail.com>
11
12         * elf-bfd.h (_bfd_elf_merge_symbol): Delete declaration.
13         * elflink.c (_bfd_elf_merge_symbol): Make static.
14         * elf32-sh-symbian.c (sh_symbian_relocate_section): Don't call
15         _bfd_elf_merge_symbol, call _bfd_generic_link_add_one_symbol.
16
17 2013-03-23  Alan Modra  <amodra@gmail.com>
18
19         PR ld/15270
20         * elflink.c (elf_link_add_object_symbols): Don't set def_regular
21         or ref_regular for BFD_PLUGIN owned syms, or have them affect
22         def_dynamic/ref_dynamic.
23         (_bfd_elf_fix_symbol_flags): Don't set def_regular for BFD_PLUGIN
24         owned syms.
25
26 2013-03-22  David S. Miller  <davem@davemloft.net>
27
28         * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Set type of
29         hwcaps attribute.
30
31 2013-03-22  Achille Fouilleul  <achille.fouilleul+binutils@gadz.org>
32
33         PR ld/14902
34         * elf32-h8300.c (elf32_h8_relax_delete_bytes): Fix off by one
35         errors adjusting relocs and symbols.
36
37 2013-03-21  Michael Schewe  <michael.schewe@gmx.net>
38
39         * elf32-h8300 (h8_relax_section): Add new relaxation of mov
40         @(disp:32,ERx) to mov @(disp:16,ERx).
41         (R_H8_DISP32A16): New reloc.
42         Comments added and corrected.
43         * reloc.c (BFD_RELOC_H8_DISP32A16): New reloc.
44         * bfd-in2.h: Regenerate.
45         * libbfd.h: Regenerate.
46
47 2013-03-21  Kai Tietz  <ktietz@redhat.com>
48
49         * coffgen.c (coff_real_object_p): Make global.
50         * peicode.h (coff_real_object_p): Add prototype.
51         (FILHDR): Defined for COFF_IMAGE_WITH_PE as
52         external_PEI_IMAGE_hdr structure.
53         (coff_swap_filehdr_in): Handle variable header-size.
54         * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Just handle amount
55         of directory-entiries as specified in pe-header.
56
57 2013-03-21  Nick Clifton  <nickc@redhat.com>
58
59         PR sim/15286
60         * elf32-arm.c (bfd_arm_get_mach_from_attributes): Identify XScale,
61         iWMMXt and iWMMXt2 processors from attributes.
62
63 2013-03-20  Alan Modra  <amodra@gmail.com>
64
65         * elflink.c (_bfd_elf_make_dynamic_reloc_section): Override
66         sh_type according to is_rela.
67
68 2013-03-18  Alan Modra  <amodra@gmail.com>
69
70         PR ld/12549
71         * elflink.c (elf_link_add_object_symbols): Exclude weak refs when
72         considering whether an --as-needed library is needed.
73
74 2013-03-14  Tom Tromey  <tromey@redhat.com>
75
76         * opncls.c (bfd_get_debug_link_info): Rename from
77         get_debug_link_info.  Export.  Update comment.
78         (find_separate_debug_file): Update.
79         * bfd-in2.h: Rebuild.
80
81 2013-03-08  Venkataramanan Kumar  <venkataramanan.kumar@linaro.org>
82
83         * elf64-aarch64.c (elf_backend_can_gc_sections): Enable gc-section
84         support.
85         (elf64_aarch64_gc_sweep_hook): Handle GOT, TLS and PLT related
86         relocs.
87
88 2013-03-08  Andreas Arnez  <arnez@linux.vnet.ibm.com>
89
90         * elf-bfd.h (elfcore_write_s390_tdb): Add prototype.
91         * elf.c (elfcore_write_s390_tdb): New function.
92         (elfcore_write_register_note): Call it.
93         (elfcore_grok_s390_tdb): New function.
94         (elfcore_grok_note): Call it.
95
96 2013-03-08  Maciej W. Rozycki  <macro@codesourcery.com>
97
98         * elfxx-mips.c (mips_elf_allocate_lazy_stub): Correct data type.
99
100 2013-03-05  Corinna Vinschen  <vinschen@redhat.com>
101
102         * config.bfd: Add x86_64-*-cygwin to list of supported targets.
103
104 2013-03-04  Alan Modra  <amodra@gmail.com>
105
106         * elf32-ppc.c (ppc_elf_relocate_section <R_PPC_PLTREL24>): Adjust
107         non-zero addends when relocatable, rather than addends >= 32768.
108         Always zero "addend" before applying relocation.
109
110 2013-03-04  Nick Clifton  <nickc@redhat.com>
111
112         * archive64.c (bfd_elf64_archive_write_armap): Fix calculation of
113         file pointer offsets for thin archives.
114
115 2013-02-28  Nathan Sidwell  <nathan@codesourcery.com>
116
117         * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't call
118         elf32_arm_allocate_dynrelocs for source reloc for non-dynamic link.
119
120 2013-02-27  DJ Delorie  <dj@redhat.com>
121
122         * reloc.c (BFD_RELOC_RL78_CODE): Add.
123         * libbfd.h: Regenerate.
124         * bfd-in2.h: Regenerate.
125         * elf32-rl78.c (rl78_elf_relocate_section): Handle weak code
126         references in compuated relocs.
127
128 2013-02-26  Anthony Green  <green@moxielogic.com>
129
130         * config.bfd: Extend moxie-rtems target triplet name support.
131
132 2013-02-21  H.J. Lu  <hongjiu.lu@intel.com>
133
134         PR ld/15167
135         * elf64-ia64-vms.c (elf64_vms_link_add_object_symbols): Set
136         unique_global only for definition.
137         * elflink.c (_bfd_elf_merge_symbol): Don't set unique_global
138         here.
139         (elf_link_add_object_symbols): Set unique_global only
140         for definition.
141
142 2013-02-21  Alan Modra  <amodra@gmail.com>
143
144         * elf-bfd.h (struct elf_build_id): Extracted from..
145         (struct elf_build_id_info): ..here.  Delete.
146         (struct output_elf_obj_tdata): New, extracted from..
147         (struct elf_obj_tdata): ..here.  Reorganize for better packing.
148         Add "o" field.
149         (elf_program_header_size): Reference tdata->o.
150         (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
151         elf_stack_flags, elf_shstrtab, elf_strtab_sec, elf_shstrtab_sec,
152         elf_section_syms, elf_num_section_syms, elf_flags_init): Likewise.
153         * elf.c (bfd_elf_allocate_object): Allocate output_elf_obj_tdata
154         when opening bfd in any mode that might write.
155         (_bfd_elf_write_object_contents): Use build_id field in
156         output_elf_obj_tdata.
157         (_bfd_elf_close_and_cleanup): Tweak elf_shstrtab test.
158         (elfobj_grok_gnu_build_id): Adjust for elf_tdata changes.
159
160 2013-02-21  Alan Modra  <amodra@gmail.com>
161
162         * elf-bfd.h (struct core_elf_obj_tdata): New.
163         (struct elf_obj_tdata): Delete core_signal, core_pid, core_lwpid,
164         core_program, and core_command.  Add "core".
165         * elf.c (bfd_elf_mkcorefile): Allocate "core" struct.
166         Update all refs to tdata core fields.
167         * elf32-am33lin.c, * elf32-arm.c, * elf32-cris.c, * elf32-frv.c,
168         * elf32-hppa.c, * elf32-i386.c, * elf32-m68k.c, * elf32-mips.c,
169         * elf32-nios2.c, * elf32-ppc.c, * elf32-s390.c, * elf32-score.c,
170         * elf32-score7.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilegx.c,
171         * elf32-tilepro.c, * elf32-xtensa.c, * elf64-aarch64.c,
172         * elf64-hppa.c, * elf64-mips.c, * elf64-ppc.c, * elf64-tilegx.c,
173         * elf64-x86-64.c, * elfcore.h, * elfn32-mips.c: Update all refs
174         to tdata core fields.
175
176 2013-02-21  Alan Modra  <amodra@gmail.com>
177
178         * elf-bfd.h (struct elf_obj_tdata): Rename segment_map to seg_map.
179         Delete num_locals and num_globals.
180         (elf_num_locals, elf_num_globals): Don't define.
181         (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
182         elf_stack_flags, elf_strtab_sec, elf_shstrtab_sec): Define.
183         * bfd.c, * elf-eh-frame.c, * elf-nacl.c, * elf-vxworks.c, * elf.c,
184         * elf32-arm.c, * elf32-lm32.c, * elf32-ppc.c, * elf32-rx.c,
185         * elf32-spu.c, * elf64-hppa.c, * elfcode.h, * elflink.c,
186         * elfnn-ia64.c, * elfxx-mips.c: Use newly defined elf_obj_tdata
187         accessor macros.
188         * elf.c (elf_map_symbols): Add pnum_locals param.  Return
189         number of locals syms via new param.
190         (swap_out_syms): Adjust to suit elf_map_symbols change.
191
192 2013-02-19  Maciej W. Rozycki  <macro@codesourcery.com>
193
194         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Also clear
195         STO_MICROMIPS annotation.
196
197 2013-02-19  Alan Modra  <amodra@gmail.com>
198
199         * configure.in: Bump version to 2.23.52.
200         * elf-bfd.h (struct elf_build_id_info): New.
201         (struct elf_obj_tdata): Delete after_write_object_contents,
202         after_write_object_contents_info and build_id_size.  Make build_id
203         a pointer to struct elf_build_id_info.
204         * elf.c (_bfd_elf_write_object_contents): Style.  Update
205         after_write_ibject_contents invocation.
206         (elfobj_grok_gnu_build_id): Update for new build_id struct.  Don't
207         allow zero size notes.
208         * configure: Regenerate.
209
210 2013-02-18  Maciej W. Rozycki  <macro@codesourcery.com>
211
212         * elf64-mips.c (micromips_elf64_howto_table_rel): Add
213         R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
214         (micromips_elf64_howto_table_rela): Likewise.
215         (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
216         * elfn32-mips.c (elf_micromips_howto_table_rel): Add
217         R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
218         (elf_micromips_howto_table_rela): Likewise.
219         (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
220
221 2013-02-18  Paul Brook  <paul@codesourcery.com>
222
223         * elfxx-mips.c (MICROMIPS_P): New macro.
224         (_bfd_mips_elf_symbol_processing): Use it.
225
226 2013-02-18  Maciej W. Rozycki  <macro@codesourcery.com>
227
228         * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Clarify
229         comment on _PROCEDURE_LINKAGE_TABLE_ creation.
230
231 2013-02-18  Alan Modra  <amodra@gmail.com>
232
233         PR ld/12549
234         * elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete.
235         (_bfd_elf_strtab_clear_all_refs): Declare.
236         (_bfd_elf_strtab_resize): Declare.
237         * elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete.
238         (_bfd_elf_strtab_clear_all_refs): New function.
239         (_bfd_elf_strtab_resize): Likewise.
240         * elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize.
241
242 2013-02-18  Alan Modra  <amodra@gmail.com>
243
244         * elf-bfd.h (struct elf_obj_tdata): Move find_line_info, local_stubs,
245         local_call_stubs, elf_data_symbol, elf_text_symbol, elf_data_section,
246         and elf_text_section to..
247         * elfxx-mips.c (struct mips_elf_obj_tdata): ..here.  Update all refs.
248         * elf64-alpha.c (struct mips_elf_find_line): Rename to..
249         (struct alpha_elf_find_line): ..this.
250         (struct alpha_elf_obj_tdata): Add find_line_info, update refs.
251
252 2013-02-16  H.J. Lu  <hongjiu.lu@intel.com>
253
254         PR ld/15146
255         * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
256         for references from the dummy bfd.
257
258 2013-02-16  H.J. Lu  <hongjiu.lu@intel.com>
259
260         PR ld/15149
261         * elflink.c (elf_link_add_object_symbols): Also track weak
262         references.
263
264 2013-02-15  H.J. Lu  <hongjiu.lu@intel.com>
265
266         PR binutils/15151
267         * archive.c (_bfd_find_nested_archive): Don't allow a nested
268         archive pointing to itself.
269         (_bfd_get_elt_at_filepos): Revert the last 2 changes.
270
271 2013-02-15  Nick Clifton  <nickc@redhat.com>
272
273         PR binutils/15140
274         * archive.c (_bfd_get_elt_at_filepos): Prevent an infinite loop
275         accessing a corrupt nested archive.
276
277 2013-02-13  Richard Sandiford  <rdsandiford@googlemail.com>
278
279         * elfxx-mips.c (mips_got_page_ref): New structure.
280         (mips_got_page_entry): Use a section rather than a (bfd, symndx)
281         pair to represent the anchor point.
282         (mips_got_info): Add a got_page_refs field.
283         (mips_elf_link_hash_table): Add a sym_cache field.
284         (mips_got_page_ref_hash, mips_got_page_ref_eq): New functions.
285         (mips_got_page_entry_hash, mips_got_page_entry_eq): Update for
286         new anchor representation.
287         (mips_elf_create_got_info): Create got_page_refs rather than
288         got_page_entries.
289         (mips_elf_record_got_page_ref): New function.
290         (mips_elf_pages_for_range): Move further down file.
291         (mips_elf_record_got_page_entry): Likewise.  Take a got as argument.
292         Use a section rather than a (bfd, symndx) pair to represent the
293         anchor point.
294         (mips_elf_resolve_got_page_ref): New function.
295         (mips_elf_resolve_final_got_entries): Use it to populate
296         got_page_entries.
297         (_bfd_mips_elf_check_relocs): Call mips_elf_record_got_page_ref
298         rather than mips_elf_record_got_page_entry.  Only nullify h
299         afterwards.
300         (mips_elf_lay_out_got): Call mips_elf_resolve_final_got_entries
301         earlier.
302
303 2013-02-12  Richard Sandiford  <rdsandiford@googlemail.com>
304
305         * elfxx-mips.c (mips_elf_lay_out_got): Count VxWorks GOT relocs
306         in g->relocs.
307
308 2013-02-12  Alan Modra  <amodra@gmail.com>
309
310         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Provide
311         suitable definition when using generic linker hash table.
312
313 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
314
315         * elfxx-mips.c (mips_elf_count_got_entries): Delete.
316         (mips_elf_check_recreate_got, mips_elf_recreate_got): Take a
317         mips_elf_traverse_got_arg.  Count GOT entries.
318         (mips_elf_resolve_final_got_entries): Take the bfd_link_info
319         as argument.  Update after above changes.
320         (mips_elf_merge_got, mips_elf_lay_out_got): Don't call
321         mips_elf_count_got_entries.  Update the calls to
322         mips_elf_resolve_final_got_entries.
323
324 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
325
326         * elfxx-mips.c (mips_got_tls_type): New enum.
327         (mips_got_entry): Add tls_initialized.
328         (mips_elf_got_entry_hash, mips_elf_got_entry_eq, mips_tls_got_relocs)
329         (mips_elf_count_got_entry, mips_elf_initialize_tls_index): Remove
330         GOT_TLS_TYPE masks.
331         (mips_elf_reloc_tls_type, mips_tls_got_entries)
332         (mips_elf_record_global_got_symbol, mips_elf_initialize_tls_index)
333         (_bfd_mips_elf_finish_dynamic_symbol): Use GOT_TLS_NONE rather
334         than GOT_NORMAL.
335         (mips_elf_initialize_tls_slots): Replace got_offset and tls_type_p
336         arguments with a GOT entry.  Remove GOT_TLS_TYPE masks.  Use
337         tls_initialized rather than GOT_TLS_DONE.
338         (mips_tls_got_index): Delete.
339         (mips_elf_local_got_index, mips_elf_global_got_index): Use
340         mips_elf_initialize_tls_slots rather than mips_tls_got_index.
341         (mips_elf_record_got_entry): Initialize tls_initialized.
342
343 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
344
345         * elfxx-mips.c (mips_got_entry): Remove tls_ldm_offset.
346         (mips_elf_link_hash_entry): Remove tls_ie_type, tls_gd_type,
347         tls_ie_got_offset and tls_gd_got_offset.
348         (mips_elf_link_hash_newfunc): Remove initialization.
349         (mips_elf_create_got_info): Likewise.
350         (mips_elf_count_local_got_entries, mips_elf_count_global_tls_entries)
351         (mips_tls_single_got_index): Delete.
352         (mips_elf_local_got_index): Always use the GOT entry to track
353         GOT indices.
354         (mips_elf_global_got_index): Likewise.
355         (mips_elf_create_local_got_entry): Assert that TLS entries have
356         already been allocated.
357         (mips_elf_record_global_got_symbol): Don't initialize
358         tls_ie_type or tls_gd_type.
359         (mips_elf_count_got_symbols): Only count reloc-only GOT entries here.
360         (mips_elf_initialize_tls_index): Allocate a GOT index for every TLS
361         entry.
362         (mips_elf_lay_out_got): Use mips_elf_count_got_entries to count
363         the GOT entries.
364         (_bfd_mips_elf_finish_dynamic_symbol): Assert that TLS GOT offsets
365         have been allocated.
366         (_bfd_mips_elf_copy_indirect_symbol): Remove handling of
367         tls_ie_type and tls_gd_type.
368
369 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
370
371         * elfxx-mips.c (mips_elf_create_local_got_entry): Tidy.  Avoid
372         aliasing violation.  Check for htab allocation failures.
373
374 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
375
376         * elfxx-mips.c (mips_elf_primary_global_got_index): New function,
377         split out from...
378         (mips_elf_global_got_index): ...here.  Reorder arguments so that
379         the output bfd and info come first.
380         (mips_elf_calculate_relocation): Update the call to
381         mips_elf_global_got_index accordingly.
382         (_bfd_mips_elf_finish_dynamic_symbol): Use
383         mips_elf_primary_global_got_index rather than
384         mips_elf_global_got_index.
385         (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
386
387 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
388
389         * elfxx-mips.c (mips_got_entry): Update comments.
390         (mips_elf_multi_got_entry_eq): Rename to...
391         (mips_elf_got_entry_eq): ...this, deleting the old definition.
392         (mips_elf_create_got_info): Remove master_got_p argument.
393         Always use mips_elf_got_entry_eq.
394         (mips_elf_bfd_got, mips_elf_multi_got, mips_elf_create_got_section):
395         Update calls accordingly.
396
397 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
398
399         * elfxx-mips.c (mips_got_info): Remove bfd2got.
400         (mips_elf_bfd2got_hash): Delete.
401         (mips_elf_got_per_bfd_arg): Remove bfd2got.
402         (mips_elf_replace_bfd_got, mips_elf_count_got_entries): New functions.
403         (mips_elf_global_got_index, mips_elf_create_local_got_entry): Use
404         g->next to test for the multigot case.  Use mips_elf_bfd_got rather
405         than mips_elf_got_for_ibfd.
406         (mips_elf_bfd2got_entry_hash, mips_elf_bfd2got_entry_eq)
407         (mips_elf_got_for_ibfd, mips_elf_get_got_for_bfd): Delete.
408         (mips_elf_make_got_per_bfd): Replace with...
409         (mips_elf_add_got_entry): ...this new function.
410         (mips_elf_make_got_pages_per_bfd): Replace with...
411         (mips_elf_add_got_page_entry): ...this new function.
412         (mips_elf_merge_got_with): Replace bfd2got argument with separate
413         bfd and GOT arguments.  Use mips_elf_add_got_entry and
414         mips_elf_add_got_page_entry instead of mips_elf_make_got_per_bfd
415         and mips_elf_make_got_pages_per_bfd.  Use mips_elf_replace_bfd_got
416         to set the BFD's GOT and free the old table.
417         (mips_elf_merge_got): Replace bfd2got argument with separate
418         bfd and GOT arguments.  Apply mips_elf_resolve_final_got_entries.
419         Use mips_elf_count_got_entries to count the number of entries in
420         each GOT.  Update the calls to mips_elf_merge_got_with.
421         (mips_elf_adjust_gp): Use g->next to test for the multigot case.
422         Use mips_elf_bfd_got rather than mips_elf_got_for_ibfd.
423         (mips_elf_multi_got): Don't create the bfd2got hash table.
424         Replace hash table traversal with a walk over the input bfds,
425         updating the call to mips_elf_merge_got.  Use mips_elf_replace_bfd_got
426         to set the output bfd's GOT.
427         (mips_elf_lay_out_got): Rename "sub" to "ibfd".  Record that all
428         bfds use the master GOT in the single-GOT case.
429         (_bfd_mips_elf_finish_dynamic_sections): Use mips_elf_bfd_got
430         rather than mips_elf_got_for_ibfd.
431
432 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
433
434         * elfxx-mips.c (mips_elf_obj_tdata): Add a got field.
435         (mips_elf_bfd_got, mips_elf_record_got_entry): New functions.
436         (mips_elf_record_global_got_symbol): Update the hash entry before
437         adding the mips_got_entry.  Use mips_elf_record_got_entry to do
438         the latter.
439         (mips_elf_record_local_got_symbol): Use mips_elf_record_got_entry.
440         (mips_elf_record_got_page_entry): Record the entry in both the
441         master and bfd GOTs.
442
443 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
444
445         * elfxx-mips.c (mips_elf_recreate_got): Don't change the entry;
446         create another one if necessary.
447         (mips_elf_set_gotidx): New function.
448         (mips_elf_set_global_gotidx): Use it.
449         (mips_elf_initialize_tls_index): Likewise.  Take a
450         mips_elf_traverse_got_arg as argument.
451         (mips_elf_lay_out_got): Update use of mips_elf_initialize_tls_index.
452         (mips_elf_multi_got): Likewise.  Cope with error returns from
453         mips_elf_set_global_gotidx.
454
455 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
456
457         * elfxx-mips.c (mips_got_info): Add relocs field.
458         (mips_elf_set_global_got_offset_arg, mips_elf_count_tls_arg): Replace
459         with...
460         (mips_elf_traverse_got_arg): ...this new structure.
461         (mips_elf_count_local_tls_relocs): Delete.
462         (mips_elf_count_global_tls_relocs): Likewise.
463         (mips_elf_count_got_entry): New function.
464         (mips_elf_count_local_got_entries): Likewise.
465         (mips_elf_count_global_tls_entries): Take a mips_elf_traverse_got_arg
466         rather than a mips_elf_count_tls_arg.  Count both relocs and entries.
467         (mips_elf_record_local_got_symbol): Don't count got entries here.
468         (mips_elf_make_got_per_bfd): Use mips_elf_count_got_entry.
469         (mips_elf_set_global_got_offset): Split into...
470         (mips_elf_set_global_got_area, mips_elf_set_global_gotidx): ...these
471         new functions.  Take a mips_elf_traverse_got_arg rather than a
472         mips_elf_set_global_got_offset_arg.  Don't count TLS relocs here.
473         Use g->relocs to record the number of relocs needed for global GOT
474         entries.
475         (mips_elf_multi_got): Use mips_elf_traverse_got_arg rather than
476         mips_elf_set_global_got_offset_arg.  Use the relocs field to count
477         relocations.  Update for above function split.
478         (mips_elf_lay_out_got): Use mips_elf_count_local_got_entries
479         to count both the number of GOT entries and the number of TLS
480         relocs required by local entries.  Likewise
481         mips_elf_count_global_tls_entries and global entries.
482         Remove uses of mips_elf_count_local_tls_relocs and
483         mips_elf_count_global_tls_relocs.
484
485 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
486
487         * elfxx-mips.c (mips_got_entry): Update comment above tls_type entry
488         to say that each structure represents only one type of TLS reference.
489         (GOT_TLS_TYPE): New define.
490         (mips_elf_link_hash_entry): Temporarily split tls_type and
491         tls_got_offset into two variables each.
492         (mips_elf_link_hash_newfunc): Update accordingly.
493         (mips_elf_got_entry_eq, mips_elf_got_entry_hash)
494         (mips_elf_multi_got_entry_eq): Require the tls_type to be the same.
495         (mips_elf_reloc_tls_type, mips_tls_got_entries): New functions.
496         (mips_tls_got_relocs): Use a switch statement.
497         (mips_elf_count_global_tls_entries): Handle the new hash entry fields.
498         (mips_elf_initialize_tls_slots): Use a switch statement.  Avoid
499         local "offset" variable.
500         (mips_tls_got_index): Remove r_type argument and assert.  Remove
501         code that handled entries with two TLS types; always use the
502         original got_index instead.
503         (mips_tls_single_got_index): New function.
504         (mips_elf_local_got_index): Use entry->tls_type to check for
505         TLS entries.  Use mips_tls_single_got_index.  Update call to
506         mips_tls_got_index.
507         (mips_elf_global_got_index): Use mips_elf_reloc_tls_type.
508         Use p->tls_type to check for TLS entries.  Update call to
509         mips_tls_got_index.  Use mips_tls_single_got_index.
510         (mips_elf_create_local_got_entry): Use mips_elf_reloc_tls_type.
511         Use entry.tls_type to check for TLS entries.
512         (mips_elf_record_global_got_symbol): Replace tls_flag argument
513         with r_type argument.  Use mips_elf_reloc_tls_type.
514         Set up the new hash entry fields.
515         (mips_elf_record_local_got_symbol): Replace tls_flag argument
516         with r_type argument.  Use mips_elf_reloc_tls_type and
517         mips_tls_got_entries.  Remove code that handled entries
518         with multiple TLS types.
519         (mips_elf_make_got_per_bfd): Use mips_tls_got_entries.
520         (mips_elf_initialize_tls_index): Handle new hash entry fields.
521         Use equality rather than masks when checking for specific TLS types.
522         Use mips_tls_got_entries.  Remove code that handled entries
523         with multiple TLS types.
524         (mips_elf_calculate_relocation): Use TLS_RELOC_P instead of
525         testing the hash table entry.
526         (_bfd_mips_elf_check_relocs): Update calls to
527         mips_elf_record_global_got_symbol and mips_elf_record_local_got_symbol.
528         (_bfd_mips_elf_finish_dynamic_symbol): Don't check h->type.
529         (_bfd_mips_elf_copy_indirect_symbol): Handle new hash entry fields.
530
531 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
532
533         * elfxx-mips.c (mips_elf_multi_got_entry_hash): Rename to...
534         (mips_elf_got_entry_hash): ...this, deleting the old version.
535         (mips_elf_create_got_info): Use mips_elf_got_entry_hash for
536         both types of GOT.
537
538 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
539
540         * elfxx-mips.c (mips_elf_create_got_info): New function.
541         (mips_elf_get_got_for_bfd, mips_elf_multi_got): Use it.
542         (mips_elf_create_got_section): Likewise.
543
544 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
545
546         * elfxx-mips.c (mips_elf_record_local_got_symbol): Always set
547         gotidx to -1.
548
549 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
550
551         * elfxx-mips.c (mips_elf_multi_got): Simplify size calculation.
552
553 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
554
555         * elfxx-mips.c (mips_got_info): Move global_gotsym to...
556         (mips_elf_link_hash_table): ...here.  Update rest of file accordingly.
557
558 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
559
560         * elfxx-mips.c (mips_elf_count_global_tls_entries)
561         (mips_elf_count_global_tls_relocs): Don't count indirect or
562         warning symbols.
563         (mips_elf_multi_got, mips_elf_lay_out_got): Assert that the right
564         number of TLS entries were allocated.
565
566 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
567
568         * elfxx-mips.c (mips_elf_sort_hash_table_f): Remove asserts.
569
570 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
571
572         * elfxx-mips.c (mips_elf_merge_got_with): Only use arg->global_count
573         if there are TLS relocations.
574
575 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
576
577         * elfxx-mips.c (mips_elf_recreate_got): Remove free.
578         (mips_elf_resolve_final_got_entries): Remove bogus comment.
579
580 2013-02-11  Alan Modra  <amodra@gmail.com>
581
582         * elfcode.h (elf_checksum_contents): Free contents.
583         * elf-bfd.h (_bfd_elf_link_hash_table_free): Declare.
584         * elflink.c (_bfd_elf_link_hash_table_free): New function.
585         (elf_final_link_free): New function, extracted from..
586         (bfd_elf_final_link): ..here.  Always call
587         _bfd_elf_write_section_eh_frame_hdr.
588         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Default to
589         _bfd_elf_link_hash_table_free.
590         * libbfd-in.h (_bfd_merge_sections_free): Declare.
591         * libbfd.h: Regenerate.
592         * merge.c (_bfd_merge_sections_free): New function.
593         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Free
594         hdr_info->array.
595         * elf-m10300.c (elf32_mn10300_link_hash_table_free): Call
596         _bfd_elf_link_hash_table_free.
597         * elf32-arm.c (elf32_arm_link_hash_table_free): Likewise.
598         * elf32-avr.c (elf32_avr_link_hash_table_free): Likewise.
599         * elf32-hppa.c (elf32_hppa_link_hash_table_free): Likewise.
600         * elf32-i386.c (elf_i386_link_hash_table_free): Likewise.
601         * elf32-m68hc1x.c (m68hc11_elf_hash_table_free): Likewise.
602         * elf32-m68k.c (elf_m68k_link_hash_table_free): Likewise.
603         * elf32-metag.c (elf_metag_link_hash_table_free): Likewise.
604         * elf32-xgate.c (xgate_elf_bfd_link_hash_table_free): Likewise.
605         * elf64-aarch64.c (elf64_aarch64_link_hash_table_free): Likewise.
606         * elf64-ia64-vms.c (elf64_ia64_hash_table_free): Likewise.
607         * elf64-ppc.c (ppc64_elf_link_hash_table_free): Likewise.
608         * elf64-x86-64.c (elf_x86_64_link_hash_table_free): Likewise.
609         * elfnn-ia64.c (elfNN_ia64_hash_table_free): Likewise.
610         * elf32-cr16.c (elf32_cr16_link_hash_table_free): Delete.
611         (bfd_elf32_bfd_link_hash_table_free): Don't define.
612         * elf32-tic6x.c (elf32_tic6x_link_hash_table_free): Delete.
613         (bfd_elf32_bfd_link_hash_table_free): Dont' define.
614
615 2013-02-10  Alan Modra  <amodra@gmail.com>
616
617         * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_zmalloc.
618         * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
619         * m68klinux.c (linux_link_hash_table_create): Likewise.
620         * sparclinux.c (linux_link_hash_table_create): Likewise.
621         * sunos.c (sunos_link_hash_table_create): Likewise.
622         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
623         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
624         * elf32-arm.c (elf32_arm_link_hash_table_create): Likewise.
625         * elf32-avr.c (elf32_avr_link_hash_table_create): Likewise.
626         * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
627         * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
628         * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
629         * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
630         * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
631         * elf32-m32r.c (m32r_elf_link_hash_table_create): Likewise.
632         * elf32-m68hc1x.c (m68hc11_elf_hash_table_create): Likewise.
633         * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
634         * elf32-metag.c (elf_metag_link_hash_table_create): Likewise.
635         * elf32-nios2.c (nios2_elf32_link_hash_table_create): Likewise.
636         * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
637         * elf32-score.c (elf32_score_link_hash_table_create): Likewise.
638         * elf32-spu.c (spu_elf_link_hash_table_create): Likewise.
639         * elf32-tic6x.c (elf32_tic6x_link_hash_table_create): Likewise.
640         * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
641         * elf32-xgate.c (xgate_elf_bfd_link_hash_table_create): Likewise.
642         * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Likewise.
643         * elf64-aarch64.c (elf64_aarch64_link_hash_table_create): Likewise.
644         * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
645         * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
646         * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Likewise.
647         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
648         * elflink.c (_bfd_elf_link_hash_table_create): Likewise.
649         (_bfd_elf_link_hash_table_init): Assume zero fill table on entry.
650
651 2013-02-10  Alan Modra  <amodra@gmail.com>
652
653         * i386linux.c (linux_link_hash_table_create): Allocate table
654         with bfd_zmalloc, not bfd_alloc.
655         * pdp11.c (link_hash_table_create): Allocate table with
656         bfd_malloc, not bfd_alloc.
657         * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create): Allocate table
658         with bfd_zmalloc, not bfd_zalloc.
659         (bfin_link_hash_table_create): Likewise.
660         * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
661         * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
662
663 2013-02-10  Alan Modra  <amodra@gmail.com>
664
665         PR ld/15113
666         * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc.
667
668 2013-02-08  Markos Chandras  <markos.chandras@imgtec.com>
669
670         * elf32-metag.c: Use bfd_get_linker_section to get SEC_LINKER_CREATED
671         sections.
672         (elf_metag_adjust_dynamic_symbol): Don't error on zero size dynbss
673         symbol.
674
675 2013-02-08  Yufeng Zhang  <yufeng.zhang@arm.com>
676
677         * elf64-aarch64.c (elf64_aarch64_grok_prstatus): Change 'size' from
678         288 to 272.
679
680 2013-02-08  Alan Modra  <amodra@gmail.com>
681
682         PR binutils/15106
683         * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache.
684         * elf.c (elf_find_function): Revert last change.  Use new
685         tdata field rather than static vars for cache.
686
687 2013-02-07  H.J. Lu  <hongjiu.lu@intel.com>
688
689         PR ld/15107
690         * elflink.c (elf_link_output_extsym): Set STB_GNU_UNIQUE only if
691         symbol is defined in regular object.
692
693 2013-02-07  Roberto Agostino Vitillo  <ra.vitillo@gmail.com>
694
695         PR binutils/15106
696         * elf.c (elf_find_function): Don't cache if symbols change.
697
698 2013-02-07  Alan Modra  <amodra@gmail.com>
699
700         PR binutils/14873
701         * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to
702         copy attributes from or to non-ELF.
703
704 2013-02-06  H.J. Lu  <hongjiu.lu@intel.com>
705
706         * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't clear pc_count
707         for non-zero TLS symbol.
708         (elf_i386_relocate_section): Don't resolve size relocation against
709         non-zero TLS symbol.
710         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Don't clear
711         pc_count for non-zero TLS symbol.
712         (elf_x86_64_relocate_section): Don't resolve size relocation
713         against non-zero TLS symbol.
714
715 2013-02-06  Sandra Loosemore  <sandra@codesourcery.com>
716             Andrew Jenner <andrew@codesourcery.com>
717
718         Based on patches from Altera Corporation.
719
720         * Makefile.am (ALL_MACHINES): Add cpu-nios2.lo.
721         (ALL_MACHINES_CFILES): Add cpu-nios2.c.
722         (BFD_BACKENDS): Add elf32-nios2.lo.
723         (BFD32_BACKENDS_CFILES): Add elf32-nios2.c.
724         * Makefile.in: Regenerated.
725         * configure.in: Add entries for bfd_elf32_bignios2_vec and
726         bfd_elf32_littlenios2_vec.
727         * configure: Regenerated.
728         * config.bfd: Add cases for nios2.
729         * archures.c (enum bfd_architecture): Add bfd_arch_nios2.
730         (bfd_mach_nios2): Define.
731         (bfd_nios2_arch): Declare.
732         (bfd_archures_list): Add bfd_nios2_arch.
733         * targets.c (bfd_elf32_bignios2_vec): Declare.
734         (bfd_elf32_littlenios2_vec): Declare.
735         (_bfd_target_vector): Add entries for bfd_elf32_bignios2_vec and
736         bfd_elf32_littlenios2_vec.
737         * elf-bfd.h (enum elf_target_id): Add NIOS2_ELF_DATA.
738         * reloc.c (enum bfd_reloc_code_real): Add Nios II relocations.
739         * bfd-in2.h: Regenerated.
740         * libbfd.h: Regenerated.
741         * cpu-nios2.c: New file.
742         * elf32-nios2.c: New file.
743
744 2013-02-06  Alan Modra  <amodra@gmail.com>
745
746         * elf32-arm.c (elf32_arm_final_link_relocate): Only test for
747         stubs in stub_bfd.
748
749 2013-02-06  Alan Modra  <amodra@gmail.com>
750
751         * Makefile.am (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
752         * Makefile.in: Regenerate.
753
754 2013-02-04  Sergio Durigan Junior  <sergiodj@redhat.com>
755             Pedro Alves  <palves@redhat.com>
756
757         * Makefile.in (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
758         * elf-bfd.h (elf_internal_linux_prpsinfo): New structure
759         declaration.
760         (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64)
761         (elfcore_write_ppc32_linux_prpsinfo32): New declarations.
762         * elf-linux-psinfo.h: New file.
763         * elf.c: Include elf-linux-psinfo.h.
764         (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64):
765         New functions.
766         * elf32-ppc.c: Include `elf-linux-psinfo.h'.
767         (elf_external_ppc_linux_prpsinfo32): New structure declaration.
768         (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): New macro.
769         (elfcore_write_ppc_linux_prpsinfo32): New function.
770
771 2013-02-04  Tristan Gingold  <gingold@adacore.com>
772
773         * mach-o.c (bfd_mach_o_scan_start_address): Do not fail if no
774         start address.
775
776 2013-02-04  Alan Modra  <amodra@gmail.com>
777
778         * Makefile.am (BFD64_BACKENDS): Remove elf-nacl.lo.
779         (BFD64_BACKENDS_CFILES): Remove elf-nacl.c.
780         * Makefile.in: Regenerate.
781         * po/SRC-POTFILES.in: Regenerate.
782
783 2013-02-04  Alan Modra  <amodra@gmail.com>
784
785         * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Delete.
786         * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Delete.
787
788 2013-02-01  Alan Modra  <amodra@gmail.com>
789
790         * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
791         clears def_regular.
792
793 2013-01-31  Tristan Gingold  <gingold@adacore.com>
794
795         * mach-o.c (bfd_mach_o_scan): Call bfd_mach_o_flatten_sections
796         earlier.  Fix status checking of bfd_mach_o_scan_start_address.
797         (bfd_mach_o_scan_start_address): Handle LC_MAIN.
798
799 2013-01-31  Alan Modra  <amodra@gmail.com>
800             David S. Miller  <davem@davemloft.net>
801
802         PR ld/15056
803         * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit
804         references to __tls_get_addr.
805         * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise.  Correct
806         vtinherit and vtentry reloc handling too.
807         * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro.
808
809 2013-01-31  Alan Modra  <amodra@gmail.com>
810
811         * elf64-ppc.c (ppc_stub_name): Trim off trailing "+0".
812
813 2013-01-31  Alan Modra  <amodra@gmail.com>
814
815         * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink.
816
817 2013-01-28  Alan Modra  <amodra@gmail.com>
818
819         * elf64-ppc.c: Use %T to print symbols names and remove redundant
820         "relocation" in error messages throughout file.
821         (ppc64_elf_relocate_section): Remove sibling call error message,
822         replace with "call lacks nop".  Specially report errors for
823         branches to function entry points via OPD lookup and branches
824         to stubs.  Remove NULL symbol handling now done by %T.
825
826 2013-01-28  Alan Modra  <amodra@gmail.com>
827
828         * archive.c (bfd_generic_archive_p): Return target and keep
829         ardata on partial matches.
830         * format.c (bfd_check_format_matches): Adjust for above
831         change.  Remove bfd_error_file_ambiguously_recognized dead
832         code.
833
834 2013-01-26  Alan Modra  <amodra@gmail.com>
835
836         * bfd.c (struct bfd_preserve, bfd_preserve_save, bfd_preserve_restore,
837         bfd_preserve_finish): Move to..
838         * format.c: ..here, splitting out..
839         (bfd_reinit): ..this.  New function.
840         (bfd_check_format_matches): Use bfd_preserve_save/restore to
841         keep bfd state for a match.
842         * elfcode.h (elf_object_p): Don't use bfd_preserve_save/restore.
843         * elfcore.h (elf_core_file_p): Likewise.
844         * mach-o.c (bfd_mach_o_header_p): Likewise.
845         * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
846         * xsym.c (bfd_sym_object_p): Likewise.
847         * mmo.c (mmo_scan): Clear abfd->symcount.
848         * opncls.c (_bfd_new_bfd): Use a smaller section hash table.
849         * section.c (bfd_section_list_clear): Clear section_htab.count.
850         * bfd-in2.h: Regenerate.
851
852 2013-01-25  Michael Schewe  <michael.schewe@gmx.net>
853
854         * elf32-h8300.c (elf32_h8_relax_section): When checking for a
855         second reloc, make sure that the reloc potentially exists first.
856
857 2013-01-24  Nick Clifton  <nickc@redhat.com>
858
859         * archures.c: Add bfd_mach_v850e3v5.
860         * bfd-in2.h: Regenerate.
861         * cpu-v850.c: Add entries for v850e2v5 and v850e3v5.
862         * cpu-v850_rh850.c: Likewise.
863         * elf32-v850.c: Add support for v850e3v5 architecture.
864
865 2013-01-23  Markos Chandras  <markos.chandras@imgtec.com>
866
867         * elf32-metag.c: Error on HIADDR16/LOADDR16 in shared link.
868
869 2013-01-23  Leif Ekblad  <leif@rdos.net>
870
871         * config.bfd (x86_64-*-rdos*): Remove targ_selvecs.
872
873 2013-01-18  H.J. Lu  <hongjiu.lu@intel.com>
874
875         * elf32-i386.c (elf_i386_allocate_dynrelocs): Clear pc_count for
876         non-zero TLS symbol.
877         (elf_i386_relocate_section): Resolve size relocation against
878         non-zero TLS symbol.
879         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Clear pc_count
880         for non-zero TLS symbol.
881         (elf_x86_64_relocate_section): Resolve size relocation against
882         non-zero TLS symbol.
883
884 2013-01-18  Mike Frysinger  <vapier@gentoo.org>
885
886         * elflink.c (bfd_elf_size_dynamic_sections): Only add DT_RPATH
887         when new_dtags is false.  Only add DT_RUNPATH when new_dtags is
888         true.
889
890 2013-01-17  H.J. Lu  <hongjiu.lu@intel.com>
891
892         * elf32-i386.c (elf_i386_check_relocs): Count size relocation as
893         PC-relative relocation.
894         * elf64-x86-64.c (elf_x86_64_check_relocs): Count size relocation
895         as PC-relative relocation.
896
897 2013-01-16  H.J. Lu  <hongjiu.lu@intel.com>
898
899         * elf32-i386.c (elf_i386_check_relocs): Update R_386_SIZE32
900         check.
901         (elf_i386_relocate_section): Don't check TLS for R_386_SIZE32.
902
903         * elf64-x86-64.c (elf_x86_64_check_relocs): Update R_X86_64_SIZE32
904         and R_X86_64_SIZE64 check.
905         (elf_x86_64_relocate_section): Don't check TLS for R_X86_64_SIZE32
906         nor R_X86_64_SIZE64.
907
908 2013-01-16  H.J. Lu  <hongjiu.lu@intel.com>
909
910         * bfd-in2.h: Regenerated.
911         * libbfd.h: Likewise.
912
913         * elf32-i386.c (elf_howto_table): Fill R_386_SIZE32 entry.
914         (elf_i386_reloc_type_lookup): Support BFD_RELOC_SIZE32.
915         (elf_i386_check_relocs): Handle R_386_SIZE32.
916         (elf_i386_gc_sweep_hook): Likewise.
917         (elf_i386_relocate_section): Likewise.
918
919         * elf64-x86-64.c (x86_64_elf_howto_table): Fill R_X86_64_SIZE32
920         and R_X86_64_SIZE64 entries.
921         (x86_64_reloc_map): Add BFD_RELOC_SIZE32 and BFD_RELOC_SIZE64,
922         (elf_x86_64_rtype_to_howto): Handle R_X86_64_SIZE32 for x32.
923         (elf_x86_64_reloc_name_lookup): Likewise.
924         (elf_x86_64_check_relocs): Handle R_X86_64_SIZE32 and
925         R_X86_64_SIZE64.
926         (elf_x86_64_gc_sweep_hook): Likewise.
927         (elf_x86_64_relocate_section): Likewise.
928
929         * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SIZE32 and
930         BFD_RELOC_SIZE64.
931
932 2013-01-15  H.J. Lu  <hongjiu.lu@intel.com>
933
934         * elf64-x86-64.c (R_X86_64_standard): Replace R_X86_64_IRELATIVE
935         with R_X86_64_RELATIVE64.
936
937 2013-01-15  Nick Clifton  <nickc@redhat.com>
938
939         * elf32-msp430.c: Fix spelling typo.
940
941 2013-01-15  Alan Modra  <amodra@gmail.com>
942
943         * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to
944         plt-thread-safe.
945
946 2013-01-14  Alan Modra  <amodra@gmail.com>
947
948         PR binutils/14813
949         * bfdio.c (struct bfd_iovec <bclose>): Revert 2012-11-06.
950         (memory_bclose): Likewise.  Return 0 on success.
951         * cache.c (cache_bclose): Likewise.
952         * opncls.c (opncls_bclose, bfd_close): Likewise.
953         * vms-lib.c (vms_lib_bclose): Likewise.
954         * libbfd.h: Regenerate.
955
956 2013-01-13  Alan Modra  <amodra@gmail.com>
957
958         * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak.
959         Add ref_dynamic_nonweak.
960         * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete.
961         (_bfd_elf_merge_symbol): Don't call above function.  Move
962         setting of ref_dynamic_nonweak and dynamic_def earlier.  Don't
963         clear dynamic_def.
964         (elf_link_add_object_symbols): Delete redundant "override" test.
965         Don't set dynamic_def here.
966         (elf_link_output_extsym): Update.
967
968 2013-01-12  H.J. Lu  <hongjiu.lu@intel.com>
969
970         * elf32-i386.c (elf_i386_check_relocs): Set bfd errror for
971         normal and TLS symbol access.
972         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
973
974 2013-01-12  Alan Modra  <amodra@gmail.com>
975
976         * elf-bfd.h (_bfd_elf_strtab_refcount): Declare.
977         * elf-strtab.c (_bfd_elf_strtab_refcount): New function.
978         * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount.
979
980 2013-01-12  Alan Modra  <amodra@gmail.com>
981
982         PR ld/12549
983         * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare.
984         (_bfd_elf_strtab_clear_all_refs): Define.
985         * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function.
986         (_bfd_elf_strtab_clear_all_refs): Delete.
987         * elflink.c (elf_link_add_object_symbols): Clear out added
988         strtab refs.  Correct handling of warning common symbols.
989
990 2013-01-10  H.J. Lu  <hongjiu.lu@intel.com>
991
992         * aout0.c: Remove trailing white spaces.
993         * archive.c: Likewise.
994         * archures.c: Likewise.
995         * bfd-in.h: Likewise.
996         * bfd-in2.h: Likewise.
997         * coff-alpha.c: Likewise.
998         * coff-i860.c: Likewise.
999         * coff-mips.c: Likewise.
1000         * coff-ppc.c: Likewise.
1001         * coff-tic80.c: Likewise.
1002         * coff-x86_64.c: Likewise.
1003         * coff-z80.c: Likewise.
1004         * coffcode.h: Likewise.
1005         * coffgen.c: Likewise.
1006         * cofflink.c: Likewise.
1007         * compress.c: Likewise.
1008         * corefile.c: Likewise.
1009         * cpu-arm.c: Likewise.
1010         * cpu-avr.c: Likewise.
1011         * cpu-bfin.c: Likewise.
1012         * cpu-cr16.c: Likewise.
1013         * cpu-cr16c.c: Likewise.
1014         * cpu-crx.c: Likewise.
1015         * cpu-h8300.c: Likewise.
1016         * cpu-i386.c: Likewise.
1017         * cpu-lm32.c: Likewise.
1018         * cpu-m68k.c: Likewise.
1019         * cpu-moxie.c: Likewise.
1020         * cpu-msp430.c: Likewise.
1021         * cpu-sh.c: Likewise.
1022         * cpu-xc16x.c: Likewise.
1023         * dwarf2.c: Likewise.
1024         * ecofflink.c: Likewise.
1025         * ecoffswap.h: Likewise.
1026         * elf-ifunc.c: Likewise.
1027         * elf-m10300.c: Likewise.
1028         * elf-vxworks.c: Likewise.
1029         * elf32-avr.c: Likewise.
1030         * elf32-avr.h: Likewise.
1031         * elf32-cr16.c: Likewise.
1032         * elf32-cr16c.c: Likewise.
1033         * elf32-cris.c: Likewise.
1034         * elf32-crx.c: Likewise.
1035         * elf32-frv.c: Likewise.
1036         * elf32-hppa.c: Likewise.
1037         * elf32-i860.c: Likewise.
1038         * elf32-ip2k.c: Likewise.
1039         * elf32-iq2000.c: Likewise.
1040         * elf32-m32c.c: Likewise.
1041         * elf32-m68hc1x.c: Likewise.
1042         * elf32-msp430.c: Likewise.
1043         * elf32-mt.c: Likewise.
1044         * elf32-ppc.c: Likewise.
1045         * elf32-rl78.c: Likewise.
1046         * elf32-s390.c: Likewise.
1047         * elf32-score.h: Likewise.
1048         * elf32-sh-symbian.c: Likewise.
1049         * elf32-sh.c: Likewise.
1050         * elf32-spu.c: Likewise.
1051         * elf32-tic6x.c: Likewise.
1052         * elf32-v850.c: Likewise.
1053         * elf32-xc16x.c: Likewise.
1054         * elf32-xtensa.c: Likewise.
1055         * elf64-alpha.c: Likewise.
1056         * elf64-hppa.c: Likewise.
1057         * elf64-ppc.c: Likewise.
1058         * elf64-s390.c: Likewise.
1059         * elfcore.h: Likewise.
1060         * elflink.c: Likewise.
1061         * elfxx-mips.c: Likewise.
1062         * elfxx-sparc.c: Likewise.
1063         * elfxx-tilegx.c: Likewise.
1064         * ieee.c: Likewise.
1065         * libcoff.h: Likewise.
1066         * libpei.h: Likewise.
1067         * libxcoff.h: Likewise.
1068         * linker.c: Likewise.
1069         * mach-o-i386.c: Likewise.
1070         * mach-o-target.c: Likewise.
1071         * mach-o.c: Likewise.
1072         * mach-o.h: Likewise.
1073         * mmo.c: Likewise.
1074         * opncls.c: Likewise.
1075         * pdp11.c: Likewise.
1076         * pe-x86_64.c: Likewise.
1077         * peXXigen.c: Likewise.
1078         * pef-traceback.h: Likewise.
1079         * pei-x86_64.c: Likewise.
1080         * peicode.h: Likewise.
1081         * plugin.c: Likewise.
1082         * reloc.c: Likewise.
1083         * riscix.c: Likewise.
1084         * section.c: Likewise.
1085         * som.c: Likewise.
1086         * syms.c: Likewise.
1087         * tekhex.c: Likewise.
1088         * ticoff.h: Likewise.
1089         * vaxbsd.c: Likewise.
1090         * xcofflink.c: Likewise.
1091         * xtensa-isa.c: Likewise.
1092
1093 2013-01-10  Will Newton <will.newton@imgtec.com>
1094
1095         * Makefile.am: Add Meta.
1096         * Makefile.in: Regenerate.
1097         * archures.c (bfd_mach_metag): New.
1098         * bfd-in2.h: Regenerate.
1099         * config.bfd: Add Meta.
1100         * configure: Regenerate.
1101         * configure.in: Add Meta.
1102         * cpu-metag.c: New file.
1103         * elf-bfd.h: Add Meta.
1104         * elf32-metag.c: New file.
1105         * elf32-metag.h: New file.
1106         * libbfd.h: Regenerate.
1107         * reloc.c: Add Meta relocations.
1108         * targets.c: Add Meta.
1109
1110 2013-01-08  Yufeng Zhang  <yufeng.zhang@arm.com>
1111
1112         * elf-bfd.h (elfcore_write_aarch_tls): Add prototype.
1113         (elfcore_write_aarch_hw_break): Likewise.
1114         (elfcore_write_aarch_hw_watch): Likewise.
1115         * elf.c (elfcore_grok_aarch_tls): New function.
1116         (elfcore_grok_aarch_hw_break): Likewise.
1117         (elfcore_grok_aarch_hw_watch): Likewise.
1118         (elfcore_grok_note): Call the new functions to handle the
1119         corresponding notes.
1120         (elfcore_write_aarch_tls): New function.
1121         (elfcore_write_aarch_hw_break): Likewise.
1122         (elfcore_write_aarch_hw_watch): Likewise.
1123         (elfcore_write_register_note): Call the new functions to handle the
1124         corresponding pseudo sections.
1125
1126 2013-01-07  Tom Tromey  <tromey@redhat.com>
1127
1128         * section.c (_bfd_std_section): Rename from std_section.
1129         (bfd_com_section_ptr, bfd_und_section_ptr, bfd_abs_section_ptr)
1130         (STD_SECTION): Update.
1131         * bfd-in2.h: Rebuild.
1132
1133 2013-01-04  Juergen Urban <JuergenUrban@gmx.de>
1134
1135         * archures.c (bfd_mach_mips5900): Define.
1136         * bfd-in2.h: Regenerate.
1137         * config.bfd: Add mips64-ps2-elf and mips-ps2-elf targets.
1138         * cpu-mips.c: Add support for MIPS r5900.
1139         * elfxx-mips.c: Add support for MIPS r5900 (extension of r4000).
1140
1141 2013-01-03  Nickolai Zeldovich  <nickolai@csail.mit.edu>
1142             Nick Clifton  <nickc@redhat.com>
1143
1144         * elflink.c (get_value): Prevent the use of an undefined shift
1145         operation.  Add sanity checks.
1146
1147 2013-01-02  Kaushik Phatak  <kaushik.phatak@kpitcummins.com>
1148
1149         * config.bfd (cr16*-*-uclinux*): New target support.
1150
1151
1152 For older changes see ChangeLog-2012
1153 \f
1154 Copyright (C) 2013 Free Software Foundation, Inc.
1155
1156 Copying and distribution of this file, with or without modification,
1157 are permitted in any medium without royalty provided the copyright
1158 notice and this notice are preserved.
1159
1160 Local Variables:
1161 mode: change-log
1162 left-margin: 8
1163 fill-column: 74
1164 version-control: never
1165 End: