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