1 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
4 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
5 R_X86_64_PC32 relocation run-time overflow and unresolvable
6 R_X86_64_32S relocation with -z nocopyreloc.
8 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
10 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
11 Undefined symbols may not have a type.
12 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
14 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
16 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
17 bfd_link_info. Report shared, PIE or PDE object based on
19 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
20 (elf_x86_64_relocate_section): Likewise.
22 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
24 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
26 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
28 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
30 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
31 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
32 is set on any input relocatable file.
33 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
35 2017-08-23 Alan Modra <amodra@gmail.com>
38 * elf64-ppc.c (ensure_undef_dynamic): Rename from
39 ensure_undefweak_dynamic. Handle undefined too.
40 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
41 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
42 (allocate_dynrelocs): Discard undefined non-default visibility
43 relocs first. Make undefined syms dynamic. Tidy goto.
45 2017-08-21 Alan Modra <amodra@gmail.com>
46 H.J. Lu <hongjiu.lu@intel.com>
49 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
50 * elflink.c (bfd_elf_define_start_stop): Rewrite.
52 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
55 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
56 undefined weak symbols.
58 2017-08-18 Nick Clifton <nickc@redhat.com>
61 * tekhex.c (getsym): Fix check for source pointer walking off the
62 end of the input buffer.
64 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
67 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
68 relocations in debug sections, change abort to _bfd_error_handler.
70 2017-08-14 Nick Clifton <nickc@redhat.com>
73 * elf.c (setup_group): Check for an empty or very small group
75 * po/bfd.pot: Regenerate.
77 2017-08-14 Alan Modra <amodra@gmail.com>
80 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
81 alignment padding here.
82 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
83 in a reverse pass over sections.
85 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
88 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
89 for @plt suffixes first.
90 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
92 2017-08-08 Nick Clifton <nickc@redhat.com>
95 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
96 small section lengths.
97 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
99 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
100 there is enough data present in the note.
102 2017-08-08 Alan Modra <amodra@gmail.com>
105 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
106 got.refcount for GOTOFF relocs, just create .got section.
108 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
110 * elflink.c (elf_link_add_object_symbols): Move common symbol
111 check after bed->common_definition.
113 2017-08-07 Alan Modra <amodra@gmail.com>
116 * elflink.c (bfd_elf_final_link): Don't segfault when sections
117 needed to define various dynamic tags have been discarded.
119 2017-08-07 Nick Clifton <nickc@redhat.com>
122 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
123 has not been set then use the bfd returned by
124 _bfd_elf_link_setup_gnu_properties. If that is null then search
125 through all the input bfds selecting the first normal, ELF format
127 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
129 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
131 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
133 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
134 (elf_i386_check_tls_transition): Check tls_get_addr directly.
135 (elf_i386_convert_load_reloc): Update tls_get_addr check.
136 (elf_i386_link_check_relocs): New function.
137 (bfd_elf32_bfd_link_check_relocs): New.
138 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
140 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
141 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
142 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
143 (elf_x86_64_link_check_relocs): New function.
144 (bfd_elf64_bfd_link_check_relocs): New.
145 (bfd_elf32_bfd_link_check_relocs): Likewise.
147 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
150 * elflink.c (elf_link_add_object_symbols): Treat common symbol
151 as undefined for --no-define-common.
153 2017-08-05 Alan Modra <amodra@gmail.com>
155 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
156 hppa_link_hash_table.
158 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
160 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
161 entries for sysregs with negative indices.
163 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
165 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
166 isn't the S/390 specific elf data.
167 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
169 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
171 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
172 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
173 [R_RISCV_ADD16]: Likewise.
174 [R_RISCV_ADD32]: Likewise.
175 [R_RISCV_ADD64]: Likewise.
176 [R_RISCV_SUB6]: Likewise.
177 [R_RISCV_SUB8]: Likewise.
178 [R_RISCV_SUB16]: Likewise.
179 [R_RISCV_SUB32]: Likewise.
180 [R_RISCV_SUB64]: Likewise.
182 2017-07-31 Alan Modra <amodra@gmail.com>
184 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
185 without ld.so checks.
187 2017-07-29 Alan Modra <amodra@gmail.com>
190 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
191 (ppc64_elf_merge_symbol): Set non_zero_localentry.
192 (is_elfv2_localentry0): Test non_zero_localentry.
193 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
195 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
197 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
198 pointer check for htab->elf.irelplt.
199 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
201 2017-07-27 Nick Clifton <nickc@redhat.com>
204 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
206 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
208 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
210 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
212 (evax_bfd_print_emh): Check for invalid string lengths.
214 2017-07-25 Nick Clifton <nickc@redhat.com>
216 * po/fr.po: Updated French translation.
218 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
221 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
222 16-bit absolute branches into 10-bit pc-relative branches on the
223 MSP430 as well as the MSP430X.
225 2017-07-25 Alan Modra <amodra@gmail.com>
227 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
228 (stub_eh_frame_size): New function.
229 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
230 (group_sections): Init group tls_get_addr_opt_bctrl.
231 (ppc64_elf_size_stubs): Update sizing and initialization of
232 .eh_frame. Iteration over stubs via group list.
233 (ppc64_elf_build_stubs): Iterate over stubs via group list.
234 (ppc64_elf_finish_dynamic_sections): Update finalization of
237 2017-07-24 Nick Clifton <nickc@redhat.com>
240 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
241 of the relocs to the canonicalize_one_reloc routine.
242 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
243 for the _bfd_mach_o_canonicalize_one_reloc field.
244 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
245 res_base parameter. Use to check for corrupt pair relocs.
246 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
248 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
250 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
253 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
254 enough data in the record before attempting to parse it.
255 (_bfd_vms_slurp_eeom): Likewise.
257 (_bfd_vms_slurp_egsd): Check for an invalid section index.
258 (image_set_ptr): Likewise.
259 (alpha_vms_slurp_relocs): Likewise.
261 (alpha_vms_object_p): Check for a truncated record.
263 2017-07-24 Nick Clifton <nickc@redhat.com>
266 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
267 an unrecognized reloc and sets the bfd_error value.
268 * libbfd.h: Regenerate.
269 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
271 * elf32-i386.c (elf_i386_relocate_section): Likewise.
272 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
273 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
274 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
275 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
277 2017-07-23 Alan Modra <amodra@gmail.com>
279 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
282 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
285 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
286 reloc_class_ifunc for ifunc symbols.
288 2017-07-19 Nick Clifton <nickc@redhat.com>
291 * archive.c (bfd_generic_archive_p): If the bfd does not have the
292 correct magic bytes at the start, set the error to wrong format
293 and clear the format selector before returning NULL.
295 2017-07-19 Nick Clifton <nickc@redhat.com>
298 * coff-rs6000.c (_bfd_strntol): New function.
299 (_bfd_strntoll): New function.
300 (GET_VALUE_IN_FIELD): New macro.
301 (EQ_VALUE_IN_FIELD): new macro.
302 (_bfd_xcoff_slurp_armap): Use new macros.
303 (_bfd_xcoff_archive_p): Likewise.
304 (_bfd_xcoff_read_ar_hdr): Likewise.
305 (_bfd_xcoff_openr_next_archived_file): Likewise.
306 (_bfd_xcoff_stat_arch_elt): Likewise.
307 * coff64-rs6000.c (_bfd_strntol): New function.
308 (_bfd_strntoll): New function.
309 (GET_VALUE_IN_FIELD): New macro.
310 (xcoff64_slurp_armap): Use new macros.
312 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
313 John Eric Martin <John.Martin@emmicro-us.com>
315 * bfd-in2.h: Regenerate.
316 * libbfd.h: Regenerate.
317 * elf32-arc.c (JLI): Define.
318 * reloc.c: Add JLI relocations.
320 2017-07-18 Nick Clifton <nickc@redhat.com>
323 * coff-sh.c: Fix spelling typos.
324 * compress.c: Likewise.
325 * cpu-pdp11.c: Likewise.
326 * ecofflink.c: Likewise.
327 * elf-m10300.c: Likewise.
329 * elf32-arm.c: Likewise.
330 * elf32-m68k.c: Likewise.
331 * elf32-nds32.c: Likewise.
332 * elf32-ppc.c: Likewise.
333 * elf32-sh.c: Likewise.
334 * elf32-v850.c: Likewise.
335 * elf64-ppc.c: Likewise.
336 * elf64-x86-64.c: Likewise.
337 * elflink.c: Likewise.
338 * elfnn-aarch64.c: Likewise.
339 * elfxx-mips.c: Likewise.
342 * vms-alpha.c: Likewise.
343 * xcofflink.c: Likewise.
345 2017-07-18 Nick Clifton <nickc@redhat.com>
348 * coffcode.h (handle_COMDAT): Replace abort with an error message
351 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
354 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
357 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
359 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
361 2017-07-16 Alan Modra <amodra@gmail.com>
363 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
364 __tls_index GOT entries when using __tls_get_addr_opt stub.
365 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
367 2017-07-12 Alan Modra <amodra@gmail.com>
369 * po/es.po: Update from translationproject.org/latest/bfd/.
370 * po/fi.po: Likewise.
371 * po/fr.po: Likewise.
372 * po/id.po: Likewise.
373 * po/ja.po: Likewise.
374 * po/ro.po: Likewise.
375 * po/ru.po: Likewise.
376 * po/sr.po: Likewise.
377 * po/sv.po: Likewise.
378 * po/tr.po: Likewise.
379 * po/uk.po: Likewise.
380 * po/vi.po: Likewise.
381 * po/zh_CN.po: Likewise.
382 * po/hr.po: New file from translationproject.org.
383 * configure.ac (ALL_LINGUAS): Add hr. Sort.
384 * configure: Regenerate.
386 2017-07-12 Nick Clifton <nickc@redhat.com>
388 Fix compile time warnings using gcc 7.1.1.
389 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
391 (elf_xtensa_get_gotplt_section): Increase length of got_name
393 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
394 default return of FALSE.
395 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
396 default return of FALSE.
398 2017-07-12 Alan Modra <amodra@gmail.com>
400 * binary.c (binary_set_section_contents): Don't print filepos in
402 (coff_write_object_contents): Cast size_t for error message.
403 (coff_slurp_line_table): Don't use bfd_vma symndx.
404 (coff_slurp_reloc_table): Remove unneeded cast.
405 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
407 (find_abstract_instance_name): Likewise.
408 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
409 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
410 (elf32_arm_check_relocs): Make r_symndx an int.
411 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
413 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
415 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
417 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
418 * elf32-s390.c (elf_s390_check_relocs): Likewise.
419 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
420 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
421 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
422 * elf64-s390.c (elf_s390_check_relocs): Likewise.
423 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
424 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
425 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
426 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
427 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
428 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
429 and use %lu for error message.
430 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
431 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
434 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
436 (elf32_arm_final_link_relocate): Likewise.
437 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
438 * coffcode.h (styp_to_sec_flags): Likewise.
439 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
440 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
441 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
442 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
443 (elf32_bfin_merge_private_bfd_data): Likewise.
444 * elf32-cris.c (cris_elf_relocate_section): Likewise.
445 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
446 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
447 (i370_elf_relocate_section): Likewise.
448 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
449 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
450 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
451 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
452 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
453 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
454 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
455 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
456 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
457 * ieee.c (ieee_write_id, read_id): Likewise.
458 * mach-o.c (bfd_mach_o_write_contents): Likewise.
459 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
460 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
461 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
462 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
463 * stabs.c (_bfd_link_section_stabs): Likewise.
465 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
467 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
468 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
469 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
470 * coff-sh.c (sh_relax_section): Likewise.
471 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
472 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
473 * coffcode.h (coff_slurp_reloc_table): Likewise.
474 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
475 (_bfd_coff_read_string_table): Likewise.
476 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
477 * compress.c (bfd_get_full_section_contents): Likewise.
478 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
479 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
480 * elf.c (bfd_elf_string_from_elf_section): Likewise.
481 * elf32-arc.c (arc_special_overflow_checks): Likewise.
482 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
483 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
484 (elf32_arm_write_section): Likewise.
485 * elf32-bfin.c (bfin_relocate_section): Likewise.
486 (bfinfdpic_relocate_section): Likewise.
487 * elf32-hppa.c (hppa_build_one_stub): Likewise.
488 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
489 * elf32-i386.c (elf_i386_tls_transition): Likewise.
490 (elf_i386_relocate_section): Likewise.
491 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
492 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
493 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
494 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
495 * elf32-metag.c (elf_metag_relocate_section): Likewise.
496 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
497 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
498 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
499 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
500 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
501 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
502 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
503 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
504 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
505 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
506 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
507 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
508 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
509 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
510 * elf32-sh.c (sh_elf_relax_section): Likewise.
511 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
512 (sh_elf_relocate_section): Likewise.
513 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
514 * elf32-spu.c (spu_elf_relocate_section): Likewise.
515 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
516 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
517 * elf32-v850.c (v850_elf_relax_section): Likewise.
518 * elf32-vax.c (elf_vax_check_relocs): Likewise.
519 (elf_vax_relocate_section): Likewise.
520 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
521 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
522 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
523 (do_fix_for_relocatable_link): Likewise.
524 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
525 (elf64_alpha_relax_with_lituse): Likewise.
526 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
527 (elf_hppa_final_link_relocate): Likewise.
528 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
529 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
530 (elf64_vms_link_add_object_symbols): Likewise.
531 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
532 (mmix_final_link_relocate): Likewise.
533 * elf64-s390.c (invalid_tls_insn): Likewise.
534 (elf_s390_relocate_section): Likewise.
535 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
536 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
537 (elf_x86_64_relocate_section): Likewise.
538 * elfcode.h (elf_slurp_symbol_table): Likewise.
539 * elfcore.h (elf_core_file_p): Likewise.
540 * elflink.c (elf_link_read_relocs_from_section): Likewise.
541 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
542 (elfNN_aarch64_relocate_section): Likewise.
543 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
544 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
545 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
546 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
547 (_bfd_mips_elf_relocate_section): Likewise.
548 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
549 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
550 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
551 * ieee.c (ieee_slurp_external_symbols): Likewise.
552 * ihex.c (ihex_write_object_content): Likewise.
553 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
554 * merge.c (_bfd_merged_section_offset): Likewise.
555 * mmo.c (mmo_write_loc_chunk): Likewise.
556 (mmo_write_object_contents): Likewise.
557 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
558 * stabs.c (_bfd_link_section_stabs): Likewise.
559 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
561 2017-07-11 Alan Modra <amodra@gmail.com>
563 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
565 2017-07-11 Alan Modra <amodra@gmail.com>
567 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
568 instruction" error using _bfd_error_handler, not einfo.
570 2017-07-10 Nick Clifton <nickc@redhat.com>
572 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
573 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
575 2017-07-07 John Baldwin <jhb@FreeBSD.org>
577 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
579 2017-07-07 Alan Modra <amodra@gmail.com>
581 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
583 2017-07-07 Alan Modra <amodra@gmail.com>
585 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
586 as long long. Move code replacing "ll" with "I64", and simplify.
588 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
590 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
593 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
595 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
597 (line_info_add_file_name): Likewise.
598 (decode_line_info): Likewise.
600 2017-07-04 Tristan Gingold <gingold@adacore.com>
602 * version.m4: Bump version to 2.29.51
603 * configure: Regenerate.
605 2017-07-04 Jiong Wang <jiong.wang@arm.com>
607 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
608 sanity check at the head of this function.
610 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
612 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
614 (struct attr_abbrev): Add field implicit_const.
615 (dwarf_debug_sections): Add .debug_line_str.
616 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
617 (dwarf_debug_section_assert): Add static assertion.
618 (read_indirect_line_string): New.
619 (read_abbrevs): Support DW_FORM_implicit_const.
620 (is_str_attr): Support DW_FORM_line_strp.
621 (read_attribute_value): Support DW_FORM_line_strp and
622 DW_FORM_implicit_const.
623 (read_attribute): Support DW_FORM_implicit_const.
624 (line_info_add_include_dir, line_info_add_include_dir_stub):
625 (line_info_add_file_name, read_formatted_entries): New.
626 (decode_line_info, parse_comp_unit): Support DWARF 5.
627 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
629 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
631 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
632 abort statement that was put for symbols that are not dynamic.
634 2017-07-03 Tristan Gingold <gingold@adacore.com>
636 * po/bfd.pot: Regenerate
638 2017-07-03 Alan Modra <amodra@gmail.com>
640 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
641 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
642 * elf.c (setup_group): Use "Lx" to print sh_size.
643 (_bfd_elf_setup_sections): Remove unnecessary cast and print
644 unknown section type in hex.
645 (copy_special_section_fields): Style fix.
646 (bfd_section_from_shdr): Correct format for sh_link. Use a
647 common error message for all the variants of unrecognized
649 (assign_file_positions_for_load_sections): Use "Lx" for lma
650 adjust error message.
651 (assign_file_positions_for_non_load_sections): Formatting.
652 (rewrite_elf_program_header): Formatting. Use "Lx" for
653 bfd_vma values in error messages.
654 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
655 ELF_R_SYM value to type expected by format.
656 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
658 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
659 (elf_link_input_bfd): Use "Lx" for r_info.
660 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
662 2017-07-03 Alan Modra <amodra@gmail.com>
664 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
665 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
666 Microsoft C library variant of long long format specifier.
667 (PRINT20): Cast value to bfd_uint64_t not long long.
668 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
669 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
670 long long. Don't cast to bfd_vma.
671 * elf32-score.c (score3_bfd_getl48): Likewise.
672 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
674 2017-07-03 Alan Modra <amodra@gmail.com>
676 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
678 (bfd_elf_print_symbol): Don't cast symbol->flags.
679 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
680 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
681 _bfd_error_handler argument order.
682 (ppc_elf_merge_private_bfd_data): Don't cast flags.
684 2017-07-03 Alan Modra <amodra@gmail.com>
686 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
688 * configure: Regenerate.
689 * config.in: Regenerate.
691 2017-06-29 Andrew Waterman <andrew@sifive.com>
693 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
696 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
698 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
699 unless it is undefined weak.
700 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
701 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
703 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
704 is not dynamic in PIC, abort.
706 2017-06-29 Jiong Wang <jiong.wang@arm.com>
709 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
710 undefined weak symbols into dynamic.
711 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
712 relocation for non-dynamic symbols.
713 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
715 2017-06-29 Jiong Wang <jiong.wang@arm.com>
717 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
718 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
719 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
720 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
721 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
724 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
726 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
727 (elfcore_write_s390_gs_bc): Likewise.
728 * elf.c (elfcore_grok_s390_gs_cb): New function.
729 (elfcore_grok_s390_gs_bc): New function.
730 (elfcore_grok_note): Call them.
731 (elfcore_write_s390_gs_cb): New function.
732 (elfcore_write_s390_gs_bc): New function.
733 (elfcore_write_register_note): Call them.
735 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
737 * libbfd.c (_bfd_generic_get_section_contents): Don't call
738 bfd_get_file_size. Check archive element size.
739 (_bfd_generic_get_section_contents_in_window): Likewise.
741 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
743 * bfd-in2.h: Regenerated.
744 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
745 (bfd_get_file_size): Likewise.
747 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
748 Matthew Fortune <matthew.fortune@imgtec.com>
750 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
751 * cpu-mips.c (I_interaptiv_mr2): New enum value.
752 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
753 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
755 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
756 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
757 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
758 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
759 `bfd_mach_mips_interaptiv_mr2' entries.
760 * bfd-in2.h: Regenerate.
762 2017-06-27 Nick Clifton <nickc@redhat.com>
764 * tekhex.c (pass_over): Revert accidental conversion of a local
765 array to a static array.
767 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
770 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
771 reloc addend if necessary. Adjust diff only if
772 shrinked_insn_address < end_address.
774 2017-06-27 Alan Modra <amodra@gmail.com>
777 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
778 (_bfd_generic_get_section_contents_in_window): Likewise.
780 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
782 * elfnn-riscv.c (perform_relocation): Support the new
783 R_RISCV_32_PCREL relocation.
784 (riscv_elf_relocate_section): Likewise.
785 * elfxx-riscv.c (howto_table): Likewise.
786 (riscv_reloc_map): Likewise.
787 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
788 * libbfd.h: Regenerate.
790 2017-06-27 Alan Modra <amodra@gmail.com>
793 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
794 Use unsigned file pointer type, and remove cast.
795 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
796 Add "count", not "sz".
798 2017-06-26 Pedro Alves <palves@redhat.com>
801 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
804 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
807 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
810 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
812 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
813 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
814 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
815 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
816 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
818 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
821 * compress.c (bfd_get_full_section_contents): Don't check the
823 * libbfd.c (_bfd_generic_get_section_contents): Check for and
824 reject a section whose size + offset is greater than the size
826 (_bfd_generic_get_section_contents_in_window): Likewise.
828 2017-06-26 Nick Clifton <nickc@redhat.com>
831 * tekhex.c (getvalue): Check for the source pointer exceeding the
832 end pointer before the first byte is read.
834 2017-06-26 Nick Clifton <nickc@redhat.com>
837 * opncls.c (get_build_id): Check that the section is big enough
838 to contain the whole note.
839 * compress.c (bfd_get_full_section_contents): Check for and reject
840 a section whose size is greater than the size of the entire file.
841 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
842 contain a notes section.
844 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
846 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
848 (elf_s390_modify_segment_map): Likewise.
849 (bfd_elf_s390_set_options): Lisewise.
851 2017-06-26 Alan Modra <amodra@gmail.com>
853 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
855 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
856 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
857 .preinit_array on --just-syms bfds.
858 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
859 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
860 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
862 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
864 * elf.c (find_link): Bounds check "hint".
866 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
868 * elf32-arm.c (using_thumb_only): Update list of architectures in
869 BFD_ASSERT for which the logic is valid.
870 (using_thumb2_bl): Likewise.
871 (using_thumb2): Likewise and return true for ARMv8-R.
872 (arch_has_arm_nop): Likewise.
873 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
874 merging logic. Update commentis for value 15 of v8m_baseline,
875 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
876 merging of value 15 of Tag_CPU_arch.
878 2017-06-23 Jiong Wang <jiong.wang@arm.com>
880 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
881 BFD_RELOC_AARCH64_ADR_GOT_PAGE
882 * bfd-in2.h: Regenerate.
884 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
886 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
887 the error_alignment label forward. Properly align program
888 property note section.
890 2017-06-22 Eric Christopher <echristo@gmail.com>
892 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
893 abs to fix a truncation warning.
895 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
897 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
898 local undefined weak symbol to 0.
899 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
901 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
903 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
904 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
905 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
906 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
907 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
908 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
909 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
910 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
912 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
914 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
915 (elf_i386_lazy_ibt_plt_entry): Likewise.
916 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
917 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
918 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
919 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
920 (elf_i386_lazy_plt_layout): Likewise.
921 (elf_i386_non_lazy_plt_layout): Likewise.
922 (elf_i386_link_hash_entry): Add plt_second.
923 (elf_i386_link_hash_table): Add plt_second and
925 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
926 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
927 the second PLT. Check the second PLT.
928 (elf_i386_relocate_section): Use the second PLT to resolve
929 PLT reference if needed.
930 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
932 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
933 second PLT. Generate unwind info for the second PLT.
934 (elf_i386_plt_type): Add plt_second.
935 (elf_i386_get_synthetic_symtab): Support the second PLT.
936 (elf_i386_parse_gnu_properties): Support
937 GNU_PROPERTY_X86_FEATURE_1_AND.
938 (elf_i386_merge_gnu_properties): Support
939 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
940 on GNU_PROPERTY_X86_FEATURE_1_IBT
941 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
942 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
943 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
944 is set on all relocatable inputs.
945 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
946 (elf_x32_lazy_ibt_plt_entry): Likewise.
947 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
948 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
949 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
950 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
951 (elf_x86_64_lazy_ibt_plt): Likewise.
952 (elf_x32_lazy_ibt_plt): Likewise.
953 (elf_x86_64_non_lazy_ibt_plt): Likewise.
954 (elf_x32_non_lazy_ibt_plt): Likewise.
955 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
956 (elf_x86_64_parse_gnu_properties): Support
957 GNU_PROPERTY_X86_FEATURE_1_AND.
958 (elf_x86_64_merge_gnu_properties): Support
959 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
960 on GNU_PROPERTY_X86_FEATURE_1_IBT
961 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
962 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
963 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
964 is set on all relocatable inputs.
966 2017-06-22 Nick Clifton <nickc@redhat.com>
969 * som.c (setup_sections): NUL terminate the space_strings buffer.
970 Check that the space.name field does not index beyond the end of
971 the space_strings buffer.
973 2017-06-21 Nick Clifton <nickc@redhat.com>
976 * coff-sh.c (sh_reloc): Check for an out of range reloc.
978 2017-06-21 Nick Clifton <nickc@redhat.com>
981 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
982 type of the size parameter.
983 (_bfd_vms_save_counted_string): Add second parameter - the maximum
984 length of the counted string.
985 * vms.h (_bfd_vms_save_sized_string): Update prototype.
986 (_bfd_vms_save_counted_string): Likewise.
987 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
988 _bfd_vms_save_counted_string.
989 (_bfd_vms_slurp_ehdr): Likewise.
990 (_bfd_vms_slurp_egsd): Likewise.
991 (Parse_module): Likewise.
993 2017-06-21 Alan Modra <amodra@gmail.com>
995 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
996 calls before tocsave calls.
997 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1000 2017-06-21 Nick Clifton <nickc@redhat.com>
1003 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1004 bfd_get_full_section_contents returns no contents.
1006 2017-06-21 Nick Clifton <nickc@redhat.com>
1009 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1012 2017-06-21 Nick Clifton <nickc@redhat.com>
1015 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1017 (image_set_ptr): Likewise.
1018 (alpha_vms_fix_sec_rel): Likewise.
1019 (alpha_vms_slurp_relocs): Likewise.
1021 2017-06-21 Nick Clifton <nickc@redhat.com>
1024 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1026 (ieee_archive_p): Likewise.
1027 (ieee_object_p): Likewise.
1029 2017-06-21 Nick Clifton <nickc@redhat.com>
1032 * elf.c (setup_group): Zero the group section pointer list after
1033 allocation so that loops can be caught. Check for NULL pointers
1034 when processing a group list.
1036 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1038 * elf-s390.h: New file.
1039 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1041 (elf_s390_additional_program_headers): New function.
1042 (elf_s390_modify_segment_map): New function.
1043 (bfd_elf_s390_set_options): New function.
1044 (elf_backend_additional_program_headers)
1045 (elf_backend_modify_segment_map): Add macro definitions.
1047 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1050 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1051 the DYNAMIC bit instead of bfd_count_sections.
1053 2017-06-19 Nick Clifton <nickc@redhat.com>
1056 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1058 (evax_bfd_print_eeom): Likewise.
1059 (evax_bfd_print_egsd): Check for an overlarge record length.
1060 (evax_bfd_print_etir): Likewise.
1062 2017-06-19 Nick Clifton <nickc@redhat.com>
1065 * libieee.h (struct common_header_type): Add end_p field.
1066 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1068 (read_id): Check for a length that exceeds the remaining bytes in
1070 (ieee_seek): Initialise end_p.
1071 (ieee_archive_p): Likewise.
1072 (ieee_object_p): Likewise.
1074 2017-06-19 Nick Clifton <nickc@redhat.com>
1077 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1078 before reading the EIHS structure entries.
1080 2017-06-19 Nick Clifton <nickc@redhat.com>
1083 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1084 gsd_size. Check that there are enough bytes remaining to read the
1085 type and size of the next egsd. Check that the size of the egsd
1086 does not exceed the size of the record.
1088 2017-06-19 Alan Modra <amodra@gmail.com>
1090 * config.bfd: Correct targ_underscore for cris.
1092 2017-06-18 Alan Modra <amodra@gmail.com>
1094 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1095 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1097 2017-06-16 Nick Clifton <nickc@redhat.com>
1099 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1100 bucketlist is empty because there are no symbols to add to the
1103 2017-06-16 Alan Modra <amodra@gmail.com>
1109 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1110 (BFD_JUMP_TABLE_LINK): Likewise.
1111 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1112 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1113 (bfd_elf_define_start_stop): New function.
1114 * linker.c (bfd_generic_define_start_stop): New function.
1115 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1117 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1118 * aout-target.h (MY_bfd_define_start_stop): Define.
1119 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1120 * binary.c (binary_bfd_define_start_stop): Define.
1121 * bout.c (b_out_bfd_define_start_stop): Define.
1122 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1123 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1124 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1125 * coffcode.h (coff_bfd_define_start_stop): Define.
1126 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1127 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1128 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1129 * ieee.c (ieee_bfd_define_start_stop): Define.
1130 * ihex.c (ihex_bfd_define_start_stop): Define.
1131 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1132 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1133 * mmo.c (mmo_bfd_define_start_stop): Define.
1134 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1135 * oasys.c (oasys_bfd_define_start_stop): Define.
1136 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1137 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1138 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1139 * som.c (som_bfd_define_start_stop): Define.
1140 * srec.c (srec_bfd_define_start_stop): Define.
1141 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1142 * versados.c (versados_bfd_define_start_stop): Define.
1143 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1144 (alpha_vms_bfd_define_start_stop): Define.
1145 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1146 * bfd-in2.h: Regenerate.
1147 * libbfd.h: Regenerate.
1149 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1151 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1152 SYMBOL_REFERENCES_LOCAL.
1154 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1157 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1158 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1159 runtime for if there needs copy relocation elimination.
1160 (need_copy_relocation_p): New function. Return true for symbol with
1161 pc-relative references and if it's against read-only sections.
1162 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1163 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1164 that are related with accessing external objects.
1165 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1166 in elfNN_aarch64_check_relocs.
1168 2017-06-15 Nick Clifton <nickc@redhat.com>
1171 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1174 (ieee_archive_p): Likewise.
1176 2017-06-15 Nick Clifton <nickc@redhat.com>
1179 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1181 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1183 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1184 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1185 keep both windowed and call0 ABI PLT definitions.
1186 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1187 elf_xtensa_*_plt_entry endex.
1188 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1190 2017-06-14 Nick Clifton <nickc@redhat.com>
1193 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1196 2017-06-14 Nick Clifton <nickc@redhat.com>
1199 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1200 maximum value for the ascic pointer. Check that name processing
1201 does not read beyond this value.
1202 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1205 2017-06-14 Nick Clifton <nickc@redhat.com>
1208 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1209 (process_otr): Check for an invalid offset in the otr structure.
1211 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1213 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1215 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1221 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1222 vtable field to a union.
1223 (_bfd_elf_is_start_stop): Removed.
1224 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1225 __start_SECNAME and __stop_SECNAME symbols.
1226 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1227 * elflink.c (_bfd_elf_is_start_stop): Removed.
1228 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1229 _bfd_elf_is_start_stop.
1230 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1231 __stop_SECNAME symbols. Updated.
1232 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1233 (bfd_elf_gc_record_vtinherit): Likewise.
1234 (bfd_elf_gc_record_vtentry): Likewise.
1236 2017-06-13 Nick Clifton <nickc@redhat.com>
1239 * elflink.c (elf_link_adjust_relocs): Generate an error when
1240 encountering a reloc against a symbol removed by garbage
1243 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1245 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1246 to merge_gnu_properties.
1247 * elf-properties.c (elf_merge_gnu_properties): Add struct
1248 bfd_link_info * and pass it to merge_gnu_properties.
1249 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1250 and pass it to elf_merge_gnu_properties.
1251 (_bfd_elf_link_setup_gnu_properties): Pass info to
1252 elf_merge_gnu_property_list.
1253 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1255 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1257 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1260 * binary.c (binary_set_section_contents): Scale lma by octets
1261 per byte to set filepos.
1263 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1265 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1268 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1270 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1273 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1275 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1276 patched section contents for TLS IE reloc.
1277 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1279 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1281 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1282 RELOC_FOR_GLOBAL_SYMBOL macro.
1284 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1286 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1289 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1291 * config/tc-arc.c (md_undefined_symbol): Changed.
1292 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1294 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1296 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1299 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1301 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1302 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1304 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1306 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1309 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1311 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1312 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1313 is non-zero. Add clarifying comments.
1315 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1317 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1318 name. Use local IFUNC symbol name string to report unsupported
1319 non-PIC call to IFUNC function.
1320 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1321 when generating R_386_IRELATIVE relocation.
1322 (elf_i386_finish_dynamic_symbol): Likewise.
1323 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1325 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1326 when generating R_X86_64_IRELATIVE relocation.
1327 (elf_x86_64_finish_dynamic_symbol): Likewise.
1329 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1331 * elf.c (setup_group): Make sure BFD sections are created for all
1332 group sections in the input file when processing SHF_GROUP
1334 (bfd_section_from_shdr): Avoid duplicating logic already
1335 implemented in `setup_group'.
1337 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1340 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1341 if the hint address is zero.
1343 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1346 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1347 ELF_COMMON_DEF_P for common symbols.
1349 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1351 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1352 SEC_GROUP sections as SEC_EXCLUDE.
1353 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1354 (assign_section_numbers): Use resolve_section_groups flag instead
1355 of relocatable link type.
1356 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1357 flag instead of checking the final_link flag for part of the
1358 checks in here. Fix white space as a result.
1359 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1360 instead of relocatable link type.
1361 (bfd_elf_final_link): Likewise.
1363 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1365 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1367 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1368 (s3_bfd_score_elf_check_relocs): Likewise.
1369 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1370 (score_elf_final_link_relocate): Likewise.
1371 (s7_bfd_score_elf_check_relocs): Likewise.
1373 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1375 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1378 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1380 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1381 from `reloc_count' rather than decrementing it.
1382 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1383 `reloc_count' by `int_rels_per_ext_rel'.
1384 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1385 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1386 entry determination.
1387 (s3_bfd_score_elf_check_relocs): Likewise.
1388 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1389 (s7_bfd_score_elf_relocate_section): Likewise.
1390 (s7_bfd_score_elf_check_relocs): Likewise.
1391 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1392 prototype and function.
1393 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1394 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1395 triple rather than once the sum of REL and RELA relocation entry
1397 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1398 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1399 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1400 storage allocation size determination.
1401 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1402 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1403 by `int_rels_per_ext_rel' for last relocation entry
1405 (bfd_elf_final_link): Do not multiply `reloc_count' by
1406 `int_rels_per_ext_rel' for internal relocation storage
1407 allocation size determination.
1408 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1409 `int_rels_per_ext_rel' for last relocation entry determination.
1410 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1411 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1412 (_bfd_mips_elf_relocate_section): Likewise.
1414 2017-06-05 Alan Modra <amodra@gmail.com>
1417 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1419 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1421 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1422 determine structure sizes.
1423 (elfcore_grok_freebsd_prstatus): Likewise.
1425 2017-06-01 Alan Modra <amodra@gmail.com>
1427 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1428 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1430 (is_elfv2_localentry0): New function.
1431 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1432 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1433 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1434 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1435 optimized localentry:0 stubs.
1436 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1437 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1439 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1441 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1443 2017-05-30 Casey Smith <clegg89@gmail.com>
1446 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1447 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1449 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1451 * cpu-arc.c (arc_compatible): New function.
1453 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1455 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1457 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1460 * bfdio.c (bfd_get_file_size): New function.
1461 * bfd-in2.h: Regenerated.
1463 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1465 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1468 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1470 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1471 dynobj instead of htab->elf.dynobj.
1473 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1475 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1477 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1478 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1479 actual number of internal relocations retrieved. Adjust
1480 function description.
1481 (bfd_elf64_canonicalize_reloc): Remove macro.
1482 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1484 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1486 * archures.c (bfd_mach_sparc_v9m8): Define.
1487 (bfd_mach_sparc_v8plusm8): Likewise.
1488 (bfd_mach_sparc_v9_p): Adjust to M8.
1489 (bfd_mach_sparc_64bit_p): Likewise.
1490 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1491 bfd_mach_sparc_v8plusm8.
1492 * bfd-in2.h: Regenerated.
1493 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1495 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1496 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1497 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1499 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1500 bfd_mach_sparc_v8plusm8.
1502 2017-05-19 Alan Modra <amodra@gmail.com>
1504 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1505 debug and special sections when no non-note alloc sections in an
1508 2017-05-18 Alan Modra <amodra@gmail.com>
1510 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1511 * elf-m10300.c: Likewise.
1513 * elf32-arc.c: Likewise.
1514 * elf32-bfin.c: Likewise.
1515 * elf32-m68k.c: Likewise.
1516 * elf32-nds32.c: Likewise.
1517 * elf32-tilepro.c: Likewise.
1518 * elflink.c: Likewise.
1519 * elfnn-aarch64.c: Likewise.
1520 * elfnn-riscv.c: Likewise.
1521 * elfxx-tilegx.c: Likewise.
1522 * mach-o.c: Likewise.
1523 * peXXigen.c: Likewise.
1524 * vms-alpha.c: Likewise.
1525 * vms-lib.c: Likewise.
1527 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1530 * elflink.c (elf_gc_mark_debug_section): New function.
1531 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1532 referenced by kept debug sections.
1534 2017-05-16 Alan Modra <amodra@gmail.com>
1536 * elf-m10300.c: Rename occurrences of non_ir_ref.
1537 * elf32-arm.c: Likewise.
1538 * elf32-bfin.c: Likewise.
1539 * elf32-cr16.c: Likewise.
1540 * elf32-cris.c: Likewise.
1541 * elf32-d10v.c: Likewise.
1542 * elf32-dlx.c: Likewise.
1543 * elf32-fr30.c: Likewise.
1544 * elf32-frv.c: Likewise.
1545 * elf32-hppa.c: Likewise.
1546 * elf32-i370.c: Likewise.
1547 * elf32-i386.c: Likewise.
1548 * elf32-iq2000.c: Likewise.
1549 * elf32-lm32.c: Likewise.
1550 * elf32-m32c.c: Likewise.
1551 * elf32-m32r.c: Likewise.
1552 * elf32-m68hc1x.c: Likewise.
1553 * elf32-m68k.c: Likewise.
1554 * elf32-mcore.c: Likewise.
1555 * elf32-metag.c: Likewise.
1556 * elf32-microblaze.c: Likewise.
1557 * elf32-moxie.c: Likewise.
1558 * elf32-msp430.c: Likewise.
1559 * elf32-mt.c: Likewise.
1560 * elf32-nios2.c: Likewise.
1561 * elf32-or1k.c: Likewise.
1562 * elf32-ppc.c: Likewise.
1563 * elf32-rl78.c: Likewise.
1564 * elf32-s390.c: Likewise.
1565 * elf32-score.c: Likewise.
1566 * elf32-score7.c: Likewise.
1567 * elf32-sh.c: Likewise.
1568 * elf32-tic6x.c: Likewise.
1569 * elf32-tilepro.c: Likewise.
1570 * elf32-v850.c: Likewise.
1571 * elf32-vax.c: Likewise.
1572 * elf32-xstormy16.c: Likewise.
1573 * elf32-xtensa.c: Likewise.
1574 * elf64-alpha.c: Likewise.
1575 * elf64-hppa.c: Likewise.
1576 * elf64-ia64-vms.c: Likewise.
1577 * elf64-mmix.c: Likewise.
1578 * elf64-ppc.c: Likewise.
1579 * elf64-s390.c: Likewise.
1580 * elf64-sh64.c: Likewise.
1581 * elf64-x86-64.c: Likewise.
1582 * elflink.c: Likewise.
1583 * elfnn-aarch64.c: Likewise.
1584 * elfnn-ia64.c: Likewise.
1585 * elfnn-riscv.c: Likewise.
1586 * elfxx-mips.c: Likewise.
1587 * elfxx-sparc.c: Likewise.
1588 * elfxx-tilegx.c: Likewise.
1589 * linker.c: Likewise.
1591 2017-05-16 Alan Modra <amodra@gmail.com>
1593 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1594 * elflink.c (elf_link_add_object_symbols): Update to use
1596 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1598 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1600 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1602 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1604 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1606 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1607 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1609 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1611 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1613 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1615 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1616 to plt_second/plt_second_eh_frame.
1617 (elf_x86_64_link_hash_newfunc): Updated.
1618 (elf_x86_64_allocate_dynrelocs): Likewise.
1619 (elf_x86_64_size_dynamic_sections): Likewise.
1620 (elf_x86_64_relocate_section): Likewise.
1621 (elf_x86_64_finish_dynamic_symbol): Likewise.
1622 (elf_x86_64_finish_dynamic_sections): Likewise.
1623 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1624 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1626 (elf_backend_setup_gnu_properties): Updated. Create the
1627 .plt.sec section instead of the .plt.sec section.
1629 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1631 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1632 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1633 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1635 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1637 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1638 (bfd_elf64_set_reloc): Define.
1639 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1641 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1643 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1644 (struct bfd_target): New field _bfd_set_reloc.
1645 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1646 * reloc.c (_bfd_generic_set_reloc): New function.
1647 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1648 * nlm-target.h (nlm_set_reloc): Likewise.
1649 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1650 * aout-tic30.c (MY_set_reloc): Likewise.
1651 * aout-target.h (MY_set_reloc): Likewise.
1652 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1653 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1654 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1655 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1656 * aout-adobe.c (aout_32_set_reloc): Likewise.
1657 * bout.c (b_out_set_reloc): Likewise.
1658 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
1659 * i386os9k.c (aout_32_set_reloc): Likewise.
1660 * ieee.c (ieee_set_reloc): Likewise.
1661 * oasys.c (oasys_set_reloc): Likewise.
1662 * som.c (som_set_reloc): Likewise.
1663 * versados.c (versados_set_reloc): Likewise.
1664 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1665 _bfd_generic_set_reloc.
1666 (rs6000_xcoff64_aix_vec): LIkewise.
1667 * libbfd.c (_bfd_norelocs_set_reloc): New function.
1668 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
1669 * i386msdos.c (msdos_set_reloc): Define to
1670 _bfd_norelocs_set_reloc.
1671 * elfcode.h (elf_set_reloc): Define.
1672 * bfd-in2.h: Regenerated.
1674 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1677 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1678 for IFUNC function address.
1680 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1682 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1683 (CONFLICT_LIST): Likewise.
1684 (opcode/arc-attrs.h): Include.
1685 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1686 (arc_extract_features): New file.
1687 (arc_stralloc): Likewise.
1688 (arc_elf_merge_attributes): Likewise.
1689 (arc_elf_merge_private_bfd_data): Use object attributes.
1690 (bfd_arc_get_mach_from_attributes): New function.
1691 (arc_elf_object_p): Use object attributes.
1692 (arc_elf_final_write_processing): Likewise.
1693 (elf32_arc_obj_attrs_arg_type): New function.
1694 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1695 (elf32_arc_section_from_shdr): Likewise.
1696 (elf_backend_obj_attrs_vendor): Define.
1697 (elf_backend_obj_attrs_section): Likewise.
1698 (elf_backend_obj_attrs_arg_type): Likewise.
1699 (elf_backend_obj_attrs_section_type): Likewise.
1700 (elf_backend_obj_attrs_handle_unknown): Likewise.
1701 (elf_backend_section_from_shdr): Likewise.
1703 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1706 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1707 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1708 and the destination is a Thumb symbol.
1710 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1712 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1713 initializer to silence GCC 4.2.
1714 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1716 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1718 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1719 (LAZY_PLT_ENTRY_SIZE): This.
1720 (NON_LAZY_PLT_ENTRY_SIZE): New.
1721 (elf_x86_64_plt0_entry): Renamed to ...
1722 (elf_x86_64_lazy_plt0_entry): This.
1723 (elf_x86_64_plt_entry): Renamed to ...
1724 (elf_x86_64_lazy_plt_entry): This.
1725 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1726 (elf_x86_64_lazy_bnd_plt0_entry): This.
1727 (elf_x86_64_legacy_plt_entry): Removed.
1728 (elf_x86_64_bnd_plt_entry): Renamed to ...
1729 (elf_x86_64_lazy_bnd_plt_entry): This.
1730 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1731 (elf_x86_64_non_lazy_plt_entry): This.
1732 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1733 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1734 (elf_x86_64_eh_frame_plt): Renamed to ...
1735 (elf_x86_64_eh_frame_lazy_plt): This.
1736 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1737 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1738 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1739 (elf_x86_64_eh_frame_non_lazy_plt): This.
1740 (elf_x86_64_lazy_plt_layout): New.
1741 (elf_x86_64_non_lazy_plt_layout): Likewise.
1742 (elf_x86_64_plt_layout): Likewise.
1743 (elf_x86_64_backend_data): Remove PLT layout information. Add
1744 os for target system.
1745 (GET_PLT_ENTRY_SIZE): Removed.
1746 (elf_x86_64_lazy_plt): New.
1747 (elf_x86_64_non_lazy_plt): Likewise.
1748 (elf_x86_64_lazy_bnd_plt): Likewise.
1749 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1750 (elf_x86-64_arch_bed): Updated.
1751 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1752 (elf_x86_64_create_dynamic_sections): Removed.
1753 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1754 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1755 (elf_x86-64_adjust_dynamic_symbol): Updated.
1756 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1757 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1758 size for PLT0 if there is no PLT0. Get plt_entry_size from
1759 non_lazy_plt for non-lazy PLT entries.
1760 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1761 from non_lazy_plt for non-lazy PLT entries.
1762 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1763 if there is no PLT0.
1764 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1765 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1766 entries with non-lazy PLT layout. Don't fill the second and third
1767 slots in the PLT entry if there is no PLT0.
1768 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1769 if there is no PLT0. Set sh_entsize on the .plt.got section.
1770 (compare_relocs): New.
1771 (elf_x86_64_plt_type): Likewise.
1772 (elf_x86_64_plt): Likewise.
1773 (elf_x86_64_nacl_plt): New. Forward declaration.
1774 (elf_x86_64_get_plt_sym_val): Removed.
1775 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1776 against all dynamic relocations.
1777 (elf_x86_64_link_setup_gnu_properties): New function.
1778 (elf_backend_create_dynamic_sections): Updated.
1779 (elf_backend_setup_gnu_properties): New.
1780 (elf_x86_64_nacl_plt): New.
1781 (elf_x86_64_nacl_arch_bed): Updated.
1783 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1785 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1786 (LAZY_PLT_ENTRY_SIZE): This.
1787 (NON_LAZY_PLT_ENTRY_SIZE): New.
1788 (elf_i386_plt0_entry): Renamed to ...
1789 (elf_i386_lazy_plt0_entry): This.
1790 (elf_i386_plt_entry): Renamed to ...
1791 (elf_i386_lazy_plt_entry): This.
1792 (elf_i386_pic_plt0_entry): Renamed to ...
1793 (elf_i386_pic_lazy_plt0_entry): This.
1794 (elf_i386_pic_plt_entry): Renamed to ...
1795 (elf_i386_pic_lazy_plt_entry): This.
1796 (elf_i386_got_plt_entry): Renamed to ...
1797 (elf_i386_non_lazy_plt_entry): This.
1798 (elf_i386_pic_got_plt_entry): Renamed to ...
1799 (elf_i386_pic_non_lazy_plt_entry): This.
1800 (elf_i386_eh_frame_plt): Renamed to ...
1801 (elf_i386_eh_frame_lazy_plt): This.
1802 (elf_i386_eh_frame_plt_got): Renamed to ...
1803 (elf_i386_eh_frame_non_lazy_plt): This.
1804 (elf_i386_plt_layout): Renamed to ...
1805 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1806 eh_frame_plt_got_size.
1807 (elf_i386_non_lazy_plt_layout): New.
1808 (elf_i386_plt_layout): Likewise.
1809 (elf_i386_non_lazy_plt): Likewise.
1810 (GET_PLT_ENTRY_SIZE): Removed.
1811 (elf_i386_plt): Renamed to ...
1812 (elf_i386_lazy_plt): This.
1813 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1814 (elf_i386_arch_bed): Updated.
1815 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1816 (elf_i386_create_dynamic_sections): Removed.
1817 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1818 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1819 (elf_i386_adjust_dynamic_symbol): Updated.
1820 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1821 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1822 size for PLT0 if there is no PLT0.
1823 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1824 output section is discarded only if GOT isn't empty.
1825 (elf_i386_relocate_section): Updated. Properly get PLT index
1826 if there is no PLT0.
1827 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1828 second and third slots in the PLT entry if there is no PLT0.
1829 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1830 if there is no PLT0. Set sh_entsize on the .plt.got section.
1831 (elf_i386_nacl_plt): Forward declaration.
1832 (elf_i386_get_plt_sym_val): Removed.
1833 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1834 against all dynamic relocations.
1835 (elf_i386_link_setup_gnu_properties): New function.
1836 (elf_backend_create_dynamic_sections): Updated.
1837 (elf_backend_setup_gnu_properties): New.
1838 (elf_i386_nacl_plt): Updated.
1839 (elf_i386_nacl_arch_bed): Likewise.
1840 (elf_i386_vxworks_arch_bed): Likewise.
1842 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1844 * elflink.c (elf_output_implib): Remove executable flag from import
1846 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1847 library is a relocatable object file.
1849 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1852 * elf32-avr.c (avr_should_move_sym): New function.
1853 (avr_should_reduce_sym_size): Likewise.
1854 (avr_should_increase_sym_size): Likewise.
1855 (elf32_avr_relax_delete_bytes): Adjust symbol values
1856 and sizes by calling new functions.
1858 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1860 * config.bfd (riscv32-*): Enable rv64.
1862 2017-05-02 Alan Modra <amodra@gmail.com>
1865 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1866 rather than h->root.type == bfd_link_hash_new.
1867 (bfd_elf_record_link_assignment): Similarly, call
1868 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1870 2017-04-29 Alan Modra <amodra@gmail.com>
1873 * reloc.c (reloc_offset_in_range): New function.
1874 (bfd_perform_relocation, bfd_install_relocation): Use it.
1875 (_bfd_final_link_relocate): Likewise.
1877 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1879 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1880 before using .plt.got.
1881 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1883 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1885 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1886 instead of "+=" to update 0.
1888 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1890 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1891 .plt.got section here.
1892 (elf_i386_check_relocs): Don't create the .plt.got section.
1893 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1894 the .plt.got and .plt.bnd sections here.
1895 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1898 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1900 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1902 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1903 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1904 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1905 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1908 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1910 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1912 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1913 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1914 the first relocatable ELF input with GNU properties.
1916 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1918 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1919 VxWorks for non-PIC.
1921 2017-04-27 Alan Modra <amodra@gmail.com>
1923 * elf-bfd.h (struct elf_backend_data): Make asection param of
1924 elf_backend_eh_frame_address_size const.
1925 (_bfd_elf_eh_frame_address_size): Likewise.
1926 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1927 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1928 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1929 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1930 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1931 (next_cie_fde_offset): Constify params.
1932 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1934 2017-04-27 Alan Modra <amodra@gmail.com>
1936 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1937 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1938 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1940 (offset_adjust): New function.
1941 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1942 (adjust_eh_frame_local_symbols): Likewise.
1943 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1944 after changing anything. Return true if anything changed.
1945 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1946 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1948 2017-04-27 Alan Modra <amodra@gmail.com>
1950 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1953 2017-04-27 Alan Modra <amodra@gmail.com>
1955 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1956 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1957 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1958 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1959 for undef and undefweak dyn_relocs.
1960 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1961 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1962 (allocate_got, allocate_dynrelocs): Likewise.
1963 (ppc64_elf_relocate_section): Likewise.
1965 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1967 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1968 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1969 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1970 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1972 2017-04-26 Nick Clifton <nickc@redhat.com>
1975 * reloc.c (bfd_perform_relocation): Check for a negative address
1978 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1981 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1983 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1984 (elf_backend_always_renumber_dynsyms): Define.
1985 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1986 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1987 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1988 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1990 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1992 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1994 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1995 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1996 sections have been created.
1998 2017-04-26 Nick Clifton <nickc@redhat.com>
2001 * compress.c (bfd_init_section_compress_status): Check the return
2002 value from bfd_malloc.
2004 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2006 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2007 no_finish_dynamic_symbol.
2008 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2010 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2011 weak symbol, don't make it dynamic.
2012 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2013 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2014 relocation for GOT reference.
2015 (elf_x86_64_finish_dynamic_symbol): Abort if
2016 no_finish_dynamic_symbol isn't 0.
2018 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2021 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2022 undefined weak symbol, don't make it dynamic.
2023 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2024 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2025 relocation for R_386_GOT32.
2027 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2030 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2032 2017-04-23 Alan Modra <amodra@gmail.com>
2035 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2036 * elf.c (lcomm_sym): New.
2037 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2038 * bfd-in2.h: Regenerate.
2040 2017-04-23 Alan Modra <amodra@gmail.com>
2043 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2044 parameters and comment.
2045 (_bfd_elf_get_reloc_section): Delete.
2046 (_bfd_elf_plt_get_reloc_section): Declare.
2047 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2048 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2050 (_bfd_elf_get_reloc_section): ..here. Delete.
2051 (assign_section_numbers): Call elf_get_reloc_section.
2052 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2053 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2055 2017-04-23 Alan Modra <amodra@gmail.com>
2058 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2061 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2064 * elf32-i386.c (elf_i386_link_hash_entry): Add
2065 no_finish_dynamic_symbol.
2066 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2067 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2068 symbol, don't make it dynamic in PIE.
2069 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2070 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2071 relocation for R_386_GOT32
2072 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2075 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2079 * elflink.c (elf_link_add_object_symbols): Require
2080 --no-dynamic-linker with -E/--dynamic-list when creating
2083 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2085 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2088 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2090 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2091 dynamic symbol sorting.
2093 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2096 * elflink.c (elf_link_add_object_symbols): Preserve
2097 dynamic_ref_after_ir_def when restoring the symbol table for
2098 unneeded dynamic object.
2100 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2103 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2104 on on undefined IFUNC symbol in the second PLT.
2106 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2108 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2110 2017-04-19 Alan Modra <amodra@gmail.com>
2112 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2113 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2114 * elf32-ppc.c:Formatting.
2115 (ensure_undefweak_dynamic): Don't make dynamic when
2116 info->dynamic_undefined_weak is zero.
2117 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2118 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2119 not default visibility. Discard undef and undefweak
2121 (ppc_elf_relocate_section): Adjust to suit.
2122 * elf64-ppc.c: Formatting.
2123 (ensure_undefweak_dynamic): Don't make dynamic when
2124 info->dynamic_undefined_weak is zero.
2125 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2126 info->dynamic_undefined_weak. Discard them earlier.
2128 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2131 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2132 before generating the version definition section.
2134 2017-04-17 Alan Modra <amodra@gmail.com>
2136 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2137 state when a regular object file defines a symbol with
2138 incompatible type to that defined by an earlier shared lib.
2140 2017-04-13 Alan Modra <amodra@gmail.com>
2142 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2144 * elf32-arm.c: Likewise.
2145 * elf32-i386.c: Likewise.
2146 * elf32-mep.c: Likewise.
2147 * elf64-ia64-vms.c: Likewise.
2148 * elf64-x86-64.c: Likewise.
2149 * elflink.c: Likewise.
2150 * elfnn-ia64.c: Likewise.
2151 * elfxx-mips.c: Likewise.
2153 2017-04-13 Alan Modra <amodra@gmail.com>
2155 * aoutx.h: Use %B and %A in error messages throughout file.
2156 * aout-cris.c: Likewise.
2157 * archive.c: Likewise.
2158 * binary.c: Likewise.
2159 * coff-rs6000.c: Likewise.
2160 * coff-tic4x.c: Likewise.
2161 * coffcode.h: Likewise.
2162 * coffgen.c: Likewise.
2163 * cofflink.c: Likewise.
2164 * coffswap.h: Likewise.
2165 * cpu-arm.c: Likewise.
2166 * elf-eh-frame.c: Likewise.
2167 * elf-m10300.c: Likewise.
2169 * elf32-arc.c: Likewise.
2170 * elf32-arm.c: Likewise.
2171 * elf32-bfin.c: Likewise.
2172 * elf32-frv.c: Likewise.
2173 * elf32-iq2000.c: Likewise.
2174 * elf32-m32c.c: Likewise.
2175 * elf32-microblaze.c: Likewise.
2176 * elf32-nds32.c: Likewise.
2177 * elf32-rl78.c: Likewise.
2178 * elf32-rx.c: Likewise.
2179 * elf32-score.c: Likewise.
2180 * elf32-score7.c: Likewise.
2181 * elf32-sh64.c: Likewise.
2182 * elf32-v850.c: Likewise.
2183 * elf32-vax.c: Likewise.
2184 * elf32-visium.c: Likewise.
2185 * elf64-ia64-vms.c: Likewise.
2186 * elf64-mmix.c: Likewise.
2187 * elf64-sh64.c: Likewise.
2188 * elfcode.h: Likewise.
2189 * elfnn-aarch64.c: Likewise.
2190 * elfnn-ia64.c: Likewise.
2191 * elfxx-mips.c: Likewise.
2192 * hpux-core.c: Likewise.
2195 * linker.c: Likewise.
2196 * merge.c: Likewise.
2198 * oasys.c: Likewise.
2199 * pdp11.c: Likewise.
2200 * peXXigen.c: Likewise.
2201 * rs6000-core.c: Likewise.
2202 * vms-alpha.c: Likewise.
2203 * xcofflink.c: Likewise.
2205 2017-04-13 Alan Modra <amodra@gmail.com>
2207 * bfd.c (PRINT_TYPE): Define.
2208 (_doprnt): New function.
2209 (error_handler_internal): Use _doprnt.
2210 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2211 calls in their natural order, throughout file.
2212 * coff-mcore.c: Likewise.
2213 * coff-ppc.c: Likewise.
2214 * coff-tic80.c: Likewise.
2215 * cofflink.c: Likewise.
2216 * elf-s390-common.c: Likewise.
2218 * elf32-arm.c: Likewise.
2219 * elf32-i386.c: Likewise.
2220 * elf32-m32r.c: Likewise.
2221 * elf32-msp430.c: Likewise.
2222 * elf32-spu.c: Likewise.
2223 * elf64-ia64-vms.c: Likewise.
2224 * elf64-sparc.c: Likewise.
2225 * elf64-x86-64.c: Likewise.
2226 * elflink.c: Likewise.
2227 * elfnn-aarch64.c: Likewise.
2228 * elfnn-ia64.c: Likewise.
2229 * elfxx-mips.c: Likewise.
2231 2017-04-13 Alan Modra <amodra@gmail.com>
2233 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2234 branch veneers" error. Fix double space and format message.
2235 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2236 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2238 2017-04-13 Alan Modra <amodra@gmail.com>
2240 * bfd-in2.h: Regenerate.
2242 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2244 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2245 extra `\n' in warning/error messages.
2246 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2247 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2249 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2251 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2252 processor-specific properties with generic ELF target vector.
2254 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2256 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2257 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2258 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2259 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2261 (link_hash_newfunc): Initialize has_got_reloc and
2263 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2265 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2267 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2269 (_bfd_sparc_elf_fixup_symbol): New function.
2270 (allocate_dynrelocs): Don't allocate space for dynamic
2271 relocations and discard relocations against resolved undefined
2272 weak symbols in executable. Don't make resolved undefined weak
2273 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2274 relocation against undefined weak symbols in PIE.
2275 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2276 relocations against resolved undefined weak symbols in PIE
2277 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2278 without ynamic PLT/GOT relocations for resolved undefined weak
2280 Don't generate dynamic relocation against resolved undefined
2281 weak symbol in executable.
2282 (pie_finish_undefweak_symbol): New function.
2283 (_bfd_sparc_elf_finish_dynamic_sections): Call
2284 pie_finish_undefweak_symbol on all symbols in PIE.
2285 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2286 (_bfd_sparc_elf_fixup_symbol): New function.
2288 2017-04-10 Nick Clifton <nickc@redhat.com>
2290 * config.bfd: Remove ns32k from obsolete list.
2292 2017-04-10 Alan Modra <amodra@gmail.com>
2295 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2296 (special_sections_i): Likewise for .init_array.
2297 (special_sections_p): Likewise for .preinit_array.
2299 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2303 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2304 ELF_COMMON_DEF_P for common symbols.
2305 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2306 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2307 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2308 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2309 07492f668d2173da7a2bda3707ff0985e0f460b6.
2311 2017-04-07 Pedro Alves <palves@redhat.com>
2313 * opncls.c (bfd_get_debug_link_info): Rename to...
2314 (bfd_get_debug_link_info_1): ... this. Change type of second
2315 parameter to void pointer. Adjust.
2316 (bfd_get_debug_link_info): Reimplement on top of
2317 bfd_get_debug_link_info_1.
2318 (separate_debug_file_exists, separate_alt_debug_file_exists):
2319 Change type of second parameter to void pointer. Adjust.
2320 (get_func_type, check_func_type): Change type of second parameter
2322 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2323 the callback functions instead of passing the address of a local.
2324 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2325 find_separate_debug_file.
2326 (get_alt_debug_link_info_shim): Change type of second parameter to
2327 void pointer. Adjust.
2328 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2329 find_separate_debug_file.
2330 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2331 of second parameter to void pointer. Adjust.
2332 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2333 pointer local to find_separate_debug_file.
2335 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2337 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2338 external symbols with a definition.
2339 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2341 2017-04-07 Alan Modra <amodra@gmail.com>
2343 * po/SRC-POTFILES.in: Regenerate.
2345 2017-04-05 Alan Modra <amodra@gmail.com>
2347 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2350 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2352 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2353 numbers for DataDirectory entry indicies passed to
2356 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2358 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2359 each GNU_MBIND section and align GNU_MBIND section to page size.
2360 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2361 segment for each GNU_MBIND section.
2362 (_bfd_elf_init_private_section_data): Copy sh_info from input
2363 for GNU_MBIND section.
2365 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2367 * elfnn-riscv.c (GP_NAME): Delete.
2368 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2369 (_bfd_riscv_relax_lui): Likewise.
2371 2017-04-04 Nick Clifton <nickc@redhat.com>
2374 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2376 (bfd_elf_final_link): Only initialize the extended symbol index
2377 section if there are extended symbol tables to list.
2379 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2381 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2382 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2383 * configure.ac (elf): Add elf-properties.lo.
2384 * Makefile.in: Regenerated.
2385 * configure: Likewise.
2386 * elf-bfd.h (elf_property_kind): New.
2387 (elf_property): Likewise.
2388 (elf_property_list): Likewise.
2389 (elf_properties): Likewise.
2390 (_bfd_elf_parse_gnu_properties): Likewise.
2391 (_bfd_elf_get_property): Likewise.
2392 (_bfd_elf_link_setup_gnu_properties): Likewise.
2393 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2394 and setup_gnu_properties.
2395 (elf_obj_tdata): Add properties.
2396 * elf-properties.c: New file.
2397 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2398 (elf_i386_merge_gnu_properties): Likewise.
2399 (elf_backend_parse_gnu_properties): Likewise.
2400 (elf_backend_merge_gnu_properties): Likewise.
2401 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2402 (elf_x86_64_merge_gnu_properties): Likewise.
2403 (elf_backend_parse_gnu_properties): Likewise.
2404 (elf_backend_merge_gnu_properties): Likewise.
2405 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2406 (elf_backend_parse_gnu_properties): Likewise.
2407 (elf_backend_setup_gnu_properties): Likewise.
2408 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2409 elf_backend_merge_gnu_properties and
2410 elf_backend_setup_gnu_properties.
2412 2017-03-30 Pip Cet <pipcet@gmail.com>
2414 * elf32-wasm32.c: Add relocation code, two relocs.
2415 * reloc.c: Add wasm32 relocations.
2416 * libbfd.h: Regenerate.
2417 * bfd-in2.h: Regenerate.
2418 * bfd/po/bfd.pot: Regenerate.
2420 2017-03-29 Nick Clifton <nickc@redhat.com>
2423 * coff-bfd.h (struct coff_section_data): Add new fields:
2424 saved_bias and bias.
2425 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2426 computed for PE binaries.
2427 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2430 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
2433 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2434 to handle a local symbol with a hash-symbol-entry; without PLT.
2435 Add BFD_ASSERT for an incidental case with GOT entry present.
2436 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2437 isn't forced-or-set local.
2439 2017-03-27 Pip Cet <pipcet@gmail.com>
2441 * wasm-module.c: New file to support WebAssembly modules.
2442 * wasm-module.h: New file to support WebAssembly modules.
2443 * doc/webassembly.texi: Start documenting wasm-module.c.
2444 * config.bfd: Add wasm_vec.
2445 * targets.c: Likewise.
2446 * configure.ac: Likewise.
2447 * Makefile.am: Add entries for wasm-module.c.
2448 * Makefile.in: Regenerate.
2449 * configure: Regenerate.
2450 * po/SRC-POTFILES.in: Regenerate.
2452 2017-03-27 Pip Cet <pipcet@gmail.com>
2454 * cpu-wasm32.c: New file to support wasm32 architecture.
2455 * elf32-wasm32.c: New file to support wasm32 architecture.
2456 * Makefile.am: Add wasm32 architecture.
2457 * archures.c: Likewise.
2458 * config.bfd: Likewise.
2459 * configure.ac: Likewise.
2460 * targets.c: Likewise.
2461 * Makefile.in: Regenerate.
2462 * bfd-in2.h: Regenerate.
2463 * configure: Regenerate.
2464 * po/SRC-POTFILES.in: Regenerate.
2466 2017-03-20 Alan Modra <amodra@gmail.com>
2469 * elf64-ppc.c (compare_symbols): Stabilize sort.
2471 2017-03-18 Alan Modra <amodra@gmail.com>
2473 * elf64-ppc.c (struct ppc_link_hash_table): Add
2474 local_ifunc_resolver and maybe_local_ifunc_resolver.
2475 (ppc_build_one_stub): Set flags on emitting dynamic
2476 relocation to ifunc.
2477 (ppc64_elf_relocate_section): Likewise.
2478 (ppc64_elf_finish_dynamic_symbol): Likewise.
2479 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2480 local dynamic relocs to ifuncs.
2481 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2482 local_ifunc_resolver and maybe_local_ifunc_resolver.
2483 (ppc_elf_relocate_section): Set flag on emitting dynamic
2484 relocation to ifuncs.
2485 (ppc_elf_finish_dynamic_symbol): Likewise.
2486 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2487 dynamic relocs to ifuncs.
2489 2017-03-13 Nick Clifton <nickc@redhat.com>
2492 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2493 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2494 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2495 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2496 * bfd-in2.h: Regenerate.
2497 * libbfd.h: Regenerate.
2498 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2500 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2501 (elfNN_aarch64_howto_table): Likewise.
2502 (aarch64_tls_transition_without_check): Likewise.
2503 (aarch64_reloc_got_type): Likewise.
2504 (elfNN_aarch64_final_link_relocate): Likewise.
2505 (elfNN_aarch64_tls_relax): Likewise.
2506 (elfNN_aarch64_relocate_section): Likewise.
2507 (elfNN_aarch64_gc_sweep_hook): Likewise.
2508 (elfNN_aarch64_check_relocs): Likewise.
2509 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2510 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2512 2017-03-11 Alan Modra <amodra@gmail.com>
2514 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2515 parameter is in fact used. Whitespace fixes.
2516 * elf64-ppc.c: Likewise.
2518 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2520 * rs6000-core.c (CORE_NEW): Simplify macro when
2521 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2523 2017-03-07 Alan Modra <amodra@gmail.com>
2527 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2530 2017-03-05 Alan Modra <amodra@gmail.com>
2532 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2533 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2534 (next_cie_fde_offset): New function.
2535 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2536 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2537 four bytes. Align CIEs to four or eight bytes depending on
2538 per_encoding_aligned8. Align FDEs according to their encoding.
2539 Pad last FDE to output section alignment.
2540 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2542 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2543 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2544 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2546 2017-03-02 Martin Bickel <binutils@ineranves.de>
2549 * elf.c (rewrite_elf_program_header): Do not issue a warning for
2550 empty segments which have a zero filesz, but a non-zero memsz.
2552 2017-03-02 Alan Modra <amodra@gmail.com>
2554 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2556 2017-02-28 Alan Modra <amodra@gmail.com>
2558 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2559 (ppc64_elf_relocate_section): Likewise.
2561 2017-02-28 Alan Modra <amodra@gmail.com>
2564 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2565 rather than elf32_nios2_hash_table or elf_hash_table.
2566 (create_got_section): Likewise.
2567 (nios2_elf32_finish_dynamic_symbol): Likewise.
2568 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2569 (nios2_elf32_size_dynamic_sections): Likewise.
2570 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2571 vars. Use htab equivalents directly instead. Don't create
2572 all dynamic sections on needing just the GOT. Use a goto
2573 rather than a fall-through with reloc test. Ensure
2574 htab->dynobj is set when making dynamic sreloc section.
2575 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2576 equivalent directly instead. Don't segfault on looking for
2577 .dynamic when dynamic sections have not been created. Don't
2578 segfault on .got.plt being discarded.
2579 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2580 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2581 fixme and another not so relevant comment.
2582 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2583 already set, set hash table dynobj on creating .sbss.
2585 2017-02-28 Alan Modra <amodra@gmail.com>
2587 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2588 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2589 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2590 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2591 (ppc64_elf_relocate_section): Likewise.
2592 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2593 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2594 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2595 * libbfd.h: Regenerate.
2596 * bfd-in2.h: Regenerate.
2598 2017-02-28 Alan Modra <amodra@gmail.com>
2600 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2601 dynamic .data.rel.ro read-only.
2602 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2603 rather than section flags when deciding where copy reloc goes.
2604 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2605 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2606 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2607 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2608 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2609 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2610 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2611 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2612 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2613 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2614 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2615 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2616 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2617 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2618 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2619 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2620 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2621 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2622 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2624 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2626 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2627 `jalr $0, $25' instruction encoding.
2629 2017-02-27 Nick Clifton <nickc@redhat.com>
2632 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2633 generating a seg-fault when encountering a symbol that has been
2634 deleted by garbage collection.
2636 2017-02-25 Alan Modra <amodra@gmail.com>
2638 * elf32-arc.c (struct dynamic_sections): Delete.
2639 (enum dyn_section_types): Delete.
2640 (dyn_section_names): Delete.
2641 (arc_create_dynamic_sections): Delete.
2642 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2643 segfault on discarded .rela.plt section.
2644 (elf_arc_size_dynamic_sections): Formatting. Don't call
2645 arc_create_dynamic_sections. Don't allocate memory for sections
2646 handled by the generic linker. Correct code finding relocs in
2647 read-only sections. Set SEC_EXCLUDE on zero size .got,
2648 .got.plt, and .dynbss sections. Do set .interp for pies.
2650 2017-02-24 Andrew Waterman <andrew@sifive.com>
2652 * elfnn-riscv.c (GP_NAME): New macro.
2653 (riscv_global_pointer_value): Use it.
2654 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2655 output section, consider only that section's alignment.
2657 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2659 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
2660 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
2661 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
2662 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
2664 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2666 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
2667 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
2670 2017-02-23 Alan Modra <amodra@gmail.com>
2673 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2675 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2676 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2679 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2682 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2683 processing ahead of the call to `elf_gc_sweep_symbol'.
2685 2017-02-22 Nick Clifton <nickc@redhat.com>
2688 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2689 created section 4-byte alignment.
2691 2017-02-22 Alan Modra <amodra@gmail.com>
2693 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2694 on .got or .plt output section being discarded by script.
2695 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2698 2017-02-21 Alan Modra <amodra@gmail.com>
2700 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2701 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2703 2017-02-20 Alan Modra <amodra@gmail.com>
2706 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2707 if DT_RELSZ/DT_RELASZ is zero.
2709 2017-02-17 Nick Clifton <nickc@redhat.com>
2711 * compress.c (bfd_get_full_section_contents): Remember to reduce
2712 compressed size by the sizeof the compression header when
2713 decompressing the contents.
2715 2017-02-17 Pedro Alves <palves@redhat.com>
2717 * srec.c (Chunk): Rename to ...
2718 (_bfd_srec_len): ... this.
2719 (S3Forced): Rename to ...
2720 (_bfd_srec_forceS3): ... this.
2721 * objcopy.c: Adjust all references.
2723 2017-02-17 Pedro Alves <palves@redhat.com>
2725 * archive.c (bsd_write_armap): Rename to ...
2726 (_bfd_bsd_write_armap): ... this.
2727 (coff_write_armap): Rename to ...
2728 (_bfd_coff_write_armap): ... this.
2729 * libbfd-in.h (bsd_write_armap): Rename to ...
2730 (_bfd_bsd_write_armap): ... this.
2731 (coff_write_armap): Rename to ...
2732 (_bfd_coff_write_armap): ... this.
2733 * aout-target.h, aout-tic30.c: Adjust all users.
2734 * libbfd.h: Regenerate.
2736 2017-02-17 Pedro Alves <palves@redhat.com>
2738 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2739 (warn_deprecated): Rename to ...
2740 (_bfd_warn_deprecated): ... this.
2741 * libbfd.c (warn_deprecated): Rename to ...
2742 (_bfd_warn_deprecated): ... this.
2743 * bfd-in2.h: Regenerate.
2745 2017-02-17 Pedro Alves <palves@redhat.com>
2747 * bfdio.c (real_ftell): Rename to ...
2748 (_bfd_real_ftell): ... this.
2749 (real_fseek): Rename to ...
2750 (_bfd_real_fseek): ... this.
2751 (real_fopen): Rename to ...
2752 (_bfd_real_fopen): ... this.
2753 * libbfd-in.h (real_ftell): Rename to ...
2754 (_bfd_real_ftell): ... this.
2755 (real_fseek): Rename to ...
2756 (_bfd_real_fseek): ... this.
2757 (real_fopen): Rename to ...
2758 (_bfd_real_fopen): ... this.
2759 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2760 * libbfd.h: Regenerate.
2762 2017-02-17 Pedro Alves <palves@redhat.com>
2764 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2765 * libbfd.c (read_unsigned_leb128): Rename to ...
2766 (_bfd_read_unsigned_leb128): ... this.
2767 (read_signed_leb128): Rename to ...
2768 (_bfd_read_signed_leb128): ... this.
2769 (safe_read_leb128): Rename to ...
2770 (_bfd_safe_read_leb128): ... this.
2771 * libbfd-in.h (read_unsigned_leb128): Rename to ...
2772 (_bfd_read_unsigned_leb128): ... this.
2773 (read_signed_leb128): Rename to ...
2774 (_bfd_read_signed_leb128): ... this.
2775 (safe_read_leb128): Rename to ...
2776 (_bfd_safe_read_leb128): ... this.
2777 * libbfd.h: Renegerate.
2779 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2781 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2782 before trying to fine matching file and line information.
2784 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2786 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2787 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2788 not match current bfd, then reload debug information. Record bfd
2789 we're loading debug info for in the stash. If we have debug
2790 informatin in the cache then perform section placement before
2793 2017-02-16 Alan Modra <amodra@gmail.com>
2796 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2797 * elfxx-target.h (elf_backend_no_page_alias): Define.
2798 (elfNN_bed): Init new field.
2799 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2800 ensure PT_LOAD segment starts on a new page.
2801 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2803 2017-02-16 Alan Modra <amodra@gmail.com>
2806 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2809 2017-02-16 Jiong Wang <jiong.wang@arm.com>
2811 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2812 * bfd-in2.h: Regenerated.
2814 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2817 * elf32-i386.c (elf_i386_relocate_section): Allow
2818 "lea foo@GOT, %reg" in PIC.
2820 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2823 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2824 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2825 error against local IFUNC symbol without a base register for
2828 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2830 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2831 `%P: %H:' with `info->callbacks->einfo'.
2832 (ppc_elf_relocate_section): Likewise.
2833 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2834 (ppc64_elf_edit_toc): Likewise.
2835 (ppc64_elf_relocate_section): Likewise.
2837 2017-02-14 Alan Modra <amodra@gmail.com>
2839 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2840 --gc-keep-exported, and test versioned field of sym rather than
2841 looking for @ in name.
2843 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2845 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2848 2017-02-13 Nick Clifton <nickc@redhat.com>
2851 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2854 2017-02-07 Andrew Waterman <andrew@sifive.com>
2856 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2857 entry size if PLT header is written.
2859 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2861 Fix sparc64 dynamic relocation processing to use the dynamic
2863 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2864 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2867 2017-02-03 Nick Clifton <nickc@redhat.com>
2870 * coffcode.h (coff_write_object_contents): Enlarge size of
2871 s_name_buf in order to avoid compile time warning about possible
2873 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2874 32-bits of insn value before printing into buffer.
2876 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2878 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2879 `max_local_dynindx'.
2880 (mips_elf_sort_hash_table): Handle it.
2881 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2882 symbols bump up `max_local_dynindx' rather than
2883 `max_non_got_dynindx'.
2885 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2887 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2888 `min_got_dynindx', `max_unref_got_dynindx' and
2889 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2890 (mips_elf_sort_hash_table): Adjust accordingly.
2892 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2894 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2895 to access the hash table.
2897 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2899 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2900 non-NULL `htab' to the beginning.
2902 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2904 * elflink.c (elf_gc_sweep): Wrap overlong line.
2906 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2908 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2909 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2910 * elfxx-mips.c (mips_elf_link_hash_table): Add
2911 `ignore_branch_isa' member.
2912 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2913 in branch relocation calculation as an error if
2914 `ignore_branch_isa' has been set.
2915 (_bfd_mips_elf_insn32): Rename to...
2916 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2917 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2918 Handle the new parameter.
2920 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2922 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2923 local variable dynobj.
2926 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2927 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2928 executable from read-only sections into sdynrelro.
2929 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2930 dynamic relocs in sdynrelro.
2931 (elf_backend_want_dynrelro): Define.
2933 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2935 * config.bfd (*-*-rtemsaout*): Mark as removed.
2937 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2939 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2940 (arm-*-rtems*): Move to (arm*-*-eabi*).
2941 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2942 (m68-*-rtems*): Move to (m68*-*-elf*).
2944 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2946 * config.bfd (*-*-rtemscoff*): Mark as removed.
2948 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2951 * elflink.c (bfd_elf_record_link_assignment): Revert last
2952 change and don't ever clear `forced_local'. Set `mark'
2954 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2956 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2957 (bfd_elf_size_dynamic_sections): ... here.
2958 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2959 and set `mark' instead in `__tls_get_addr_opt' processing.
2960 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2962 2017-01-24 Alan Modra <amodra@gmail.com>
2964 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2965 where dynamic relocs are preferable. Allow ifunc too.
2966 (ensure_undefweak_dynamic): New function.
2967 (allocate_dynrelocs): Use it here. Move plt handling last and
2968 don't make symbols dynamic, simplifying loop. Only make undef
2969 weak symbols with GOT entries dynamic. Correct condition
2970 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2971 comments. Remove goto.
2972 (ppc_elf_relocate_section): Correct test for using dynamic
2973 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2974 to suit. Set up explicit tls_index entries and implicit GOT
2975 tls_index entries resolvable at link time for
2976 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2977 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2978 (ensure_undefweak_dynamic): New function.
2979 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2980 with GOT entries dynamic. Remove unnecessary test of
2981 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2982 (ppc64_elf_relocate_section): Correct test for using dynamic
2983 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2984 to suit. Set up explicit tls_index entries and implicit GOT
2985 tls_index entries resolvable at link time for __tls_get_addr_opt.
2986 Simplify expression to clear mem for prelink.
2988 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2990 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2992 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2994 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2995 (elf_backend_hash_symbol): Define.
2997 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3000 * elflink.c (bfd_elf_record_link_assignment): Clear any
3001 `forced_local' marking for DSO symbols that are not being
3004 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3006 * elfnn-riscv.c (riscv_elf_object_p): New function.
3008 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3011 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3013 (elf_x86_64_check_relocs): Create .eh_frame section for the
3015 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3016 .eh_frame section for the .plt.bnd section.
3017 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3018 for the .plt.bnd section.
3020 2017-01-12 Nick Clifton <nickc@redhat.com>
3023 * opncls.c (find_separate_debug_file): Add include_dirs
3024 parameter. Only include the directory part of the bfd's filename
3025 in search paths if include_dirs is true. Add a couple of extra
3026 locations for looking for debug files.
3027 ( bfd_follow_gnu_debuglink): Update invocation of
3028 find_separate_debug_file.
3029 (bfd_follow_gnu_debugaltlink): Likewise.
3030 (get_build_id): New function: Finds the build-id of the given bfd.
3031 (get_build_id_name): New function: Computes the name of the
3032 separate debug info file for a bfd, based upon its build-id.
3033 (check_build_id_file): New function: Checks to see if a separate
3034 debug info file exists at the given location, and that its
3035 build-id matches that of the original bfd.
3036 (bfd_follow_build_id_debuglink): New function: Finds a separate
3037 debug info file for a given bfd by using the build-id method.
3038 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3039 method of locating a separate debug info file before using the
3041 * bfd-in2.h: Regenerate.
3043 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3046 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3047 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3048 elf_x86_64_eh_frame_plt_got.
3049 (elf_x86_64_size_dynamic_sections): Get unwind info from
3050 elf_x86_64_bnd_arch_bed for the BND PLT.
3052 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3054 * config.bfd: Add entries for i686-redox and x86_64-redox.
3056 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3058 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3060 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3061 .eh_frame section to 4 bytes for x32.
3062 (elf_x86_64_check_relocs): Likewise.
3064 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3067 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3068 (PLT_GOT_FDE_LENGTH): Likewise.
3069 (elf_i386_plt_layout): Add eh_frame_plt_got and
3070 eh_frame_plt_got_size.
3071 (elf_i386_plt): Updated.
3072 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3073 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3074 (elf_i386_size_dynamic_sections): Allocate and initialize
3075 .eh_frame section for .plt.got.
3076 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3078 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3079 eh_frame_plt_got_size.
3080 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3081 (PLT_GOT_FDE_LENGTH): Likewise.
3082 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3083 eh_frame_plt_got_size.
3084 (elf_x86_64_arch_bed): Updated.
3085 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3086 eh_frame_plt_got_size.
3087 (elf_x86_64_nacl_arch_bed): Likewise.
3088 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3089 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3090 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3091 .eh_frame section for .plt.got.
3092 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3095 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3097 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3098 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3100 2017-01-09 Nick Clifton <nickc@redhat.com>
3102 * dwarf2.c (lookup_address_in_function_table): Return early if
3103 there are no functions in the given comp unit, or if the high
3104 address of the last function in the comp unit is less than the
3107 2017-01-09 Nick Clifton <nickc@redhat.com>
3110 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3111 message if there are too many symbols to load.
3113 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3115 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3116 if relocs are cached.
3118 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3121 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3122 for R_MICROBLAZE_GOTOFF_64.
3124 2017-01-03 Nick Clifton <nickc@redhat.com>
3126 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3127 warning about using a possibly uninitialised variable.
3129 2017-01-02 Alan Modra <amodra@gmail.com>
3131 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3132 (allocate_plt_static, allocate_dynrelocs): Use it.
3134 2017-01-02 Alan Modra <amodra@gmail.com>
3136 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3137 .PARISC.unwind section.
3139 2017-01-02 Alan Modra <amodra@gmail.com>
3142 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3143 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3144 indirect to GOT pointer relative code edit.
3146 2017-01-02 Alan Modra <amodra@gmail.com>
3148 Update year range in copyright notice of all files.
3150 For older changes see ChangeLog-2016
3152 Copyright (C) 2017 Free Software Foundation, Inc.
3154 Copying and distribution of this file, with or without modification,
3155 are permitted in any medium without royalty provided the copyright
3156 notice and this notice are preserved.
3162 version-control: never