PR ld/15113
[platform/upstream/binutils.git] / bfd / ChangeLog
1 2013-02-10  Alan Modra  <amodra@gmail.com>
2
3         PR ld/15113
4         * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc.
5
6 2013-02-08  Markos Chandras  <markos.chandras@imgtec.com>
7
8         * elf32-metag.c: Use bfd_get_linker_section to get SEC_LINKER_CREATED
9         sections.
10         (elf_metag_adjust_dynamic_symbol): Don't error on zero size dynbss
11         symbol.
12
13 2013-02-08  Yufeng Zhang  <yufeng.zhang@arm.com>
14
15         * elf64-aarch64.c (elf64_aarch64_grok_prstatus): Change 'size' from
16         288 to 272.
17
18 2013-02-08  Alan Modra  <amodra@gmail.com>
19
20         PR binutils/15106
21         * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache.
22         * elf.c (elf_find_function): Revert last change.  Use new
23         tdata field rather than static vars for cache.
24
25 2013-02-07  H.J. Lu  <hongjiu.lu@intel.com>
26
27         PR ld/15107
28         * elflink.c (elf_link_output_extsym): Set STB_GNU_UNIQUE only if
29         symbol is defined in regular object.
30
31 2013-02-07  Roberto Agostino Vitillo  <ra.vitillo@gmail.com>
32
33         PR binutils/15106
34         * elf.c (elf_find_function): Don't cache if symbols change.
35
36 2013-02-07  Alan Modra  <amodra@gmail.com>
37
38         PR binutils/14873
39         * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to
40         copy attributes from or to non-ELF.
41
42 2013-02-06  H.J. Lu  <hongjiu.lu@intel.com>
43
44         * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't clear pc_count
45         for non-zero TLS symbol.
46         (elf_i386_relocate_section): Don't resolve size relocation against
47         non-zero TLS symbol.
48         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Don't clear
49         pc_count for non-zero TLS symbol.
50         (elf_x86_64_relocate_section): Don't resolve size relocation
51         against non-zero TLS symbol.
52
53 2013-02-06  Sandra Loosemore  <sandra@codesourcery.com>
54             Andrew Jenner <andrew@codesourcery.com>
55
56         Based on patches from Altera Corporation.
57
58         * Makefile.am (ALL_MACHINES): Add cpu-nios2.lo.
59         (ALL_MACHINES_CFILES): Add cpu-nios2.c.
60         (BFD_BACKENDS): Add elf32-nios2.lo.
61         (BFD32_BACKENDS_CFILES): Add elf32-nios2.c.
62         * Makefile.in: Regenerated.
63         * configure.in: Add entries for bfd_elf32_bignios2_vec and
64         bfd_elf32_littlenios2_vec.
65         * configure: Regenerated.
66         * config.bfd: Add cases for nios2.
67         * archures.c (enum bfd_architecture): Add bfd_arch_nios2.
68         (bfd_mach_nios2): Define.
69         (bfd_nios2_arch): Declare.
70         (bfd_archures_list): Add bfd_nios2_arch.
71         * targets.c (bfd_elf32_bignios2_vec): Declare.
72         (bfd_elf32_littlenios2_vec): Declare.
73         (_bfd_target_vector): Add entries for bfd_elf32_bignios2_vec and
74         bfd_elf32_littlenios2_vec.
75         * elf-bfd.h (enum elf_target_id): Add NIOS2_ELF_DATA.
76         * reloc.c (enum bfd_reloc_code_real): Add Nios II relocations.
77         * bfd-in2.h: Regenerated.
78         * libbfd.h: Regenerated.
79         * cpu-nios2.c: New file.
80         * elf32-nios2.c: New file.
81
82 2013-02-06  Alan Modra  <amodra@gmail.com>
83
84         * elf32-arm.c (elf32_arm_final_link_relocate): Only test for
85         stubs in stub_bfd.
86
87 2013-02-06  Alan Modra  <amodra@gmail.com>
88
89         * Makefile.am (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
90         * Makefile.in: Regenerate.
91
92 2013-02-04  Sergio Durigan Junior  <sergiodj@redhat.com>
93             Pedro Alves  <palves@redhat.com>
94
95         * Makefile.in (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
96         * elf-bfd.h (elf_internal_linux_prpsinfo): New structure
97         declaration.
98         (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64)
99         (elfcore_write_ppc32_linux_prpsinfo32): New declarations.
100         * elf-linux-psinfo.h: New file.
101         * elf.c: Include elf-linux-psinfo.h.
102         (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64):
103         New functions.
104         * elf32-ppc.c: Include `elf-linux-psinfo.h'.
105         (elf_external_ppc_linux_prpsinfo32): New structure declaration.
106         (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): New macro.
107         (elfcore_write_ppc_linux_prpsinfo32): New function.
108
109 2013-02-04  Tristan Gingold  <gingold@adacore.com>
110
111         * mach-o.c (bfd_mach_o_scan_start_address): Do not fail if no
112         start address.
113
114 2013-02-04  Alan Modra  <amodra@gmail.com>
115
116         * Makefile.am (BFD64_BACKENDS): Remove elf-nacl.lo.
117         (BFD64_BACKENDS_CFILES): Remove elf-nacl.c.
118         * Makefile.in: Regenerate.
119         * po/SRC-POTFILES.in: Regenerate.
120
121 2013-02-04  Alan Modra  <amodra@gmail.com>
122
123         * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Delete.
124         * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Delete.
125
126 2013-02-01  Alan Modra  <amodra@gmail.com>
127
128         * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
129         clears def_regular.
130
131 2013-01-31  Tristan Gingold  <gingold@adacore.com>
132
133         * mach-o.c (bfd_mach_o_scan): Call bfd_mach_o_flatten_sections
134         earlier.  Fix status checking of bfd_mach_o_scan_start_address.
135         (bfd_mach_o_scan_start_address): Handle LC_MAIN.
136
137 2013-01-31  Alan Modra  <amodra@gmail.com>
138             David S. Miller  <davem@davemloft.net>
139
140         PR ld/15056
141         * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit
142         references to __tls_get_addr.
143         * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise.  Correct
144         vtinherit and vtentry reloc handling too.
145         * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro.
146
147 2013-01-31  Alan Modra  <amodra@gmail.com>
148
149         * elf64-ppc.c (ppc_stub_name): Trim off trailing "+0".
150
151 2013-01-31  Alan Modra  <amodra@gmail.com>
152
153         * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink.
154
155 2013-01-28  Alan Modra  <amodra@gmail.com>
156
157         * elf64-ppc.c: Use %T to print symbols names and remove redundant
158         "relocation" in error messages throughout file.
159         (ppc64_elf_relocate_section): Remove sibling call error message,
160         replace with "call lacks nop".  Specially report errors for
161         branches to function entry points via OPD lookup and branches
162         to stubs.  Remove NULL symbol handling now done by %T.
163
164 2013-01-28  Alan Modra  <amodra@gmail.com>
165
166         * archive.c (bfd_generic_archive_p): Return target and keep
167         ardata on partial matches.
168         * format.c (bfd_check_format_matches): Adjust for above
169         change.  Remove bfd_error_file_ambiguously_recognized dead
170         code.
171
172 2013-01-26  Alan Modra  <amodra@gmail.com>
173
174         * bfd.c (struct bfd_preserve, bfd_preserve_save, bfd_preserve_restore,
175         bfd_preserve_finish): Move to..
176         * format.c: ..here, splitting out..
177         (bfd_reinit): ..this.  New function.
178         (bfd_check_format_matches): Use bfd_preserve_save/restore to
179         keep bfd state for a match.
180         * elfcode.h (elf_object_p): Don't use bfd_preserve_save/restore.
181         * elfcore.h (elf_core_file_p): Likewise.
182         * mach-o.c (bfd_mach_o_header_p): Likewise.
183         * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
184         * xsym.c (bfd_sym_object_p): Likewise.
185         * mmo.c (mmo_scan): Clear abfd->symcount.
186         * opncls.c (_bfd_new_bfd): Use a smaller section hash table.
187         * section.c (bfd_section_list_clear): Clear section_htab.count.
188         * bfd-in2.h: Regenerate.
189
190 2013-01-25  Michael Schewe  <michael.schewe@gmx.net>
191
192         * elf32-h8300.c (elf32_h8_relax_section): When checking for a
193         second reloc, make sure that the reloc potentially exists first.
194
195 2013-01-24  Nick Clifton  <nickc@redhat.com>
196
197         * archures.c: Add bfd_mach_v850e3v5.
198         * bfd-in2.h: Regenerate.
199         * cpu-v850.c: Add entries for v850e2v5 and v850e3v5.
200         * cpu-v850_rh850.c: Likewise.
201         * elf32-v850.c: Add support for v850e3v5 architecture.
202
203 2013-01-23  Markos Chandras  <markos.chandras@imgtec.com>
204
205         * elf32-metag.c: Error on HIADDR16/LOADDR16 in shared link.
206
207 2013-01-23  Leif Ekblad  <leif@rdos.net>
208
209         * config.bfd (x86_64-*-rdos*): Remove targ_selvecs.
210
211 2013-01-18  H.J. Lu  <hongjiu.lu@intel.com>
212
213         * elf32-i386.c (elf_i386_allocate_dynrelocs): Clear pc_count for
214         non-zero TLS symbol.
215         (elf_i386_relocate_section): Resolve size relocation against
216         non-zero TLS symbol.
217         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Clear pc_count
218         for non-zero TLS symbol.
219         (elf_x86_64_relocate_section): Resolve size relocation against
220         non-zero TLS symbol.
221
222 2013-01-18  Mike Frysinger  <vapier@gentoo.org>
223
224         * elflink.c (bfd_elf_size_dynamic_sections): Only add DT_RPATH
225         when new_dtags is false.  Only add DT_RUNPATH when new_dtags is
226         true.
227
228 2013-01-17  H.J. Lu  <hongjiu.lu@intel.com>
229
230         * elf32-i386.c (elf_i386_check_relocs): Count size relocation as
231         PC-relative relocation.
232         * elf64-x86-64.c (elf_x86_64_check_relocs): Count size relocation
233         as PC-relative relocation.
234
235 2013-01-16  H.J. Lu  <hongjiu.lu@intel.com>
236
237         * elf32-i386.c (elf_i386_check_relocs): Update R_386_SIZE32
238         check.
239         (elf_i386_relocate_section): Don't check TLS for R_386_SIZE32.
240
241         * elf64-x86-64.c (elf_x86_64_check_relocs): Update R_X86_64_SIZE32
242         and R_X86_64_SIZE64 check.
243         (elf_x86_64_relocate_section): Don't check TLS for R_X86_64_SIZE32
244         nor R_X86_64_SIZE64.
245
246 2013-01-16  H.J. Lu  <hongjiu.lu@intel.com>
247
248         * bfd-in2.h: Regenerated.
249         * libbfd.h: Likewise.
250
251         * elf32-i386.c (elf_howto_table): Fill R_386_SIZE32 entry.
252         (elf_i386_reloc_type_lookup): Support BFD_RELOC_SIZE32.
253         (elf_i386_check_relocs): Handle R_386_SIZE32.
254         (elf_i386_gc_sweep_hook): Likewise.
255         (elf_i386_relocate_section): Likewise.
256
257         * elf64-x86-64.c (x86_64_elf_howto_table): Fill R_X86_64_SIZE32
258         and R_X86_64_SIZE64 entries.
259         (x86_64_reloc_map): Add BFD_RELOC_SIZE32 and BFD_RELOC_SIZE64,
260         (elf_x86_64_rtype_to_howto): Handle R_X86_64_SIZE32 for x32.
261         (elf_x86_64_reloc_name_lookup): Likewise.
262         (elf_x86_64_check_relocs): Handle R_X86_64_SIZE32 and
263         R_X86_64_SIZE64.
264         (elf_x86_64_gc_sweep_hook): Likewise.
265         (elf_x86_64_relocate_section): Likewise.
266
267         * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SIZE32 and
268         BFD_RELOC_SIZE64.
269
270 2013-01-15  H.J. Lu  <hongjiu.lu@intel.com>
271
272         * elf64-x86-64.c (R_X86_64_standard): Replace R_X86_64_IRELATIVE
273         with R_X86_64_RELATIVE64.
274
275 2013-01-15  Nick Clifton  <nickc@redhat.com>
276
277         * elf32-msp430.c: Fix spelling typo.
278
279 2013-01-15  Alan Modra  <amodra@gmail.com>
280
281         * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to
282         plt-thread-safe.
283
284 2013-01-14  Alan Modra  <amodra@gmail.com>
285
286         PR binutils/14813
287         * bfdio.c (struct bfd_iovec <bclose>): Revert 2012-11-06.
288         (memory_bclose): Likewise.  Return 0 on success.
289         * cache.c (cache_bclose): Likewise.
290         * opncls.c (opncls_bclose, bfd_close): Likewise.
291         * vms-lib.c (vms_lib_bclose): Likewise.
292         * libbfd.h: Regenerate.
293
294 2013-01-13  Alan Modra  <amodra@gmail.com>
295
296         * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak.
297         Add ref_dynamic_nonweak.
298         * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete.
299         (_bfd_elf_merge_symbol): Don't call above function.  Move
300         setting of ref_dynamic_nonweak and dynamic_def earlier.  Don't
301         clear dynamic_def.
302         (elf_link_add_object_symbols): Delete redundant "override" test.
303         Don't set dynamic_def here.
304         (elf_link_output_extsym): Update.
305
306 2013-01-12  H.J. Lu  <hongjiu.lu@intel.com>
307
308         * elf32-i386.c (elf_i386_check_relocs): Set bfd errror for
309         normal and TLS symbol access.
310         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
311
312 2013-01-12  Alan Modra  <amodra@gmail.com>
313
314         * elf-bfd.h (_bfd_elf_strtab_refcount): Declare.
315         * elf-strtab.c (_bfd_elf_strtab_refcount): New function.
316         * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount.
317
318 2013-01-12  Alan Modra  <amodra@gmail.com>
319
320         PR ld/12549
321         * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare.
322         (_bfd_elf_strtab_clear_all_refs): Define.
323         * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function.
324         (_bfd_elf_strtab_clear_all_refs): Delete.
325         * elflink.c (elf_link_add_object_symbols): Clear out added
326         strtab refs.  Correct handling of warning common symbols.
327
328 2013-01-10  H.J. Lu  <hongjiu.lu@intel.com>
329
330         * aout0.c: Remove trailing white spaces.
331         * archive.c: Likewise.
332         * archures.c: Likewise.
333         * bfd-in.h: Likewise.
334         * bfd-in2.h: Likewise.
335         * coff-alpha.c: Likewise.
336         * coff-i860.c: Likewise.
337         * coff-mips.c: Likewise.
338         * coff-ppc.c: Likewise.
339         * coff-tic80.c: Likewise.
340         * coff-x86_64.c: Likewise.
341         * coff-z80.c: Likewise.
342         * coffcode.h: Likewise.
343         * coffgen.c: Likewise.
344         * cofflink.c: Likewise.
345         * compress.c: Likewise.
346         * corefile.c: Likewise.
347         * cpu-arm.c: Likewise.
348         * cpu-avr.c: Likewise.
349         * cpu-bfin.c: Likewise.
350         * cpu-cr16.c: Likewise.
351         * cpu-cr16c.c: Likewise.
352         * cpu-crx.c: Likewise.
353         * cpu-h8300.c: Likewise.
354         * cpu-i386.c: Likewise.
355         * cpu-lm32.c: Likewise.
356         * cpu-m68k.c: Likewise.
357         * cpu-moxie.c: Likewise.
358         * cpu-msp430.c: Likewise.
359         * cpu-sh.c: Likewise.
360         * cpu-xc16x.c: Likewise.
361         * dwarf2.c: Likewise.
362         * ecofflink.c: Likewise.
363         * ecoffswap.h: Likewise.
364         * elf-ifunc.c: Likewise.
365         * elf-m10300.c: Likewise.
366         * elf-vxworks.c: Likewise.
367         * elf32-avr.c: Likewise.
368         * elf32-avr.h: Likewise.
369         * elf32-cr16.c: Likewise.
370         * elf32-cr16c.c: Likewise.
371         * elf32-cris.c: Likewise.
372         * elf32-crx.c: Likewise.
373         * elf32-frv.c: Likewise.
374         * elf32-hppa.c: Likewise.
375         * elf32-i860.c: Likewise.
376         * elf32-ip2k.c: Likewise.
377         * elf32-iq2000.c: Likewise.
378         * elf32-m32c.c: Likewise.
379         * elf32-m68hc1x.c: Likewise.
380         * elf32-msp430.c: Likewise.
381         * elf32-mt.c: Likewise.
382         * elf32-ppc.c: Likewise.
383         * elf32-rl78.c: Likewise.
384         * elf32-s390.c: Likewise.
385         * elf32-score.h: Likewise.
386         * elf32-sh-symbian.c: Likewise.
387         * elf32-sh.c: Likewise.
388         * elf32-spu.c: Likewise.
389         * elf32-tic6x.c: Likewise.
390         * elf32-v850.c: Likewise.
391         * elf32-xc16x.c: Likewise.
392         * elf32-xtensa.c: Likewise.
393         * elf64-alpha.c: Likewise.
394         * elf64-hppa.c: Likewise.
395         * elf64-ppc.c: Likewise.
396         * elf64-s390.c: Likewise.
397         * elfcore.h: Likewise.
398         * elflink.c: Likewise.
399         * elfxx-mips.c: Likewise.
400         * elfxx-sparc.c: Likewise.
401         * elfxx-tilegx.c: Likewise.
402         * ieee.c: Likewise.
403         * libcoff.h: Likewise.
404         * libpei.h: Likewise.
405         * libxcoff.h: Likewise.
406         * linker.c: Likewise.
407         * mach-o-i386.c: Likewise.
408         * mach-o-target.c: Likewise.
409         * mach-o.c: Likewise.
410         * mach-o.h: Likewise.
411         * mmo.c: Likewise.
412         * opncls.c: Likewise.
413         * pdp11.c: Likewise.
414         * pe-x86_64.c: Likewise.
415         * peXXigen.c: Likewise.
416         * pef-traceback.h: Likewise.
417         * pei-x86_64.c: Likewise.
418         * peicode.h: Likewise.
419         * plugin.c: Likewise.
420         * reloc.c: Likewise.
421         * riscix.c: Likewise.
422         * section.c: Likewise.
423         * som.c: Likewise.
424         * syms.c: Likewise.
425         * tekhex.c: Likewise.
426         * ticoff.h: Likewise.
427         * vaxbsd.c: Likewise.
428         * xcofflink.c: Likewise.
429         * xtensa-isa.c: Likewise.
430
431 2013-01-10  Will Newton <will.newton@imgtec.com>
432
433         * Makefile.am: Add Meta.
434         * Makefile.in: Regenerate.
435         * archures.c (bfd_mach_metag): New.
436         * bfd-in2.h: Regenerate.
437         * config.bfd: Add Meta.
438         * configure: Regenerate.
439         * configure.in: Add Meta.
440         * cpu-metag.c: New file.
441         * elf-bfd.h: Add Meta.
442         * elf32-metag.c: New file.
443         * elf32-metag.h: New file.
444         * libbfd.h: Regenerate.
445         * reloc.c: Add Meta relocations.
446         * targets.c: Add Meta.
447
448 2013-01-08  Yufeng Zhang  <yufeng.zhang@arm.com>
449
450         * elf-bfd.h (elfcore_write_aarch_tls): Add prototype.
451         (elfcore_write_aarch_hw_break): Likewise.
452         (elfcore_write_aarch_hw_watch): Likewise.
453         * elf.c (elfcore_grok_aarch_tls): New function.
454         (elfcore_grok_aarch_hw_break): Likewise.
455         (elfcore_grok_aarch_hw_watch): Likewise.
456         (elfcore_grok_note): Call the new functions to handle the
457         corresponding notes.
458         (elfcore_write_aarch_tls): New function.
459         (elfcore_write_aarch_hw_break): Likewise.
460         (elfcore_write_aarch_hw_watch): Likewise.
461         (elfcore_write_register_note): Call the new functions to handle the
462         corresponding pseudo sections.
463
464 2013-01-07  Tom Tromey  <tromey@redhat.com>
465
466         * section.c (_bfd_std_section): Rename from std_section.
467         (bfd_com_section_ptr, bfd_und_section_ptr, bfd_abs_section_ptr)
468         (STD_SECTION): Update.
469         * bfd-in2.h: Rebuild.
470
471 2013-01-04  Juergen Urban <JuergenUrban@gmx.de>
472
473         * archures.c (bfd_mach_mips5900): Define.
474         * bfd-in2.h: Regenerate.
475         * config.bfd: Add mips64-ps2-elf and mips-ps2-elf targets.
476         * cpu-mips.c: Add support for MIPS r5900.
477         * elfxx-mips.c: Add support for MIPS r5900 (extension of r4000).
478
479 2013-01-03  Nickolai Zeldovich  <nickolai@csail.mit.edu>
480             Nick Clifton  <nickc@redhat.com>
481
482         * elflink.c (get_value): Prevent the use of an undefined shift
483         operation.  Add sanity checks.
484
485 2013-01-02  Kaushik Phatak  <kaushik.phatak@kpitcummins.com>
486
487         * config.bfd (cr16*-*-uclinux*): New target support.
488
489
490 For older changes see ChangeLog-2012
491 \f
492 Copyright (C) 2013 Free Software Foundation, Inc.
493
494 Copying and distribution of this file, with or without modification,
495 are permitted in any medium without royalty provided the copyright
496 notice and this notice are preserved.
497
498 Local Variables:
499 mode: change-log
500 left-margin: 8
501 fill-column: 74
502 version-control: never
503 End: