[ARC] Fix condition.
[external/binutils.git] / bfd / ChangeLog
1 2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
2
3         * elf32-arc.c (elf_arc_relocate_section): Fixed condition.
4
5 2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
6
7         * elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
8
9 2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
10
11         * elf32-arc.c (arc_local_data, arc_local_data): Removed.
12         (SECTSTART): Changed.
13         (elf_arc_relocate_section): Fixed mistake in PIE related
14         condition.
15         (elf_arc_size_dynamic_sections): Changed DT_RELENT to DT_RELAENT.
16
17 2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
18
19         * elf32-arc.c (elf32_arc_reloc_type_class): Defined function to
20         enable support for "-z combreloc" and DT_RELACOUNT.
21         (elf_backend_reloc_type_class): Likewise
22
23 2016-06-11  H.J. Lu  <hongjiu.lu@intel.com>
24
25         PR ld/20244
26         * elf32-i386.c (elf_i386_relocate_section): When relocating
27         R_386_GOT32, return error without a base register for PIC and
28         subtract the .got.plt section address only with a base register.
29
30 2016-06-10  Alan Modra  <amodra@gmail.com>
31
32         * elf-strtab.c (struct strtab_save): Use size_t for "size".
33         (struct elf_strtab_hash): Likewise for "size" and "alloced".
34         (_bfd_elf_strtab_init): Formatting.
35         (_bfd_elf_strtab_add): Return size_t rather than bfd_size_type.
36         (_bfd_elf_strtab_addref): Take size_t idx param.
37         (_bfd_elf_strtab_delref, _bfd_elf_strtab_refcount): Likewise.
38         (_bfd_elf_strtab_offset): Likewise.
39         (_bfd_elf_strtab_clear_all_refs): Use size_t idx.
40         (_bfd_elf_strtab_save): Use size_t "idx" and "size" vars.
41         (_bfd_elf_strtab_restore, _bfd_elf_strtab_emit): Similarly.
42         (_bfd_elf_strtab_finalize): Similarly.
43         * elf-bfd.h (_bfd_elf_strtab_add): Update prototypes.
44         (_bfd_elf_strtab_addref, _bfd_elf_strtab_delref): Likewise.
45         (_bfd_elf_strtab_refcount, _bfd_elf_strtab_offset): Likewise.
46         * elf.c (bfd_elf_get_elf_syms): Calculate symbol buffer size
47         using bfd_size_type.
48         (bfd_section_from_shdr): Delete amt.
49         (_bfd_elf_init_reloc_shdr): Likewise.
50         (_bfd_elf_link_assign_sym_version): Likewise.
51         (assign_section_numbers): Use size_t reloc_count.
52         * elflink.c (struct elf_symbuf_head): Use size_t "count".
53         (bfd_elf_link_record_dynamic_symbol): Use size_t for some vars.
54         (elf_link_is_defined_archive_symbol): Likewise.
55         (elf_add_dt_needed_tag): Likewise.
56         (elf_finalize_dynstr): Likewise.
57         (elf_link_add_object_symbols): Likewise.
58         (bfd_elf_size_dynamic_sections): Likewise.
59         (elf_create_symbuf): Similarly.
60         (bfd_elf_match_symbols_in_sections): Likewise.
61         (elf_link_swap_symbols_out): Likewise.
62         (elf_link_check_versioned_symbol): Likewise.
63         (bfd_elf_gc_record_vtinherit): Likewise.
64         (bfd_elf_gc_common_finalize_got_offsets): Likewise.
65
66 2016-06-08  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
67
68         PR ld/20221
69         * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms
70         and relocs only if shrinking occurred.
71
72 2016-06-08  H.J. Lu  <hongjiu.lu@intel.com>
73
74         * elf64-i386.c (elf_i386_link_hash_entry): Add tls_get_addr.
75         (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 2.
76         (elf_i386_check_tls_transition): Check indirect call and direct
77         call with the addr32 prefix for general and local dynamic models.
78         Set the tls_get_addr feild.
79         (elf_i386_convert_load_reloc): Always use addr32 prefix for
80         indirect ___tls_get_addr call via GOT.
81         (elf_i386_relocate_section): Handle GD->LE, GD->IE and LD->LE
82         transitions with indirect call and direct call with the addr32
83         prefix.
84
85 2016-06-07  Marcin Koƛcielnicki  <koriakin@0x04.net>
86
87         * elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment.
88         * elf64-s390.c (elf_s390x_plt_entry): Fix comment.
89         (elf_s390_relocate_section): Fix comment.
90         (elf_s390_finish_dynamic_sections): Fix initialization of fixed
91         .got.plt entries.
92
93 2016-06-07  Ulrich Weigand  <ulrich.weigand@de.ibm.com>
94
95         * elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt
96         section offset when calculation the larl operand in the first PLT
97         entry.
98
99 2016-06-07  Alan Modra  <amodra@gmail.com>
100
101         * cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry
102         to match other 32-bit archs.
103         * elf32-ppc.c (_bfd_elf_ppc_set_arch): New function.
104         (ppc_elf_object_p): Call it.
105         (ppc_elf_special_sections): Use APUINFO_SECTION_NAME.  Fix
106         overlong line.
107         (APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here.
108         * elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch.
109         * bfd-in.h (_bfd_elf_ppc_at_tls_transform,
110         _bfd_elf_ppc_at_tprel_transform): Move to..
111         * elf-bfd.h: ..here.
112         (_bfd_elf_ppc_set_arch): Declare.
113         * bfd-in2.h: Regenerate.
114
115 2016-06-06  H.J. Lu  <hongjiu.lu@intel.com>
116
117         * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add tls_get_addr.
118         (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 2.
119         (elf_x86_64_check_tls_transition): Check indirect call and
120         direct call with the addr32 prefix for general and local dynamic
121         models.  Set the tls_get_addr feild.
122         (elf_x86_64_convert_load_reloc): Always use addr32 prefix for
123         indirect __tls_get_addr call via GOT.
124         (elf_x86_64_relocate_section): Handle GD->LE, GD->IE and LD->LE
125         transitions with indirect call and direct call with the addr32
126         prefix.
127
128 2016-06-04  Christian Groessler  <chris@groessler.org>
129
130         * coff-z8k.c (extra_case): Fix range check for R_JR relocation.
131
132 2016-06-02  Nick Clifton  <nickc@redhat.com>
133
134         PR target/20088
135         * cpu-arm.c (processors): Add "arm_any" type to match any ARM
136         architecture.
137         (arch_info_struct): Likewise.
138         (architectures): Likewise.
139
140 2016-06-02  Vineet Gupta  <Vineet.Gupta1@synopsys.com>
141
142         * config.bfd: Replace -uclibc with *.
143
144 2016-06-02  H.J. Lu  <hongjiu.lu@intel.com>
145
146         * elf64-x86-64.c: Replace data32 with data16 in comments.
147
148 2016-05-31  Alan Modra  <amodra@gmail.com>
149
150         PR ld/20159
151         PR ld/16467
152         * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change.
153         (_bfd_elf_add_default_symbol): Don't indirect to/from defined
154         symbol given a version by a script different to the version
155         of the symbol being added.
156         (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and
157         _bfd_elf_strtab_restore.  Don't fudge dynstr references.
158         * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete.
159         (struct strtab_save): New.
160         (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions.
161         * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete.
162         (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare.
163
164 2016-06-01  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
165
166         * elf32-hppa.h: Add extern "C".
167         * elf32-nds32.h: Likewise.
168         * elf32-tic6x.h: Likewise.
169
170 2016-06-01  Nick Clifton  <nickc@redhat.com>
171
172         * po/sr.po: New Serbian translation.
173         * configure.ac (ALL_LINGUAS): Add sr.
174         * configure: Regenerate.
175
176 2016-05-28  Maciej W. Rozycki  <macro@imgtec.com>
177
178         * elfxx-mips.c (b_reloc_p): New function.
179         (_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Handle
180         branch relocations.
181
182 2016-05-28  Maciej W. Rozycki  <macro@imgtec.com>
183
184         * elfxx-mips.c (mips_elf_calculate_relocation): <R_MIPS16_26>
185         <R_MIPS_26, R_MICROMIPS_26_S1>: Drop the region bits of the
186         reloc location from calculation, treat the addend as signed with
187         local non-section symbols and enable overflow detection.
188
189 2016-05-28  Alan Modra  <amodra@gmail.com>
190
191         * aoutx.h: Adjust linker callback calls throughout file,
192         removing dead code.
193         * bout.c: Likewise.
194         * coff-alpha.c: Likewise.
195         * coff-arm.c: Likewise.
196         * coff-h8300.c: Likewise.
197         * coff-h8500.c: Likewise.
198         * coff-i960.c: Likewise.
199         * coff-mcore.c: Likewise.
200         * coff-mips.c: Likewise.
201         * coff-ppc.c: Likewise.
202         * coff-rs6000.c: Likewise.
203         * coff-sh.c: Likewise.
204         * coff-tic80.c: Likewise.
205         * coff-w65.c: Likewise.
206         * coff-z80.c: Likewise.
207         * coff-z8k.c: Likewise.
208         * coff64-rs6000.c: Likewise.
209         * cofflink.c: Likewise.
210         * ecoff.c: Likewise.
211         * elf-bfd.h: Likewise.
212         * elf-m10200.c: Likewise.
213         * elf-m10300.c: Likewise.
214         * elf32-arc.c: Likewise.
215         * elf32-arm.c: Likewise.
216         * elf32-avr.c: Likewise.
217         * elf32-bfin.c: Likewise.
218         * elf32-cr16.c: Likewise.
219         * elf32-cr16c.c: Likewise.
220         * elf32-cris.c: Likewise.
221         * elf32-crx.c: Likewise.
222         * elf32-d10v.c: Likewise.
223         * elf32-epiphany.c: Likewise.
224         * elf32-fr30.c: Likewise.
225         * elf32-frv.c: Likewise.
226         * elf32-ft32.c: Likewise.
227         * elf32-h8300.c: Likewise.
228         * elf32-hppa.c: Likewise.
229         * elf32-i370.c: Likewise.
230         * elf32-i386.c: Likewise.
231         * elf32-i860.c: Likewise.
232         * elf32-ip2k.c: Likewise.
233         * elf32-iq2000.c: Likewise.
234         * elf32-lm32.c: Likewise.
235         * elf32-m32c.c: Likewise.
236         * elf32-m32r.c: Likewise.
237         * elf32-m68hc1x.c: Likewise.
238         * elf32-m68k.c: Likewise.
239         * elf32-mep.c: Likewise.
240         * elf32-metag.c: Likewise.
241         * elf32-microblaze.c: Likewise.
242         * elf32-moxie.c: Likewise.
243         * elf32-msp430.c: Likewise.
244         * elf32-mt.c: Likewise.
245         * elf32-nds32.c: Likewise.
246         * elf32-nios2.c: Likewise.
247         * elf32-or1k.c: Likewise.
248         * elf32-ppc.c: Likewise.
249         * elf32-s390.c: Likewise.
250         * elf32-score.c: Likewise.
251         * elf32-score7.c: Likewise.
252         * elf32-sh.c: Likewise.
253         * elf32-sh64.c: Likewise.
254         * elf32-spu.c: Likewise.
255         * elf32-tic6x.c: Likewise.
256         * elf32-tilepro.c: Likewise.
257         * elf32-v850.c: Likewise.
258         * elf32-vax.c: Likewise.
259         * elf32-visium.c: Likewise.
260         * elf32-xstormy16.c: Likewise.
261         * elf32-xtensa.c: Likewise.
262         * elf64-alpha.c: Likewise.
263         * elf64-hppa.c: Likewise.
264         * elf64-ia64-vms.c: Likewise.
265         * elf64-mmix.c: Likewise.
266         * elf64-ppc.c: Likewise.
267         * elf64-s390.c: Likewise.
268         * elf64-sh64.c: Likewise.
269         * elf64-x86-64.c: Likewise.
270         * elflink.c: Likewise.
271         * elfnn-aarch64.c: Likewise.
272         * elfnn-ia64.c: Likewise.
273         * elfxx-mips.c: Likewise.
274         * elfxx-sparc.c: Likewise.
275         * elfxx-tilegx.c: Likewise.
276         * linker.c: Likewise.
277         * pdp11.c: Likewise.
278         * pe-mips.c: Likewise.
279         * reloc.c: Likewise.
280         * reloc16.c: Likewise.
281         * simple.c: Likewise.
282         * vms-alpha.c: Likewise.
283         * xcofflink.c: Likewise.
284         * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete
285         status param.  Adjust calls to these and linker callbacks throughout.
286         * elf32-rx.c: (get_symbol_value, get_gp, get_romstart,
287         get_ramstart): Delete status param.  Adjust calls to these and
288         linker callbacks throughout.
289
290 2016-05-27  Maciej W. Rozycki  <macro@imgtec.com>
291
292         * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS16_26>
293         <R_MIPS_26, R_MICROMIPS_26_S1>: Include the addend in JALX's
294         target alignment verification.
295
296 2016-05-27  Maciej W. Rozycki  <macro@imgtec.com>
297
298         * elfxx-mips.c (mips_elf_calculate_relocation): Also use the
299         section name if `bfd_elf_string_from_elf_section' returns an
300         empty string.
301
302 2016-05-26  Maciej W. Rozycki  <macro@imgtec.com>
303
304         * elfxx-mips.c (_bfd_mips_elf_relocate_section)
305         <bfd_reloc_outofrange>: Use the `%X%H' rather than `%C' format
306         for message.  Continue processing rather than returning failure.
307
308 2016-05-25  Maciej W. Rozycki  <macro@imgtec.com>
309
310         * elfxx-mips.c (_bfd_mips_elf_relocate_section)
311         <bfd_reloc_outofrange>: Call `->einfo' rather than `->warning'.
312         Call `bfd_set_error'.
313
314 2016-05-25  H.J. Lu  <hongjiu.lu@intel.com>
315
316         PR binutils/14625
317         * archive.c (bfd_slurp_armap): Replace
318         bfd_elf64_archive_slurp_armap with
319         _bfd_archive_64_bit_slurp_armap.
320         (bsd_write_armap): Call _bfd_archive_64_bit_write_armap if
321         BFD64 is defined and the archive is too big.
322         (coff_write_armap): Likewise.
323         * archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ...
324         (_bfd_archive_64_bit_slurp_armap): This.
325         (bfd_elf64_archive_write_armap): Renamed to ...
326         (_bfd_archive_64_bit_write_armap): This.
327         * configure.ac: Add --enable-64-bit-archive.
328         (want_64_bit_archive): New.  Set to true by default for 64-bit
329         MIPS and s390 ELF targets.
330         (USE_64_BIT_ARCHIVE): New AC_DEFINE.
331         * config.in: Regenerated.
332         * configure: Likewise.
333         * elf64-mips.c (bfd_elf64_archive_functions): Removed.
334         (bfd_elf64_archive_slurp_armap): Likewise.
335         (bfd_elf64_archive_write_armap): Likewise.
336         (bfd_elf64_archive_slurp_extended_name_table): Likewise.
337         (bfd_elf64_archive_construct_extended_name_table): Likewise.
338         (bfd_elf64_archive_truncate_arname): Likewise.
339         (bfd_elf64_archive_read_ar_hdr): Likewise.
340         (bfd_elf64_archive_write_ar_hdr): Likewise.
341         (bfd_elf64_archive_openr_next_archived_file): Likewise.
342         (bfd_elf64_archive_get_elt_at_index): Likewise.
343         (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
344         (bfd_elf64_archive_update_armap_timestamp): Likewise.
345         * elf64-s390.c (bfd_elf64_archive_functions): Removed.
346         (bfd_elf64_archive_slurp_armap): Likewise.
347         (bfd_elf64_archive_write_armap): Likewise.
348         (bfd_elf64_archive_slurp_extended_name_table): Likewise.
349         (bfd_elf64_archive_construct_extended_name_table): Likewise.
350         (bfd_elf64_archive_truncate_arname): Likewise.
351         (bfd_elf64_archive_read_ar_hdr): Likewise.
352         (bfd_elf64_archive_write_ar_hdr): Likewise.
353         (bfd_elf64_archive_openr_next_archived_file): Likewise.
354         (bfd_elf64_archive_get_elt_at_index): Likewise.
355         (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
356         (bfd_elf64_archive_update_armap_timestamp): Likewise.
357         * elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on
358         BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and
359         bfd_elfNN_archive_functions isn't defined.
360         (TARGET_LITTLE_SYM): Likewise.
361         * libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype.
362         (_bfd_archive_64_bit_write_armap): Likewise.
363         (_bfd_archive_64_bit_slurp_extended_name_table): New macro.
364         (_bfd_archive_64_bit_construct_extended_name_table): Likewise.
365         (_bfd_archive_64_bit_truncate_arname): Likewise.
366         (_bfd_archive_64_bit_read_ar_hdr): Likewise.
367         (_bfd_archive_64_bit_write_ar_hdr): Likewise.
368         (_bfd_archive_64_bit_openr_next_archived_file): Likewise.
369         (_bfd_archive_64_bit_get_elt_at_index): Likewise.
370         (_bfd_archive_64_bit_generic_stat_arch_elt): Likewise.
371         (_bfd_archive_64_bit_update_armap_timestamp): Likewise.
372         * libbfd.h: Regenerated.
373         * plugin.c (plugin_vec): Use _bfd_archive_64_bit on
374         BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined.
375
376 2016-05-25  H.J. Lu  <hongjiu.lu@intel.com>
377
378         PR ld/20103
379         * cofflink.c (coff_link_check_archive_element): Return TRUE if
380         linker add_archive_element callback returns FALSE.
381         * ecoff.c (ecoff_link_check_archive_element): Likewise.
382         * elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip
383         archive element if linker add_archive_element callback returns
384         FALSE.
385         * elflink.c (elf_link_add_archive_symbols): Likewise.
386         * pdp11.c (aout_link_check_ar_symbols): Likewise.
387         * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise.
388         * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise.
389         (xcoff_link_check_ar_symbols): Likewise.
390
391 2016-05-24  Maciej W. Rozycki  <macro@imgtec.com>
392
393         * elfxx-mips.c (_bfd_mips_elf_relocate_section)
394         <bfd_reloc_outofrange>: Unify error reporting code.
395
396 2016-05-23  Jim Wilson  <jim.wilson@linaro.org>
397
398         * elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and
399         R_AARCH64_NONE.  Use HOWTO64 for R_AARCH64_NULL.
400         * relocs.c: Add BFD_RELOC_AARCH64_NULL.
401         * bfd-in2.h: Regenerate.
402         * libbfd.h: Likewise.
403
404 2016-05-23  Kuba Sejdak  <jakub.sejdak@phoesys.com>
405
406         * config.bfd: Add entry for arm-phoenix.
407
408 2016-05-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
409
410         * elf32-arm.c (arm_dedicated_stub_section_padding): New function.
411         (elf32_arm_size_stubs): Declare stub_type in a more outer scope and
412         account for padding for stub section requiring one.
413         (elf32_arm_build_stubs): Add comment to stress the importance of
414         zeroing veneer section content.
415
416 2016-05-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
417
418         * bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare
419         bfd hook.
420         * bfd-in2.h: Regenerate.
421         * elf32-arm.c (arm_dedicated_stub_output_section_required): New
422         function.
423         (arm_dedicated_stub_output_section_required_alignment): Likewise.
424         (arm_dedicated_stub_output_section_name): Likewise.
425         (arm_dedicated_stub_input_section_ptr): Likewise.
426         (elf32_arm_create_or_find_stub_sec): Add stub type parameter and
427         function description comment. Add support for dedicated output stub
428         section to given stub types.
429         (elf32_arm_add_stub): Add a stub type parameter and pass it down to
430         elf32_arm_create_or_find_stub_sec.
431         (elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub.
432         (elf32_arm_size_stubs): Pass stub type when calling
433         elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers.
434         (bfd_elf32_arm_keep_private_stub_output_sections): New function.
435
436 2016-05-20  H.J. Lu  <hongjiu.lu@intel.com>
437
438         * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32
439         when setting need_convert_load.
440
441 2016-05-20  Maciej W. Rozycki  <macro@imgtec.com>
442
443         * elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for
444         microMIPS JALX.
445
446 2016-05-19  H.J. Lu  <hongjiu.lu@intel.com>
447
448         PR ld/20117
449         * elf32-i386.c (elf_i386_convert_load_reloc): Don't check
450         R_386_GOT32X.
451         (elf_i386_convert_load): Don't convert R_386_GOT32.
452
453 2016-05-20  Alan Modra  <amodra@gmail.com>
454
455         PR gas/20118
456         * elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY,
457         SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY.
458
459 2016-05-19  Cupertino Miranda  <cmiranda@synopsys.com>
460
461         * elf32-arc.c (arc_elf_final_write_processing): Changed.
462         (debug_arc_reloc): Likewise.
463         (elf_arc_relocate_section): Likewise.
464         (elf_arc_check_relocs): Likewise.
465         (elf_arc_adjust_dynamic_symbol): Likewise.
466         (elf_arc_add_symbol_hook): Likewise.
467
468 2016-05-19  Maciej W. Rozycki  <macro@imgtec.com>
469
470         * config.bfd: Remove `am34-*-linux*' support.
471
472 2016-05-19  Alan Modra  <amodra@gmail.com>
473
474         * elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic
475         relocs before plt relocs.
476
477 2016-05-19  Alan Modra  <amodra@gmail.com>
478
479         * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
480         before dereferencing.
481
482 2016-05-18  Nick Clifton  <nickc@redhat.com>
483
484         * po/sv.po: Updated Swedish translation.
485
486 2016-05-18  Alan Modra  <amodra@gmail.com>
487
488         * elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
489         for each BFD.  Don't goto error_ret_free_local from outside loop.
490
491 2016-05-17  Maciej W. Rozycki  <macro@imgtec.com>
492
493         * elf-s390-common.c (elf_s390_add_symbol_hook): Remove
494         STB_GNU_UNIQUE handling.
495         * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
496         * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise.
497         * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
498         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
499         * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
500         * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
501         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
502         * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
503         * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
504         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
505         * elf32-i386.c (elf_i386_add_symbol_hook): Remove function.
506         (elf_backend_add_symbol_hook): Remove macro.
507         * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols'
508         for STB_GNU_UNIQUE symbols.
509
510 2016-05-16  Maciej W. Rozycki  <macro@imgtec.com>
511
512         * elf32-v850.c (v850_elf_copy_notes): New function, factored out
513         from...
514         (v850_elf_copy_private_bfd_data): ... here.  Call the new
515         function and `_bfd_elf_copy_private_bfd_data'.
516
517 2016-05-13  H.J. Lu  <hongjiu.lu@intel.com>
518
519         PR ld/20093
520         * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
521         GOTPCREL relocation against large section.
522
523 2016-05-13  Alan Modra  <amodra@gmail.com>
524
525         * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
526         linker dynamic sections in calculating size and address of
527         dynamic tags rather than using output sections.  Remove asserts.
528         * elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
529         * elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
530         * elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
531         * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
532         * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
533         * elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
534         * elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
535         * elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
536         * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
537         * elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
538         * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
539         * elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
540         * elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
541         * elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
542         * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
543         * elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
544         * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
545         * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
546         * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
547         * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
548         * elflink.c (bfd_elf_final_link): Likewise.
549         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
550         * elfxx-sparc.c (sparc_finish_dyn): Likewise.  Adjust error message.
551         * elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
552         don't set doit.  Look up dynobj section.
553         (elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
554         invocation and dynamic tag vma calculation.  Don't test
555         boolean var == TRUE.
556         * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
557         DT_JMPREL calc.
558
559 2016-05-13  Alan Modra  <amodra@gmail.com>
560
561         * elflink.c (elf_link_sort_relocs): Wrap overlong lines.  Fix
562         octets_per_byte.  Put dynamic .rela.plt last in link orders.
563         Assign output_offset for reloc sections rather than writing
564         sorted relocs from block corresponding to output_offset.
565
566 2016-05-12  Alan Modra  <amodra@gmail.com>
567
568         * elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.
569
570 2016-05-11  Andrew Bennett  <andrew.bennett@imgtec.com>
571
572         * elfxx-mips.c (print_mips_ases): Add DSPR3.
573
574 2016-05-11  Alan Modra  <amodra@gmail.com>
575
576         * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
577         (elf32_hppa_check_relocs): Don't set dynobj.
578         (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
579         (elf32_hppa_build_stubs): Likewise.
580         * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
581
582 2016-05-11  Alan Modra  <amodra@gmail.com>
583
584         PR 20060
585         * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
586         * elf32-ppc.c (ppc_elf_tls_setup): Likewise.
587
588 2016-05-10  Jiong Wang  <jiong.wang@arm.com>
589
590         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
591         aarch64_tls_transition check.
592
593 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
594
595         * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
596         enumerator.
597         (arm_stub_sym_claimed): New function.
598         (elf32_arm_create_stub): Use veneered symbol name and section if
599         veneer needs to claim its symbol, and keep logic unchanged otherwise.
600         (arm_stub_claim_sym): New function.
601         (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
602         veneered symbol, otherwise create local symbol as before.
603
604 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
605
606         * elf32-arm.c (elf32_arm_size_stubs): Use new macros
607         ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
608         and set branch type of a symbol.
609         (bfd_elf32_arm_process_before_allocation): Likewise.
610         (elf32_arm_relocate_section): Likewise and fix identation along the
611         way.
612         (allocate_dynrelocs_for_symbol): Likewise.
613         (elf32_arm_finish_dynamic_symbol): Likewise.
614         (elf32_arm_swap_symbol_in): Likewise.
615         (elf32_arm_swap_symbol_out): Likewise.
616
617 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
618
619         * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
620         * bfd-in2.h: Regenerated.
621         * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
622         parameter to add_stub_section callback.
623         (elf32_arm_create_or_find_stub_sec): Get output section from link_sec
624         and pass it down to add_stub_section.
625         (elf32_arm_add_stub): Set section to stub_sec if NULL before using it
626         for error message.
627         (elf32_arm_size_stubs): Add output section parameter to
628         add_stub_section function pointer parameter.
629
630 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
631
632         * elf32-arm.c (elf32_arm_create_stub): New function.
633         (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
634
635 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
636
637         * elf32-arm.c (enum elf32_arm_stub_type): Delete
638         arm_stub_a8_veneer_lwm enumerator.
639         (arm_stub_a8_veneer_lwm): New unsigned constant to replace
640         aforementioned enumerator.
641         (struct elf32_arm_stub_hash_entry): Delete target_addend
642         field and add source_value.
643         (struct a8_erratum_fix): Delete addend field and add target_offset.
644         (stub_hash_newfunc): Initialize source_value field amd remove
645         initialization for target_addend.
646         (arm_build_one_stub): Stop special casing Thumb relocations: promote
647         the else to being always executed, moving the
648         arm_stub_a8_veneer_b_cond specific code in it.  Remove
649         stub_entry->target_addend from points_to computation.
650         (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
651         to target symbol from start of section rather than the offset from the
652         stub address.
653         (elf32_arm_size_stubs): Set stub_entry's source_value and target_value
654         fields from struct a8_erratum_fix's offset and target_offset
655         respectively.
656         (make_branch_to_a8_stub): Rename target variable to loc.  Compute
657         veneered_insn_loc and loc using stub_entry's source_value.
658
659 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
660
661         (elf32_arm_merge_eabi_attributes): Add merging logic for
662         Tag_DSP_extension.
663
664 2016-05-10  Pip Cet  <pipcet@gmail.com>
665
666         PR ld/20059
667         * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
668         Define as _bfd_generic_copy_link_hash_symbol_type when using
669         generic hash table.
670
671 2016-05-09  Nick Clifton  <nickc@redhat.com>
672
673         PR binutils/20063
674         * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
675         field before accessing sections array.
676
677 2016-05-09  Christophe Monat  <christophe.monat@st.com>
678
679         PR ld/20030
680         * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
681         (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
682         to nb_words.
683         (create_instruction_vldmia): Add is_dp to disambiguate SP/DP
684         encoding.
685         (create_instruction_vldmdb): Likewise.
686         (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
687         uses it to re-encode.
688
689 2016-05-09  Nick Clifton  <nickc@redhat.com>
690
691         PR 19938
692         * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
693         commit.
694
695 2016-05-09  Alan Modra  <amodra@gmail.com>
696
697         * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
698
699 2016-05-06  H.J. Lu  <hongjiu.lu@intel.com>
700
701         PR ld/17550
702         * elf-bfd.h (elf_link_hash_entry): Update comments for indx,
703         documenting that indx == -3 if symbol is defined in a discarded
704         section.
705         * elflink.c (elf_link_add_object_symbols): Set indx to -3 if
706         symbol is defined in a discarded section.
707         (elf_link_output_extsym): Strip a global symbol defined in a
708         discarded section.
709
710 2016-05-06  H.J. Lu  <hongjiu.lu@intel.com>
711
712         * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
713         MCU.
714
715 2016-05-05  H.J. Lu  <hongjiu.lu@intel.com>
716
717         * elf32-i386.c (elf_i386_convert_load): Extract the GOT load
718         conversion to ...
719         (elf_i386_convert_load_reloc): This.  New function.
720         * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
721         conversion to ...
722         (elf_x86_64_convert_load_reloc): This.  New function.
723
724 2016-05-05  H.J. Lu  <hongjiu.lu@intel.com>
725
726         * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
727         Don't check if contents == NULL.
728         (elf_i386_tls_transition): Add from_relocate_section.  Check
729         from_relocate_section instead of contents != NULL.  Update
730         elf_i386_check_tls_transition call.
731         (elf_i386_check_relocs): Cache the section contents if
732         keep_memory is FALSE.  Pass FALSE as from_relocate_section to
733         elf_i386_tls_transition.
734         (elf_i386_relocate_section): Pass TRUE as from_relocate_section
735         to elf_i386_tls_transition.
736         (elf_backend_caches_rawsize): New.
737         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
738         if contents == NULL.
739         (elf_x86_64_tls_transition): Add from_relocate_section.  Check
740         from_relocate_section instead of contents != NULL.
741         (elf_x86_64_check_relocs): Cache the section contents if
742         keep_memory is FALSE.  Pass FALSE as from_relocate_section to
743         elf_x86_64_tls_transition.
744         (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
745         to elf_x86_64_tls_transition.
746         (elf_backend_caches_rawsize): New.
747
748 2016-05-03  Maciej W. Rozycki  <macro@imgtec.com>
749
750         PR 10549
751         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
752         STB_GNU_UNIQUE.
753
754 2016-05-03  Jiong Wang  <jiong.wang@arm.com>
755
756         * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
757         * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
758         * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
759         no_apply_dynamic_relocs.
760         (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
761         dynamic relocations generated.
762
763 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
764
765         * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
766         setting to ...
767         (elf_i386_create_dynamic_sections): Here.
768         * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
769         interp setting to ...
770         (elf_x86_64_create_dynamic_sections): Here.
771
772 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
773
774         * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
775         and replace (EH)->has_got_reloc with GOT_RELOC.
776         (elf_i386_fixup_symbol): Pass has_got_reloc to
777         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
778         (elf_i386_allocate_dynrelocs): Likewise.
779         (elf_i386_relocate_section): Likewise.
780         (elf_i386_finish_dynamic_symbol): Likewise.
781         (elf_i386_convert_load): Pass TRUE to
782         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
783         * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
784         GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
785         (elf_x86_64_fixup_symbol): Pass has_got_reloc to
786         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
787         (elf_x86_64_allocate_dynrelocs): Likewise.
788         (elf_x86_64_relocate_section): Likewise.
789         (elf_x86_64_finish_dynamic_symbol): Likewise.
790         (elf_x86_64_convert_load): Pass TRUE to
791         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
792
793 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
794
795         * elf32-i386.c (check_relocs_failed): New.
796         (elf_i386_check_relocs): Set check_relocs_failed on error.
797         (elf_i386_relocate_section): Skip if check_relocs failed.
798
799 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
800
801         * elf64-x86-64.c (elf_x86_64_check_relocs): Set
802         check_relocs_failed on error.
803
804 2016-04-29  Nick Clifton  <nickc@redhat.com>
805
806         PR 19938
807         * elf-bfd.h (struct elf_backend_data): Rename
808         elf_backend_set_special_section_info_and_link to
809         elf_backend_copy_special_section_fields.
810         * elfxx-target.h: Likewise.
811         * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
812         comparing section flags.
813         (copy_special_section_fields): New function.
814         (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
815         Perform two scans over special sections.  The first one looks for
816         a direct mapping between the output section and an input section.
817         The second scan looks for a possible match based upon section
818         characteristics.
819         * elf32-arm.c (elf32_arm_copy_special_section_fields): New
820         function.  Handle setting the sh_link field of SHT_ARM_EXIDX
821         sections.
822         * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
823         elf32_i386_copy_solaris_special_section_fields.
824         * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
825         Rename to elf32_sparc_copy_solaris_special_section_fields.
826         * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
827         elf64_x86_64_copy_solaris_special_section_fields.
828
829 2016-04-28  Nick Clifton  <nickc@redhat.com>
830
831         * po/zh_CN.po: Updated Chinese (simplified) translation.
832
833 2016-04-27  H.J. Lu  <hongjiu.lu@intel.com>
834
835         PR ld/20006
836         * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
837         when estimating distances between output sections.
838
839 2016-04-27  Alan Modra  <amodra@gmail.com>
840
841         * elflink.c (_bfd_elf_is_start_stop): New function.
842         (_bfd_elf_gc_mark_rsec): Use it.
843         * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
844
845 2016-04-26  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
846
847         * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
848         * mmo.c (mmo_get_section_contents): Likewise.
849         (mmo_set_section_contents): Likewise.
850
851 2016-04-26  H.J. Lu  <hongjiu.lu@intel.com>
852
853         * elf-bfd.h (elf_link_hash_table): Update comments for
854         dynsymcount.
855         * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
856         the unused NULL entry at the head of dynamic symbol table.
857         (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
858         checks.
859
860 2016-04-21  H.J. Lu  <hongjiu.lu@intel.com>
861
862         * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
863         created file from dynobj.
864
865 2016-04-21  H.J. Lu  <hongjiu.lu@intel.com>
866
867         * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
868         normal input file if possible.
869
870 2016-04-21  Nick Clifton  <nickc@redhat.com>
871
872         * aout-adobe.c: Use _bfd_generic_link_check_relocs.
873         * aout-target.h: Likewise.
874         * aout-tic30.c: Likewise.
875         * binary.c: Likewise.
876         * bout.c: Likewise.
877         * coff-alpha.c: Likewise.
878         * coff-rs6000.c: Likewise.
879         * coff64-rs6000.c: Likewise.
880         * coffcode.h: Likewise.
881         * i386msdos.c: Likewise.
882         * i386os9k.c: Likewise.
883         * ieee.c: Likewise.
884         * ihex.c: Likewise.
885         * libbfd-in.h: Likewise.
886         * libecoff.h: Likewise.
887         * mach-o-target.c: Likewise.
888         * mmo.c: Likewise.
889         * nlm-target.h: Likewise.
890         * oasys.c: Likewise.
891         * pef.c: Likewise.
892         * plugin.c: Likewise.
893         * ppcboot.c: Likewise.
894         * som.c: Likewise.
895         * srec.c: Likewise.
896         * tekhex.c: Likewise.
897         * versados.c: Likewise.
898         * vms-alpha.c: Likewise.
899         * xsym.c: Likewise.
900         * elfxx-target.h: Use _bfd_elf_link_check_relocs.
901         * linker.c (bfd_link_check_relocs): New function.
902         (_bfd_generic_link_check_relocs): New function.
903         * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
904         _bfd_link_check_relocs field.
905         (struct bfd_target)L Add _bfd_link_check_relocs field.
906         * bfd-in2.h: Regenerate.
907         * libbfd.h: Regenerate.
908
909 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
910
911         * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
912         (elf_backend_gc_sweep_hook): Likewise.
913         * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
914         (elf_backend_gc_sweep_hook): Likewise.
915
916 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
917
918         * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
919         in excluded sections
920
921 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
922
923         PR ld/19969
924         * elf64-x86-64.c (check_relocs_failed): New.
925         (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
926         Support relocation agaist local symbol.  Set check_relocs_failed.
927         (elf_x86_64_check_relocs): Use elf_x86_64_need_pic.  Check
928         R_X86_64_32 relocation overflow.
929         (elf_x86_64_relocate_section): Skip if check_relocs failed.
930         Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
931
932 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
933
934         * elf32-i386.c (elf_i386_check_relocs): Call
935         _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
936         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
937
938 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
939
940         * elf-bfd.h (_bfd_elf_link_check_relocs): New.
941         * elflink.c (_bfd_elf_link_check_relocs): New function.
942         (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
943         if check_relocs_after_open_input is FALSE.
944
945 2016-04-20  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
946
947         * cache.c: Update old style function definitions.
948         * elf32-m68k.c: Likewise.
949         * elf64-mmix.c: Likewise.
950         * stab-syms.c: Likewise.
951
952 2016-04-20  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
953
954         * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
955
956 2016-04-15  H.J. Lu  <hongjiu.lu@intel.com>
957
958         * Makefile.in: Regenerated with automake 1.11.6.
959         * aclocal.m4: Likewise.
960         * doc/Makefile.in: Likewise.
961
962 2016-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
963
964         * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
965         * bfd-in2.h: Regenerate.
966         * libbfd.h: Regenerate.
967         * elf32-arc.c: Add 'opcode/arc.h' include.
968         (struct arc_relocation_data): Add symbol_name.
969         (arc_special_overflow_checks): New function.
970         (arc_do_relocation): Use arc_special_overflow_checks, reindent as
971         required, add an extra comment.
972         (elf_arc_relocate_section): Setup symbol_name in reloc_data.
973
974 2016-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
975
976         * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
977         entries.
978         (elf_arc_relocate_section): Update enum uses.
979         (elf_arc_check_relocs): Likewise.
980         (elf_arc_finish_dynamic_symbol): Likewise.
981
982 2016-04-14  H.J. Lu  <hongjiu.lu@intel.com>
983
984         * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
985         "sh_link".
986
987 2016-04-14  Nick Clifton  <nickc@redhat.com>
988
989         PR target/19938
990         * elf-bbfd.h (struct elf_backend_data): New field:
991         elf_strtab_flags.
992         New field: elf_backend_set_special_section_info_and_link
993         * elfxx-target.h (elf_backend_strtab_flags): Define if not already
994         defined.
995         (elf_backend_set_special_section_info_and_link): Define if not
996         already defined.
997         (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
998         elf_backend_strtab_flags macros to initialise fields in structure.
999         * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
1000         being set even if SHF_MERGE is not set.
1001         (elf_fake_sections): Likewise.
1002         (section_match): New function.  Matches two ELF sections based
1003         upon fixed characteristics.
1004         (find_link): New function.  Locates a section in a BFD that
1005         matches a section in a different BFD.
1006         (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
1007         fields of reserved sections.
1008         (bfd_elf_compute_section_file_positions): Set the flags for the
1009         .shstrtab section based upon the elf_strtab_flags field in the
1010         elf_backend_data structure.
1011         (swap_out_syms): Likewise for the .strtab section.
1012         * elflink.c (bfd_elf_final_link): Set the flags for the
1013         .strtab section based upon the elf_strtab_flags field in the
1014         elf_backend_data structure.
1015         * elf32-i386.c (elf32_i386_set_special_info_link): New function.
1016         (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
1017         targets.
1018         (elf_backend_set_special_section_info_and_link): Define for
1019         Solaris targets.
1020         * elf32-sparc.c: Likewise.
1021         * elf64-x86-64.c: Likewise.
1022
1023 2016-04-11  H.J. Lu  <hongjiu.lu@intel.com>
1024
1025         PR ld/19939
1026         * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
1027         to bfd_boolean.
1028         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
1029         Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
1030         applies to read-only section.
1031         * elf32-i386.c (elf_i386_link_hash_table): Add
1032         readonly_dynrelocs_against_ifunc.
1033         (elf_i386_allocate_dynrelocs): Updated.
1034         (elf_i386_size_dynamic_sections): Issue an error for read-only
1035         segment with dynamic IFUNC relocations only if
1036         readonly_dynrelocs_against_ifunc is TRUE.
1037         * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1038         readonly_dynrelocs_against_ifunc.
1039         (elf_x86_64_allocate_dynrelocs): Updated.
1040         (elf_x86_64_size_dynamic_sections): Issue an error for read-only
1041         segment with dynamic IFUNC relocations only if
1042         readonly_dynrelocs_against_ifunc is TRUE.
1043         * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
1044         Updated.
1045
1046 2016-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1047
1048         * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
1049         a fall through from error_ret_free_internal.  Free local_syms in
1050         error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
1051
1052 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
1053
1054         * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
1055         (relocate_plt_for_entry): Likewise.
1056
1057 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
1058
1059         * elf32-arc.c (elf_arc_check_relocs): Changed
1060
1061 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
1062
1063         * elf32-arc.c (name_for_global_symbol): Changed assert.
1064         (get_replace_function): Created.:
1065         (struct arc_relocation_data): Changed to signed types.
1066         (defines S, L, P, PDATA): Casted to signed type.
1067         (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
1068         (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
1069         (arc_do_relocation): Changed.
1070
1071 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
1072
1073         * elf32-arc.c (name_for_global_symbol): Added assert to check for
1074         symbol index.
1075         (elf_arc_relocate_section): Added and changed asserts, validating
1076         the synamic symbol index.
1077         (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
1078         relocation if symbol has dynindx set to -1.
1079
1080 2016-04-05  Maciej W. Rozycki  <macro@imgtec.com>
1081
1082         * elflink.c (elf_link_add_object_symbols): Always turn hidden
1083         and internal symbols which have a dynamic index into local
1084         ones.
1085
1086 2016-04-04  Nick Clifton  <nickc@redhat.com>
1087
1088         PR 19872
1089         * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
1090         version number if the version is zero.
1091
1092 2016-04-01  Alan Modra  <amodra@gmail.com>
1093
1094         PR 19886
1095         * elflink.c (on_needed_list): Recursively check needed status.
1096         (elf_link_add_object_symbols): Adjust.
1097
1098 2016-03-30  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
1099
1100         * elf32-avr.c (avr_elf32_load_records_from_section): Free
1101         internal_relocs only if they aren't cached.
1102
1103 2016-03-29  Nick Clifton  <nickc@redhat.com>
1104
1105         PR 17334
1106         * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
1107         assertion on the size of the got section to allow it to be bigger
1108         than the number of relocs.
1109
1110 2016-03-29  Toni Spets  <toni.spets@iki.fi>
1111
1112         PR 19878
1113         * coffcode.h (coff_write_object_contents): Revert accidental
1114         2014-11-10 change.
1115
1116 2016-03-22  Alan Modra  <amodra@gmail.com>
1117
1118         PR 19850
1119         * dwarf2.c (read_attribute_value): Skip info_ptr check for
1120         DW_FORM_flag_present.
1121
1122 2016-03-22  Nick Clifton  <nickc@redhat.com>
1123
1124         * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
1125         architecture name for backwards compatibility.
1126
1127         * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
1128         unbounded stack use.
1129
1130         * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
1131         sufficiently recent version of GCC.
1132         * configure: Regenerate.
1133
1134 2016-03-22  Alan Modra  <amodra@gmail.com>
1135
1136         PR 19851
1137         * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
1138
1139 2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1140
1141         * archures.c (bfd_mach_arc_nps400): Define.
1142         * bfd-in2.h: Regenerate.
1143         * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
1144         some existing entries to make space.
1145         * elf32-arc.c (arc_elf_object_p): Add nps400 case.
1146         (arc_elf_final_write_processing): Likewise.
1147
1148 2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1149
1150         * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
1151         EF_ARC_CPU_GENERIC.
1152         (arc_elf_final_write_processing): Don't bother setting cpu field
1153         in e_flags, this will have been set elsewhere.
1154
1155 2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1156
1157         * elf32-arc.c (arc_elf_final_write_processing): Switch to using
1158         EF_ARC_MACH_MSK.
1159
1160 2016-03-21  Nick Clifton  <nickc@redhat.com>
1161
1162         * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
1163         * configure: Regenerate.
1164         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
1165         alloca with call to xmalloc.
1166         * elf32-nds32.c: Likewise.
1167         * elf64-hppa.c: Likewise.
1168         * elfxx-mips.c: Likewise.
1169         * pef.c: Likewise.
1170         * pei-x86_64.c: Likewise.
1171         * som.c: Likewise.
1172         * xsym.c: Likewise.
1173
1174 2016-03-15  H.J. Lu  <hongjiu.lu@intel.com>
1175
1176         PR ld/19827
1177         * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
1178         locally in PIE.
1179         (elf_i386_relocate_section): Likewise.
1180         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1181         (elf_x86_64_relocate_section): Likewise.
1182
1183 2016-03-15  H.J. Lu  <hongjiu.lu@intel.com>
1184
1185         PR ld/19807
1186         * elf64-x86-64.c (elf_x86_64_relocate_section): Check
1187         no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
1188         relocation overflow check.
1189
1190 2016-03-14  H.J. Lu  <hongjiu.lu@intel.com>
1191
1192         * bfd-in2.h: Regenerated.
1193
1194 2016-03-11  Dan Gissel  <dgisselq@ieee.org>
1195
1196         PR 19713
1197         * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
1198         uses bytes not octets.
1199         * elflink.c (resolve_section): Likewise.
1200         Add a bfd parameter.
1201         (eval_section): Pass the input_bfd to resolve_section.
1202         (bfd_elf_perform_complex_relocation): Convert byte offset to
1203         octets before read and writing values.
1204         (elf_link_input_bfd): Add byte to octet conversions.
1205         (elf_reloc_link_order): Likewise.
1206         (elf_fixup_link_order): Likewise.
1207         (bfd_elf_final_link): Likewise.
1208         * reloc.c (_bfd_final_link_relocate): Likewise.
1209         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1210
1211 2016-03-10  Nick Clifton  <nickc@redhat.com>
1212
1213         * config.bfd: Mark the i370 target as obsolete.
1214
1215 2016-03-09  Pedro Alves  <palves@redhat.com>
1216
1217         * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
1218         gcc ABI)" to printable name.
1219         * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
1220         of "v850-rh850" as printable name.
1221
1222 2016-03-09  Leon Winter  <winter-gcc@bfw-online.de>
1223
1224         PR ld/19623
1225         * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
1226         relocations against absolute symbols.
1227
1228 2016-03-09  Alan Modra  <amodra@gmail.com>
1229
1230         PR binutils/19775
1231         * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
1232         length elements in the archive.
1233
1234 2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
1235
1236         PR ld/19789
1237         * elflink.c (elf_link_add_object_symbols): Create dynamic sections
1238         for -E/--dynamic-list only when not relocatable.
1239
1240 2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
1241
1242         PR ld/19784
1243         * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
1244         count for locally defined local IFUNC symbols in shared object.
1245         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1246
1247 2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
1248
1249         PR ld/19579
1250         * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
1251         together.
1252
1253 2016-03-08  Cupertino Miranda  <Cupertino.Miranda@synopsys.com>
1254             Andrew Burgess  <andrew.burgess@embecosm.com>
1255
1256         * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
1257         (arc_bfd_put_32): Becomes an alias for bfd_put_32.
1258         (arc_elf_howto_init): Added assert to validate relocations.
1259         (get_middle_endian_relocation): Delete.
1260         (middle_endian_convert): New function.
1261         (ME): Redefine, now does nothing.
1262         (IS_ME): New define.
1263         (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
1264         definition to call middle_endian_convert.  Add a new local
1265         variable and make use of this throughout. Added call to
1266         arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
1267
1268 2016-03-07  Nick Clifton  <nickc@redhat.com>
1269
1270         PR binutils/19775
1271         * archive.c (bfd_generic_openr_next_archived_file): Allow zero
1272         length elements in the archive.
1273
1274 2016-03-07  Jiong Wang  <jiong.wang@arm.com>
1275
1276         * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
1277         section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
1278
1279 2016-03-04  H.J. Lu  <hongjiu.lu@intel.com>
1280
1281         PR ld/19579
1282         * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
1283         executable as definition if the new definition comes from a
1284         shared library.
1285
1286 2016-03-02  Alan Modra  <amodra@gmail.com>
1287
1288         * Makefile.in: Regenerate.
1289         * po/SRC-POTFILES.in: Regenerate.
1290
1291 2016-02-29  Cupertino Miranda  <cmiranda@synopsys.com>
1292
1293         * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
1294         relocation addend when sections get merged.
1295
1296 2016-02-29  Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1297
1298         * elf32-arc.c (arc_elf_final_write_processing): Add condition to
1299         the flag change.
1300         (elf_arc_relocate_section): Fixes and conditions to support PIE.
1301         Assert for code sections dynamic relocs.
1302
1303 2016-02-26  Renlin Li  <renlin.li@arm.com>
1304
1305         * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
1306         check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
1307
1308 2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
1309
1310         PR ld/19609
1311         * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
1312         load with locally bound symbols if PIC is false or there is no
1313         base register.  Optimize branch to 0 if PIC is false.
1314         (elf_i386_relocate_section): Don't generate dynamic relocations
1315         against undefined weak symbols if PIC is false.
1316         * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
1317         if we can't estimate relocation overflow with --no-relax.
1318         Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
1319         symbols if PIC is false.  Optimize branch to 0 if PIC is false.
1320         (elf_x86_64_relocate_section): Don't generate dynamic relocations
1321         against undefined weak symbols if PIC is false.
1322
1323 2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
1324
1325         PR ld/19645
1326         * bfd.c (bfd): Change flags to 20 bits.
1327         (BFD_CONVERT_ELF_COMMON): New.
1328         (BFD_USE_ELF_STT_COMMON): Likewise.
1329         (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
1330         BFD_USE_ELF_STT_COMMON.
1331         (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1332         * configure.ac: Remove --enable-elf-stt-common.
1333         * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
1334         common symbol depending on BFD_CONVERT_ELF_COMMON and
1335         BFD_USE_ELF_STT_COMMON.
1336         * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
1337         STT_COMMON.
1338         * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
1339         STT_COMMON.
1340         (elf_link_convert_common_type): New function.
1341         (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
1342         common symbol depending on BFD_CONVERT_ELF_COMMON and
1343         BFD_USE_ELF_STT_COMMON.  Set sym.st_info after sym.st_shndx.
1344         * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
1345         and BFD_USE_ELF_STT_COMMON to object_flags.
1346         (TARGET_LITTLE_SYM): Likewise.
1347         * syms.c (BSF_KEEP_G): Renamed to ...
1348         (BSF_ELF_COMMON): This.
1349         * bfd-in2.h: Regenerated.
1350         * config.in: Likewise.
1351         * configure: Likewise.
1352
1353 2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
1354
1355         PR ld/19636
1356         PR ld/19704
1357         PR ld/19719
1358         * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1359         (elf_i386_link_hash_entry): Add has_got_reloc and
1360         has_non_got_reloc.
1361         (elf_i386_link_hash_table): Add interp.
1362         (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
1363         has_non_got_reloc.
1364         (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
1365         has_non_got_reloc.
1366         (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
1367         (elf_i386_fixup_symbol): New function.
1368         (elf_i386_pie_finish_undefweak_symbol): Likewise.
1369         (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
1370         relocations and discard relocations against resolved undefined
1371         weak symbols in executable.  Don't make resolved undefined weak
1372         symbols in executable dynamic.  Keep dynamic non-GOT/non-PLT
1373         relocation against undefined weak symbols in PIE.
1374         (elf_i386_size_dynamic_sections): Set interp to .interp section.
1375         (elf_i386_relocate_section): Don't generate dynamic relocations
1376         against resolved undefined weak symbols in PIE, except for
1377         R_386_PC32.
1378         (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
1379         dynamic PLT/GOT relocations for resolved undefined weak symbols.
1380         Don't generate dynamic relocation against resolved undefined weak
1381         symbol in executable.
1382         (elf_i386_finish_dynamic_sections): Call
1383         elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
1384         (elf_backend_fixup_symbol): New.
1385         * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1386         (elf_x86_64_link_hash_entry): Add has_got_reloc and
1387         has_non_got_reloc.
1388         (elf_x86_64_link_hash_table): Add interp.
1389         (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
1390         has_non_got_reloc.
1391         (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
1392         has_non_got_reloc.
1393         (elf_x86_64_check_relocs): Set has_got_reloc and
1394         has_non_got_reloc.
1395         (elf_x86_64_fixup_symbol): New function.
1396         (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1397         (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
1398         relocations and discard relocations against resolved undefined
1399         weak symbols in executable.  Don't make resolved undefined weak
1400         symbols in executable dynamic.
1401         (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
1402         (elf_x86_64_relocate_section): Check relocation overflow for
1403         dynamic relocations against unresolved weak undefined symbols.
1404         Don't generate dynamic relocations against resolved weak
1405         undefined symbols in PIE.
1406         (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
1407         dynamic PLT/GOT relocations for resolved undefined weak symbols.
1408         Don't generate dynamic relocation against resolved undefined weak
1409         symbol in executable.
1410         (elf_x86_64_finish_dynamic_sections): Call
1411         elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
1412         (elf_backend_fixup_symbol): New.
1413
1414 2016-02-26  Alan Modra  <amodra@gmail.com>
1415
1416         * elf64-ppc.c (create_linkage_sections): Create sfpr when
1417         save_restore_funcs, rest of sections when not relocatable.
1418         (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
1419         (sfpr_define): Define all symbols on emitted code.
1420         (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
1421         when relocatable.  Move sfpr_define loop earlier.
1422
1423 2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
1424
1425         * elf64-x86-64.c (elf_x86_64_need_pic): New function.
1426         (elf_x86_64_relocate_section): Use it.  Replace
1427         x86_64_elf_howto_table[r_type] with howto.
1428
1429 2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
1430
1431         PR ld/19698
1432         * elflink.c (bfd_elf_record_link_assignment): Set versioned if
1433         symbol version is unknown.
1434
1435 2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
1436
1437         * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
1438         to (bfd_vma) -1 when setting needs_plt to 0.
1439         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1440
1441 2016-02-23  H.J. Lu  <hongjiu.lu@intel.com>
1442
1443         * elflink.c (bfd_elf_record_link_assignment): Check for shared
1444         library, instead of PIC, and don't check PDE when making linker
1445         assigned symbol dynamic.
1446
1447 2016-02-23  Faraz Shahbazker  <faraz.shahbazker@imgtec.com>
1448
1449         * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
1450         ABIVERSION for non-executable stack.
1451
1452 2016-02-23  Rich Felker  <bugdal@aerifal.cx>
1453
1454         PR target/19516
1455         * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
1456         Always produce a RELATIVE reloc for a local symbol.
1457
1458 2016-02-23  Hans-Peter Nilsson  <hp@axis.com>
1459
1460         Fix test-case ld-elf/pr19617b
1461         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1462         discard unused non-function symbols when --dynamic-list-data.
1463
1464 2016-02-22  H.J. Lu  <hongjiu.lu@intel.com>
1465
1466         * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
1467         dynsym section, even if it is empty, with dynamic sections.
1468
1469 2016-02-22  H.J. Lu  <hongjiu.lu@intel.com>
1470
1471         * syms.c: Remove BSF_COMMON from comments.
1472         * bfd-in2.h: Regenerated.
1473
1474 2016-02-22  Jiong Wang  <jiong.wang@arm.com>
1475
1476         * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
1477         for destination.  Remove useless function parameters.
1478         (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
1479
1480 2016-02-19  Nick Clifton  <nickc@redhat.com>
1481
1482         PR ld/19629
1483         * aoutx.h (aout_link_add_symbols): Check for out of range string
1484         table offsets.
1485
1486         PR ld/19628
1487         * reloc.c (bfd_generic_get_relocated_section_contents): Stop
1488         processing if we encounter a reloc without an associated symbol.
1489
1490 2016-02-18  H.J. Lu  <hongjiu.lu@intel.com>
1491
1492         PR ld/19617
1493         * elflink.c (elf_link_add_object_symbols): Always create dynamic
1494         sections for -E/--dynamic-list.
1495
1496 2016-02-17  H.J. Lu  <hongjiu.lu@intel.com>
1497
1498         * elf64-x86-64.c (elf_backend_omit_section_dynsym): New.  Defined
1499         to bfd_true.
1500
1501 2016-02-16  Joseph Myers  <joseph@codesourcery.com>
1502
1503         * plugin.c (plugin_vec): Set match priority to 255.
1504         * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
1505         matching against the plugin vector, take priority from there not
1506         from TEMP.
1507
1508 2016-02-15  Nick Clifton  <nickc@redhat.com>
1509
1510         * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
1511         for length and type fields.  Use a signed value for the
1512         suffix_length field.
1513
1514 2016-02-10  H.J. Lu  <hongjiu.lu@intel.com>
1515
1516         PR ld/19601
1517         * elf32-i386.c (elf_i386_relocate_section): Mask off the least
1518         significant bit in GOT offset for R_386_GOT32X.
1519
1520 2016-02-10  Nick Clifton  <nickc@redhat.com>
1521
1522         PR 19405
1523         * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
1524         immediate values.
1525         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
1526         number of messages about FDE encoding preventing .eh_frame_hdr
1527         generation.
1528
1529 2016-02-09  Nick Clifton  <nickc@redhat.com>
1530
1531         * oasys.c (oasys_archive_p): Fix indentation.
1532         * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
1533         constant for left shifting.
1534
1535         * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
1536         helpful warning message to explain why certain AArch64 relocs
1537         might overflow.
1538
1539 2016-02-05  Simon Marchi  <simon.marchi@ericsson.com>
1540
1541         * pe-mips.c (coff_mips_reloc): Fix formatting.
1542
1543 2016-02-05  Cupertino Miranda  <Cupertino.Miranda@synopsys.com>
1544
1545         * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
1546         to bfd_mach_arc_arc600.
1547
1548 2016-02-04  Alan Modra  <amodra@gmail.com>
1549
1550         * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
1551         for big-endian.
1552
1553 2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
1554
1555         PR ld/19542
1556         * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
1557         distances in the compressed_size field of the output section.
1558
1559 2016-02-02  Alan Modra  <amodra@gmail.com>
1560
1561         * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
1562         ELFv2 entry optimization.
1563
1564 2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
1565
1566         PR binutils/19547
1567         * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
1568         no relocations in relocatable files.
1569
1570 2016-02-01  H.J. Lu  <hongjiu.lu@intel.com>
1571
1572         PR ld/19553
1573         * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
1574         if a symbol from a library loaded via DT_NEEDED doesn't match
1575         the symbol referenced by regular object.
1576
1577 2016-02-01  Nathaniel Smith  <njs@pobox.com>
1578
1579         * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
1580         CODE and DATA.
1581
1582 2016-02-01  Alan Modra  <amodra@gmail.com>
1583
1584         * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
1585         an out of range reloc_index.
1586         * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
1587
1588 2016-02-01  Kamil Rytarowski  <n54@gmx.com>
1589
1590         * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
1591         (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
1592         * Makefile.in: Regenerated.
1593
1594 2016-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
1595
1596         * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
1597
1598 2016-01-31  John David Anglin  <danglin@gcc.gnu.org>
1599
1600         PR ld/19526
1601         * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
1602         files.
1603         * elf64-hppa.c (elf32_hppa_final_link): Likewise.  Remove retval.
1604
1605 2016-01-30  H.J. Lu  <hongjiu.lu@intel.com>
1606
1607         PR ld/19539
1608         * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
1609         against STT_GNU_IFUNC symbol only with dynamic symbols.
1610         * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1611
1612 2016-01-28  H.J. Lu  <hongjiu.lu@intel.com>
1613
1614         PR binutils/19523
1615         * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
1616         decompress debug sections.
1617
1618 2016-01-25  Maciej W. Rozycki  <macro@imgtec.com>
1619
1620         * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
1621         `dynindx'.
1622
1623 2016-01-25  Nick Clifton  <nickc@redhat.com>
1624
1625         PR target/19435
1626         * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
1627         dsym filename buffer.
1628
1629 2016-01-24  Maciej W. Rozycki  <macro@imgtec.com>
1630
1631         * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
1632
1633 2016-01-24  Maciej W. Rozycki  <macro@imgtec.com>
1634
1635         * elfxx-mips.c (BZ16_REG): Correct calculation.
1636
1637 2016-01-21  Nick Clifton  <nickc@redhat.com>
1638
1639         * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
1640         changing the type of _loc to be bfd_byte *.
1641         (elf_arc_finish_dynamic_symbol): Likewise.
1642
1643 2016-01-21  Nick Clifton  <nickc@redhat.com>
1644
1645         PR ld/19455
1646         * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
1647         class of the linker stub bfd.
1648         (elf32_arm_check_relocs): Skip check for pic format after
1649         processing a vxWorks R_ARM_ABS12 reloc.
1650         * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
1651         reporting a class mismatch.
1652
1653 2016-01-21  Jiong Wang  <jiong.wang@arm.com>
1654
1655         * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
1656         veneer for sym_sec != input_sec.
1657         (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
1658         (elfNN_aarch64_final_link_relocate): Take rela addend into account when
1659         calculation destination.
1660
1661 2016-01-21  Alan Modra  <amodra@gmail.com>
1662
1663         * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
1664         (swap_linux_prpsinfo64_out): New function.
1665         (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1666         (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
1667         * elf.c (elfcore_write_linux_prpsinfo32): Adjust.  Don't memset.
1668         (elfcore_write_linux_prpsinfo64): Likewise.
1669         * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
1670         (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1671         (elfcore_write_ppc_linux_prpsinfo32): Adjust.  Don't memset.
1672
1673 2016-01-21  Alan Modra  <amodra@gmail.com>
1674
1675         * elf-linux-core.h: Rename from elf-linux-psinfo.h.
1676         * elf.c: Adjust #include.
1677         * elf32-ppc.c: Don't #include elf-linux-psinfo.h
1678         * Makefile.am (SOURCE_HFILES): Update.
1679         * Makefile.in: Regenerate.
1680         * po/SRC-PORFILES.in: Regenerate.
1681
1682 2016-01-21  Alan Modra  <amodra@gmail.com>
1683
1684         * configure.ac: Move corefile selection later in file.  Move
1685         tdefaults code immediately after other target vector code.
1686         * configure: Regenerate.
1687
1688 2016-01-20  Mickael Guene  <mickael.guene@st.com>
1689
1690         * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
1691         section using '.text.noread' pattern.
1692
1693 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
1694
1695         * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
1696
1697 2016-01-18  Miranda Cupertino  <Cupertino.Miranda@synopsys.com>
1698             Zissulescu Claudiu  <Claudiu.Zissulescu@synopsys.com>
1699
1700         * arc-plt.def: New file.
1701         * arc-plt.h: Likewise.
1702         * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
1703                        elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
1704                        elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
1705                        elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
1706         (name_for_global_symbol): Added.
1707         (ADD_RELA): Helper to create dynamic relocs.
1708         (new_got_entry_to_list): Create a new got entry in linked list.
1709         (symbol_has_entry_of_type): Search for specific type of entry in
1710         list.
1711         (is_reloc_for_GOT): return FALSE for any TLS related relocs.
1712         (is_reloc_for_TLS, arc_elf_set_private_flags)
1713         (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
1714         (arc_elf_merge_private_bfd_data): New functions.
1715         (debug_arc_reloc): Cleaned debug info printing.
1716         (PDATA reloc): Changed not to perform address alignment.
1717         (reverse_me): Added. Fix for ARC_32 relocs.
1718         (arc_do_relocation): Return bfd_reloc_of when no relocation should
1719         occur.
1720         (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
1721         Changed function to access an array of list of GOT entries instead
1722         of just an array of offsets.
1723         (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
1724         (elf_arc_check_relocs): Likewise.
1725         (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
1726         (elf_arc_finish_dynamic_sections): Likewise
1727         (arc_create_dynamic_sections): Modified conditions to create
1728         dynamic sections.
1729         (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
1730         (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
1731         (relocate_plt_for_entry): Changed to support new way to define PLT
1732         related code.
1733         (add_symbol_to_plt): Likewise.
1734         (arc_elf_link_hash_table_create): New function.
1735
1736 2016-01-18  Nick Clifton  <nickc@redhat.com>
1737
1738         PR ld/19440
1739         * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
1740         section number into internal section number.
1741         * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
1742         * coffswap.h (coff_swap_sym_in): Likewise.
1743         * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
1744         * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
1745         section number field is big enough to hold the external value.
1746
1747 2016-01-17  Alan Modra  <amodra@gmail.com>
1748
1749         * configure: Regenerate.
1750
1751 2016-01-12  Yury Usishchev  <y.usishchev@samsung.com>
1752
1753         * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
1754         when address in first unwind entry does not match start of
1755         section.
1756
1757 2016-01-08  Richard Sandiford  <richard.sandiford@arm.com>
1758             Jiong Wang  <jiong.wang@arm.com>
1759
1760         PR ld/19368
1761         * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
1762         reloc_class_ifunc.
1763
1764 2016-01-06  Andrew Burgess  <andrew.burgess@embecosm.com>
1765
1766         * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
1767         place 'R_' before the reloc name returned.
1768         (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
1769         the relocation string.
1770
1771 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1772
1773         * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
1774         factored out from...
1775         (_bfd_mips_elf_merge_private_bfd_data): ... here.
1776
1777 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1778
1779         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
1780         attribute check after ELF file header flag check.
1781
1782 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1783
1784         * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
1785         return status from `_bfd_elf_merge_object_attributes'.
1786
1787 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1788
1789         * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
1790         factored out from...
1791         (_bfd_mips_elf_merge_private_bfd_data): ... here.
1792
1793 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1794
1795         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
1796         handling of input MIPS ABI flags together.
1797
1798 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1799
1800         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
1801         attribute checks for null input.
1802
1803 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1804
1805         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
1806         pointers to target data.
1807
1808 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1809
1810         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
1811         an FP ABI warning.
1812
1813 2016-01-01  Alan Modra  <amodra@gmail.com>
1814
1815         Update year range in copyright notice of all files.
1816
1817 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
1818 \f
1819 Copyright (C) 2016 Free Software Foundation, Inc.
1820
1821 Copying and distribution of this file, with or without modification,
1822 are permitted in any medium without royalty provided the copyright
1823 notice and this notice are preserved.
1824
1825 Local Variables:
1826 mode: change-log
1827 left-margin: 8
1828 fill-column: 74
1829 version-control: never
1830 End: