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