tile: Dump dynamic relocation info to the map file
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
4 in read-only section with minfo.
5 (tilepro_elf_size_dynamic_sections): Likewise.
6 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
7 (tilegx_elf_size_dynamic_sections): Likewise.
8
9 2017-10-05 Pedro Alves <palves@redhat.com>
10
11 PR 22245
12 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
13 ellipsis parameter. Split out bfd_error_on_input code to..
14 (bfd_set_input_error): .. New function.
15 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
16 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
17 * bfd-in2.h: Regenerate.
18
19 2017-10-05 Alan Modra <amodra@gmail.com>
20
21 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
22 fini_array error value.
23
24 2017-10-05 Alan Modra <amodra@gmail.com>
25
26 PR 21167
27 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
28 groups.
29 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
30 flag from section.
31 (elf_fake_sections): Adjust calls. Exit immediately on failure.
32 (bfd_elf_set_group_contents): Add associated reloc section indices
33 to group contents.
34
35 2017-10-04 Alan Modra <amodra@gmail.com>
36
37 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
38 classify symbols for ELFv2.
39
40 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
41
42 PR 22245
43 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
44 undergoes default promotion.
45 * bfd-in2.h: Regenerate.
46
47 2017-10-02 Alan Modra <amodra@gmail.com>
48
49 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
50 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
51
52 2017-10-01 Alan Modra <amodra@gmail.com>
53
54 PR 21957
55 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
56 (add_line_info): Always put end_sequence last.
57
58 2017-10-01 Alan Modra <amodra@gmail.com>
59
60 PR 22047
61 * dwarf2.c (read_section): Allocate buffer with extra byte for
62 bfd_simple_get_relocated_section_contents rather than copying
63 afterwards.
64
65 2017-09-29 Alan Modra <amodra@gmail.com>
66
67 * merge.c (merge_strings): Return FALSE on malloc failure.
68 (_bfd_merge_sections): Return failures from record_section and
69 merge_strings.
70
71 2017-09-28 Alan Modra <amodra@gmail.com>
72
73 PR 22220
74 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
75 a case where plugin_notice isn't called.
76
77 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
78
79 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
80 comparison.
81
82 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
83
84 PR ld/22199
85 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
86 output_bfd to info->callbacks->minfo.
87
88 2017-09-26 Nick Clifton <nickc@redhat.com>
89
90 PR 22172
91 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
92 assertion failure if elf_x86_64_rtype_to_howto has already issued
93 an error message.
94
95 2017-09-26 Alan Modra <amodra@gmail.com>
96
97 PR 22210
98 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
99 read data.
100
101 2017-09-26 Nick Clifton <nickc@redhat.com>
102
103 PR 22210
104 * dwarf2.c (read_formatted_entries): Fail early if we know that
105 the loop parsing data entries will overflow the end of the
106 section.
107
108 2017-09-26 Alan Modra <amodra@gmail.com>
109
110 PR 22209
111 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
112 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
113 to stash->info_ptr_memory, and check die_ref is within that memory.
114 Set info_ptr_end correctly when another CU is refd. Check die_ref
115 for DW_FORM_ref4 etc. is within CU.
116
117 2017-09-26 Alan Modra <amodra@gmail.com>
118
119 PR 22205
120 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
121 (read_formatted_entries): Init "fe".
122 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
123
124 2017-09-26 Alan Modra <amodra@gmail.com>
125
126 PR 22204
127 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
128 bounds in inner loop.
129
130 2017-09-25 Alan Modra <amodra@gmail.com>
131
132 PR 22202
133 * dwarf1.c (parse_die): Sanity check pointer against section limit
134 before dereferencing.
135 (parse_line_table): Likewise.
136
137 2017-09-25 Alan Modra <amodra@gmail.com>
138
139 PR 22201
140 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
141 has string form.
142 (parse_comp_unit): Likewise.
143
144 2017-09-25 Alan Modra <amodra@gmail.com>
145
146 PR 22200
147 * dwarf2.c (read_formatted_entries): Error on format_count zero.
148
149 2017-09-24 Alan Modra <amodra@gmail.com>
150
151 PR 22197
152 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
153 within section bounds.
154
155 2017-09-24 Alan Modra <amodra@gmail.com>
156
157 PR 22191
158 * dwarf2.c (decode_line_info): Properly free line sequences on error.
159
160 2017-09-24 Alan Modra <amodra@gmail.com>
161
162 PR 22187
163 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
164 pname param. Return status. Make name const. Don't abort,
165 return an error. Formatting. Exit if current info_ptr matches
166 orig_info_ptr. Update callers.
167 (scan_unit_for_symbols): Start at nesting_level of zero. Make
168 nested_funcs an array of structs for extensibility. Formatting.
169
170 2017-09-24 Alan Modra <amodra@gmail.com>
171
172 PR 22186
173 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
174 rather than dividing by zero.
175
176 2017-09-24 Alan Modra <amodra@gmail.com>
177
178 PR 22169
179 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
180
181 2017-09-24 Alan Modra <amodra@gmail.com>
182
183 PR 22167
184 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
185
186 2017-09-24 Alan Modra <amodra@gmail.com>
187
188 PR 22166
189 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
190 SHT_GNU_verneed section for sanity. Don't zalloc memory for
191 verref.
192
193 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
194
195 PR binutils/22170
196 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
197 corrupted PLT.
198
199 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
200
201 PR binutils/22163
202 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
203 -1 if bfd_canonicalize_dynamic_reloc returns 0.
204
205 2017-09-22 Pedro Alves <palves@redhat.com>
206 Alan Modra <amodra@gmail.com>
207
208 * version.h: Add comment.
209
210 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
211
212 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
213 NT_S390_GS_BC, correct the previously swapped invocations of
214 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
215
216 2017-09-19 Alan Modra <amodra@gmail.com>
217
218 PR 21441
219 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
220 size.
221
222 2017-09-19 Alan Modra <amodra@gmail.com>
223
224 PR 22150
225 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
226 symbols before calculating verrefs. Don't renumber dynsyms
227 after gc. Exclude .gnu.version when zero or one dynsym.
228 Localize some vars and reindent.
229
230 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
231
232 PR ld/22148
233 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
234 return from bfd_canonicalize_dynamic_reloc.
235
236 2017-09-15 Alan Modra <amodra@gmail.com>
237
238 PR 22116
239 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
240 overflows bfd_size_type.
241
242 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
243
244 PR ld/22135
245 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
246 to indicate if conversion is performed.
247 (elf_i386_check_relocs): Cache section contents and relocations
248 if conversion is performed.
249 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
250 contents and relocations if conversion is performed.
251
252 2017-09-14 Nick Clifton <nickc@redhat.com>
253
254 PR binutils/22113
255 * peXXigen.c (pe_print_idata): Extend check for HintName vector
256 entries.
257
258 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
259
260 * elfxx-x86.h: Fix a typo in comments.
261
262 2017-09-09 Kamil Rytarowski <n54@gmx.com>
263
264 * elf32-nds32.c: Rename __BIT() to N32_BIT().
265
266 2017-09-09 Alan Modra <amodra@gmail.com>
267
268 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
269 plt_stub_align.
270
271 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
272
273 * elf32-i386.c (elf_i386_relocate_section): Update usage of
274 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
275 (elf_i386_finish_dynamic_symbol): Likewise.
276 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
277 (elf_x86_64_finish_dynamic_symbol): Likewise.
278 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
279 (_bfd_x86_elf_fixup_symbol): Likewise.
280
281 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
282
283 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
284 check has_non_got_reloc.
285
286 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
287
288 PR ld/22115
289 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
290 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
291 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
292 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
293 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
294 and linker_def on __ehdr_start if it is referenced and not
295 defined.
296 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
297 and return TRUE when building executable, if a symbol has
298 non-GOT/non-PLT relocations in text section or there is no
299 dynamic linker.
300 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
301
302 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
303
304 * elfxx-x86.h: Update comments.
305
306 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
307
308 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
309 elf_x86_plt_layout_table with elf_x86_init_table.
310 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
311 Likewise.
312 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
313 Likewise.
314 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
315 (elf_x86_init_table): This.
316 (_bfd_x86_elf_link_setup_gnu_properties): Replace
317 elf_x86_plt_layout_table with elf_x86_init_table.
318
319 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
320
321 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
322 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
323 * configure: Regenerated.
324 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
325 and r_sym fields of plt_layout.
326 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
327 Likewise.
328 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
329 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
330 r_info nor r_sym fields.
331 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
332 fields of htab.
333 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
334
335 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
336
337 * (_bfd_riscv_relax_align): Call bfd_set_error and
338 print an error message when unable to relax a .align directive.
339
340 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
341
342 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
343 (riscv_record_pcrel_hi_reloc): Add absolute argument.
344 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
345 R_RISCV_PCREL_HI20 relocs, and pass the result to
346 riscv_record_pcrel_hi_reloc.
347
348 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
349
350 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
351 r_type_p. Remove the converted argument. Replace
352 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
353 the new relocation type via r_type_p.
354 (elf_i386_relocate_section): Likewise.
355 (elf_i386_finish_dynamic_symbol): Likewise.
356 (need_convert_load): Removed.
357 (check_relocs_failed): Updated.
358 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
359 instead of setting need_convert_load.
360 (_bfd_i386_elf_convert_load): Removed.
361 * elf64-x86-64.c (need_convert_load): Removed.
362 (check_relocs_failed): Updated.
363 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
364 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
365 Return the new relocation type via r_type_p.
366 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
367 instead of setting need_convert_load.
368 (elf_x86_64_check_relocs): Don't check PIC if relocation has
369 been converted.
370 (_bfd_x86_64_elf_convert_load): Removed.
371 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
372 with SYMBOL_REFERENCES_LOCAL_P.
373 (elf_x86_64_finish_dynamic_symbol): Likewise.
374 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
375 set convert_load.
376 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
377 (_bfd_x86_elf_link_symbol_references_local): New function.
378 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
379 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
380 SYMBOL_REFERENCES_LOCAL_P.
381 (elf_x86_link_hash_entry): Add local_ref.
382 (elf_x86_link_hash_table): Remove convert_load.
383 (_bfd_i386_elf_convert_load): Removed.
384 (_bfd_x86_64_elf_convert_load): Likewise.
385 (_bfd_x86_elf_link_symbol_references_local): New.
386
387 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
388
389 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
390 (elf_x86_64_info_to_howto): Get the real relocation type by
391 masking out R_X86_64_converted_reloc_bit.
392 (elf_x86_64_check_tls_transition): Get the real relocation type
393 by masking out R_X86_64_converted_reloc_bit.
394 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
395 instead of setting converted_reloc.
396 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
397 instead of converted_reloc. Get the real relocation type by
398 masking out R_X86_64_converted_reloc_bit.
399 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
400 R_X86_64_converted_reloc_bit is valid.
401 * elfxx-x86.h (converted_reloc): Removed.
402
403 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
404
405 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
406 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
407 to get the relocation type again.
408 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
409 r_type when calling elf_x86_64_tls_transition. Don't use
410 ELF32_R_TYPE to get the relocation type again.
411
412 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
413
414 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
415 converted_reloc.
416
417 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
418
419 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
420 argument. Don't check relocation overflow. Avoid relocation
421 overflow if --no-relax is used. Set converted_reloc on symbol
422 if a GOTPCREL relocation is converted.
423 (elf_x86_64_relocate_section): Issue a fatal error and suggest
424 --no-relax if GOTPCREL relocation conversion leads to relocation
425 overflow.
426 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
427
428 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
429 Edmar Wienskoski <edmar.wienskoski@nxp.com
430
431 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
432 (ppc_elf_check_relocs): Handle it.
433 (ppc_elf_vle_split20): New function.
434 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
435
436 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
437
438 PR ld/22071
439 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
440 for x86-64 if GOT_TLS_GDESC_P is true.
441
442 2017-09-03 Alan Modra <amodra@gmail.com>
443
444 PR 22067
445 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
446
447 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
448
449 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
450 tls_get_addr for x86-64 in one place.
451
452 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
453
454 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
455 with elfxx-x86.lo for 64-bit BFD.
456 * configure: Regenerated.
457
458 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
459
460 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
461 (_bfd_i386_elf_convert_load): This. Remove static.
462 (elf_i386_size_dynamic_sections): Removed.
463 (elf_backend_size_dynamic_sections): Likewise.
464 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
465 (_bfd_x86_64_elf_convert_load): This. Remove static.
466 (elf_x86_64_size_dynamic_sections): Removed.
467 (elf_backend_size_dynamic_sections): Likewise.
468 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
469 (elf_x86_allocate_dynrelocs): This. Make it static.
470 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
471 (elf_x86_allocate_local_dynreloc): This. Make it static.
472 (elf_i386_is_reloc_section): New function.
473 (elf_x86_64_is_reloc_section): Likewise.
474 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
475 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
476 Rearrange got_entry_size initialization.
477 (_bfd_x86_elf_size_dynamic_sections): New function.
478 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
479 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
480 (_bfd_i386_elf_convert_load): New.
481 (_bfd_x86_64_elf_convert_load): Likewise.
482 (_bfd_x86_elf_size_dynamic_sections): Likewise.
483 (elf_backend_size_dynamic_sections): Likewise.
484 (_bfd_x86_elf_allocate_dynrelocs): Removed.
485 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
486
487 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
488
489 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
490 update comments.
491
492 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
493
494 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
495 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
496
497 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
498
499 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
500 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
501 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
502 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
503 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
504 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
505
506 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
507
508 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
509 (elf_i386_allocate_local_dynrelocs): Likewise.
510 (elf_i386_size_dynamic_sections): Replace
511 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
512 with _bfd_x86_elf_allocate_dynrelocs and
513 _bfd_x86_elf_allocate_local_dynrelocs.
514 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
515 (elf_x86_64_allocate_local_dynrelocs): Likewise.
516 (elf_x86_64_size_dynamic_sections): Replace
517 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
518 with _bfd_x86_elf_allocate_dynrelocs and
519 _bfd_x86_elf_allocate_local_dynrelocs.
520 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
521 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
522 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
523 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
524
525 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
526
527 * elf32-i386.c (is_i386_elf): Removed.
528 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
529 (elf_i386_size_dynamic_sections): Likewise.
530 (elf_i386_relocate_section): Likewise.
531 * elf64-x86-64.c (is_x86_64_elf): Removed.
532 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
533 is_x86_elf.
534 (elf_x86_64_size_dynamic_sections): Likewise.
535 (elf_x86_64_relocate_section): Likewise.
536 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
537 target_id.
538 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
539 (is_x86_elf): New.
540
541 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
542
543 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
544 (elf_i386_allocate_dynrelocs): Replace
545 elf_i386_compute_jump_table_size with
546 elf_x86_compute_jump_table_size.
547 (elf_i386_size_dynamic_sections): Likewise.
548 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
549 (elf_x86_64_allocate_dynrelocs): Replace
550 elf_x86_64_compute_jump_table_size with
551 elf_x86_compute_jump_table_size.
552 (elf_x86_64_size_dynamic_sections): Likewise.
553 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
554 got_entry_size.
555 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
556 (elf_x86_compute_jump_table_size): New.
557
558 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
559
560 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
561 sizeof_reloc.
562 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
563 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
564
565 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
566
567 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
568 with htab->is_vxworks.
569 (elf_i386_size_dynamic_sections): Likewise.
570 (elf_i386_relocate_section): Likewise.
571 (elf_i386_finish_dynamic_symbol): Likewise.
572 (elf_i386_finish_dynamic_sections): Likewise.
573
574 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
575
576 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
577 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
578 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
579 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
580 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
581 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
582 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
583 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
584
585 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
586
587 PR ld/22064
588 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
589 ELF_COMMON_DEF_P for common symbols.
590
591 2017-09-02 Alan Modra <amodra@gmail.com>
592
593 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
594 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
595 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
596
597 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
598
599 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
600 (elf_backend_gc_mark_hook): Likewise.
601 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
602 (elf_backend_gc_mark_hook): Likewise.
603 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
604 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
605 (elf_backend_gc_mark_hook): Likewise.
606
607 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
608
609 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
610 (elf_backend_adjust_dynamic_symbol): Likewise.
611 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
612 (elf_backend_adjust_dynamic_symbol): Likewise.
613 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
614 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
615 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
616 (_bfd_x86_elf_adjust_dynamic_symbol): New.
617 (elf_backend_adjust_dynamic_symbol): Likewise.
618
619 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
620
621 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
622 comments.
623
624 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
625
626 * elf32-i386.c (elf_i386_mkobject): Removed.
627 (bfd_elf32_mkobject): Likewise.
628 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
629 (bfd_elf64_mkobject): Likewise.
630 (bfd_elf32_mkobject): Likewise.
631 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
632 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
633 (bfd_elf64_mkobject): Likewise.
634 (bfd_elf32_mkobject): Likewise.
635
636 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
637
638 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
639 Call _bfd_x86_elf_link_setup_gnu_properties.
640 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
641 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
642 entries.
643 (elf_x86_64_non_lazy_plt): Likewise.
644 (elf_x86_64_lazy_bnd_plt): Likewise.
645 (elf_x86_64_non_lazy_bnd_plt): Likewise.
646 (elf_x86_64_lazy_ibt_plt): Likewise.
647 (elf_x32_lazy_ibt_plt): Likewise.
648 (elf_x86_64_non_lazy_ibt_plt): Likewise.
649 (elf_x32_non_lazy_ibt_plt): Likewise.
650 (elf_x86_64_nacl_plt): Likewise.
651 (elf_x86_64_link_setup_gnu_properties): Updated. Call
652 _bfd_x86_elf_link_setup_gnu_properties.
653 * elfxx-x86.c: Include elf-vxworks.h".
654 (_bfd_x86_elf_link_setup_gnu_properties): New function.
655 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
656 comments for pic_plt0_entry and pic_plt_entry.
657 (elf_x86_non_lazy_plt_layout): Likewise.
658 (elf_x86_plt_layout_table): New.
659 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
660
661 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
662
663 PR ld/22061
664 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
665 .eh_frame section for the second PLT.
666 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
667 alignment of .eh_frame section for the second PLT.
668
669 2017-09-01 Nick Clifton <nickc@redhat.com>
670
671 PR 22059
672 * dwarf2.c (decode_line_info): Fix test for an overlong line info
673 structure.
674
675 2017-09-01 Nick Clifton <nickc@redhat.com>
676
677 PR 22058
678 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
679 attribute buffer is NUL terminated.
680
681 2017-08-31 Nick Clifton <nickc@redhat.com>
682
683 PR 22047
684 * dwarf2.c (read_section): If necessary add a terminating NUL byte
685 to dwarf string sections.
686
687 2017-08-31 Alan Modra <amodra@gmail.com>
688
689 * po/SRC-POTFILES.in: Regenerate.
690
691 2017-08-31 Alan Modra <amodra@gmail.com>
692
693 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
694 for a section containing just a terminator. Allow multiple
695 terminators at end of section.
696 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
697 sections when not adding alignment. Assert on terminator in
698 the middle of FDEs.
699
700 2017-08-31 Alan Modra <amodra@gmail.com>
701
702 PR 21441
703 PR 22048
704 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
705 terminators.
706
707 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
708
709 * configure.ac (bfd_backends): Add elf64.lo together with
710 elfxx-x86.lo for 64-bit BFD.
711 * configure: Regenerated.
712
713 2017-08-31 James Bowman <james.bowman@ftdichip.com>
714
715 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
716 for R_FT32_18.
717
718 2017-08-31 Alan Modra <amodra@gmail.com>
719
720 PR binutils/22032
721 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
722 before _close_and_cleanup. Call iovec->bclose after.
723 (bfd_close): Remove code common to, and call, bfd_close_all_done.
724
725 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
726
727 * elf32-i386.c (elf_i386_plt_type): Removed.
728 (elf_i386_plt): Likewise.
729 (elf_i386_get_synthetic_symtab): Updated. Call
730 _bfd_x86_elf_get_synthetic_symtab.
731 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
732 (elf_x86_64_plt): Likewise.
733 (elf_x86_64_get_synthetic_symtab): Updated. Call
734 _bfd_x86_elf_get_synthetic_symtab.
735 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
736 (elf_x86_64_get_plt_got_vma): Likewise.
737 (elf_i386_valid_plt_reloc_p): Likewise.
738 (elf_x86_64_valid_plt_reloc_p): Likewise.
739 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
740 * elfxx-x86.h (elf_x86_plt_type): New.
741 (elf_x86_plt): Likewise.
742 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
743
744 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
745
746 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
747 target_id instead of elf_machine_code.
748
749 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
750
751 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
752 (elf_i386_lazy_plt_layout): Likewise.
753 (elf_i386_non_lazy_plt_layout): Likewise.
754 (elf_i386_plt_layout): Likewise.
755 (elf_i386_link_hash_table): Likewise.
756 (elf_i386_next_tls_desc_index): Likewise.
757 (elf_i386_srelplt2): Likewise.
758 (elf_i386_plt): Likewise.
759 (elf_i386_lazy_plt): Likewise.
760 (elf_i386_non_lazy_plt): Likewise.
761 (elf_i386_link_hash_table_create): Likewise.
762 (bfd_elf32_bfd_link_hash_table_create): Likewise.
763 (elf_i386_lazy_plt): Updated.
764 (elf_i386_non_lazy_plt): Likewise.
765 (elf_i386_lazy_ibt_plt): Likewise.
766 (elf_i386_non_lazy_ibt_plt): Likewise.
767 (elf_i386_allocate_dynrelocs): Likewise.
768 (elf_i386_size_dynamic_sections): Likewise.
769 (elf_i386_relocate_section): Likewise.
770 (elf_i386_finish_dynamic_symbol): Likewise.
771 (elf_i386_finish_dynamic_sections): Likewise.
772 (elf_i386_get_synthetic_symtab): Likewise.
773 (elf_i386_link_setup_gnu_properties): Likewise.
774 (elf_i386_nacl_plt): Likewise.
775 * elf64-x86-64.c (ABI_64_P): Removed.
776 (ELF64_DYNAMIC_INTERPRETER): Likewise.
777 (ELF32_DYNAMIC_INTERPRETER): Likewise.
778 (elf_x86_64_lazy_plt_layout): Likewise.
779 (elf_x86_64_non_lazy_plt_layout): Likewise.
780 (elf_x86_64_plt_layout): Likewise.
781 (elf_x86_64_link_hash_table): Likewise.
782 (elf_x86_64_plt): Likewise.
783 (elf_x86_64_lazy_plt): Likewise.
784 (elf_x86_64_non_lazy_plt): Likewise.
785 (elf_x86_64_link_hash_table_create): Likewise.
786 (bfd_elf64_bfd_link_hash_table_create): Likewise.
787 (bfd_elf32_bfd_link_hash_table_create): Likewise.
788 (elf_x86_64_lazy_plt): Updated.
789 (elf_x86_64_non_lazy_plt): Likewise.
790 (elf_x86_64_lazy_bnd_plt): Likewise.
791 (elf_x86_64_non_lazy_bnd_plt): Likewise.
792 (elf_x86_64_lazy_ibt_plt): Likewise.
793 (elf_x32_lazy_ibt_plt): Likewise.
794 (elf_x86_64_non_lazy_ibt_plt): Likewise.
795 (elf_x32_non_lazy_ibt_plt): Likewise.
796 (elf_x86_64_allocate_dynrelocs): Likewise.
797 (elf_x86_64_size_dynamic_sections): Likewise.
798 (elf_x86_64_relocate_section): Likewise.
799 (elf_x86_64_finish_dynamic_symbol): Likewise.
800 (elf_x86_64_finish_dynamic_sections): Likewise.
801 (elf_x86_64_get_synthetic_symtab): Likewise.
802 (elf_x86_64_link_setup_gnu_properties): Likewise.
803 (elf_x86_64_nacl_plt): Likewise.
804 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
805 "elf/x86-64.h".
806 (ELF32_DYNAMIC_INTERPRETER): New.
807 (ELF64_DYNAMIC_INTERPRETER): Likewise.
808 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
809 (_bfd_x86_elf_link_hash_table_create): Likewise.
810 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
811 (elf_x86_link_hash_table_free): This. Make it static.
812 * elfxx-x86.h: Don't include "objalloc.h".
813 (ABI_64_P): New.
814 (elf_x86_lazy_plt_layout): Likewise.
815 (elf_x86_non_lazy_plt_layout): Likewise.
816 (elf_x86_plt_layout): Likewise.
817 (_bfd_x86_elf_link_hash_table_create): Likewise.
818 (bfd_elf64_bfd_link_hash_table_create): Likewise.
819 (bfd_elf32_bfd_link_hash_table_create): Likewise.
820 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
821 srelplt2 and next_tls_desc_index.
822 (_bfd_x86_elf_link_hash_table_free): Removed.
823
824 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
825
826 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
827 branch offset interpretation.
828
829 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
830
831 PR binutils/22032
832 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
833
834 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
835
836 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
837 (elf_x86_64_srelplt2): Likewise.
838
839 2017-08-30 Alan Modra <amodra@gmail.com>
840
841 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
842 (ppc64_elf_tls_optimize): Set it.
843 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
844 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
845 addis would add zero.
846 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
847 (ppc_elf_tls_optimize): Set it.
848 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
849 insn on TPREL16_LO relocs to use r2 when addis would add zero.
850
851 2017-08-30 Alan Modra <amodra@gmail.com>
852
853 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
854 __tls_get_addr call sequences to LE, don't move the addi down
855 to the nop. Replace the bl with addi and leave the nop alone.
856
857 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
858
859 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
860 Re-indent.
861 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
862 Likewise.
863 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
864
865 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
866
867 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
868 (BFD64_BACKENDS): Likewise.
869 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
870 (BFD64_BACKENDS_CFILES): Likewise.
871 * Makefile.in: Regenerated.
872 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
873 elf32-i386.lo and elf64-x86-64.lo.
874 * configure: Regenerated.
875 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
876 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
877 "objalloc.h" and "hashtab.h".
878 (ELIMINATE_COPY_RELOCS): Removed.
879 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
880 (SYMBOL_NO_COPYRELOC): Likewise.
881 (elf_i386_link_hash_entry): Likewise.
882 (GOT_UNKNOWN): Likewise.
883 (GOT_NORMAL): Likewise.
884 (GOT_TLS_GD): Likewise.
885 (elf_i386_hash_entry): Likewise.
886 (elf_i386_obj_tdata): Likewise.
887 (elf_i386_tdata): Likewise.
888 (elf_i386_local_got_tls_type): Likewise.
889 (elf_i386_local_tlsdesc_gotent): Likewise.
890 (elf_i386_hash_table): Likewise.
891 (elf_i386_link_hash_newfunc): Likewise.
892 (elf_i386_local_htab_hash): Likewise.
893 (elf_i386_local_htab_eq): Likewise.
894 (elf_i386_get_local_sym_hash): Likewise.
895 (elf_i386_link_hash_table_free): Likewise.
896 (elf_i386_copy_indirect_symbol): Likewise.
897 (elf_i386_fixup_symbol): Likewise.
898 (elf_i386_readonly_dynrelocs): Likewise.
899 (elf_i386_always_size_sections): Likewise.
900 (elf_i386_set_tls_module_base): Likewise.
901 (elf_i386_dtpoff_base): Likewise.
902 (compare_relocs): Likewise.
903 (elf_i386_hash_symbol): Likewise.
904 (elf_i386_parse_gnu_properties): Likewise.
905 (elf_i386_merge_gnu_properties): Likewise.
906 (elf_i386_link_check_relocs): Likewise.
907 (elf_i386_merge_symbol_attribute): Likewise.
908 (bfd_elf32_bfd_link_check_relocs): Likewise.
909 (elf_backend_copy_indirect_symbol): Likewise.
910 (elf_backend_always_size_sections): Likewise.
911 (elf_backend_omit_section_dynsym): Likewise.
912 (elf_backend_hash_symbol): Likewise.
913 (elf_backend_fixup_symbol): Likewise.
914 (elf_backend_parse_gnu_properties): Likewise.
915 (elf_backend_merge_gnu_properties): Likewise.
916 (elf_backend_merge_symbol_attribute): Likewise.
917 (elf_i386_mkobject): Updated.
918 (elf_i386_link_hash_table_create): Likewise.
919 (elf_i386_check_tls_transition): Likewise.
920 (elf_i386_tls_transition): Likewise.
921 (elf_i386_convert_load_reloc): Likewise.
922 (elf_i386_check_relocs): Likewise.
923 (elf_i386_adjust_dynamic_symbol): Likewise.
924 (elf_i386_allocate_dynrelocs): Likewise.
925 (elf_i386_convert_load): Likewise.
926 (elf_i386_size_dynamic_sections): Likewise.
927 (elf_i386_relocate_section): Likewise.
928 (elf_i386_finish_dynamic_symbol ): Likewise.
929 (elf_i386_finish_dynamic_sections): Likewise.
930 (elf_i386_output_arch_local_syms): Likewise.
931 (elf_i386_get_synthetic_symtab): Likewise.
932 (elf_i386_link_setup_gnu_properties): Likewise.
933 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
934 of elf_link_hash_table, as base.
935 (elf_i386_next_tls_desc_index): New.
936 (elf_i386_srelplt2): Likewise.
937 (elf_i386_plt): Likewise.
938 (elf_i386_lazy_plt): Likewise.
939 (elf_i386_non_lazy_plt): Likewise.
940 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
941 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
942 "objalloc.h" and "hashtab.h".
943 (ELIMINATE_COPY_RELOCS): Removed.
944 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
945 (SYMBOL_NO_COPYRELOC): Likewise.
946 (elf_x86_64_link_hash_entry): Likewise.
947 (GOT_UNKNOWN): Likewise.
948 (GOT_NORMAL): Likewise.
949 (GOT_TLS_GD): Likewise.
950 (elf_x86_64_hash_entry): Likewise.
951 (elf_x86_64_obj_tdata): Likewise.
952 (elf_x86_64_tdata): Likewise.
953 (elf_x86_64_local_got_tls_type): Likewise.
954 (elf_x86_64_local_tlsdesc_gotent): Likewise.
955 (elf_x86_64_hash_table): Likewise.
956 (elf_x86_64_link_hash_newfunc): Likewise.
957 (elf_x86_64_local_htab_hash): Likewise.
958 (elf_x86_64_local_htab_eq): Likewise.
959 (elf_x86_64_get_local_sym_hash): Likewise.
960 (elf_x86_64_link_hash_table_free): Likewise.
961 (elf_x86_64_copy_indirect_symbol): Likewise.
962 (elf_x86_64_fixup_symbol): Likewise.
963 (elf_x86_64_readonly_dynrelocs): Likewise.
964 (elf_x86_64_always_size_sections): Likewise.
965 (elf_x86_64_set_tls_module_base): Likewise.
966 (elf_x86_64_dtpoff_base): Likewise.
967 (compare_relocs): Likewise.
968 (elf_x86_64_merge_symbol_attribute): Likewise.
969 (elf_x86_64_hash_symbol): Likewise.
970 (elf_x86_64_parse_gnu_properties): Likewise.
971 (elf_x86_64_merge_gnu_properties): Likewise.
972 (elf_x86_64_link_check_relocs): Likewise.
973 (elf_backend_copy_indirect_symbol): Likewise.
974 (elf_backend_always_size_sections): Likewise.
975 (bfd_elf64_bfd_link_check_relocs): Likewise.
976 (elf_backend_merge_symbol_attribute): Likewise.
977 (elf_backend_hash_symbol): Likewise.
978 (elf_backend_omit_section_dynsym): Likewise.
979 (elf_backend_fixup_symbol): Likewise.
980 (elf_backend_parse_gnu_properties): Likewise.
981 (elf_backend_merge_gnu_properties): Likewise.
982 (bfd_elf32_bfd_link_check_relocs): Likewise.
983 (elf_x86_64_mkobject): Updated.
984 (elf_x86_64_link_hash_table_create): Likewise.
985 (elf_x86_64_check_tls_transition): Likewise.
986 (elf_x86_64_tls_transition): Likewise.
987 (elf_x86_64_convert_load_reloc): Likewise.
988 (elf_x86_64_check_relocs): Likewise.
989 (elf_x86_64_adjust_dynamic_symbol): Likewise.
990 (elf_x86_64_allocate_dynrelocs): Likewise.
991 (elf_x86_64_convert_load): Likewise.
992 (elf_x86_64_size_dynamic_sections): Likewise.
993 (elf_x86_64_relocate_section): Likewise.
994 (elf_x86_64_finish_dynamic_symbol ): Likewise.
995 (elf_x86_64_finish_dynamic_sections): Likewise.
996 (elf_x86_64_output_arch_local_syms): Likewise.
997 (elf_x86_64_get_synthetic_symtab): Likewise.
998 (elf_x86_64_link_setup_gnu_properties): Likewise.
999 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1000 instead of elf_link_hash_table, as base.
1001 (elf_x86_64_next_tls_desc_index): New.
1002 (elf_x86_64_srelplt2): Likewise.
1003 (elf_x86_64_plt): Likewise.
1004 (elf_x86_64_lazy_plt): Likewise.
1005 (elf_x86_64_non_lazy_plt): Likewise.
1006 * elfxx-x86.c: New file.
1007 * elfxx-x86.h: Likewise.
1008
1009 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1010
1011 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1012 return.
1013 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1014
1015 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1016
1017 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1018 sections before checking dynamic relocations and free invalid
1019 PLT section contents.
1020 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1021
1022 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1023
1024 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1025 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1026
1027 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1028
1029 PR binutils/22018
1030 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1031 PLT section size.
1032 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1033
1034 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1035
1036 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1037 def_protected.
1038 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1039
1040 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1041
1042 PR ld/21997
1043 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1044 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1045 Add a has_no_copy_on_protected bitfield.
1046 (elf_has_no_copy_on_protected): New.
1047 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1048 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1049 (elf_merge_gnu_property_list): Likewise.
1050 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1051 to FALSE for elf_has_no_copy_on_protected.
1052 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1053 (elf_i386_link_hash_entry): Add def_protected.
1054 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1055 when checking info->nocopyreloc.
1056 (elf_i386_link_setup_gnu_properties): Don't set
1057 extern_protected_data here.
1058 (elf_i386_merge_symbol_attribute): New function.
1059 (elf_backend_merge_symbol_attribute): New.
1060 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1061 (elf_x86_64_link_hash_entry): Add def_protected.
1062 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1063 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1064 when checking info->nocopyreloc.
1065 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1066 relocation run-time overflow and unresolvable R_X86_64_32S
1067 relocation against protected data symbol defined in shared object
1068 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1069 (elf_x86_64_link_setup_gnu_properties): Don't set
1070 extern_protected_data here.
1071 (elf_x86_64_merge_symbol_attribute): New function.
1072 (elf_backend_merge_symbol_attribute): New.
1073
1074 2017-08-26 Alan Modra <amodra@gmail.com>
1075
1076 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1077 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1078 (ppc_elf_relocate_section): Comment fix.
1079 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1080 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1081 Support dynamic relocs for TPREL16 when non-pic too.
1082 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1083 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1084 when non-pic too.
1085
1086 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1087
1088 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1089 "symbol" in comments.
1090 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1091
1092 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1093
1094 PR ld/22001
1095 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1096 R_X86_64_PC32 relocation run-time overflow and unresolvable
1097 R_X86_64_32S relocation with -z nocopyreloc.
1098
1099 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1100
1101 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1102 Undefined symbols may not have a type.
1103 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1104
1105 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1106
1107 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1108 bfd_link_info. Report shared, PIE or PDE object based on
1109 bfd_link_info.
1110 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1111 (elf_x86_64_relocate_section): Likewise.
1112
1113 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1114
1115 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1116 for function symbols.
1117 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1118
1119 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1120
1121 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1122 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1123 is set on any input relocatable file.
1124 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1125
1126 2017-08-23 Alan Modra <amodra@gmail.com>
1127
1128 PR 21988
1129 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1130 ensure_undefweak_dynamic. Handle undefined too.
1131 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1132 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1133 (allocate_dynrelocs): Discard undefined non-default visibility
1134 relocs first. Make undefined syms dynamic. Tidy goto.
1135
1136 2017-08-21 Alan Modra <amodra@gmail.com>
1137 H.J. Lu <hongjiu.lu@intel.com>
1138
1139 PR ld/21964
1140 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1141 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1142
1143 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1144
1145 PR ld/20125
1146 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1147 undefined weak symbols.
1148
1149 2017-08-18 Nick Clifton <nickc@redhat.com>
1150
1151 PR binutils/21962
1152 * tekhex.c (getsym): Fix check for source pointer walking off the
1153 end of the input buffer.
1154
1155 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1156
1157 PR ld/18808
1158 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1159 relocations in debug sections, change abort to _bfd_error_handler.
1160
1161 2017-08-14 Nick Clifton <nickc@redhat.com>
1162
1163 PR 21957
1164 * elf.c (setup_group): Check for an empty or very small group
1165 section.
1166 * po/bfd.pot: Regenerate.
1167
1168 2017-08-14 Alan Modra <amodra@gmail.com>
1169
1170 PR 21441
1171 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1172 alignment padding here.
1173 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1174 in a reverse pass over sections.
1175
1176 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1177
1178 PR binutils/21943
1179 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1180 for @plt suffixes first.
1181 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1182
1183 2017-08-08 Nick Clifton <nickc@redhat.com>
1184
1185 PR 21916
1186 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1187 small section lengths.
1188 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1189 table.
1190 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1191 there is enough data present in the note.
1192
1193 2017-08-08 Alan Modra <amodra@gmail.com>
1194
1195 PR 21017
1196 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1197 got.refcount for GOTOFF relocs, just create .got section.
1198
1199 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1200
1201 * elflink.c (elf_link_add_object_symbols): Move common symbol
1202 check after bed->common_definition.
1203
1204 2017-08-07 Alan Modra <amodra@gmail.com>
1205
1206 PR 21910
1207 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1208 needed to define various dynamic tags have been discarded.
1209
1210 2017-08-07 Nick Clifton <nickc@redhat.com>
1211
1212 PR 21884
1213 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1214 has not been set then use the bfd returned by
1215 _bfd_elf_link_setup_gnu_properties. If that is null then search
1216 through all the input bfds selecting the first normal, ELF format
1217 one.
1218 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1219
1220 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1221
1222 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1223 to 1 bit.
1224 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1225 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1226 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1227 (elf_i386_link_check_relocs): New function.
1228 (bfd_elf32_bfd_link_check_relocs): New.
1229 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1230 to 1 bit.
1231 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1232 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1233 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1234 (elf_x86_64_link_check_relocs): New function.
1235 (bfd_elf64_bfd_link_check_relocs): New.
1236 (bfd_elf32_bfd_link_check_relocs): Likewise.
1237
1238 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1239
1240 PR ld/21903:
1241 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1242 as undefined for --no-define-common.
1243
1244 2017-08-05 Alan Modra <amodra@gmail.com>
1245
1246 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1247 hppa_link_hash_table.
1248
1249 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1250
1251 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1252 entries for sysregs with negative indices.
1253
1254 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1255
1256 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1257 isn't the S/390 specific elf data.
1258 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1259
1260 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1261
1262 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1263 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1264 [R_RISCV_ADD16]: Likewise.
1265 [R_RISCV_ADD32]: Likewise.
1266 [R_RISCV_ADD64]: Likewise.
1267 [R_RISCV_SUB6]: Likewise.
1268 [R_RISCV_SUB8]: Likewise.
1269 [R_RISCV_SUB16]: Likewise.
1270 [R_RISCV_SUB32]: Likewise.
1271 [R_RISCV_SUB64]: Likewise.
1272
1273 2017-07-31 Alan Modra <amodra@gmail.com>
1274
1275 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1276 without ld.so checks.
1277
1278 2017-07-29 Alan Modra <amodra@gmail.com>
1279
1280 PR 21847
1281 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1282 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1283 (is_elfv2_localentry0): Test non_zero_localentry.
1284 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1285
1286 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1287
1288 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1289 pointer check for htab->elf.irelplt.
1290 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1291
1292 2017-07-27 Nick Clifton <nickc@redhat.com>
1293
1294 PR 21840
1295 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1296 size is -1.
1297 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1298 with error return.
1299 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1300 are NULL.
1301 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1302 of end pointer.
1303 (evax_bfd_print_emh): Check for invalid string lengths.
1304
1305 2017-07-25 Nick Clifton <nickc@redhat.com>
1306
1307 * po/fr.po: Updated French translation.
1308
1309 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1310
1311 PR 21824
1312 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1313 16-bit absolute branches into 10-bit pc-relative branches on the
1314 MSP430 as well as the MSP430X.
1315
1316 2017-07-25 Alan Modra <amodra@gmail.com>
1317
1318 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1319 (stub_eh_frame_size): New function.
1320 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1321 (group_sections): Init group tls_get_addr_opt_bctrl.
1322 (ppc64_elf_size_stubs): Update sizing and initialization of
1323 .eh_frame. Iteration over stubs via group list.
1324 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1325 (ppc64_elf_finish_dynamic_sections): Update finalization of
1326 .eh_frame.
1327
1328 2017-07-24 Nick Clifton <nickc@redhat.com>
1329
1330 PR 21813
1331 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1332 of the relocs to the canonicalize_one_reloc routine.
1333 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1334 for the _bfd_mach_o_canonicalize_one_reloc field.
1335 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1336 res_base parameter. Use to check for corrupt pair relocs.
1337 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1338 Likewise.
1339 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1340 Likewise.
1341 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1342 Likewise.
1343
1344 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1345 enough data in the record before attempting to parse it.
1346 (_bfd_vms_slurp_eeom): Likewise.
1347
1348 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1349 (image_set_ptr): Likewise.
1350 (alpha_vms_slurp_relocs): Likewise.
1351
1352 (alpha_vms_object_p): Check for a truncated record.
1353
1354 2017-07-24 Nick Clifton <nickc@redhat.com>
1355
1356 PR 21803
1357 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1358 an unrecognized reloc and sets the bfd_error value.
1359 * libbfd.h: Regenerate.
1360 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1361 function.
1362 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1363 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1364 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1365 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1366 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1367
1368 2017-07-23 Alan Modra <amodra@gmail.com>
1369
1370 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1371 restore of LR.
1372
1373 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1374
1375 PR ld/18841
1376 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1377 reloc_class_ifunc for ifunc symbols.
1378
1379 2017-07-19 Nick Clifton <nickc@redhat.com>
1380
1381 PR 21787
1382 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1383 correct magic bytes at the start, set the error to wrong format
1384 and clear the format selector before returning NULL.
1385
1386 2017-07-19 Nick Clifton <nickc@redhat.com>
1387
1388 PR 21786
1389 * coff-rs6000.c (_bfd_strntol): New function.
1390 (_bfd_strntoll): New function.
1391 (GET_VALUE_IN_FIELD): New macro.
1392 (EQ_VALUE_IN_FIELD): new macro.
1393 (_bfd_xcoff_slurp_armap): Use new macros.
1394 (_bfd_xcoff_archive_p): Likewise.
1395 (_bfd_xcoff_read_ar_hdr): Likewise.
1396 (_bfd_xcoff_openr_next_archived_file): Likewise.
1397 (_bfd_xcoff_stat_arch_elt): Likewise.
1398 * coff64-rs6000.c (_bfd_strntol): New function.
1399 (_bfd_strntoll): New function.
1400 (GET_VALUE_IN_FIELD): New macro.
1401 (xcoff64_slurp_armap): Use new macros.
1402
1403 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1404 John Eric Martin <John.Martin@emmicro-us.com>
1405
1406 * bfd-in2.h: Regenerate.
1407 * libbfd.h: Regenerate.
1408 * elf32-arc.c (JLI): Define.
1409 * reloc.c: Add JLI relocations.
1410
1411 2017-07-18 Nick Clifton <nickc@redhat.com>
1412
1413 PR 21775
1414 * coff-sh.c: Fix spelling typos.
1415 * compress.c: Likewise.
1416 * cpu-pdp11.c: Likewise.
1417 * ecofflink.c: Likewise.
1418 * elf-m10300.c: Likewise.
1419 * elf.c: Likewise.
1420 * elf32-arm.c: Likewise.
1421 * elf32-m68k.c: Likewise.
1422 * elf32-nds32.c: Likewise.
1423 * elf32-ppc.c: Likewise.
1424 * elf32-sh.c: Likewise.
1425 * elf32-v850.c: Likewise.
1426 * elf64-ppc.c: Likewise.
1427 * elf64-x86-64.c: Likewise.
1428 * elflink.c: Likewise.
1429 * elfnn-aarch64.c: Likewise.
1430 * elfxx-mips.c: Likewise.
1431 * som.c: Likewise.
1432 * sunos.c: Likewise.
1433 * vms-alpha.c: Likewise.
1434 * xcofflink.c: Likewise.
1435
1436 2017-07-18 Nick Clifton <nickc@redhat.com>
1437
1438 PR binutils/21781
1439 * coffcode.h (handle_COMDAT): Replace abort with an error message
1440 and return.
1441
1442 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1443
1444 PR ld/21782
1445 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1446 to shared library.
1447
1448 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1449
1450 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1451
1452 2017-07-16 Alan Modra <amodra@gmail.com>
1453
1454 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1455 __tls_index GOT entries when using __tls_get_addr_opt stub.
1456 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1457
1458 2017-07-12 Alan Modra <amodra@gmail.com>
1459
1460 * po/es.po: Update from translationproject.org/latest/bfd/.
1461 * po/fi.po: Likewise.
1462 * po/fr.po: Likewise.
1463 * po/id.po: Likewise.
1464 * po/ja.po: Likewise.
1465 * po/ro.po: Likewise.
1466 * po/ru.po: Likewise.
1467 * po/sr.po: Likewise.
1468 * po/sv.po: Likewise.
1469 * po/tr.po: Likewise.
1470 * po/uk.po: Likewise.
1471 * po/vi.po: Likewise.
1472 * po/zh_CN.po: Likewise.
1473 * po/hr.po: New file from translationproject.org.
1474 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1475 * configure: Regenerate.
1476
1477 2017-07-12 Nick Clifton <nickc@redhat.com>
1478
1479 Fix compile time warnings using gcc 7.1.1.
1480 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1481 plt_name buffer.
1482 (elf_xtensa_get_gotplt_section): Increase length of got_name
1483 buffer.
1484 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1485 default return of FALSE.
1486 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1487 default return of FALSE.
1488
1489 2017-07-12 Alan Modra <amodra@gmail.com>
1490
1491 * binary.c (binary_set_section_contents): Don't print filepos in
1492 error message.
1493 (coff_write_object_contents): Cast size_t for error message.
1494 (coff_slurp_line_table): Don't use bfd_vma symndx.
1495 (coff_slurp_reloc_table): Remove unneeded cast.
1496 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1497 error message.
1498 (find_abstract_instance_name): Likewise.
1499 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1500 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1501 (elf32_arm_check_relocs): Make r_symndx an int.
1502 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1503 format string.
1504 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1505 message arg.
1506 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1507 error message.
1508 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1509 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1510 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1511 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1512 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1513 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1514 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1515 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1516 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1517 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1518 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1519 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1520 and use %lu for error message.
1521 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1522 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1523 error message.
1524
1525 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1526 in error message.
1527 (elf32_arm_final_link_relocate): Likewise.
1528 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1529 * coffcode.h (styp_to_sec_flags): Likewise.
1530 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1531 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1532 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1533 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1534 (elf32_bfin_merge_private_bfd_data): Likewise.
1535 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1536 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1537 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1538 (i370_elf_relocate_section): Likewise.
1539 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1540 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1541 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1542 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1543 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1544 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1545 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1546 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1547 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1548 * ieee.c (ieee_write_id, read_id): Likewise.
1549 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1550 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1551 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1552 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1553 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1554 * stabs.c (_bfd_link_section_stabs): Likewise.
1555
1556 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1557 format.
1558 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1559 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1560 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1561 * coff-sh.c (sh_relax_section): Likewise.
1562 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1563 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1564 * coffcode.h (coff_slurp_reloc_table): Likewise.
1565 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1566 (_bfd_coff_read_string_table): Likewise.
1567 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1568 * compress.c (bfd_get_full_section_contents): Likewise.
1569 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1570 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1571 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1572 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1573 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1574 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1575 (elf32_arm_write_section): Likewise.
1576 * elf32-bfin.c (bfin_relocate_section): Likewise.
1577 (bfinfdpic_relocate_section): Likewise.
1578 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1579 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1580 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1581 (elf_i386_relocate_section): Likewise.
1582 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1583 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1584 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1585 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1586 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1587 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1588 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1589 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1590 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1591 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1592 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1593 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1594 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1595 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1596 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1597 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1598 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1599 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1600 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1601 * elf32-sh.c (sh_elf_relax_section): Likewise.
1602 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1603 (sh_elf_relocate_section): Likewise.
1604 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1605 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1606 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1607 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1608 * elf32-v850.c (v850_elf_relax_section): Likewise.
1609 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1610 (elf_vax_relocate_section): Likewise.
1611 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1612 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1613 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1614 (do_fix_for_relocatable_link): Likewise.
1615 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1616 (elf64_alpha_relax_with_lituse): Likewise.
1617 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1618 (elf_hppa_final_link_relocate): Likewise.
1619 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1620 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1621 (elf64_vms_link_add_object_symbols): Likewise.
1622 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1623 (mmix_final_link_relocate): Likewise.
1624 * elf64-s390.c (invalid_tls_insn): Likewise.
1625 (elf_s390_relocate_section): Likewise.
1626 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1627 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1628 (elf_x86_64_relocate_section): Likewise.
1629 * elfcode.h (elf_slurp_symbol_table): Likewise.
1630 * elfcore.h (elf_core_file_p): Likewise.
1631 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1632 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1633 (elfNN_aarch64_relocate_section): Likewise.
1634 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1635 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1636 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1637 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1638 (_bfd_mips_elf_relocate_section): Likewise.
1639 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1640 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1641 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1642 * ieee.c (ieee_slurp_external_symbols): Likewise.
1643 * ihex.c (ihex_write_object_content): Likewise.
1644 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1645 * merge.c (_bfd_merged_section_offset): Likewise.
1646 * mmo.c (mmo_write_loc_chunk): Likewise.
1647 (mmo_write_object_contents): Likewise.
1648 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1649 * stabs.c (_bfd_link_section_stabs): Likewise.
1650 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1651
1652 2017-07-11 Alan Modra <amodra@gmail.com>
1653
1654 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1655
1656 2017-07-11 Alan Modra <amodra@gmail.com>
1657
1658 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1659 instruction" error using _bfd_error_handler, not einfo.
1660
1661 2017-07-10 Nick Clifton <nickc@redhat.com>
1662
1663 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1664 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1665
1666 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1667
1668 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1669
1670 2017-07-07 Alan Modra <amodra@gmail.com>
1671
1672 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1673
1674 2017-07-07 Alan Modra <amodra@gmail.com>
1675
1676 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1677 as long long. Move code replacing "ll" with "I64", and simplify.
1678
1679 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1680
1681 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1682 to 1.
1683
1684 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1685
1686 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1687 xtime.
1688 (line_info_add_file_name): Likewise.
1689 (decode_line_info): Likewise.
1690
1691 2017-07-04 Tristan Gingold <gingold@adacore.com>
1692
1693 * version.m4: Bump version to 2.29.51
1694 * configure: Regenerate.
1695
1696 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1697
1698 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1699 sanity check at the head of this function.
1700
1701 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1702
1703 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1704 dwarf_line_str_size.
1705 (struct attr_abbrev): Add field implicit_const.
1706 (dwarf_debug_sections): Add .debug_line_str.
1707 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1708 (dwarf_debug_section_assert): Add static assertion.
1709 (read_indirect_line_string): New.
1710 (read_abbrevs): Support DW_FORM_implicit_const.
1711 (is_str_attr): Support DW_FORM_line_strp.
1712 (read_attribute_value): Support DW_FORM_line_strp and
1713 DW_FORM_implicit_const.
1714 (read_attribute): Support DW_FORM_implicit_const.
1715 (line_info_add_include_dir, line_info_add_include_dir_stub):
1716 (line_info_add_file_name, read_formatted_entries): New.
1717 (decode_line_info, parse_comp_unit): Support DWARF 5.
1718 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1719
1720 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1721
1722 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1723 abort statement that was put for symbols that are not dynamic.
1724
1725 2017-07-03 Tristan Gingold <gingold@adacore.com>
1726
1727 * po/bfd.pot: Regenerate
1728
1729 2017-07-03 Alan Modra <amodra@gmail.com>
1730
1731 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1732 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1733 * elf.c (setup_group): Use "Lx" to print sh_size.
1734 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1735 unknown section type in hex.
1736 (copy_special_section_fields): Style fix.
1737 (bfd_section_from_shdr): Correct format for sh_link. Use a
1738 common error message for all the variants of unrecognized
1739 section types.
1740 (assign_file_positions_for_load_sections): Use "Lx" for lma
1741 adjust error message.
1742 (assign_file_positions_for_non_load_sections): Formatting.
1743 (rewrite_elf_program_header): Formatting. Use "Lx" for
1744 bfd_vma values in error messages.
1745 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1746 ELF_R_SYM value to type expected by format.
1747 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1748 in error messages.
1749 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1750 (elf_link_input_bfd): Use "Lx" for r_info.
1751 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1752
1753 2017-07-03 Alan Modra <amodra@gmail.com>
1754
1755 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1756 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1757 Microsoft C library variant of long long format specifier.
1758 (PRINT20): Cast value to bfd_uint64_t not long long.
1759 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1760 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1761 long long. Don't cast to bfd_vma.
1762 * elf32-score.c (score3_bfd_getl48): Likewise.
1763 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1764
1765 2017-07-03 Alan Modra <amodra@gmail.com>
1766
1767 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1768 print d_tag.
1769 (bfd_elf_print_symbol): Don't cast symbol->flags.
1770 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1771 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1772 _bfd_error_handler argument order.
1773 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1774
1775 2017-07-03 Alan Modra <amodra@gmail.com>
1776
1777 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1778 AC_TYPE_LONG_DOUBLE.
1779 * configure: Regenerate.
1780 * config.in: Regenerate.
1781
1782 2017-06-29 Andrew Waterman <andrew@sifive.com>
1783
1784 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1785 relocs.
1786
1787 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1788
1789 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1790 unless it is undefined weak.
1791 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1792 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1793 relocation.
1794 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1795 is not dynamic in PIC, abort.
1796
1797 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1798
1799 PR ld/21402
1800 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1801 undefined weak symbols into dynamic.
1802 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1803 relocation for non-dynamic symbols.
1804 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1805
1806 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1807
1808 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1809 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1810 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1811 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1812 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1813 support for them.
1814
1815 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1816
1817 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1818 (elfcore_write_s390_gs_bc): Likewise.
1819 * elf.c (elfcore_grok_s390_gs_cb): New function.
1820 (elfcore_grok_s390_gs_bc): New function.
1821 (elfcore_grok_note): Call them.
1822 (elfcore_write_s390_gs_cb): New function.
1823 (elfcore_write_s390_gs_bc): New function.
1824 (elfcore_write_register_note): Call them.
1825
1826 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1827
1828 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1829 bfd_get_file_size. Check archive element size.
1830 (_bfd_generic_get_section_contents_in_window): Likewise.
1831
1832 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1833
1834 * bfd-in2.h: Regenerated.
1835 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1836 (bfd_get_file_size): Likewise.
1837
1838 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1839 Matthew Fortune <matthew.fortune@imgtec.com>
1840
1841 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1842 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1843 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1844 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1845 case.
1846 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1847 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1848 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1849 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1850 `bfd_mach_mips_interaptiv_mr2' entries.
1851 * bfd-in2.h: Regenerate.
1852
1853 2017-06-27 Nick Clifton <nickc@redhat.com>
1854
1855 * tekhex.c (pass_over): Revert accidental conversion of a local
1856 array to a static array.
1857
1858 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1859
1860 PR ld/13402
1861 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1862 reloc addend if necessary. Adjust diff only if
1863 shrinked_insn_address < end_address.
1864
1865 2017-06-27 Alan Modra <amodra@gmail.com>
1866
1867 PR binutils/21665
1868 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1869 (_bfd_generic_get_section_contents_in_window): Likewise.
1870
1871 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1872
1873 * elfnn-riscv.c (perform_relocation): Support the new
1874 R_RISCV_32_PCREL relocation.
1875 (riscv_elf_relocate_section): Likewise.
1876 * elfxx-riscv.c (howto_table): Likewise.
1877 (riscv_reloc_map): Likewise.
1878 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1879 * libbfd.h: Regenerate.
1880
1881 2017-06-27 Alan Modra <amodra@gmail.com>
1882
1883 PR binutils/21665
1884 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1885 Use unsigned file pointer type, and remove cast.
1886 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1887 Add "count", not "sz".
1888
1889 2017-06-26 Pedro Alves <palves@redhat.com>
1890
1891 PR binutils/21665
1892 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1893 "sz".
1894
1895 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1896
1897 PR binutils/21665
1898 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1899 a missing line.
1900
1901 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1902
1903 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1904 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1905 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1906 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1907 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1908
1909 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1910
1911 PR binutils/21665
1912 * compress.c (bfd_get_full_section_contents): Don't check the
1913 file size here.
1914 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1915 reject a section whose size + offset is greater than the size
1916 of the entire file.
1917 (_bfd_generic_get_section_contents_in_window): Likewise.
1918
1919 2017-06-26 Nick Clifton <nickc@redhat.com>
1920
1921 PR binutils/21670
1922 * tekhex.c (getvalue): Check for the source pointer exceeding the
1923 end pointer before the first byte is read.
1924
1925 2017-06-26 Nick Clifton <nickc@redhat.com>
1926
1927 PR binutils/21665
1928 * opncls.c (get_build_id): Check that the section is big enough
1929 to contain the whole note.
1930 * compress.c (bfd_get_full_section_contents): Check for and reject
1931 a section whose size is greater than the size of the entire file.
1932 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1933 contain a notes section.
1934
1935 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1936
1937 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1938 pointer checks.
1939 (elf_s390_modify_segment_map): Likewise.
1940 (bfd_elf_s390_set_options): Lisewise.
1941
1942 2017-06-26 Alan Modra <amodra@gmail.com>
1943
1944 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1945 a --just-syms bfd.
1946 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1947 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1948 .preinit_array on --just-syms bfds.
1949 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1950 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1951 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1952
1953 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1954
1955 * elf.c (find_link): Bounds check "hint".
1956
1957 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1958
1959 * elf32-arm.c (using_thumb_only): Update list of architectures in
1960 BFD_ASSERT for which the logic is valid.
1961 (using_thumb2_bl): Likewise.
1962 (using_thumb2): Likewise and return true for ARMv8-R.
1963 (arch_has_arm_nop): Likewise.
1964 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1965 merging logic. Update commentis for value 15 of v8m_baseline,
1966 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1967 merging of value 15 of Tag_CPU_arch.
1968
1969 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1970
1971 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1972 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1973 * bfd-in2.h: Regenerate.
1974
1975 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1976
1977 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1978 the error_alignment label forward. Properly align program
1979 property note section.
1980
1981 2017-06-22 Eric Christopher <echristo@gmail.com>
1982
1983 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1984 abs to fix a truncation warning.
1985
1986 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1987
1988 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1989 local undefined weak symbol to 0.
1990 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1991
1992 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1993
1994 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1995 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1996 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1997 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1998 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1999 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2000 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2001 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2002
2003 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2004
2005 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2006 (elf_i386_lazy_ibt_plt_entry): Likewise.
2007 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2008 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2009 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2010 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2011 (elf_i386_lazy_plt_layout): Likewise.
2012 (elf_i386_non_lazy_plt_layout): Likewise.
2013 (elf_i386_link_hash_entry): Add plt_second.
2014 (elf_i386_link_hash_table): Add plt_second and
2015 plt_second_eh_frame.
2016 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2017 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2018 the second PLT. Check the second PLT.
2019 (elf_i386_relocate_section): Use the second PLT to resolve
2020 PLT reference if needed.
2021 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2022 needed.
2023 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2024 second PLT. Generate unwind info for the second PLT.
2025 (elf_i386_plt_type): Add plt_second.
2026 (elf_i386_get_synthetic_symtab): Support the second PLT.
2027 (elf_i386_parse_gnu_properties): Support
2028 GNU_PROPERTY_X86_FEATURE_1_AND.
2029 (elf_i386_merge_gnu_properties): Support
2030 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2031 on GNU_PROPERTY_X86_FEATURE_1_IBT
2032 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2033 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2034 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2035 is set on all relocatable inputs.
2036 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2037 (elf_x32_lazy_ibt_plt_entry): Likewise.
2038 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2039 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2040 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2041 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2042 (elf_x86_64_lazy_ibt_plt): Likewise.
2043 (elf_x32_lazy_ibt_plt): Likewise.
2044 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2045 (elf_x32_non_lazy_ibt_plt): Likewise.
2046 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2047 (elf_x86_64_parse_gnu_properties): Support
2048 GNU_PROPERTY_X86_FEATURE_1_AND.
2049 (elf_x86_64_merge_gnu_properties): Support
2050 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2051 on GNU_PROPERTY_X86_FEATURE_1_IBT
2052 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2053 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2054 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2055 is set on all relocatable inputs.
2056
2057 2017-06-22 Nick Clifton <nickc@redhat.com>
2058
2059 PR binutils/21649
2060 * som.c (setup_sections): NUL terminate the space_strings buffer.
2061 Check that the space.name field does not index beyond the end of
2062 the space_strings buffer.
2063
2064 2017-06-21 Nick Clifton <nickc@redhat.com>
2065
2066 PR binutils/21646
2067 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2068
2069 2017-06-21 Nick Clifton <nickc@redhat.com>
2070
2071 PR binutils/21639
2072 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2073 type of the size parameter.
2074 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2075 length of the counted string.
2076 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2077 (_bfd_vms_save_counted_string): Likewise.
2078 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2079 _bfd_vms_save_counted_string.
2080 (_bfd_vms_slurp_ehdr): Likewise.
2081 (_bfd_vms_slurp_egsd): Likewise.
2082 (Parse_module): Likewise.
2083
2084 2017-06-21 Alan Modra <amodra@gmail.com>
2085
2086 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2087 calls before tocsave calls.
2088 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2089 following nop.
2090
2091 2017-06-21 Nick Clifton <nickc@redhat.com>
2092
2093 PR binutils/21645
2094 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2095 bfd_get_full_section_contents returns no contents.
2096
2097 2017-06-21 Nick Clifton <nickc@redhat.com>
2098
2099 PR binutils/21638
2100 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2101 record.
2102
2103 2017-06-21 Nick Clifton <nickc@redhat.com>
2104
2105 PR binutils/21637
2106 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2107 list.
2108 (image_set_ptr): Likewise.
2109 (alpha_vms_fix_sec_rel): Likewise.
2110 (alpha_vms_slurp_relocs): Likewise.
2111
2112 2017-06-21 Nick Clifton <nickc@redhat.com>
2113
2114 PR binutils/21633
2115 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2116 read_id.
2117 (ieee_archive_p): Likewise.
2118 (ieee_object_p): Likewise.
2119
2120 2017-06-21 Nick Clifton <nickc@redhat.com>
2121
2122 PR binutils/21640
2123 * elf.c (setup_group): Zero the group section pointer list after
2124 allocation so that loops can be caught. Check for NULL pointers
2125 when processing a group list.
2126
2127 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2128
2129 * elf-s390.h: New file.
2130 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2131 field.
2132 (elf_s390_additional_program_headers): New function.
2133 (elf_s390_modify_segment_map): New function.
2134 (bfd_elf_s390_set_options): New function.
2135 (elf_backend_additional_program_headers)
2136 (elf_backend_modify_segment_map): Add macro definitions.
2137
2138 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2139
2140 PR ld/21626
2141 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2142 the DYNAMIC bit instead of bfd_count_sections.
2143
2144 2017-06-19 Nick Clifton <nickc@redhat.com>
2145
2146 PR binutils/21618
2147 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2148 length.
2149 (evax_bfd_print_eeom): Likewise.
2150 (evax_bfd_print_egsd): Check for an overlarge record length.
2151 (evax_bfd_print_etir): Likewise.
2152
2153 2017-06-19 Nick Clifton <nickc@redhat.com>
2154
2155 PR binutils/21612
2156 * libieee.h (struct common_header_type): Add end_p field.
2157 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2158 end_p.
2159 (read_id): Check for a length that exceeds the remaining bytes in
2160 the input buffer.
2161 (ieee_seek): Initialise end_p.
2162 (ieee_archive_p): Likewise.
2163 (ieee_object_p): Likewise.
2164
2165 2017-06-19 Nick Clifton <nickc@redhat.com>
2166
2167 PR binutils/21611
2168 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2169 before reading the EIHS structure entries.
2170
2171 2017-06-19 Nick Clifton <nickc@redhat.com>
2172
2173 PR binutils/21615
2174 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2175 gsd_size. Check that there are enough bytes remaining to read the
2176 type and size of the next egsd. Check that the size of the egsd
2177 does not exceed the size of the record.
2178
2179 2017-06-19 Alan Modra <amodra@gmail.com>
2180
2181 * config.bfd: Correct targ_underscore for cris.
2182
2183 2017-06-18 Alan Modra <amodra@gmail.com>
2184
2185 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2186 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2187
2188 2017-06-16 Nick Clifton <nickc@redhat.com>
2189
2190 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2191 bucketlist is empty because there are no symbols to add to the
2192 list.
2193
2194 2017-06-16 Alan Modra <amodra@gmail.com>
2195
2196 PR ld/20022
2197 PR ld/21557
2198 PR ld/21562
2199 PR ld/21571
2200 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2201 (BFD_JUMP_TABLE_LINK): Likewise.
2202 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2203 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2204 (bfd_elf_define_start_stop): New function.
2205 * linker.c (bfd_generic_define_start_stop): New function.
2206 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2207 new field.
2208 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2209 * aout-target.h (MY_bfd_define_start_stop): Define.
2210 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2211 * binary.c (binary_bfd_define_start_stop): Define.
2212 * bout.c (b_out_bfd_define_start_stop): Define.
2213 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2214 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2215 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2216 * coffcode.h (coff_bfd_define_start_stop): Define.
2217 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2218 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2219 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2220 * ieee.c (ieee_bfd_define_start_stop): Define.
2221 * ihex.c (ihex_bfd_define_start_stop): Define.
2222 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2223 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2224 * mmo.c (mmo_bfd_define_start_stop): Define.
2225 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2226 * oasys.c (oasys_bfd_define_start_stop): Define.
2227 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2228 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2229 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2230 * som.c (som_bfd_define_start_stop): Define.
2231 * srec.c (srec_bfd_define_start_stop): Define.
2232 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2233 * versados.c (versados_bfd_define_start_stop): Define.
2234 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2235 (alpha_vms_bfd_define_start_stop): Define.
2236 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2237 * bfd-in2.h: Regenerate.
2238 * libbfd.h: Regenerate.
2239
2240 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2241
2242 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2243 SYMBOL_REFERENCES_LOCAL.
2244
2245 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2246
2247 PR ld/21532
2248 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2249 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2250 runtime for if there needs copy relocation elimination.
2251 (need_copy_relocation_p): New function. Return true for symbol with
2252 pc-relative references and if it's against read-only sections.
2253 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2254 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2255 that are related with accessing external objects.
2256 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2257 in elfNN_aarch64_check_relocs.
2258
2259 2017-06-15 Nick Clifton <nickc@redhat.com>
2260
2261 PR binutils/21582
2262 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2263 bugs.
2264 PR binutils/21581
2265 (ieee_archive_p): Likewise.
2266
2267 2017-06-15 Nick Clifton <nickc@redhat.com>
2268
2269 PR binutils/21579
2270 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2271
2272 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2273
2274 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2275 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2276 keep both windowed and call0 ABI PLT definitions.
2277 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2278 elf_xtensa_*_plt_entry endex.
2279 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2280
2281 2017-06-14 Nick Clifton <nickc@redhat.com>
2282
2283 PR binutils/21578
2284 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2285 flag value.
2286
2287 2017-06-14 Nick Clifton <nickc@redhat.com>
2288
2289 PR binutils/21589
2290 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2291 maximum value for the ascic pointer. Check that name processing
2292 does not read beyond this value.
2293 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2294 end of etir record.
2295
2296 2017-06-14 Nick Clifton <nickc@redhat.com>
2297
2298 PR binutils/21591
2299 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2300 (process_otr): Check for an invalid offset in the otr structure.
2301
2302 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2303
2304 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2305
2306 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2307
2308 PR ld/20022
2309 PR ld/21557
2310 PR ld/21562
2311 PR ld/21571
2312 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2313 vtable field to a union.
2314 (_bfd_elf_is_start_stop): Removed.
2315 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2316 __start_SECNAME and __stop_SECNAME symbols.
2317 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2318 * elflink.c (_bfd_elf_is_start_stop): Removed.
2319 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2320 _bfd_elf_is_start_stop.
2321 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2322 __stop_SECNAME symbols. Updated.
2323 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2324 (bfd_elf_gc_record_vtinherit): Likewise.
2325 (bfd_elf_gc_record_vtentry): Likewise.
2326
2327 2017-06-13 Nick Clifton <nickc@redhat.com>
2328
2329 PR ld/21524
2330 * elflink.c (elf_link_adjust_relocs): Generate an error when
2331 encountering a reloc against a symbol removed by garbage
2332 collection.
2333
2334 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2335
2336 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2337 to merge_gnu_properties.
2338 * elf-properties.c (elf_merge_gnu_properties): Add struct
2339 bfd_link_info * and pass it to merge_gnu_properties.
2340 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2341 and pass it to elf_merge_gnu_properties.
2342 (_bfd_elf_link_setup_gnu_properties): Pass info to
2343 elf_merge_gnu_property_list.
2344 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2345 bfd_link_info *.
2346 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2347
2348 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2349
2350 PR 21564
2351 * binary.c (binary_set_section_contents): Scale lma by octets
2352 per byte to set filepos.
2353
2354 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2355
2356 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2357 dynamic sections.
2358
2359 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2360
2361 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2362 require TEXTREL.
2363
2364 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2365
2366 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2367 patched section contents for TLS IE reloc.
2368 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2369
2370 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2371
2372 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2373 RELOC_FOR_GLOBAL_SYMBOL macro.
2374
2375 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2376
2377 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2378 changes.
2379
2380 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2381
2382 * config/tc-arc.c (md_undefined_symbol): Changed.
2383 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2384
2385 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2386
2387 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2388 symbols.
2389
2390 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2391
2392 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2393 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2394
2395 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2396
2397 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2398 object is created.
2399
2400 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2401
2402 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2403 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2404 is non-zero. Add clarifying comments.
2405
2406 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2407
2408 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2409 name. Use local IFUNC symbol name string to report unsupported
2410 non-PIC call to IFUNC function.
2411 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2412 when generating R_386_IRELATIVE relocation.
2413 (elf_i386_finish_dynamic_symbol): Likewise.
2414 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2415 IFUNC symbol name.
2416 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2417 when generating R_X86_64_IRELATIVE relocation.
2418 (elf_x86_64_finish_dynamic_symbol): Likewise.
2419
2420 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2421
2422 * elf.c (setup_group): Make sure BFD sections are created for all
2423 group sections in the input file when processing SHF_GROUP
2424 sections.
2425 (bfd_section_from_shdr): Avoid duplicating logic already
2426 implemented in `setup_group'.
2427
2428 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2429
2430 PR binutils/21546
2431 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2432 if the hint address is zero.
2433
2434 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2435
2436 PR ld/19579
2437 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2438 ELF_COMMON_DEF_P for common symbols.
2439
2440 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2441
2442 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2443 SEC_GROUP sections as SEC_EXCLUDE.
2444 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2445 (assign_section_numbers): Use resolve_section_groups flag instead
2446 of relocatable link type.
2447 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2448 flag instead of checking the final_link flag for part of the
2449 checks in here. Fix white space as a result.
2450 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2451 instead of relocatable link type.
2452 (bfd_elf_final_link): Likewise.
2453
2454 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2455
2456 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2457 variable `bed'.
2458 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2459 (s3_bfd_score_elf_check_relocs): Likewise.
2460 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2461 (score_elf_final_link_relocate): Likewise.
2462 (s7_bfd_score_elf_check_relocs): Likewise.
2463
2464 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2465
2466 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2467 `bed'.
2468
2469 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2470
2471 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2472 from `reloc_count' rather than decrementing it.
2473 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2474 `reloc_count' by `int_rels_per_ext_rel'.
2475 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2476 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2477 entry determination.
2478 (s3_bfd_score_elf_check_relocs): Likewise.
2479 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2480 (s7_bfd_score_elf_relocate_section): Likewise.
2481 (s7_bfd_score_elf_check_relocs): Likewise.
2482 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2483 prototype and function.
2484 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2485 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2486 triple rather than once the sum of REL and RELA relocation entry
2487 counts.
2488 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2489 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2490 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2491 storage allocation size determination.
2492 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2493 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2494 by `int_rels_per_ext_rel' for last relocation entry
2495 determination.
2496 (bfd_elf_final_link): Do not multiply `reloc_count' by
2497 `int_rels_per_ext_rel' for internal relocation storage
2498 allocation size determination.
2499 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2500 `int_rels_per_ext_rel' for last relocation entry determination.
2501 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2502 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2503 (_bfd_mips_elf_relocate_section): Likewise.
2504
2505 2017-06-05 Alan Modra <amodra@gmail.com>
2506
2507 PR 21529
2508 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2509
2510 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2511
2512 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2513 determine structure sizes.
2514 (elfcore_grok_freebsd_prstatus): Likewise.
2515
2516 2017-06-01 Alan Modra <amodra@gmail.com>
2517
2518 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2519 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2520 dynamic objects.
2521 (is_elfv2_localentry0): New function.
2522 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2523 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2524 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2525 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2526 optimized localentry:0 stubs.
2527 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2528 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2529 localentry:0 stubs.
2530 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2531 DT_PPC64_OPT.
2532 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2533
2534 2017-05-30 Casey Smith <clegg89@gmail.com>
2535
2536 PR ld/21523
2537 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2538 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2539
2540 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2541
2542 * cpu-arc.c (arc_compatible): New function.
2543
2544 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2545
2546 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2547
2548 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2549
2550 PR binutils/21519
2551 * bfdio.c (bfd_get_file_size): New function.
2552 * bfd-in2.h: Regenerated.
2553
2554 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2555
2556 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2557 comments.
2558
2559 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2560
2561 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2562 dynobj instead of htab->elf.dynobj.
2563
2564 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2565
2566 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2567 and function.
2568 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2569 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2570 actual number of internal relocations retrieved. Adjust
2571 function description.
2572 (bfd_elf64_canonicalize_reloc): Remove macro.
2573 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2574
2575 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2576
2577 * archures.c (bfd_mach_sparc_v9m8): Define.
2578 (bfd_mach_sparc_v8plusm8): Likewise.
2579 (bfd_mach_sparc_v9_p): Adjust to M8.
2580 (bfd_mach_sparc_64bit_p): Likewise.
2581 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2582 bfd_mach_sparc_v8plusm8.
2583 * bfd-in2.h: Regenerated.
2584 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2585 sparc:v8plusm8.
2586 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2587 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2588 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2589 SHA3.
2590 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2591 bfd_mach_sparc_v8plusm8.
2592
2593 2017-05-19 Alan Modra <amodra@gmail.com>
2594
2595 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2596 debug and special sections when no non-note alloc sections in an
2597 object are kept.
2598
2599 2017-05-18 Alan Modra <amodra@gmail.com>
2600
2601 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2602 * elf-m10300.c: Likewise.
2603 * elf.c: Likewise.
2604 * elf32-arc.c: Likewise.
2605 * elf32-bfin.c: Likewise.
2606 * elf32-m68k.c: Likewise.
2607 * elf32-nds32.c: Likewise.
2608 * elf32-tilepro.c: Likewise.
2609 * elflink.c: Likewise.
2610 * elfnn-aarch64.c: Likewise.
2611 * elfnn-riscv.c: Likewise.
2612 * elfxx-tilegx.c: Likewise.
2613 * mach-o.c: Likewise.
2614 * peXXigen.c: Likewise.
2615 * vms-alpha.c: Likewise.
2616 * vms-lib.c: Likewise.
2617
2618 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2619
2620 PR ld/20882
2621 * elflink.c (elf_gc_mark_debug_section): New function.
2622 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2623 referenced by kept debug sections.
2624
2625 2017-05-16 Alan Modra <amodra@gmail.com>
2626
2627 * elf-m10300.c: Rename occurrences of non_ir_ref.
2628 * elf32-arm.c: Likewise.
2629 * elf32-bfin.c: Likewise.
2630 * elf32-cr16.c: Likewise.
2631 * elf32-cris.c: Likewise.
2632 * elf32-d10v.c: Likewise.
2633 * elf32-dlx.c: Likewise.
2634 * elf32-fr30.c: Likewise.
2635 * elf32-frv.c: Likewise.
2636 * elf32-hppa.c: Likewise.
2637 * elf32-i370.c: Likewise.
2638 * elf32-i386.c: Likewise.
2639 * elf32-iq2000.c: Likewise.
2640 * elf32-lm32.c: Likewise.
2641 * elf32-m32c.c: Likewise.
2642 * elf32-m32r.c: Likewise.
2643 * elf32-m68hc1x.c: Likewise.
2644 * elf32-m68k.c: Likewise.
2645 * elf32-mcore.c: Likewise.
2646 * elf32-metag.c: Likewise.
2647 * elf32-microblaze.c: Likewise.
2648 * elf32-moxie.c: Likewise.
2649 * elf32-msp430.c: Likewise.
2650 * elf32-mt.c: Likewise.
2651 * elf32-nios2.c: Likewise.
2652 * elf32-or1k.c: Likewise.
2653 * elf32-ppc.c: Likewise.
2654 * elf32-rl78.c: Likewise.
2655 * elf32-s390.c: Likewise.
2656 * elf32-score.c: Likewise.
2657 * elf32-score7.c: Likewise.
2658 * elf32-sh.c: Likewise.
2659 * elf32-tic6x.c: Likewise.
2660 * elf32-tilepro.c: Likewise.
2661 * elf32-v850.c: Likewise.
2662 * elf32-vax.c: Likewise.
2663 * elf32-xstormy16.c: Likewise.
2664 * elf32-xtensa.c: Likewise.
2665 * elf64-alpha.c: Likewise.
2666 * elf64-hppa.c: Likewise.
2667 * elf64-ia64-vms.c: Likewise.
2668 * elf64-mmix.c: Likewise.
2669 * elf64-ppc.c: Likewise.
2670 * elf64-s390.c: Likewise.
2671 * elf64-sh64.c: Likewise.
2672 * elf64-x86-64.c: Likewise.
2673 * elflink.c: Likewise.
2674 * elfnn-aarch64.c: Likewise.
2675 * elfnn-ia64.c: Likewise.
2676 * elfnn-riscv.c: Likewise.
2677 * elfxx-mips.c: Likewise.
2678 * elfxx-sparc.c: Likewise.
2679 * elfxx-tilegx.c: Likewise.
2680 * linker.c: Likewise.
2681
2682 2017-05-16 Alan Modra <amodra@gmail.com>
2683
2684 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2685 * elflink.c (elf_link_add_object_symbols): Update to use
2686 non_ir_ref_dynamic.
2687 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2688 non_ir_ref.
2689 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2690
2691 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2692
2693 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2694
2695 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2696
2697 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2698 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2699 properties.
2700 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2701
2702 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2703
2704 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2705 to plt_second.
2706 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2707 to plt_second/plt_second_eh_frame.
2708 (elf_x86_64_link_hash_newfunc): Updated.
2709 (elf_x86_64_allocate_dynrelocs): Likewise.
2710 (elf_x86_64_size_dynamic_sections): Likewise.
2711 (elf_x86_64_relocate_section): Likewise.
2712 (elf_x86_64_finish_dynamic_symbol): Likewise.
2713 (elf_x86_64_finish_dynamic_sections): Likewise.
2714 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2715 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2716 .plt.sec section.
2717 (elf_backend_setup_gnu_properties): Updated. Create the
2718 .plt.sec section instead of the .plt.sec section.
2719
2720 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2721
2722 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2723 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2724 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2725
2726 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2727
2728 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2729 (bfd_elf64_set_reloc): Define.
2730 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2731
2732 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2733
2734 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2735 (struct bfd_target): New field _bfd_set_reloc.
2736 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2737 * reloc.c (_bfd_generic_set_reloc): New function.
2738 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2739 * nlm-target.h (nlm_set_reloc): Likewise.
2740 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2741 * aout-tic30.c (MY_set_reloc): Likewise.
2742 * aout-target.h (MY_set_reloc): Likewise.
2743 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2744 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2745 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2746 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2747 * aout-adobe.c (aout_32_set_reloc): Likewise.
2748 * bout.c (b_out_set_reloc): Likewise.
2749 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2750 * i386os9k.c (aout_32_set_reloc): Likewise.
2751 * ieee.c (ieee_set_reloc): Likewise.
2752 * oasys.c (oasys_set_reloc): Likewise.
2753 * som.c (som_set_reloc): Likewise.
2754 * versados.c (versados_set_reloc): Likewise.
2755 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2756 _bfd_generic_set_reloc.
2757 (rs6000_xcoff64_aix_vec): LIkewise.
2758 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2759 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2760 * i386msdos.c (msdos_set_reloc): Define to
2761 _bfd_norelocs_set_reloc.
2762 * elfcode.h (elf_set_reloc): Define.
2763 * bfd-in2.h: Regenerated.
2764
2765 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2766
2767 PR ld/21481
2768 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2769 for IFUNC function address.
2770
2771 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2772
2773 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2774 (CONFLICT_LIST): Likewise.
2775 (opcode/arc-attrs.h): Include.
2776 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2777 (arc_extract_features): New file.
2778 (arc_stralloc): Likewise.
2779 (arc_elf_merge_attributes): Likewise.
2780 (arc_elf_merge_private_bfd_data): Use object attributes.
2781 (bfd_arc_get_mach_from_attributes): New function.
2782 (arc_elf_object_p): Use object attributes.
2783 (arc_elf_final_write_processing): Likewise.
2784 (elf32_arc_obj_attrs_arg_type): New function.
2785 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2786 (elf32_arc_section_from_shdr): Likewise.
2787 (elf_backend_obj_attrs_vendor): Define.
2788 (elf_backend_obj_attrs_section): Likewise.
2789 (elf_backend_obj_attrs_arg_type): Likewise.
2790 (elf_backend_obj_attrs_section_type): Likewise.
2791 (elf_backend_obj_attrs_handle_unknown): Likewise.
2792 (elf_backend_section_from_shdr): Likewise.
2793
2794 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2795
2796 PR ld/21458
2797 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2798 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2799 and the destination is a Thumb symbol.
2800
2801 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2802
2803 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2804 initializer to silence GCC 4.2.
2805 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2806
2807 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2808
2809 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2810 (LAZY_PLT_ENTRY_SIZE): This.
2811 (NON_LAZY_PLT_ENTRY_SIZE): New.
2812 (elf_x86_64_plt0_entry): Renamed to ...
2813 (elf_x86_64_lazy_plt0_entry): This.
2814 (elf_x86_64_plt_entry): Renamed to ...
2815 (elf_x86_64_lazy_plt_entry): This.
2816 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2817 (elf_x86_64_lazy_bnd_plt0_entry): This.
2818 (elf_x86_64_legacy_plt_entry): Removed.
2819 (elf_x86_64_bnd_plt_entry): Renamed to ...
2820 (elf_x86_64_lazy_bnd_plt_entry): This.
2821 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2822 (elf_x86_64_non_lazy_plt_entry): This.
2823 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2824 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2825 (elf_x86_64_eh_frame_plt): Renamed to ...
2826 (elf_x86_64_eh_frame_lazy_plt): This.
2827 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2828 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2829 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2830 (elf_x86_64_eh_frame_non_lazy_plt): This.
2831 (elf_x86_64_lazy_plt_layout): New.
2832 (elf_x86_64_non_lazy_plt_layout): Likewise.
2833 (elf_x86_64_plt_layout): Likewise.
2834 (elf_x86_64_backend_data): Remove PLT layout information. Add
2835 os for target system.
2836 (GET_PLT_ENTRY_SIZE): Removed.
2837 (elf_x86_64_lazy_plt): New.
2838 (elf_x86_64_non_lazy_plt): Likewise.
2839 (elf_x86_64_lazy_bnd_plt): Likewise.
2840 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2841 (elf_x86-64_arch_bed): Updated.
2842 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2843 (elf_x86_64_create_dynamic_sections): Removed.
2844 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2845 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2846 (elf_x86-64_adjust_dynamic_symbol): Updated.
2847 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2848 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2849 size for PLT0 if there is no PLT0. Get plt_entry_size from
2850 non_lazy_plt for non-lazy PLT entries.
2851 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2852 from non_lazy_plt for non-lazy PLT entries.
2853 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2854 if there is no PLT0.
2855 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2856 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2857 entries with non-lazy PLT layout. Don't fill the second and third
2858 slots in the PLT entry if there is no PLT0.
2859 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2860 if there is no PLT0. Set sh_entsize on the .plt.got section.
2861 (compare_relocs): New.
2862 (elf_x86_64_plt_type): Likewise.
2863 (elf_x86_64_plt): Likewise.
2864 (elf_x86_64_nacl_plt): New. Forward declaration.
2865 (elf_x86_64_get_plt_sym_val): Removed.
2866 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2867 against all dynamic relocations.
2868 (elf_x86_64_link_setup_gnu_properties): New function.
2869 (elf_backend_create_dynamic_sections): Updated.
2870 (elf_backend_setup_gnu_properties): New.
2871 (elf_x86_64_nacl_plt): New.
2872 (elf_x86_64_nacl_arch_bed): Updated.
2873
2874 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2875
2876 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2877 (LAZY_PLT_ENTRY_SIZE): This.
2878 (NON_LAZY_PLT_ENTRY_SIZE): New.
2879 (elf_i386_plt0_entry): Renamed to ...
2880 (elf_i386_lazy_plt0_entry): This.
2881 (elf_i386_plt_entry): Renamed to ...
2882 (elf_i386_lazy_plt_entry): This.
2883 (elf_i386_pic_plt0_entry): Renamed to ...
2884 (elf_i386_pic_lazy_plt0_entry): This.
2885 (elf_i386_pic_plt_entry): Renamed to ...
2886 (elf_i386_pic_lazy_plt_entry): This.
2887 (elf_i386_got_plt_entry): Renamed to ...
2888 (elf_i386_non_lazy_plt_entry): This.
2889 (elf_i386_pic_got_plt_entry): Renamed to ...
2890 (elf_i386_pic_non_lazy_plt_entry): This.
2891 (elf_i386_eh_frame_plt): Renamed to ...
2892 (elf_i386_eh_frame_lazy_plt): This.
2893 (elf_i386_eh_frame_plt_got): Renamed to ...
2894 (elf_i386_eh_frame_non_lazy_plt): This.
2895 (elf_i386_plt_layout): Renamed to ...
2896 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2897 eh_frame_plt_got_size.
2898 (elf_i386_non_lazy_plt_layout): New.
2899 (elf_i386_plt_layout): Likewise.
2900 (elf_i386_non_lazy_plt): Likewise.
2901 (GET_PLT_ENTRY_SIZE): Removed.
2902 (elf_i386_plt): Renamed to ...
2903 (elf_i386_lazy_plt): This.
2904 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2905 (elf_i386_arch_bed): Updated.
2906 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2907 (elf_i386_create_dynamic_sections): Removed.
2908 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2909 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2910 (elf_i386_adjust_dynamic_symbol): Updated.
2911 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2912 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2913 size for PLT0 if there is no PLT0.
2914 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2915 output section is discarded only if GOT isn't empty.
2916 (elf_i386_relocate_section): Updated. Properly get PLT index
2917 if there is no PLT0.
2918 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2919 second and third slots in the PLT entry if there is no PLT0.
2920 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2921 if there is no PLT0. Set sh_entsize on the .plt.got section.
2922 (elf_i386_nacl_plt): Forward declaration.
2923 (elf_i386_get_plt_sym_val): Removed.
2924 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2925 against all dynamic relocations.
2926 (elf_i386_link_setup_gnu_properties): New function.
2927 (elf_backend_create_dynamic_sections): Updated.
2928 (elf_backend_setup_gnu_properties): New.
2929 (elf_i386_nacl_plt): Updated.
2930 (elf_i386_nacl_arch_bed): Likewise.
2931 (elf_i386_vxworks_arch_bed): Likewise.
2932
2933 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2934
2935 * elflink.c (elf_output_implib): Remove executable flag from import
2936 library bfd.
2937 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2938 library is a relocatable object file.
2939
2940 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2941
2942 PR ld/21404
2943 * elf32-avr.c (avr_should_move_sym): New function.
2944 (avr_should_reduce_sym_size): Likewise.
2945 (avr_should_increase_sym_size): Likewise.
2946 (elf32_avr_relax_delete_bytes): Adjust symbol values
2947 and sizes by calling new functions.
2948
2949 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2950
2951 * config.bfd (riscv32-*): Enable rv64.
2952
2953 2017-05-02 Alan Modra <amodra@gmail.com>
2954
2955 PR 21384
2956 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2957 rather than h->root.type == bfd_link_hash_new.
2958 (bfd_elf_record_link_assignment): Similarly, call
2959 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2960
2961 2017-04-29 Alan Modra <amodra@gmail.com>
2962
2963 PR 21432
2964 * reloc.c (reloc_offset_in_range): New function.
2965 (bfd_perform_relocation, bfd_install_relocation): Use it.
2966 (_bfd_final_link_relocate): Likewise.
2967
2968 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2969
2970 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2971 before using .plt.got.
2972 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2973
2974 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2975
2976 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2977 instead of "+=" to update 0.
2978
2979 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2980
2981 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2982 .plt.got section here.
2983 (elf_i386_check_relocs): Don't create the .plt.got section.
2984 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2985 the .plt.got and .plt.bnd sections here.
2986 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2987 .plt.bnd sections.
2988
2989 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2990
2991 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2992 has_bnd_reloc.
2993 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2994 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2995 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2996 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2997 has_bnd_reloc.
2998
2999 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3000
3001 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3002 to return bfd *.
3003 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3004 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3005 the first relocatable ELF input with GNU properties.
3006
3007 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3008
3009 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3010 VxWorks for non-PIC.
3011
3012 2017-04-27 Alan Modra <amodra@gmail.com>
3013
3014 * elf-bfd.h (struct elf_backend_data): Make asection param of
3015 elf_backend_eh_frame_address_size const.
3016 (_bfd_elf_eh_frame_address_size): Likewise.
3017 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3018 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3019 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3020 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3021 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3022 (next_cie_fde_offset): Constify params.
3023 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3024
3025 2017-04-27 Alan Modra <amodra@gmail.com>
3026
3027 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3028 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3029 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3030 aug_data_len.
3031 (offset_adjust): New function.
3032 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3033 (adjust_eh_frame_local_symbols): Likewise.
3034 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3035 after changing anything. Return true if anything changed.
3036 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3037 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3038
3039 2017-04-27 Alan Modra <amodra@gmail.com>
3040
3041 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3042 when force_local.
3043
3044 2017-04-27 Alan Modra <amodra@gmail.com>
3045
3046 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3047 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3048 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3049 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3050 for undef and undefweak dyn_relocs.
3051 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3052 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3053 (allocate_got, allocate_dynrelocs): Likewise.
3054 (ppc64_elf_relocate_section): Likewise.
3055
3056 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3057
3058 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3059 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3060 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3061 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3062
3063 2017-04-26 Nick Clifton <nickc@redhat.com>
3064
3065 PR binutils/21434
3066 * reloc.c (bfd_perform_relocation): Check for a negative address
3067 in the reloc.
3068
3069 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3070
3071 PR ld/21334
3072 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3073 member.
3074 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3075 (elf_backend_always_renumber_dynsyms): Define.
3076 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3077 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3078 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3079 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3080 it.
3081 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3082
3083 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3084
3085 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3086 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3087 sections have been created.
3088
3089 2017-04-26 Nick Clifton <nickc@redhat.com>
3090
3091 PR binutils/21431
3092 * compress.c (bfd_init_section_compress_status): Check the return
3093 value from bfd_malloc.
3094
3095 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3096
3097 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3098 no_finish_dynamic_symbol.
3099 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3100 0.
3101 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3102 weak symbol, don't make it dynamic.
3103 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3104 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3105 relocation for GOT reference.
3106 (elf_x86_64_finish_dynamic_symbol): Abort if
3107 no_finish_dynamic_symbol isn't 0.
3108
3109 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3110
3111 PR ld/21402
3112 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3113 undefined weak symbol, don't make it dynamic.
3114 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3115 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3116 relocation for R_386_GOT32.
3117
3118 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3119
3120 PR ld/21425
3121 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3122
3123 2017-04-23 Alan Modra <amodra@gmail.com>
3124
3125 PR 21414
3126 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3127 * elf.c (lcomm_sym): New.
3128 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3129 * bfd-in2.h: Regenerate.
3130
3131 2017-04-23 Alan Modra <amodra@gmail.com>
3132
3133 PR 21412
3134 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3135 parameters and comment.
3136 (_bfd_elf_get_reloc_section): Delete.
3137 (_bfd_elf_plt_get_reloc_section): Declare.
3138 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3139 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3140 Extracted from..
3141 (_bfd_elf_get_reloc_section): ..here. Delete.
3142 (assign_section_numbers): Call elf_get_reloc_section.
3143 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3144 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3145
3146 2017-04-23 Alan Modra <amodra@gmail.com>
3147
3148 PR 21409
3149 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3150 no symbols.
3151
3152 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3153
3154 PR ld/21402
3155 * elf32-i386.c (elf_i386_link_hash_entry): Add
3156 no_finish_dynamic_symbol.
3157 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3158 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3159 symbol, don't make it dynamic in PIE.
3160 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3161 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3162 relocation for R_386_GOT32
3163 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3164 isn't 0.
3165
3166 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3167
3168 PR ld/19617
3169 PR ld/21086
3170 * elflink.c (elf_link_add_object_symbols): Require
3171 --no-dynamic-linker with -E/--dynamic-list when creating
3172 dynamic sections.
3173
3174 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3175
3176 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3177 if forced local.
3178
3179 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3180
3181 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3182 dynamic symbol sorting.
3183
3184 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3185
3186 PR ld/21382
3187 * elflink.c (elf_link_add_object_symbols): Preserve
3188 dynamic_ref_after_ir_def when restoring the symbol table for
3189 unneeded dynamic object.
3190
3191 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3192
3193 PR ld/21401
3194 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3195 on on undefined IFUNC symbol in the second PLT.
3196
3197 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3198
3199 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3200
3201 2017-04-19 Alan Modra <amodra@gmail.com>
3202
3203 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3204 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3205 * elf32-ppc.c:Formatting.
3206 (ensure_undefweak_dynamic): Don't make dynamic when
3207 info->dynamic_undefined_weak is zero.
3208 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3209 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3210 not default visibility. Discard undef and undefweak
3211 dyn_relocs earlier.
3212 (ppc_elf_relocate_section): Adjust to suit.
3213 * elf64-ppc.c: Formatting.
3214 (ensure_undefweak_dynamic): Don't make dynamic when
3215 info->dynamic_undefined_weak is zero.
3216 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3217 info->dynamic_undefined_weak. Discard them earlier.
3218
3219 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3220
3221 PR ld/21389
3222 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3223 before generating the version definition section.
3224
3225 2017-04-17 Alan Modra <amodra@gmail.com>
3226
3227 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3228 state when a regular object file defines a symbol with
3229 incompatible type to that defined by an earlier shared lib.
3230
3231 2017-04-13 Alan Modra <amodra@gmail.com>
3232
3233 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3234 * elf.c: Likewise.
3235 * elf32-arm.c: Likewise.
3236 * elf32-i386.c: Likewise.
3237 * elf32-mep.c: Likewise.
3238 * elf64-ia64-vms.c: Likewise.
3239 * elf64-x86-64.c: Likewise.
3240 * elflink.c: Likewise.
3241 * elfnn-ia64.c: Likewise.
3242 * elfxx-mips.c: Likewise.
3243
3244 2017-04-13 Alan Modra <amodra@gmail.com>
3245
3246 * aoutx.h: Use %B and %A in error messages throughout file.
3247 * aout-cris.c: Likewise.
3248 * archive.c: Likewise.
3249 * binary.c: Likewise.
3250 * coff-rs6000.c: Likewise.
3251 * coff-tic4x.c: Likewise.
3252 * coffcode.h: Likewise.
3253 * coffgen.c: Likewise.
3254 * cofflink.c: Likewise.
3255 * coffswap.h: Likewise.
3256 * cpu-arm.c: Likewise.
3257 * elf-eh-frame.c: Likewise.
3258 * elf-m10300.c: Likewise.
3259 * elf.c: Likewise.
3260 * elf32-arc.c: Likewise.
3261 * elf32-arm.c: Likewise.
3262 * elf32-bfin.c: Likewise.
3263 * elf32-frv.c: Likewise.
3264 * elf32-iq2000.c: Likewise.
3265 * elf32-m32c.c: Likewise.
3266 * elf32-microblaze.c: Likewise.
3267 * elf32-nds32.c: Likewise.
3268 * elf32-rl78.c: Likewise.
3269 * elf32-rx.c: Likewise.
3270 * elf32-score.c: Likewise.
3271 * elf32-score7.c: Likewise.
3272 * elf32-sh64.c: Likewise.
3273 * elf32-v850.c: Likewise.
3274 * elf32-vax.c: Likewise.
3275 * elf32-visium.c: Likewise.
3276 * elf64-ia64-vms.c: Likewise.
3277 * elf64-mmix.c: Likewise.
3278 * elf64-sh64.c: Likewise.
3279 * elfcode.h: Likewise.
3280 * elfnn-aarch64.c: Likewise.
3281 * elfnn-ia64.c: Likewise.
3282 * elfxx-mips.c: Likewise.
3283 * hpux-core.c: Likewise.
3284 * ieee.c: Likewise.
3285 * ihex.c: Likewise.
3286 * linker.c: Likewise.
3287 * merge.c: Likewise.
3288 * mmo.c: Likewise.
3289 * oasys.c: Likewise.
3290 * pdp11.c: Likewise.
3291 * peXXigen.c: Likewise.
3292 * rs6000-core.c: Likewise.
3293 * vms-alpha.c: Likewise.
3294 * xcofflink.c: Likewise.
3295
3296 2017-04-13 Alan Modra <amodra@gmail.com>
3297
3298 * bfd.c (PRINT_TYPE): Define.
3299 (_doprnt): New function.
3300 (error_handler_internal): Use _doprnt.
3301 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3302 calls in their natural order, throughout file.
3303 * coff-mcore.c: Likewise.
3304 * coff-ppc.c: Likewise.
3305 * coff-tic80.c: Likewise.
3306 * cofflink.c: Likewise.
3307 * elf-s390-common.c: Likewise.
3308 * elf.c: Likewise.
3309 * elf32-arm.c: Likewise.
3310 * elf32-i386.c: Likewise.
3311 * elf32-m32r.c: Likewise.
3312 * elf32-msp430.c: Likewise.
3313 * elf32-spu.c: Likewise.
3314 * elf64-ia64-vms.c: Likewise.
3315 * elf64-sparc.c: Likewise.
3316 * elf64-x86-64.c: Likewise.
3317 * elflink.c: Likewise.
3318 * elfnn-aarch64.c: Likewise.
3319 * elfnn-ia64.c: Likewise.
3320 * elfxx-mips.c: Likewise.
3321
3322 2017-04-13 Alan Modra <amodra@gmail.com>
3323
3324 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3325 branch veneers" error. Fix double space and format message.
3326 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3327 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3328
3329 2017-04-13 Alan Modra <amodra@gmail.com>
3330
3331 * bfd-in2.h: Regenerate.
3332
3333 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3334
3335 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3336 extra `\n' in warning/error messages.
3337 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3338 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3339
3340 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3341
3342 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3343 processor-specific properties with generic ELF target vector.
3344
3345 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3346
3347 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3348 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3349 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3350 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3351 has_non_got_reloc.
3352 (link_hash_newfunc): Initialize has_got_reloc and
3353 has_non_got_reloc.
3354 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3355 section.
3356 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3357 has_non_got_reloc.
3358 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3359 has_non_got_reloc.
3360 (_bfd_sparc_elf_fixup_symbol): New function.
3361 (allocate_dynrelocs): Don't allocate space for dynamic
3362 relocations and discard relocations against resolved undefined
3363 weak symbols in executable. Don't make resolved undefined weak
3364 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3365 relocation against undefined weak symbols in PIE.
3366 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3367 relocations against resolved undefined weak symbols in PIE
3368 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3369 without ynamic PLT/GOT relocations for resolved undefined weak
3370 symbols.
3371 Don't generate dynamic relocation against resolved undefined
3372 weak symbol in executable.
3373 (pie_finish_undefweak_symbol): New function.
3374 (_bfd_sparc_elf_finish_dynamic_sections): Call
3375 pie_finish_undefweak_symbol on all symbols in PIE.
3376 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3377 (_bfd_sparc_elf_fixup_symbol): New function.
3378
3379 2017-04-10 Nick Clifton <nickc@redhat.com>
3380
3381 * config.bfd: Remove ns32k from obsolete list.
3382
3383 2017-04-10 Alan Modra <amodra@gmail.com>
3384
3385 PR 21287
3386 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3387 (special_sections_i): Likewise for .init_array.
3388 (special_sections_p): Likewise for .preinit_array.
3389
3390 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3391
3392 PR ld/19579
3393 PR ld/21306
3394 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3395 ELF_COMMON_DEF_P for common symbols.
3396 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3397 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3398 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3399 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3400 07492f668d2173da7a2bda3707ff0985e0f460b6.
3401
3402 2017-04-07 Pedro Alves <palves@redhat.com>
3403
3404 * opncls.c (bfd_get_debug_link_info): Rename to...
3405 (bfd_get_debug_link_info_1): ... this. Change type of second
3406 parameter to void pointer. Adjust.
3407 (bfd_get_debug_link_info): Reimplement on top of
3408 bfd_get_debug_link_info_1.
3409 (separate_debug_file_exists, separate_alt_debug_file_exists):
3410 Change type of second parameter to void pointer. Adjust.
3411 (get_func_type, check_func_type): Change type of second parameter
3412 to void pointer.
3413 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3414 the callback functions instead of passing the address of a local.
3415 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3416 find_separate_debug_file.
3417 (get_alt_debug_link_info_shim): Change type of second parameter to
3418 void pointer. Adjust.
3419 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3420 find_separate_debug_file.
3421 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3422 of second parameter to void pointer. Adjust.
3423 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3424 pointer local to find_separate_debug_file.
3425
3426 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3427
3428 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3429 external symbols with a definition.
3430 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3431
3432 2017-04-07 Alan Modra <amodra@gmail.com>
3433
3434 * po/SRC-POTFILES.in: Regenerate.
3435
3436 2017-04-05 Alan Modra <amodra@gmail.com>
3437
3438 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3439 reference counting.
3440
3441 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3442
3443 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3444 numbers for DataDirectory entry indicies passed to
3445 add_data_entry().
3446
3447 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3448
3449 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3450 each GNU_MBIND section and align GNU_MBIND section to page size.
3451 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3452 segment for each GNU_MBIND section.
3453 (_bfd_elf_init_private_section_data): Copy sh_info from input
3454 for GNU_MBIND section.
3455
3456 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3457
3458 * elfnn-riscv.c (GP_NAME): Delete.
3459 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3460 (_bfd_riscv_relax_lui): Likewise.
3461
3462 2017-04-04 Nick Clifton <nickc@redhat.com>
3463
3464 PR binutils/21342
3465 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3466 dereference.
3467 (bfd_elf_final_link): Only initialize the extended symbol index
3468 section if there are extended symbol tables to list.
3469
3470 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3471
3472 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3473 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3474 * configure.ac (elf): Add elf-properties.lo.
3475 * Makefile.in: Regenerated.
3476 * configure: Likewise.
3477 * elf-bfd.h (elf_property_kind): New.
3478 (elf_property): Likewise.
3479 (elf_property_list): Likewise.
3480 (elf_properties): Likewise.
3481 (_bfd_elf_parse_gnu_properties): Likewise.
3482 (_bfd_elf_get_property): Likewise.
3483 (_bfd_elf_link_setup_gnu_properties): Likewise.
3484 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3485 and setup_gnu_properties.
3486 (elf_obj_tdata): Add properties.
3487 * elf-properties.c: New file.
3488 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3489 (elf_i386_merge_gnu_properties): Likewise.
3490 (elf_backend_parse_gnu_properties): Likewise.
3491 (elf_backend_merge_gnu_properties): Likewise.
3492 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3493 (elf_x86_64_merge_gnu_properties): Likewise.
3494 (elf_backend_parse_gnu_properties): Likewise.
3495 (elf_backend_merge_gnu_properties): Likewise.
3496 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3497 (elf_backend_parse_gnu_properties): Likewise.
3498 (elf_backend_setup_gnu_properties): Likewise.
3499 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3500 elf_backend_merge_gnu_properties and
3501 elf_backend_setup_gnu_properties.
3502
3503 2017-03-30 Pip Cet <pipcet@gmail.com>
3504
3505 * elf32-wasm32.c: Add relocation code, two relocs.
3506 * reloc.c: Add wasm32 relocations.
3507 * libbfd.h: Regenerate.
3508 * bfd-in2.h: Regenerate.
3509 * bfd/po/bfd.pot: Regenerate.
3510
3511 2017-03-29 Nick Clifton <nickc@redhat.com>
3512
3513 PR binutils/18025
3514 * coff-bfd.h (struct coff_section_data): Add new fields:
3515 saved_bias and bias.
3516 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3517 computed for PE binaries.
3518 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3519 missing abbrev.
3520
3521 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3522
3523 PR ld/16044
3524 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3525 to handle a local symbol with a hash-symbol-entry; without PLT.
3526 Add BFD_ASSERT for an incidental case with GOT entry present.
3527 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3528 isn't forced-or-set local.
3529
3530 2017-03-27 Pip Cet <pipcet@gmail.com>
3531
3532 * wasm-module.c: New file to support WebAssembly modules.
3533 * wasm-module.h: New file to support WebAssembly modules.
3534 * doc/webassembly.texi: Start documenting wasm-module.c.
3535 * config.bfd: Add wasm_vec.
3536 * targets.c: Likewise.
3537 * configure.ac: Likewise.
3538 * Makefile.am: Add entries for wasm-module.c.
3539 * Makefile.in: Regenerate.
3540 * configure: Regenerate.
3541 * po/SRC-POTFILES.in: Regenerate.
3542
3543 2017-03-27 Pip Cet <pipcet@gmail.com>
3544
3545 * cpu-wasm32.c: New file to support wasm32 architecture.
3546 * elf32-wasm32.c: New file to support wasm32 architecture.
3547 * Makefile.am: Add wasm32 architecture.
3548 * archures.c: Likewise.
3549 * config.bfd: Likewise.
3550 * configure.ac: Likewise.
3551 * targets.c: Likewise.
3552 * Makefile.in: Regenerate.
3553 * bfd-in2.h: Regenerate.
3554 * configure: Regenerate.
3555 * po/SRC-POTFILES.in: Regenerate.
3556
3557 2017-03-20 Alan Modra <amodra@gmail.com>
3558
3559 PR 21266
3560 * elf64-ppc.c (compare_symbols): Stabilize sort.
3561
3562 2017-03-18 Alan Modra <amodra@gmail.com>
3563
3564 * elf64-ppc.c (struct ppc_link_hash_table): Add
3565 local_ifunc_resolver and maybe_local_ifunc_resolver.
3566 (ppc_build_one_stub): Set flags on emitting dynamic
3567 relocation to ifunc.
3568 (ppc64_elf_relocate_section): Likewise.
3569 (ppc64_elf_finish_dynamic_symbol): Likewise.
3570 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3571 local dynamic relocs to ifuncs.
3572 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3573 local_ifunc_resolver and maybe_local_ifunc_resolver.
3574 (ppc_elf_relocate_section): Set flag on emitting dynamic
3575 relocation to ifuncs.
3576 (ppc_elf_finish_dynamic_symbol): Likewise.
3577 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3578 dynamic relocs to ifuncs.
3579
3580 2017-03-13 Nick Clifton <nickc@redhat.com>
3581
3582 PR binutils/21202
3583 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3584 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3585 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3586 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3587 * bfd-in2.h: Regenerate.
3588 * libbfd.h: Regenerate.
3589 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3590 names.
3591 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3592 (elfNN_aarch64_howto_table): Likewise.
3593 (aarch64_tls_transition_without_check): Likewise.
3594 (aarch64_reloc_got_type): Likewise.
3595 (elfNN_aarch64_final_link_relocate): Likewise.
3596 (elfNN_aarch64_tls_relax): Likewise.
3597 (elfNN_aarch64_relocate_section): Likewise.
3598 (elfNN_aarch64_gc_sweep_hook): Likewise.
3599 (elfNN_aarch64_check_relocs): Likewise.
3600 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3601 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3602
3603 2017-03-11 Alan Modra <amodra@gmail.com>
3604
3605 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3606 parameter is in fact used. Whitespace fixes.
3607 * elf64-ppc.c: Likewise.
3608
3609 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3610
3611 * rs6000-core.c (CORE_NEW): Simplify macro when
3612 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3613
3614 2017-03-07 Alan Modra <amodra@gmail.com>
3615
3616 PR 21224
3617 PR 20519
3618 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3619 dyn_relocs check.
3620
3621 2017-03-05 Alan Modra <amodra@gmail.com>
3622
3623 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3624 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3625 (next_cie_fde_offset): New function.
3626 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3627 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3628 four bytes. Align CIEs to four or eight bytes depending on
3629 per_encoding_aligned8. Align FDEs according to their encoding.
3630 Pad last FDE to output section alignment.
3631 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3632 assertion.
3633 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3634 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3635 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3636
3637 2017-03-02 Martin Bickel <binutils@ineranves.de>
3638
3639 PR ld/21212
3640 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3641 empty segments which have a zero filesz, but a non-zero memsz.
3642
3643 2017-03-02 Alan Modra <amodra@gmail.com>
3644
3645 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3646
3647 2017-02-28 Alan Modra <amodra@gmail.com>
3648
3649 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3650 (ppc64_elf_relocate_section): Likewise.
3651
3652 2017-02-28 Alan Modra <amodra@gmail.com>
3653
3654 PR 20995
3655 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3656 rather than elf32_nios2_hash_table or elf_hash_table.
3657 (create_got_section): Likewise.
3658 (nios2_elf32_finish_dynamic_symbol): Likewise.
3659 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3660 (nios2_elf32_size_dynamic_sections): Likewise.
3661 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3662 vars. Use htab equivalents directly instead. Don't create
3663 all dynamic sections on needing just the GOT. Use a goto
3664 rather than a fall-through with reloc test. Ensure
3665 htab->dynobj is set when making dynamic sreloc section.
3666 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3667 equivalent directly instead. Don't segfault on looking for
3668 .dynamic when dynamic sections have not been created. Don't
3669 segfault on .got.plt being discarded.
3670 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3671 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3672 fixme and another not so relevant comment.
3673 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3674 already set, set hash table dynobj on creating .sbss.
3675
3676 2017-02-28 Alan Modra <amodra@gmail.com>
3677
3678 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3679 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3680 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3681 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3682 (ppc64_elf_relocate_section): Likewise.
3683 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3684 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3685 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3686 * libbfd.h: Regenerate.
3687 * bfd-in2.h: Regenerate.
3688
3689 2017-02-28 Alan Modra <amodra@gmail.com>
3690
3691 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3692 dynamic .data.rel.ro read-only.
3693 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3694 rather than section flags when deciding where copy reloc goes.
3695 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3696 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3697 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3698 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3699 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3700 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3701 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3702 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3703 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3704 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3705 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3706 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3707 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3708 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3709 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3710 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3711 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3712 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3713 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3714
3715 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3716
3717 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3718 `jalr $0, $25' instruction encoding.
3719
3720 2017-02-27 Nick Clifton <nickc@redhat.com>
3721
3722 PR ld/21180
3723 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3724 generating a seg-fault when encountering a symbol that has been
3725 deleted by garbage collection.
3726
3727 2017-02-25 Alan Modra <amodra@gmail.com>
3728
3729 * elf32-arc.c (struct dynamic_sections): Delete.
3730 (enum dyn_section_types): Delete.
3731 (dyn_section_names): Delete.
3732 (arc_create_dynamic_sections): Delete.
3733 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3734 segfault on discarded .rela.plt section.
3735 (elf_arc_size_dynamic_sections): Formatting. Don't call
3736 arc_create_dynamic_sections. Don't allocate memory for sections
3737 handled by the generic linker. Correct code finding relocs in
3738 read-only sections. Set SEC_EXCLUDE on zero size .got,
3739 .got.plt, and .dynbss sections. Do set .interp for pies.
3740
3741 2017-02-24 Andrew Waterman <andrew@sifive.com>
3742
3743 * elfnn-riscv.c (GP_NAME): New macro.
3744 (riscv_global_pointer_value): Use it.
3745 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3746 output section, consider only that section's alignment.
3747
3748 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3749
3750 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3751 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3752 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3753 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3754
3755 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3756
3757 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3758 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3759 or misaligned.
3760
3761 2017-02-23 Alan Modra <amodra@gmail.com>
3762
3763 PR 20744
3764 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3765 16D relocations.
3766 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3767 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3768 relocs.
3769
3770 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3771
3772 PR ld/20828
3773 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3774 processing ahead of the call to `elf_gc_sweep_symbol'.
3775
3776 2017-02-22 Nick Clifton <nickc@redhat.com>
3777
3778 PR binutils/21193
3779 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3780 created section 4-byte alignment.
3781
3782 2017-02-22 Alan Modra <amodra@gmail.com>
3783
3784 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3785 on .got or .plt output section being discarded by script.
3786 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3787 vxworks splt temp.
3788
3789 2017-02-21 Alan Modra <amodra@gmail.com>
3790
3791 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3792 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3793
3794 2017-02-20 Alan Modra <amodra@gmail.com>
3795
3796 PR 21181
3797 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3798 if DT_RELSZ/DT_RELASZ is zero.
3799
3800 2017-02-17 Nick Clifton <nickc@redhat.com>
3801
3802 * compress.c (bfd_get_full_section_contents): Remember to reduce
3803 compressed size by the sizeof the compression header when
3804 decompressing the contents.
3805
3806 2017-02-17 Pedro Alves <palves@redhat.com>
3807
3808 * srec.c (Chunk): Rename to ...
3809 (_bfd_srec_len): ... this.
3810 (S3Forced): Rename to ...
3811 (_bfd_srec_forceS3): ... this.
3812 * objcopy.c: Adjust all references.
3813
3814 2017-02-17 Pedro Alves <palves@redhat.com>
3815
3816 * archive.c (bsd_write_armap): Rename to ...
3817 (_bfd_bsd_write_armap): ... this.
3818 (coff_write_armap): Rename to ...
3819 (_bfd_coff_write_armap): ... this.
3820 * libbfd-in.h (bsd_write_armap): Rename to ...
3821 (_bfd_bsd_write_armap): ... this.
3822 (coff_write_armap): Rename to ...
3823 (_bfd_coff_write_armap): ... this.
3824 * aout-target.h, aout-tic30.c: Adjust all users.
3825 * libbfd.h: Regenerate.
3826
3827 2017-02-17 Pedro Alves <palves@redhat.com>
3828
3829 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3830 (warn_deprecated): Rename to ...
3831 (_bfd_warn_deprecated): ... this.
3832 * libbfd.c (warn_deprecated): Rename to ...
3833 (_bfd_warn_deprecated): ... this.
3834 * bfd-in2.h: Regenerate.
3835
3836 2017-02-17 Pedro Alves <palves@redhat.com>
3837
3838 * bfdio.c (real_ftell): Rename to ...
3839 (_bfd_real_ftell): ... this.
3840 (real_fseek): Rename to ...
3841 (_bfd_real_fseek): ... this.
3842 (real_fopen): Rename to ...
3843 (_bfd_real_fopen): ... this.
3844 * libbfd-in.h (real_ftell): Rename to ...
3845 (_bfd_real_ftell): ... this.
3846 (real_fseek): Rename to ...
3847 (_bfd_real_fseek): ... this.
3848 (real_fopen): Rename to ...
3849 (_bfd_real_fopen): ... this.
3850 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3851 * libbfd.h: Regenerate.
3852
3853 2017-02-17 Pedro Alves <palves@redhat.com>
3854
3855 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3856 * libbfd.c (read_unsigned_leb128): Rename to ...
3857 (_bfd_read_unsigned_leb128): ... this.
3858 (read_signed_leb128): Rename to ...
3859 (_bfd_read_signed_leb128): ... this.
3860 (safe_read_leb128): Rename to ...
3861 (_bfd_safe_read_leb128): ... this.
3862 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3863 (_bfd_read_unsigned_leb128): ... this.
3864 (read_signed_leb128): Rename to ...
3865 (_bfd_read_signed_leb128): ... this.
3866 (safe_read_leb128): Rename to ...
3867 (_bfd_safe_read_leb128): ... this.
3868 * libbfd.h: Renegerate.
3869
3870 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3871
3872 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3873 before trying to fine matching file and line information.
3874
3875 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3876
3877 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3878 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3879 not match current bfd, then reload debug information. Record bfd
3880 we're loading debug info for in the stash. If we have debug
3881 informatin in the cache then perform section placement before
3882 returning.
3883
3884 2017-02-16 Alan Modra <amodra@gmail.com>
3885
3886 PR 21000
3887 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3888 * elfxx-target.h (elf_backend_no_page_alias): Define.
3889 (elfNN_bed): Init new field.
3890 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3891 ensure PT_LOAD segment starts on a new page.
3892 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3893
3894 2017-02-16 Alan Modra <amodra@gmail.com>
3895
3896 PR 21132
3897 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3898 if pic.
3899
3900 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3901
3902 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3903 * bfd-in2.h: Regenerated.
3904
3905 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3906
3907 PR ld/21168
3908 * elf32-i386.c (elf_i386_relocate_section): Allow
3909 "lea foo@GOT, %reg" in PIC.
3910
3911 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3912
3913 PR ld/20244
3914 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3915 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3916 error against local IFUNC symbol without a base register for
3917 PIC.
3918
3919 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3920
3921 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3922 `%P: %H:' with `info->callbacks->einfo'.
3923 (ppc_elf_relocate_section): Likewise.
3924 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3925 (ppc64_elf_edit_toc): Likewise.
3926 (ppc64_elf_relocate_section): Likewise.
3927
3928 2017-02-14 Alan Modra <amodra@gmail.com>
3929
3930 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3931 --gc-keep-exported, and test versioned field of sym rather than
3932 looking for @ in name.
3933
3934 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3935
3936 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3937 __global_pointer$.
3938
3939 2017-02-13 Nick Clifton <nickc@redhat.com>
3940
3941 PR binutils/21151
3942 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3943 unit length field.
3944
3945 2017-02-07 Andrew Waterman <andrew@sifive.com>
3946
3947 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3948 entry size if PLT header is written.
3949
3950 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3951
3952 Fix sparc64 dynamic relocation processing to use the dynamic
3953 symbol count.
3954 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3955 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3956 should be used.
3957
3958 2017-02-03 Nick Clifton <nickc@redhat.com>
3959
3960 PR 21096
3961 * coffcode.h (coff_write_object_contents): Enlarge size of
3962 s_name_buf in order to avoid compile time warning about possible
3963 integer truncation.
3964 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3965 32-bits of insn value before printing into buffer.
3966
3967 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3968
3969 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3970 `max_local_dynindx'.
3971 (mips_elf_sort_hash_table): Handle it.
3972 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3973 symbols bump up `max_local_dynindx' rather than
3974 `max_non_got_dynindx'.
3975
3976 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3977
3978 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3979 `min_got_dynindx', `max_unref_got_dynindx' and
3980 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3981 (mips_elf_sort_hash_table): Adjust accordingly.
3982
3983 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3984
3985 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3986 to access the hash table.
3987
3988 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3989
3990 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3991 non-NULL `htab' to the beginning.
3992
3993 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3994
3995 * elflink.c (elf_gc_sweep): Wrap overlong line.
3996
3997 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3998
3999 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4000 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4001 * elfxx-mips.c (mips_elf_link_hash_table): Add
4002 `ignore_branch_isa' member.
4003 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4004 in branch relocation calculation as an error if
4005 `ignore_branch_isa' has been set.
4006 (_bfd_mips_elf_insn32): Rename to...
4007 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4008 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4009 Handle the new parameter.
4010
4011 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4012
4013 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4014 local variable dynobj.
4015
4016 PR ld/20995
4017 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4018 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4019 executable from read-only sections into sdynrelro.
4020 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4021 dynamic relocs in sdynrelro.
4022 (elf_backend_want_dynrelro): Define.
4023
4024 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4025
4026 * config.bfd (*-*-rtemsaout*): Mark as removed.
4027
4028 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4029
4030 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4031 (arm-*-rtems*): Move to (arm*-*-eabi*).
4032 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4033 (m68-*-rtems*): Move to (m68*-*-elf*).
4034
4035 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4036
4037 * config.bfd (*-*-rtemscoff*): Mark as removed.
4038
4039 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4040
4041 PR ld/20828
4042 * elflink.c (bfd_elf_record_link_assignment): Revert last
4043 change and don't ever clear `forced_local'. Set `mark'
4044 unconditionally.
4045 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4046 file.
4047 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4048 (bfd_elf_size_dynamic_sections): ... here.
4049 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4050 and set `mark' instead in `__tls_get_addr_opt' processing.
4051 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4052
4053 2017-01-24 Alan Modra <amodra@gmail.com>
4054
4055 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4056 where dynamic relocs are preferable. Allow ifunc too.
4057 (ensure_undefweak_dynamic): New function.
4058 (allocate_dynrelocs): Use it here. Move plt handling last and
4059 don't make symbols dynamic, simplifying loop. Only make undef
4060 weak symbols with GOT entries dynamic. Correct condition
4061 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4062 comments. Remove goto.
4063 (ppc_elf_relocate_section): Correct test for using dynamic
4064 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4065 to suit. Set up explicit tls_index entries and implicit GOT
4066 tls_index entries resolvable at link time for
4067 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4068 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4069 (ensure_undefweak_dynamic): New function.
4070 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4071 with GOT entries dynamic. Remove unnecessary test of
4072 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4073 (ppc64_elf_relocate_section): Correct test for using dynamic
4074 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4075 to suit. Set up explicit tls_index entries and implicit GOT
4076 tls_index entries resolvable at link time for __tls_get_addr_opt.
4077 Simplify expression to clear mem for prelink.
4078
4079 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4080
4081 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4082
4083 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4084
4085 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4086 (elf_backend_hash_symbol): Define.
4087
4088 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4089
4090 PR ld/20828
4091 * elflink.c (bfd_elf_record_link_assignment): Clear any
4092 `forced_local' marking for DSO symbols that are not being
4093 provided.
4094
4095 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4096
4097 * elfnn-riscv.c (riscv_elf_object_p): New function.
4098
4099 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4100
4101 PR ld/21038
4102 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4103 plt_bnd_eh_frame.
4104 (elf_x86_64_check_relocs): Create .eh_frame section for the
4105 .plt.bnd section.
4106 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4107 .eh_frame section for the .plt.bnd section.
4108 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4109 for the .plt.bnd section.
4110
4111 2017-01-12 Nick Clifton <nickc@redhat.com>
4112
4113 PR binutils/20876
4114 * opncls.c (find_separate_debug_file): Add include_dirs
4115 parameter. Only include the directory part of the bfd's filename
4116 in search paths if include_dirs is true. Add a couple of extra
4117 locations for looking for debug files.
4118 ( bfd_follow_gnu_debuglink): Update invocation of
4119 find_separate_debug_file.
4120 (bfd_follow_gnu_debugaltlink): Likewise.
4121 (get_build_id): New function: Finds the build-id of the given bfd.
4122 (get_build_id_name): New function: Computes the name of the
4123 separate debug info file for a bfd, based upon its build-id.
4124 (check_build_id_file): New function: Checks to see if a separate
4125 debug info file exists at the given location, and that its
4126 build-id matches that of the original bfd.
4127 (bfd_follow_build_id_debuglink): New function: Finds a separate
4128 debug info file for a given bfd by using the build-id method.
4129 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4130 method of locating a separate debug info file before using the
4131 debuglink method.
4132 * bfd-in2.h: Regenerate.
4133
4134 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4135
4136 PR ld/21038
4137 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4138 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4139 elf_x86_64_eh_frame_plt_got.
4140 (elf_x86_64_size_dynamic_sections): Get unwind info from
4141 elf_x86_64_bnd_arch_bed for the BND PLT.
4142
4143 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4144
4145 * config.bfd: Add entries for i686-redox and x86_64-redox.
4146
4147 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4148
4149 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4150 to 4 bytes.
4151 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4152 .eh_frame section to 4 bytes for x32.
4153 (elf_x86_64_check_relocs): Likewise.
4154
4155 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4156
4157 PR ld/20830
4158 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4159 (PLT_GOT_FDE_LENGTH): Likewise.
4160 (elf_i386_plt_layout): Add eh_frame_plt_got and
4161 eh_frame_plt_got_size.
4162 (elf_i386_plt): Updated.
4163 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4164 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4165 (elf_i386_size_dynamic_sections): Allocate and initialize
4166 .eh_frame section for .plt.got.
4167 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4168 .plt.got.
4169 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4170 eh_frame_plt_got_size.
4171 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4172 (PLT_GOT_FDE_LENGTH): Likewise.
4173 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4174 eh_frame_plt_got_size.
4175 (elf_x86_64_arch_bed): Updated.
4176 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4177 eh_frame_plt_got_size.
4178 (elf_x86_64_nacl_arch_bed): Likewise.
4179 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4180 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4181 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4182 .eh_frame section for .plt.got.
4183 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4184 for .plt.got.
4185
4186 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4187
4188 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4189 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4190
4191 2017-01-09 Nick Clifton <nickc@redhat.com>
4192
4193 * dwarf2.c (lookup_address_in_function_table): Return early if
4194 there are no functions in the given comp unit, or if the high
4195 address of the last function in the comp unit is less than the
4196 desired address.
4197
4198 2017-01-09 Nick Clifton <nickc@redhat.com>
4199
4200 PR binutils/21013
4201 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4202 message if there are too many symbols to load.
4203
4204 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4205
4206 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4207 if relocs are cached.
4208
4209 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4210
4211 PR ld/21017
4212 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4213 for R_MICROBLAZE_GOTOFF_64.
4214
4215 2017-01-03 Nick Clifton <nickc@redhat.com>
4216
4217 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4218 warning about using a possibly uninitialised variable.
4219
4220 2017-01-02 Alan Modra <amodra@gmail.com>
4221
4222 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4223 (allocate_plt_static, allocate_dynrelocs): Use it.
4224
4225 2017-01-02 Alan Modra <amodra@gmail.com>
4226
4227 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4228 .PARISC.unwind section.
4229
4230 2017-01-02 Alan Modra <amodra@gmail.com>
4231
4232 PR ld/20989
4233 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4234 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4235 indirect to GOT pointer relative code edit.
4236
4237 2017-01-02 Alan Modra <amodra@gmail.com>
4238
4239 Update year range in copyright notice of all files.
4240
4241 For older changes see ChangeLog-2016
4242 \f
4243 Copyright (C) 2017 Free Software Foundation, Inc.
4244
4245 Copying and distribution of this file, with or without modification,
4246 are permitted in any medium without royalty provided the copyright
4247 notice and this notice are preserved.
4248
4249 Local Variables:
4250 mode: change-log
4251 left-margin: 8
4252 fill-column: 74
4253 version-control: never
4254 End:
This page took 0.113632 seconds and 5 git commands to generate.