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