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