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