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