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