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