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