1 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
4 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
5 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
6 Add a has_no_copy_on_protected bitfield.
7 (elf_has_no_copy_on_protected): New.
8 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
9 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
10 (elf_merge_gnu_property_list): Likewise.
11 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
12 to FALSE for elf_has_no_copy_on_protected.
13 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
14 (elf_i386_link_hash_entry): Add def_protected.
15 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
16 when checking info->nocopyreloc.
17 (elf_i386_link_setup_gnu_properties): Don't set
18 extern_protected_data here.
19 (elf_i386_merge_symbol_attribute): New function.
20 (elf_backend_merge_symbol_attribute): New.
21 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
22 (elf_x86_64_link_hash_entry): Add def_protected.
23 (elf_x86_64_need_pic): Report protected symbol for def_protected.
24 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
25 when checking info->nocopyreloc.
26 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
27 relocation run-time overflow and unresolvable R_X86_64_32S
28 relocation against protected data symbol defined in shared object
29 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
30 (elf_x86_64_link_setup_gnu_properties): Don't set
31 extern_protected_data here.
32 (elf_x86_64_merge_symbol_attribute): New function.
33 (elf_backend_merge_symbol_attribute): New.
35 2017-08-26 Alan Modra <amodra@gmail.com>
37 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
38 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
39 (ppc_elf_relocate_section): Comment fix.
40 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
41 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
42 Support dynamic relocs for TPREL16 when non-pic too.
43 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
44 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
47 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
49 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
51 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
53 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
56 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
57 R_X86_64_PC32 relocation run-time overflow and unresolvable
58 R_X86_64_32S relocation with -z nocopyreloc.
60 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
62 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
63 Undefined symbols may not have a type.
64 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
66 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
68 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
69 bfd_link_info. Report shared, PIE or PDE object based on
71 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
72 (elf_x86_64_relocate_section): Likewise.
74 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
76 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
78 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
80 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
82 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
83 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
84 is set on any input relocatable file.
85 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
87 2017-08-23 Alan Modra <amodra@gmail.com>
90 * elf64-ppc.c (ensure_undef_dynamic): Rename from
91 ensure_undefweak_dynamic. Handle undefined too.
92 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
93 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
94 (allocate_dynrelocs): Discard undefined non-default visibility
95 relocs first. Make undefined syms dynamic. Tidy goto.
97 2017-08-21 Alan Modra <amodra@gmail.com>
98 H.J. Lu <hongjiu.lu@intel.com>
101 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
102 * elflink.c (bfd_elf_define_start_stop): Rewrite.
104 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
107 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
108 undefined weak symbols.
110 2017-08-18 Nick Clifton <nickc@redhat.com>
113 * tekhex.c (getsym): Fix check for source pointer walking off the
114 end of the input buffer.
116 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
119 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
120 relocations in debug sections, change abort to _bfd_error_handler.
122 2017-08-14 Nick Clifton <nickc@redhat.com>
125 * elf.c (setup_group): Check for an empty or very small group
127 * po/bfd.pot: Regenerate.
129 2017-08-14 Alan Modra <amodra@gmail.com>
132 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
133 alignment padding here.
134 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
135 in a reverse pass over sections.
137 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
140 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
141 for @plt suffixes first.
142 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
144 2017-08-08 Nick Clifton <nickc@redhat.com>
147 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
148 small section lengths.
149 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
151 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
152 there is enough data present in the note.
154 2017-08-08 Alan Modra <amodra@gmail.com>
157 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
158 got.refcount for GOTOFF relocs, just create .got section.
160 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
162 * elflink.c (elf_link_add_object_symbols): Move common symbol
163 check after bed->common_definition.
165 2017-08-07 Alan Modra <amodra@gmail.com>
168 * elflink.c (bfd_elf_final_link): Don't segfault when sections
169 needed to define various dynamic tags have been discarded.
171 2017-08-07 Nick Clifton <nickc@redhat.com>
174 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
175 has not been set then use the bfd returned by
176 _bfd_elf_link_setup_gnu_properties. If that is null then search
177 through all the input bfds selecting the first normal, ELF format
179 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
181 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
183 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
185 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
186 (elf_i386_check_tls_transition): Check tls_get_addr directly.
187 (elf_i386_convert_load_reloc): Update tls_get_addr check.
188 (elf_i386_link_check_relocs): New function.
189 (bfd_elf32_bfd_link_check_relocs): New.
190 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
192 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
193 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
194 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
195 (elf_x86_64_link_check_relocs): New function.
196 (bfd_elf64_bfd_link_check_relocs): New.
197 (bfd_elf32_bfd_link_check_relocs): Likewise.
199 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
202 * elflink.c (elf_link_add_object_symbols): Treat common symbol
203 as undefined for --no-define-common.
205 2017-08-05 Alan Modra <amodra@gmail.com>
207 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
208 hppa_link_hash_table.
210 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
212 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
213 entries for sysregs with negative indices.
215 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
217 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
218 isn't the S/390 specific elf data.
219 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
221 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
223 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
224 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
225 [R_RISCV_ADD16]: Likewise.
226 [R_RISCV_ADD32]: Likewise.
227 [R_RISCV_ADD64]: Likewise.
228 [R_RISCV_SUB6]: Likewise.
229 [R_RISCV_SUB8]: Likewise.
230 [R_RISCV_SUB16]: Likewise.
231 [R_RISCV_SUB32]: Likewise.
232 [R_RISCV_SUB64]: Likewise.
234 2017-07-31 Alan Modra <amodra@gmail.com>
236 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
237 without ld.so checks.
239 2017-07-29 Alan Modra <amodra@gmail.com>
242 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
243 (ppc64_elf_merge_symbol): Set non_zero_localentry.
244 (is_elfv2_localentry0): Test non_zero_localentry.
245 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
247 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
249 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
250 pointer check for htab->elf.irelplt.
251 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
253 2017-07-27 Nick Clifton <nickc@redhat.com>
256 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
258 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
260 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
262 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
264 (evax_bfd_print_emh): Check for invalid string lengths.
266 2017-07-25 Nick Clifton <nickc@redhat.com>
268 * po/fr.po: Updated French translation.
270 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
273 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
274 16-bit absolute branches into 10-bit pc-relative branches on the
275 MSP430 as well as the MSP430X.
277 2017-07-25 Alan Modra <amodra@gmail.com>
279 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
280 (stub_eh_frame_size): New function.
281 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
282 (group_sections): Init group tls_get_addr_opt_bctrl.
283 (ppc64_elf_size_stubs): Update sizing and initialization of
284 .eh_frame. Iteration over stubs via group list.
285 (ppc64_elf_build_stubs): Iterate over stubs via group list.
286 (ppc64_elf_finish_dynamic_sections): Update finalization of
289 2017-07-24 Nick Clifton <nickc@redhat.com>
292 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
293 of the relocs to the canonicalize_one_reloc routine.
294 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
295 for the _bfd_mach_o_canonicalize_one_reloc field.
296 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
297 res_base parameter. Use to check for corrupt pair relocs.
298 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
300 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
302 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
305 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
306 enough data in the record before attempting to parse it.
307 (_bfd_vms_slurp_eeom): Likewise.
309 (_bfd_vms_slurp_egsd): Check for an invalid section index.
310 (image_set_ptr): Likewise.
311 (alpha_vms_slurp_relocs): Likewise.
313 (alpha_vms_object_p): Check for a truncated record.
315 2017-07-24 Nick Clifton <nickc@redhat.com>
318 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
319 an unrecognized reloc and sets the bfd_error value.
320 * libbfd.h: Regenerate.
321 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
323 * elf32-i386.c (elf_i386_relocate_section): Likewise.
324 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
325 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
326 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
327 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
329 2017-07-23 Alan Modra <amodra@gmail.com>
331 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
334 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
337 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
338 reloc_class_ifunc for ifunc symbols.
340 2017-07-19 Nick Clifton <nickc@redhat.com>
343 * archive.c (bfd_generic_archive_p): If the bfd does not have the
344 correct magic bytes at the start, set the error to wrong format
345 and clear the format selector before returning NULL.
347 2017-07-19 Nick Clifton <nickc@redhat.com>
350 * coff-rs6000.c (_bfd_strntol): New function.
351 (_bfd_strntoll): New function.
352 (GET_VALUE_IN_FIELD): New macro.
353 (EQ_VALUE_IN_FIELD): new macro.
354 (_bfd_xcoff_slurp_armap): Use new macros.
355 (_bfd_xcoff_archive_p): Likewise.
356 (_bfd_xcoff_read_ar_hdr): Likewise.
357 (_bfd_xcoff_openr_next_archived_file): Likewise.
358 (_bfd_xcoff_stat_arch_elt): Likewise.
359 * coff64-rs6000.c (_bfd_strntol): New function.
360 (_bfd_strntoll): New function.
361 (GET_VALUE_IN_FIELD): New macro.
362 (xcoff64_slurp_armap): Use new macros.
364 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
365 John Eric Martin <John.Martin@emmicro-us.com>
367 * bfd-in2.h: Regenerate.
368 * libbfd.h: Regenerate.
369 * elf32-arc.c (JLI): Define.
370 * reloc.c: Add JLI relocations.
372 2017-07-18 Nick Clifton <nickc@redhat.com>
375 * coff-sh.c: Fix spelling typos.
376 * compress.c: Likewise.
377 * cpu-pdp11.c: Likewise.
378 * ecofflink.c: Likewise.
379 * elf-m10300.c: Likewise.
381 * elf32-arm.c: Likewise.
382 * elf32-m68k.c: Likewise.
383 * elf32-nds32.c: Likewise.
384 * elf32-ppc.c: Likewise.
385 * elf32-sh.c: Likewise.
386 * elf32-v850.c: Likewise.
387 * elf64-ppc.c: Likewise.
388 * elf64-x86-64.c: Likewise.
389 * elflink.c: Likewise.
390 * elfnn-aarch64.c: Likewise.
391 * elfxx-mips.c: Likewise.
394 * vms-alpha.c: Likewise.
395 * xcofflink.c: Likewise.
397 2017-07-18 Nick Clifton <nickc@redhat.com>
400 * coffcode.h (handle_COMDAT): Replace abort with an error message
403 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
406 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
409 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
411 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
413 2017-07-16 Alan Modra <amodra@gmail.com>
415 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
416 __tls_index GOT entries when using __tls_get_addr_opt stub.
417 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
419 2017-07-12 Alan Modra <amodra@gmail.com>
421 * po/es.po: Update from translationproject.org/latest/bfd/.
422 * po/fi.po: Likewise.
423 * po/fr.po: Likewise.
424 * po/id.po: Likewise.
425 * po/ja.po: Likewise.
426 * po/ro.po: Likewise.
427 * po/ru.po: Likewise.
428 * po/sr.po: Likewise.
429 * po/sv.po: Likewise.
430 * po/tr.po: Likewise.
431 * po/uk.po: Likewise.
432 * po/vi.po: Likewise.
433 * po/zh_CN.po: Likewise.
434 * po/hr.po: New file from translationproject.org.
435 * configure.ac (ALL_LINGUAS): Add hr. Sort.
436 * configure: Regenerate.
438 2017-07-12 Nick Clifton <nickc@redhat.com>
440 Fix compile time warnings using gcc 7.1.1.
441 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
443 (elf_xtensa_get_gotplt_section): Increase length of got_name
445 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
446 default return of FALSE.
447 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
448 default return of FALSE.
450 2017-07-12 Alan Modra <amodra@gmail.com>
452 * binary.c (binary_set_section_contents): Don't print filepos in
454 (coff_write_object_contents): Cast size_t for error message.
455 (coff_slurp_line_table): Don't use bfd_vma symndx.
456 (coff_slurp_reloc_table): Remove unneeded cast.
457 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
459 (find_abstract_instance_name): Likewise.
460 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
461 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
462 (elf32_arm_check_relocs): Make r_symndx an int.
463 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
465 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
467 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
469 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
470 * elf32-s390.c (elf_s390_check_relocs): Likewise.
471 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
472 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
473 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
474 * elf64-s390.c (elf_s390_check_relocs): Likewise.
475 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
476 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
477 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
478 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
479 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
480 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
481 and use %lu for error message.
482 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
483 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
486 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
488 (elf32_arm_final_link_relocate): Likewise.
489 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
490 * coffcode.h (styp_to_sec_flags): Likewise.
491 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
492 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
493 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
494 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
495 (elf32_bfin_merge_private_bfd_data): Likewise.
496 * elf32-cris.c (cris_elf_relocate_section): Likewise.
497 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
498 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
499 (i370_elf_relocate_section): Likewise.
500 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
501 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
502 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
503 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
504 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
505 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
506 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
507 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
508 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
509 * ieee.c (ieee_write_id, read_id): Likewise.
510 * mach-o.c (bfd_mach_o_write_contents): Likewise.
511 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
512 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
513 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
514 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
515 * stabs.c (_bfd_link_section_stabs): Likewise.
517 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
519 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
520 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
521 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
522 * coff-sh.c (sh_relax_section): Likewise.
523 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
524 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
525 * coffcode.h (coff_slurp_reloc_table): Likewise.
526 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
527 (_bfd_coff_read_string_table): Likewise.
528 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
529 * compress.c (bfd_get_full_section_contents): Likewise.
530 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
531 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
532 * elf.c (bfd_elf_string_from_elf_section): Likewise.
533 * elf32-arc.c (arc_special_overflow_checks): Likewise.
534 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
535 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
536 (elf32_arm_write_section): Likewise.
537 * elf32-bfin.c (bfin_relocate_section): Likewise.
538 (bfinfdpic_relocate_section): Likewise.
539 * elf32-hppa.c (hppa_build_one_stub): Likewise.
540 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
541 * elf32-i386.c (elf_i386_tls_transition): Likewise.
542 (elf_i386_relocate_section): Likewise.
543 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
544 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
545 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
546 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
547 * elf32-metag.c (elf_metag_relocate_section): Likewise.
548 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
549 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
550 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
551 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
552 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
553 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
554 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
555 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
556 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
557 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
558 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
559 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
560 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
561 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
562 * elf32-sh.c (sh_elf_relax_section): Likewise.
563 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
564 (sh_elf_relocate_section): Likewise.
565 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
566 * elf32-spu.c (spu_elf_relocate_section): Likewise.
567 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
568 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
569 * elf32-v850.c (v850_elf_relax_section): Likewise.
570 * elf32-vax.c (elf_vax_check_relocs): Likewise.
571 (elf_vax_relocate_section): Likewise.
572 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
573 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
574 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
575 (do_fix_for_relocatable_link): Likewise.
576 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
577 (elf64_alpha_relax_with_lituse): Likewise.
578 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
579 (elf_hppa_final_link_relocate): Likewise.
580 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
581 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
582 (elf64_vms_link_add_object_symbols): Likewise.
583 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
584 (mmix_final_link_relocate): Likewise.
585 * elf64-s390.c (invalid_tls_insn): Likewise.
586 (elf_s390_relocate_section): Likewise.
587 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
588 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
589 (elf_x86_64_relocate_section): Likewise.
590 * elfcode.h (elf_slurp_symbol_table): Likewise.
591 * elfcore.h (elf_core_file_p): Likewise.
592 * elflink.c (elf_link_read_relocs_from_section): Likewise.
593 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
594 (elfNN_aarch64_relocate_section): Likewise.
595 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
596 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
597 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
598 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
599 (_bfd_mips_elf_relocate_section): Likewise.
600 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
601 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
602 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
603 * ieee.c (ieee_slurp_external_symbols): Likewise.
604 * ihex.c (ihex_write_object_content): Likewise.
605 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
606 * merge.c (_bfd_merged_section_offset): Likewise.
607 * mmo.c (mmo_write_loc_chunk): Likewise.
608 (mmo_write_object_contents): Likewise.
609 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
610 * stabs.c (_bfd_link_section_stabs): Likewise.
611 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
613 2017-07-11 Alan Modra <amodra@gmail.com>
615 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
617 2017-07-11 Alan Modra <amodra@gmail.com>
619 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
620 instruction" error using _bfd_error_handler, not einfo.
622 2017-07-10 Nick Clifton <nickc@redhat.com>
624 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
625 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
627 2017-07-07 John Baldwin <jhb@FreeBSD.org>
629 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
631 2017-07-07 Alan Modra <amodra@gmail.com>
633 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
635 2017-07-07 Alan Modra <amodra@gmail.com>
637 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
638 as long long. Move code replacing "ll" with "I64", and simplify.
640 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
642 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
645 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
647 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
649 (line_info_add_file_name): Likewise.
650 (decode_line_info): Likewise.
652 2017-07-04 Tristan Gingold <gingold@adacore.com>
654 * version.m4: Bump version to 2.29.51
655 * configure: Regenerate.
657 2017-07-04 Jiong Wang <jiong.wang@arm.com>
659 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
660 sanity check at the head of this function.
662 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
664 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
666 (struct attr_abbrev): Add field implicit_const.
667 (dwarf_debug_sections): Add .debug_line_str.
668 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
669 (dwarf_debug_section_assert): Add static assertion.
670 (read_indirect_line_string): New.
671 (read_abbrevs): Support DW_FORM_implicit_const.
672 (is_str_attr): Support DW_FORM_line_strp.
673 (read_attribute_value): Support DW_FORM_line_strp and
674 DW_FORM_implicit_const.
675 (read_attribute): Support DW_FORM_implicit_const.
676 (line_info_add_include_dir, line_info_add_include_dir_stub):
677 (line_info_add_file_name, read_formatted_entries): New.
678 (decode_line_info, parse_comp_unit): Support DWARF 5.
679 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
681 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
683 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
684 abort statement that was put for symbols that are not dynamic.
686 2017-07-03 Tristan Gingold <gingold@adacore.com>
688 * po/bfd.pot: Regenerate
690 2017-07-03 Alan Modra <amodra@gmail.com>
692 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
693 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
694 * elf.c (setup_group): Use "Lx" to print sh_size.
695 (_bfd_elf_setup_sections): Remove unnecessary cast and print
696 unknown section type in hex.
697 (copy_special_section_fields): Style fix.
698 (bfd_section_from_shdr): Correct format for sh_link. Use a
699 common error message for all the variants of unrecognized
701 (assign_file_positions_for_load_sections): Use "Lx" for lma
702 adjust error message.
703 (assign_file_positions_for_non_load_sections): Formatting.
704 (rewrite_elf_program_header): Formatting. Use "Lx" for
705 bfd_vma values in error messages.
706 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
707 ELF_R_SYM value to type expected by format.
708 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
710 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
711 (elf_link_input_bfd): Use "Lx" for r_info.
712 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
714 2017-07-03 Alan Modra <amodra@gmail.com>
716 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
717 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
718 Microsoft C library variant of long long format specifier.
719 (PRINT20): Cast value to bfd_uint64_t not long long.
720 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
721 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
722 long long. Don't cast to bfd_vma.
723 * elf32-score.c (score3_bfd_getl48): Likewise.
724 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
726 2017-07-03 Alan Modra <amodra@gmail.com>
728 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
730 (bfd_elf_print_symbol): Don't cast symbol->flags.
731 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
732 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
733 _bfd_error_handler argument order.
734 (ppc_elf_merge_private_bfd_data): Don't cast flags.
736 2017-07-03 Alan Modra <amodra@gmail.com>
738 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
740 * configure: Regenerate.
741 * config.in: Regenerate.
743 2017-06-29 Andrew Waterman <andrew@sifive.com>
745 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
748 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
750 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
751 unless it is undefined weak.
752 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
753 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
755 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
756 is not dynamic in PIC, abort.
758 2017-06-29 Jiong Wang <jiong.wang@arm.com>
761 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
762 undefined weak symbols into dynamic.
763 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
764 relocation for non-dynamic symbols.
765 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
767 2017-06-29 Jiong Wang <jiong.wang@arm.com>
769 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
770 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
771 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
772 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
773 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
776 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
778 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
779 (elfcore_write_s390_gs_bc): Likewise.
780 * elf.c (elfcore_grok_s390_gs_cb): New function.
781 (elfcore_grok_s390_gs_bc): New function.
782 (elfcore_grok_note): Call them.
783 (elfcore_write_s390_gs_cb): New function.
784 (elfcore_write_s390_gs_bc): New function.
785 (elfcore_write_register_note): Call them.
787 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
789 * libbfd.c (_bfd_generic_get_section_contents): Don't call
790 bfd_get_file_size. Check archive element size.
791 (_bfd_generic_get_section_contents_in_window): Likewise.
793 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
795 * bfd-in2.h: Regenerated.
796 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
797 (bfd_get_file_size): Likewise.
799 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
800 Matthew Fortune <matthew.fortune@imgtec.com>
802 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
803 * cpu-mips.c (I_interaptiv_mr2): New enum value.
804 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
805 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
807 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
808 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
809 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
810 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
811 `bfd_mach_mips_interaptiv_mr2' entries.
812 * bfd-in2.h: Regenerate.
814 2017-06-27 Nick Clifton <nickc@redhat.com>
816 * tekhex.c (pass_over): Revert accidental conversion of a local
817 array to a static array.
819 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
822 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
823 reloc addend if necessary. Adjust diff only if
824 shrinked_insn_address < end_address.
826 2017-06-27 Alan Modra <amodra@gmail.com>
829 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
830 (_bfd_generic_get_section_contents_in_window): Likewise.
832 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
834 * elfnn-riscv.c (perform_relocation): Support the new
835 R_RISCV_32_PCREL relocation.
836 (riscv_elf_relocate_section): Likewise.
837 * elfxx-riscv.c (howto_table): Likewise.
838 (riscv_reloc_map): Likewise.
839 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
840 * libbfd.h: Regenerate.
842 2017-06-27 Alan Modra <amodra@gmail.com>
845 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
846 Use unsigned file pointer type, and remove cast.
847 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
848 Add "count", not "sz".
850 2017-06-26 Pedro Alves <palves@redhat.com>
853 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
856 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
859 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
862 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
864 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
865 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
866 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
867 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
868 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
870 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
873 * compress.c (bfd_get_full_section_contents): Don't check the
875 * libbfd.c (_bfd_generic_get_section_contents): Check for and
876 reject a section whose size + offset is greater than the size
878 (_bfd_generic_get_section_contents_in_window): Likewise.
880 2017-06-26 Nick Clifton <nickc@redhat.com>
883 * tekhex.c (getvalue): Check for the source pointer exceeding the
884 end pointer before the first byte is read.
886 2017-06-26 Nick Clifton <nickc@redhat.com>
889 * opncls.c (get_build_id): Check that the section is big enough
890 to contain the whole note.
891 * compress.c (bfd_get_full_section_contents): Check for and reject
892 a section whose size is greater than the size of the entire file.
893 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
894 contain a notes section.
896 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
898 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
900 (elf_s390_modify_segment_map): Likewise.
901 (bfd_elf_s390_set_options): Lisewise.
903 2017-06-26 Alan Modra <amodra@gmail.com>
905 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
907 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
908 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
909 .preinit_array on --just-syms bfds.
910 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
911 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
912 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
914 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
916 * elf.c (find_link): Bounds check "hint".
918 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
920 * elf32-arm.c (using_thumb_only): Update list of architectures in
921 BFD_ASSERT for which the logic is valid.
922 (using_thumb2_bl): Likewise.
923 (using_thumb2): Likewise and return true for ARMv8-R.
924 (arch_has_arm_nop): Likewise.
925 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
926 merging logic. Update commentis for value 15 of v8m_baseline,
927 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
928 merging of value 15 of Tag_CPU_arch.
930 2017-06-23 Jiong Wang <jiong.wang@arm.com>
932 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
933 BFD_RELOC_AARCH64_ADR_GOT_PAGE
934 * bfd-in2.h: Regenerate.
936 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
938 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
939 the error_alignment label forward. Properly align program
940 property note section.
942 2017-06-22 Eric Christopher <echristo@gmail.com>
944 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
945 abs to fix a truncation warning.
947 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
949 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
950 local undefined weak symbol to 0.
951 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
953 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
955 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
956 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
957 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
958 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
959 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
960 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
961 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
962 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
964 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
966 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
967 (elf_i386_lazy_ibt_plt_entry): Likewise.
968 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
969 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
970 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
971 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
972 (elf_i386_lazy_plt_layout): Likewise.
973 (elf_i386_non_lazy_plt_layout): Likewise.
974 (elf_i386_link_hash_entry): Add plt_second.
975 (elf_i386_link_hash_table): Add plt_second and
977 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
978 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
979 the second PLT. Check the second PLT.
980 (elf_i386_relocate_section): Use the second PLT to resolve
981 PLT reference if needed.
982 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
984 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
985 second PLT. Generate unwind info for the second PLT.
986 (elf_i386_plt_type): Add plt_second.
987 (elf_i386_get_synthetic_symtab): Support the second PLT.
988 (elf_i386_parse_gnu_properties): Support
989 GNU_PROPERTY_X86_FEATURE_1_AND.
990 (elf_i386_merge_gnu_properties): Support
991 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
992 on GNU_PROPERTY_X86_FEATURE_1_IBT
993 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
994 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
995 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
996 is set on all relocatable inputs.
997 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
998 (elf_x32_lazy_ibt_plt_entry): Likewise.
999 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1000 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1001 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1002 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1003 (elf_x86_64_lazy_ibt_plt): Likewise.
1004 (elf_x32_lazy_ibt_plt): Likewise.
1005 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1006 (elf_x32_non_lazy_ibt_plt): Likewise.
1007 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1008 (elf_x86_64_parse_gnu_properties): Support
1009 GNU_PROPERTY_X86_FEATURE_1_AND.
1010 (elf_x86_64_merge_gnu_properties): Support
1011 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1012 on GNU_PROPERTY_X86_FEATURE_1_IBT
1013 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1014 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1015 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1016 is set on all relocatable inputs.
1018 2017-06-22 Nick Clifton <nickc@redhat.com>
1021 * som.c (setup_sections): NUL terminate the space_strings buffer.
1022 Check that the space.name field does not index beyond the end of
1023 the space_strings buffer.
1025 2017-06-21 Nick Clifton <nickc@redhat.com>
1028 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1030 2017-06-21 Nick Clifton <nickc@redhat.com>
1033 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1034 type of the size parameter.
1035 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1036 length of the counted string.
1037 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1038 (_bfd_vms_save_counted_string): Likewise.
1039 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1040 _bfd_vms_save_counted_string.
1041 (_bfd_vms_slurp_ehdr): Likewise.
1042 (_bfd_vms_slurp_egsd): Likewise.
1043 (Parse_module): Likewise.
1045 2017-06-21 Alan Modra <amodra@gmail.com>
1047 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1048 calls before tocsave calls.
1049 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1052 2017-06-21 Nick Clifton <nickc@redhat.com>
1055 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1056 bfd_get_full_section_contents returns no contents.
1058 2017-06-21 Nick Clifton <nickc@redhat.com>
1061 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1064 2017-06-21 Nick Clifton <nickc@redhat.com>
1067 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1069 (image_set_ptr): Likewise.
1070 (alpha_vms_fix_sec_rel): Likewise.
1071 (alpha_vms_slurp_relocs): Likewise.
1073 2017-06-21 Nick Clifton <nickc@redhat.com>
1076 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1078 (ieee_archive_p): Likewise.
1079 (ieee_object_p): Likewise.
1081 2017-06-21 Nick Clifton <nickc@redhat.com>
1084 * elf.c (setup_group): Zero the group section pointer list after
1085 allocation so that loops can be caught. Check for NULL pointers
1086 when processing a group list.
1088 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1090 * elf-s390.h: New file.
1091 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1093 (elf_s390_additional_program_headers): New function.
1094 (elf_s390_modify_segment_map): New function.
1095 (bfd_elf_s390_set_options): New function.
1096 (elf_backend_additional_program_headers)
1097 (elf_backend_modify_segment_map): Add macro definitions.
1099 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1102 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1103 the DYNAMIC bit instead of bfd_count_sections.
1105 2017-06-19 Nick Clifton <nickc@redhat.com>
1108 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1110 (evax_bfd_print_eeom): Likewise.
1111 (evax_bfd_print_egsd): Check for an overlarge record length.
1112 (evax_bfd_print_etir): Likewise.
1114 2017-06-19 Nick Clifton <nickc@redhat.com>
1117 * libieee.h (struct common_header_type): Add end_p field.
1118 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1120 (read_id): Check for a length that exceeds the remaining bytes in
1122 (ieee_seek): Initialise end_p.
1123 (ieee_archive_p): Likewise.
1124 (ieee_object_p): Likewise.
1126 2017-06-19 Nick Clifton <nickc@redhat.com>
1129 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1130 before reading the EIHS structure entries.
1132 2017-06-19 Nick Clifton <nickc@redhat.com>
1135 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1136 gsd_size. Check that there are enough bytes remaining to read the
1137 type and size of the next egsd. Check that the size of the egsd
1138 does not exceed the size of the record.
1140 2017-06-19 Alan Modra <amodra@gmail.com>
1142 * config.bfd: Correct targ_underscore for cris.
1144 2017-06-18 Alan Modra <amodra@gmail.com>
1146 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1147 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1149 2017-06-16 Nick Clifton <nickc@redhat.com>
1151 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1152 bucketlist is empty because there are no symbols to add to the
1155 2017-06-16 Alan Modra <amodra@gmail.com>
1161 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1162 (BFD_JUMP_TABLE_LINK): Likewise.
1163 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1164 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1165 (bfd_elf_define_start_stop): New function.
1166 * linker.c (bfd_generic_define_start_stop): New function.
1167 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1169 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1170 * aout-target.h (MY_bfd_define_start_stop): Define.
1171 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1172 * binary.c (binary_bfd_define_start_stop): Define.
1173 * bout.c (b_out_bfd_define_start_stop): Define.
1174 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1175 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1176 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1177 * coffcode.h (coff_bfd_define_start_stop): Define.
1178 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1179 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1180 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1181 * ieee.c (ieee_bfd_define_start_stop): Define.
1182 * ihex.c (ihex_bfd_define_start_stop): Define.
1183 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1184 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1185 * mmo.c (mmo_bfd_define_start_stop): Define.
1186 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1187 * oasys.c (oasys_bfd_define_start_stop): Define.
1188 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1189 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1190 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1191 * som.c (som_bfd_define_start_stop): Define.
1192 * srec.c (srec_bfd_define_start_stop): Define.
1193 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1194 * versados.c (versados_bfd_define_start_stop): Define.
1195 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1196 (alpha_vms_bfd_define_start_stop): Define.
1197 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1198 * bfd-in2.h: Regenerate.
1199 * libbfd.h: Regenerate.
1201 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1203 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1204 SYMBOL_REFERENCES_LOCAL.
1206 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1209 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1210 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1211 runtime for if there needs copy relocation elimination.
1212 (need_copy_relocation_p): New function. Return true for symbol with
1213 pc-relative references and if it's against read-only sections.
1214 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1215 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1216 that are related with accessing external objects.
1217 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1218 in elfNN_aarch64_check_relocs.
1220 2017-06-15 Nick Clifton <nickc@redhat.com>
1223 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1226 (ieee_archive_p): Likewise.
1228 2017-06-15 Nick Clifton <nickc@redhat.com>
1231 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1233 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1235 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1236 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1237 keep both windowed and call0 ABI PLT definitions.
1238 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1239 elf_xtensa_*_plt_entry endex.
1240 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1242 2017-06-14 Nick Clifton <nickc@redhat.com>
1245 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1248 2017-06-14 Nick Clifton <nickc@redhat.com>
1251 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1252 maximum value for the ascic pointer. Check that name processing
1253 does not read beyond this value.
1254 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1257 2017-06-14 Nick Clifton <nickc@redhat.com>
1260 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1261 (process_otr): Check for an invalid offset in the otr structure.
1263 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1265 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1267 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1273 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1274 vtable field to a union.
1275 (_bfd_elf_is_start_stop): Removed.
1276 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1277 __start_SECNAME and __stop_SECNAME symbols.
1278 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1279 * elflink.c (_bfd_elf_is_start_stop): Removed.
1280 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1281 _bfd_elf_is_start_stop.
1282 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1283 __stop_SECNAME symbols. Updated.
1284 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1285 (bfd_elf_gc_record_vtinherit): Likewise.
1286 (bfd_elf_gc_record_vtentry): Likewise.
1288 2017-06-13 Nick Clifton <nickc@redhat.com>
1291 * elflink.c (elf_link_adjust_relocs): Generate an error when
1292 encountering a reloc against a symbol removed by garbage
1295 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1297 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1298 to merge_gnu_properties.
1299 * elf-properties.c (elf_merge_gnu_properties): Add struct
1300 bfd_link_info * and pass it to merge_gnu_properties.
1301 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1302 and pass it to elf_merge_gnu_properties.
1303 (_bfd_elf_link_setup_gnu_properties): Pass info to
1304 elf_merge_gnu_property_list.
1305 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1307 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1309 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1312 * binary.c (binary_set_section_contents): Scale lma by octets
1313 per byte to set filepos.
1315 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1317 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1320 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1322 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1325 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1327 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1328 patched section contents for TLS IE reloc.
1329 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1331 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1333 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1334 RELOC_FOR_GLOBAL_SYMBOL macro.
1336 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1338 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1341 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1343 * config/tc-arc.c (md_undefined_symbol): Changed.
1344 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1346 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1348 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1351 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1353 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1354 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1356 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1358 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1361 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1363 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1364 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1365 is non-zero. Add clarifying comments.
1367 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1369 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1370 name. Use local IFUNC symbol name string to report unsupported
1371 non-PIC call to IFUNC function.
1372 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1373 when generating R_386_IRELATIVE relocation.
1374 (elf_i386_finish_dynamic_symbol): Likewise.
1375 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1377 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1378 when generating R_X86_64_IRELATIVE relocation.
1379 (elf_x86_64_finish_dynamic_symbol): Likewise.
1381 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1383 * elf.c (setup_group): Make sure BFD sections are created for all
1384 group sections in the input file when processing SHF_GROUP
1386 (bfd_section_from_shdr): Avoid duplicating logic already
1387 implemented in `setup_group'.
1389 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1392 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1393 if the hint address is zero.
1395 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1398 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1399 ELF_COMMON_DEF_P for common symbols.
1401 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1403 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1404 SEC_GROUP sections as SEC_EXCLUDE.
1405 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1406 (assign_section_numbers): Use resolve_section_groups flag instead
1407 of relocatable link type.
1408 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1409 flag instead of checking the final_link flag for part of the
1410 checks in here. Fix white space as a result.
1411 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1412 instead of relocatable link type.
1413 (bfd_elf_final_link): Likewise.
1415 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1417 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1419 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1420 (s3_bfd_score_elf_check_relocs): Likewise.
1421 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1422 (score_elf_final_link_relocate): Likewise.
1423 (s7_bfd_score_elf_check_relocs): Likewise.
1425 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1427 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1430 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1432 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1433 from `reloc_count' rather than decrementing it.
1434 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1435 `reloc_count' by `int_rels_per_ext_rel'.
1436 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1437 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1438 entry determination.
1439 (s3_bfd_score_elf_check_relocs): Likewise.
1440 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1441 (s7_bfd_score_elf_relocate_section): Likewise.
1442 (s7_bfd_score_elf_check_relocs): Likewise.
1443 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1444 prototype and function.
1445 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1446 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1447 triple rather than once the sum of REL and RELA relocation entry
1449 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1450 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1451 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1452 storage allocation size determination.
1453 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1454 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1455 by `int_rels_per_ext_rel' for last relocation entry
1457 (bfd_elf_final_link): Do not multiply `reloc_count' by
1458 `int_rels_per_ext_rel' for internal relocation storage
1459 allocation size determination.
1460 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1461 `int_rels_per_ext_rel' for last relocation entry determination.
1462 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1463 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1464 (_bfd_mips_elf_relocate_section): Likewise.
1466 2017-06-05 Alan Modra <amodra@gmail.com>
1469 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1471 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1473 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1474 determine structure sizes.
1475 (elfcore_grok_freebsd_prstatus): Likewise.
1477 2017-06-01 Alan Modra <amodra@gmail.com>
1479 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1480 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1482 (is_elfv2_localentry0): New function.
1483 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1484 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1485 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1486 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1487 optimized localentry:0 stubs.
1488 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1489 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1491 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1493 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1495 2017-05-30 Casey Smith <clegg89@gmail.com>
1498 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1499 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1501 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1503 * cpu-arc.c (arc_compatible): New function.
1505 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1507 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1509 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1512 * bfdio.c (bfd_get_file_size): New function.
1513 * bfd-in2.h: Regenerated.
1515 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1517 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1520 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1522 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1523 dynobj instead of htab->elf.dynobj.
1525 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1527 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1529 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1530 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1531 actual number of internal relocations retrieved. Adjust
1532 function description.
1533 (bfd_elf64_canonicalize_reloc): Remove macro.
1534 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1536 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1538 * archures.c (bfd_mach_sparc_v9m8): Define.
1539 (bfd_mach_sparc_v8plusm8): Likewise.
1540 (bfd_mach_sparc_v9_p): Adjust to M8.
1541 (bfd_mach_sparc_64bit_p): Likewise.
1542 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1543 bfd_mach_sparc_v8plusm8.
1544 * bfd-in2.h: Regenerated.
1545 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1547 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1548 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1549 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1551 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1552 bfd_mach_sparc_v8plusm8.
1554 2017-05-19 Alan Modra <amodra@gmail.com>
1556 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1557 debug and special sections when no non-note alloc sections in an
1560 2017-05-18 Alan Modra <amodra@gmail.com>
1562 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1563 * elf-m10300.c: Likewise.
1565 * elf32-arc.c: Likewise.
1566 * elf32-bfin.c: Likewise.
1567 * elf32-m68k.c: Likewise.
1568 * elf32-nds32.c: Likewise.
1569 * elf32-tilepro.c: Likewise.
1570 * elflink.c: Likewise.
1571 * elfnn-aarch64.c: Likewise.
1572 * elfnn-riscv.c: Likewise.
1573 * elfxx-tilegx.c: Likewise.
1574 * mach-o.c: Likewise.
1575 * peXXigen.c: Likewise.
1576 * vms-alpha.c: Likewise.
1577 * vms-lib.c: Likewise.
1579 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1582 * elflink.c (elf_gc_mark_debug_section): New function.
1583 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1584 referenced by kept debug sections.
1586 2017-05-16 Alan Modra <amodra@gmail.com>
1588 * elf-m10300.c: Rename occurrences of non_ir_ref.
1589 * elf32-arm.c: Likewise.
1590 * elf32-bfin.c: Likewise.
1591 * elf32-cr16.c: Likewise.
1592 * elf32-cris.c: Likewise.
1593 * elf32-d10v.c: Likewise.
1594 * elf32-dlx.c: Likewise.
1595 * elf32-fr30.c: Likewise.
1596 * elf32-frv.c: Likewise.
1597 * elf32-hppa.c: Likewise.
1598 * elf32-i370.c: Likewise.
1599 * elf32-i386.c: Likewise.
1600 * elf32-iq2000.c: Likewise.
1601 * elf32-lm32.c: Likewise.
1602 * elf32-m32c.c: Likewise.
1603 * elf32-m32r.c: Likewise.
1604 * elf32-m68hc1x.c: Likewise.
1605 * elf32-m68k.c: Likewise.
1606 * elf32-mcore.c: Likewise.
1607 * elf32-metag.c: Likewise.
1608 * elf32-microblaze.c: Likewise.
1609 * elf32-moxie.c: Likewise.
1610 * elf32-msp430.c: Likewise.
1611 * elf32-mt.c: Likewise.
1612 * elf32-nios2.c: Likewise.
1613 * elf32-or1k.c: Likewise.
1614 * elf32-ppc.c: Likewise.
1615 * elf32-rl78.c: Likewise.
1616 * elf32-s390.c: Likewise.
1617 * elf32-score.c: Likewise.
1618 * elf32-score7.c: Likewise.
1619 * elf32-sh.c: Likewise.
1620 * elf32-tic6x.c: Likewise.
1621 * elf32-tilepro.c: Likewise.
1622 * elf32-v850.c: Likewise.
1623 * elf32-vax.c: Likewise.
1624 * elf32-xstormy16.c: Likewise.
1625 * elf32-xtensa.c: Likewise.
1626 * elf64-alpha.c: Likewise.
1627 * elf64-hppa.c: Likewise.
1628 * elf64-ia64-vms.c: Likewise.
1629 * elf64-mmix.c: Likewise.
1630 * elf64-ppc.c: Likewise.
1631 * elf64-s390.c: Likewise.
1632 * elf64-sh64.c: Likewise.
1633 * elf64-x86-64.c: Likewise.
1634 * elflink.c: Likewise.
1635 * elfnn-aarch64.c: Likewise.
1636 * elfnn-ia64.c: Likewise.
1637 * elfnn-riscv.c: Likewise.
1638 * elfxx-mips.c: Likewise.
1639 * elfxx-sparc.c: Likewise.
1640 * elfxx-tilegx.c: Likewise.
1641 * linker.c: Likewise.
1643 2017-05-16 Alan Modra <amodra@gmail.com>
1645 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1646 * elflink.c (elf_link_add_object_symbols): Update to use
1648 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1650 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1652 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1654 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1656 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1658 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1659 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1661 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1663 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1665 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1667 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1668 to plt_second/plt_second_eh_frame.
1669 (elf_x86_64_link_hash_newfunc): Updated.
1670 (elf_x86_64_allocate_dynrelocs): Likewise.
1671 (elf_x86_64_size_dynamic_sections): Likewise.
1672 (elf_x86_64_relocate_section): Likewise.
1673 (elf_x86_64_finish_dynamic_symbol): Likewise.
1674 (elf_x86_64_finish_dynamic_sections): Likewise.
1675 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1676 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1678 (elf_backend_setup_gnu_properties): Updated. Create the
1679 .plt.sec section instead of the .plt.sec section.
1681 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1683 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1684 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1685 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1687 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1689 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1690 (bfd_elf64_set_reloc): Define.
1691 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1693 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1695 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1696 (struct bfd_target): New field _bfd_set_reloc.
1697 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1698 * reloc.c (_bfd_generic_set_reloc): New function.
1699 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1700 * nlm-target.h (nlm_set_reloc): Likewise.
1701 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1702 * aout-tic30.c (MY_set_reloc): Likewise.
1703 * aout-target.h (MY_set_reloc): Likewise.
1704 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1705 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1706 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1707 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1708 * aout-adobe.c (aout_32_set_reloc): Likewise.
1709 * bout.c (b_out_set_reloc): Likewise.
1710 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
1711 * i386os9k.c (aout_32_set_reloc): Likewise.
1712 * ieee.c (ieee_set_reloc): Likewise.
1713 * oasys.c (oasys_set_reloc): Likewise.
1714 * som.c (som_set_reloc): Likewise.
1715 * versados.c (versados_set_reloc): Likewise.
1716 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1717 _bfd_generic_set_reloc.
1718 (rs6000_xcoff64_aix_vec): LIkewise.
1719 * libbfd.c (_bfd_norelocs_set_reloc): New function.
1720 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
1721 * i386msdos.c (msdos_set_reloc): Define to
1722 _bfd_norelocs_set_reloc.
1723 * elfcode.h (elf_set_reloc): Define.
1724 * bfd-in2.h: Regenerated.
1726 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1729 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1730 for IFUNC function address.
1732 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1734 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1735 (CONFLICT_LIST): Likewise.
1736 (opcode/arc-attrs.h): Include.
1737 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1738 (arc_extract_features): New file.
1739 (arc_stralloc): Likewise.
1740 (arc_elf_merge_attributes): Likewise.
1741 (arc_elf_merge_private_bfd_data): Use object attributes.
1742 (bfd_arc_get_mach_from_attributes): New function.
1743 (arc_elf_object_p): Use object attributes.
1744 (arc_elf_final_write_processing): Likewise.
1745 (elf32_arc_obj_attrs_arg_type): New function.
1746 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1747 (elf32_arc_section_from_shdr): Likewise.
1748 (elf_backend_obj_attrs_vendor): Define.
1749 (elf_backend_obj_attrs_section): Likewise.
1750 (elf_backend_obj_attrs_arg_type): Likewise.
1751 (elf_backend_obj_attrs_section_type): Likewise.
1752 (elf_backend_obj_attrs_handle_unknown): Likewise.
1753 (elf_backend_section_from_shdr): Likewise.
1755 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1758 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1759 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1760 and the destination is a Thumb symbol.
1762 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1764 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1765 initializer to silence GCC 4.2.
1766 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1768 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1770 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1771 (LAZY_PLT_ENTRY_SIZE): This.
1772 (NON_LAZY_PLT_ENTRY_SIZE): New.
1773 (elf_x86_64_plt0_entry): Renamed to ...
1774 (elf_x86_64_lazy_plt0_entry): This.
1775 (elf_x86_64_plt_entry): Renamed to ...
1776 (elf_x86_64_lazy_plt_entry): This.
1777 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1778 (elf_x86_64_lazy_bnd_plt0_entry): This.
1779 (elf_x86_64_legacy_plt_entry): Removed.
1780 (elf_x86_64_bnd_plt_entry): Renamed to ...
1781 (elf_x86_64_lazy_bnd_plt_entry): This.
1782 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1783 (elf_x86_64_non_lazy_plt_entry): This.
1784 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1785 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1786 (elf_x86_64_eh_frame_plt): Renamed to ...
1787 (elf_x86_64_eh_frame_lazy_plt): This.
1788 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1789 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1790 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1791 (elf_x86_64_eh_frame_non_lazy_plt): This.
1792 (elf_x86_64_lazy_plt_layout): New.
1793 (elf_x86_64_non_lazy_plt_layout): Likewise.
1794 (elf_x86_64_plt_layout): Likewise.
1795 (elf_x86_64_backend_data): Remove PLT layout information. Add
1796 os for target system.
1797 (GET_PLT_ENTRY_SIZE): Removed.
1798 (elf_x86_64_lazy_plt): New.
1799 (elf_x86_64_non_lazy_plt): Likewise.
1800 (elf_x86_64_lazy_bnd_plt): Likewise.
1801 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1802 (elf_x86-64_arch_bed): Updated.
1803 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1804 (elf_x86_64_create_dynamic_sections): Removed.
1805 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1806 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1807 (elf_x86-64_adjust_dynamic_symbol): Updated.
1808 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1809 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1810 size for PLT0 if there is no PLT0. Get plt_entry_size from
1811 non_lazy_plt for non-lazy PLT entries.
1812 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1813 from non_lazy_plt for non-lazy PLT entries.
1814 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1815 if there is no PLT0.
1816 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1817 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1818 entries with non-lazy PLT layout. Don't fill the second and third
1819 slots in the PLT entry if there is no PLT0.
1820 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1821 if there is no PLT0. Set sh_entsize on the .plt.got section.
1822 (compare_relocs): New.
1823 (elf_x86_64_plt_type): Likewise.
1824 (elf_x86_64_plt): Likewise.
1825 (elf_x86_64_nacl_plt): New. Forward declaration.
1826 (elf_x86_64_get_plt_sym_val): Removed.
1827 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1828 against all dynamic relocations.
1829 (elf_x86_64_link_setup_gnu_properties): New function.
1830 (elf_backend_create_dynamic_sections): Updated.
1831 (elf_backend_setup_gnu_properties): New.
1832 (elf_x86_64_nacl_plt): New.
1833 (elf_x86_64_nacl_arch_bed): Updated.
1835 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1837 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1838 (LAZY_PLT_ENTRY_SIZE): This.
1839 (NON_LAZY_PLT_ENTRY_SIZE): New.
1840 (elf_i386_plt0_entry): Renamed to ...
1841 (elf_i386_lazy_plt0_entry): This.
1842 (elf_i386_plt_entry): Renamed to ...
1843 (elf_i386_lazy_plt_entry): This.
1844 (elf_i386_pic_plt0_entry): Renamed to ...
1845 (elf_i386_pic_lazy_plt0_entry): This.
1846 (elf_i386_pic_plt_entry): Renamed to ...
1847 (elf_i386_pic_lazy_plt_entry): This.
1848 (elf_i386_got_plt_entry): Renamed to ...
1849 (elf_i386_non_lazy_plt_entry): This.
1850 (elf_i386_pic_got_plt_entry): Renamed to ...
1851 (elf_i386_pic_non_lazy_plt_entry): This.
1852 (elf_i386_eh_frame_plt): Renamed to ...
1853 (elf_i386_eh_frame_lazy_plt): This.
1854 (elf_i386_eh_frame_plt_got): Renamed to ...
1855 (elf_i386_eh_frame_non_lazy_plt): This.
1856 (elf_i386_plt_layout): Renamed to ...
1857 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1858 eh_frame_plt_got_size.
1859 (elf_i386_non_lazy_plt_layout): New.
1860 (elf_i386_plt_layout): Likewise.
1861 (elf_i386_non_lazy_plt): Likewise.
1862 (GET_PLT_ENTRY_SIZE): Removed.
1863 (elf_i386_plt): Renamed to ...
1864 (elf_i386_lazy_plt): This.
1865 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1866 (elf_i386_arch_bed): Updated.
1867 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1868 (elf_i386_create_dynamic_sections): Removed.
1869 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1870 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1871 (elf_i386_adjust_dynamic_symbol): Updated.
1872 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1873 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1874 size for PLT0 if there is no PLT0.
1875 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1876 output section is discarded only if GOT isn't empty.
1877 (elf_i386_relocate_section): Updated. Properly get PLT index
1878 if there is no PLT0.
1879 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1880 second and third slots in the PLT entry if there is no PLT0.
1881 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1882 if there is no PLT0. Set sh_entsize on the .plt.got section.
1883 (elf_i386_nacl_plt): Forward declaration.
1884 (elf_i386_get_plt_sym_val): Removed.
1885 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1886 against all dynamic relocations.
1887 (elf_i386_link_setup_gnu_properties): New function.
1888 (elf_backend_create_dynamic_sections): Updated.
1889 (elf_backend_setup_gnu_properties): New.
1890 (elf_i386_nacl_plt): Updated.
1891 (elf_i386_nacl_arch_bed): Likewise.
1892 (elf_i386_vxworks_arch_bed): Likewise.
1894 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1896 * elflink.c (elf_output_implib): Remove executable flag from import
1898 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1899 library is a relocatable object file.
1901 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1904 * elf32-avr.c (avr_should_move_sym): New function.
1905 (avr_should_reduce_sym_size): Likewise.
1906 (avr_should_increase_sym_size): Likewise.
1907 (elf32_avr_relax_delete_bytes): Adjust symbol values
1908 and sizes by calling new functions.
1910 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1912 * config.bfd (riscv32-*): Enable rv64.
1914 2017-05-02 Alan Modra <amodra@gmail.com>
1917 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1918 rather than h->root.type == bfd_link_hash_new.
1919 (bfd_elf_record_link_assignment): Similarly, call
1920 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1922 2017-04-29 Alan Modra <amodra@gmail.com>
1925 * reloc.c (reloc_offset_in_range): New function.
1926 (bfd_perform_relocation, bfd_install_relocation): Use it.
1927 (_bfd_final_link_relocate): Likewise.
1929 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1931 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1932 before using .plt.got.
1933 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1935 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1937 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1938 instead of "+=" to update 0.
1940 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1942 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1943 .plt.got section here.
1944 (elf_i386_check_relocs): Don't create the .plt.got section.
1945 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1946 the .plt.got and .plt.bnd sections here.
1947 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1950 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1952 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1954 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1955 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1956 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1957 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1960 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1962 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1964 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1965 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1966 the first relocatable ELF input with GNU properties.
1968 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1970 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1971 VxWorks for non-PIC.
1973 2017-04-27 Alan Modra <amodra@gmail.com>
1975 * elf-bfd.h (struct elf_backend_data): Make asection param of
1976 elf_backend_eh_frame_address_size const.
1977 (_bfd_elf_eh_frame_address_size): Likewise.
1978 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1979 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1980 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1981 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1982 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1983 (next_cie_fde_offset): Constify params.
1984 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1986 2017-04-27 Alan Modra <amodra@gmail.com>
1988 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1989 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1990 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1992 (offset_adjust): New function.
1993 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1994 (adjust_eh_frame_local_symbols): Likewise.
1995 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1996 after changing anything. Return true if anything changed.
1997 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1998 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2000 2017-04-27 Alan Modra <amodra@gmail.com>
2002 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2005 2017-04-27 Alan Modra <amodra@gmail.com>
2007 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2008 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2009 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2010 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2011 for undef and undefweak dyn_relocs.
2012 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2013 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2014 (allocate_got, allocate_dynrelocs): Likewise.
2015 (ppc64_elf_relocate_section): Likewise.
2017 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2019 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2020 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2021 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2022 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2024 2017-04-26 Nick Clifton <nickc@redhat.com>
2027 * reloc.c (bfd_perform_relocation): Check for a negative address
2030 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2033 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2035 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2036 (elf_backend_always_renumber_dynsyms): Define.
2037 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2038 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2039 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2040 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2042 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2044 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2046 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2047 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2048 sections have been created.
2050 2017-04-26 Nick Clifton <nickc@redhat.com>
2053 * compress.c (bfd_init_section_compress_status): Check the return
2054 value from bfd_malloc.
2056 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2058 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2059 no_finish_dynamic_symbol.
2060 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2062 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2063 weak symbol, don't make it dynamic.
2064 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2065 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2066 relocation for GOT reference.
2067 (elf_x86_64_finish_dynamic_symbol): Abort if
2068 no_finish_dynamic_symbol isn't 0.
2070 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2073 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2074 undefined weak symbol, don't make it dynamic.
2075 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2076 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2077 relocation for R_386_GOT32.
2079 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2082 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2084 2017-04-23 Alan Modra <amodra@gmail.com>
2087 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2088 * elf.c (lcomm_sym): New.
2089 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2090 * bfd-in2.h: Regenerate.
2092 2017-04-23 Alan Modra <amodra@gmail.com>
2095 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2096 parameters and comment.
2097 (_bfd_elf_get_reloc_section): Delete.
2098 (_bfd_elf_plt_get_reloc_section): Declare.
2099 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2100 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2102 (_bfd_elf_get_reloc_section): ..here. Delete.
2103 (assign_section_numbers): Call elf_get_reloc_section.
2104 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2105 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2107 2017-04-23 Alan Modra <amodra@gmail.com>
2110 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2113 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2116 * elf32-i386.c (elf_i386_link_hash_entry): Add
2117 no_finish_dynamic_symbol.
2118 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2119 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2120 symbol, don't make it dynamic in PIE.
2121 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2122 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2123 relocation for R_386_GOT32
2124 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2127 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2131 * elflink.c (elf_link_add_object_symbols): Require
2132 --no-dynamic-linker with -E/--dynamic-list when creating
2135 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2137 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2140 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2142 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2143 dynamic symbol sorting.
2145 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2148 * elflink.c (elf_link_add_object_symbols): Preserve
2149 dynamic_ref_after_ir_def when restoring the symbol table for
2150 unneeded dynamic object.
2152 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2155 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2156 on on undefined IFUNC symbol in the second PLT.
2158 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2160 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2162 2017-04-19 Alan Modra <amodra@gmail.com>
2164 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2165 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2166 * elf32-ppc.c:Formatting.
2167 (ensure_undefweak_dynamic): Don't make dynamic when
2168 info->dynamic_undefined_weak is zero.
2169 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2170 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2171 not default visibility. Discard undef and undefweak
2173 (ppc_elf_relocate_section): Adjust to suit.
2174 * elf64-ppc.c: Formatting.
2175 (ensure_undefweak_dynamic): Don't make dynamic when
2176 info->dynamic_undefined_weak is zero.
2177 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2178 info->dynamic_undefined_weak. Discard them earlier.
2180 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2183 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2184 before generating the version definition section.
2186 2017-04-17 Alan Modra <amodra@gmail.com>
2188 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2189 state when a regular object file defines a symbol with
2190 incompatible type to that defined by an earlier shared lib.
2192 2017-04-13 Alan Modra <amodra@gmail.com>
2194 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2196 * elf32-arm.c: Likewise.
2197 * elf32-i386.c: Likewise.
2198 * elf32-mep.c: Likewise.
2199 * elf64-ia64-vms.c: Likewise.
2200 * elf64-x86-64.c: Likewise.
2201 * elflink.c: Likewise.
2202 * elfnn-ia64.c: Likewise.
2203 * elfxx-mips.c: Likewise.
2205 2017-04-13 Alan Modra <amodra@gmail.com>
2207 * aoutx.h: Use %B and %A in error messages throughout file.
2208 * aout-cris.c: Likewise.
2209 * archive.c: Likewise.
2210 * binary.c: Likewise.
2211 * coff-rs6000.c: Likewise.
2212 * coff-tic4x.c: Likewise.
2213 * coffcode.h: Likewise.
2214 * coffgen.c: Likewise.
2215 * cofflink.c: Likewise.
2216 * coffswap.h: Likewise.
2217 * cpu-arm.c: Likewise.
2218 * elf-eh-frame.c: Likewise.
2219 * elf-m10300.c: Likewise.
2221 * elf32-arc.c: Likewise.
2222 * elf32-arm.c: Likewise.
2223 * elf32-bfin.c: Likewise.
2224 * elf32-frv.c: Likewise.
2225 * elf32-iq2000.c: Likewise.
2226 * elf32-m32c.c: Likewise.
2227 * elf32-microblaze.c: Likewise.
2228 * elf32-nds32.c: Likewise.
2229 * elf32-rl78.c: Likewise.
2230 * elf32-rx.c: Likewise.
2231 * elf32-score.c: Likewise.
2232 * elf32-score7.c: Likewise.
2233 * elf32-sh64.c: Likewise.
2234 * elf32-v850.c: Likewise.
2235 * elf32-vax.c: Likewise.
2236 * elf32-visium.c: Likewise.
2237 * elf64-ia64-vms.c: Likewise.
2238 * elf64-mmix.c: Likewise.
2239 * elf64-sh64.c: Likewise.
2240 * elfcode.h: Likewise.
2241 * elfnn-aarch64.c: Likewise.
2242 * elfnn-ia64.c: Likewise.
2243 * elfxx-mips.c: Likewise.
2244 * hpux-core.c: Likewise.
2247 * linker.c: Likewise.
2248 * merge.c: Likewise.
2250 * oasys.c: Likewise.
2251 * pdp11.c: Likewise.
2252 * peXXigen.c: Likewise.
2253 * rs6000-core.c: Likewise.
2254 * vms-alpha.c: Likewise.
2255 * xcofflink.c: Likewise.
2257 2017-04-13 Alan Modra <amodra@gmail.com>
2259 * bfd.c (PRINT_TYPE): Define.
2260 (_doprnt): New function.
2261 (error_handler_internal): Use _doprnt.
2262 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2263 calls in their natural order, throughout file.
2264 * coff-mcore.c: Likewise.
2265 * coff-ppc.c: Likewise.
2266 * coff-tic80.c: Likewise.
2267 * cofflink.c: Likewise.
2268 * elf-s390-common.c: Likewise.
2270 * elf32-arm.c: Likewise.
2271 * elf32-i386.c: Likewise.
2272 * elf32-m32r.c: Likewise.
2273 * elf32-msp430.c: Likewise.
2274 * elf32-spu.c: Likewise.
2275 * elf64-ia64-vms.c: Likewise.
2276 * elf64-sparc.c: Likewise.
2277 * elf64-x86-64.c: Likewise.
2278 * elflink.c: Likewise.
2279 * elfnn-aarch64.c: Likewise.
2280 * elfnn-ia64.c: Likewise.
2281 * elfxx-mips.c: Likewise.
2283 2017-04-13 Alan Modra <amodra@gmail.com>
2285 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2286 branch veneers" error. Fix double space and format message.
2287 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2288 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2290 2017-04-13 Alan Modra <amodra@gmail.com>
2292 * bfd-in2.h: Regenerate.
2294 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2296 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2297 extra `\n' in warning/error messages.
2298 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2299 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2301 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2303 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2304 processor-specific properties with generic ELF target vector.
2306 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2308 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2309 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2310 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2311 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2313 (link_hash_newfunc): Initialize has_got_reloc and
2315 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2317 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2319 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2321 (_bfd_sparc_elf_fixup_symbol): New function.
2322 (allocate_dynrelocs): Don't allocate space for dynamic
2323 relocations and discard relocations against resolved undefined
2324 weak symbols in executable. Don't make resolved undefined weak
2325 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2326 relocation against undefined weak symbols in PIE.
2327 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2328 relocations against resolved undefined weak symbols in PIE
2329 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2330 without ynamic PLT/GOT relocations for resolved undefined weak
2332 Don't generate dynamic relocation against resolved undefined
2333 weak symbol in executable.
2334 (pie_finish_undefweak_symbol): New function.
2335 (_bfd_sparc_elf_finish_dynamic_sections): Call
2336 pie_finish_undefweak_symbol on all symbols in PIE.
2337 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2338 (_bfd_sparc_elf_fixup_symbol): New function.
2340 2017-04-10 Nick Clifton <nickc@redhat.com>
2342 * config.bfd: Remove ns32k from obsolete list.
2344 2017-04-10 Alan Modra <amodra@gmail.com>
2347 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2348 (special_sections_i): Likewise for .init_array.
2349 (special_sections_p): Likewise for .preinit_array.
2351 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2355 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2356 ELF_COMMON_DEF_P for common symbols.
2357 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2358 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2359 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2360 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2361 07492f668d2173da7a2bda3707ff0985e0f460b6.
2363 2017-04-07 Pedro Alves <palves@redhat.com>
2365 * opncls.c (bfd_get_debug_link_info): Rename to...
2366 (bfd_get_debug_link_info_1): ... this. Change type of second
2367 parameter to void pointer. Adjust.
2368 (bfd_get_debug_link_info): Reimplement on top of
2369 bfd_get_debug_link_info_1.
2370 (separate_debug_file_exists, separate_alt_debug_file_exists):
2371 Change type of second parameter to void pointer. Adjust.
2372 (get_func_type, check_func_type): Change type of second parameter
2374 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2375 the callback functions instead of passing the address of a local.
2376 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2377 find_separate_debug_file.
2378 (get_alt_debug_link_info_shim): Change type of second parameter to
2379 void pointer. Adjust.
2380 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2381 find_separate_debug_file.
2382 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2383 of second parameter to void pointer. Adjust.
2384 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2385 pointer local to find_separate_debug_file.
2387 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2389 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2390 external symbols with a definition.
2391 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2393 2017-04-07 Alan Modra <amodra@gmail.com>
2395 * po/SRC-POTFILES.in: Regenerate.
2397 2017-04-05 Alan Modra <amodra@gmail.com>
2399 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2402 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2404 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2405 numbers for DataDirectory entry indicies passed to
2408 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2410 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2411 each GNU_MBIND section and align GNU_MBIND section to page size.
2412 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2413 segment for each GNU_MBIND section.
2414 (_bfd_elf_init_private_section_data): Copy sh_info from input
2415 for GNU_MBIND section.
2417 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2419 * elfnn-riscv.c (GP_NAME): Delete.
2420 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2421 (_bfd_riscv_relax_lui): Likewise.
2423 2017-04-04 Nick Clifton <nickc@redhat.com>
2426 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2428 (bfd_elf_final_link): Only initialize the extended symbol index
2429 section if there are extended symbol tables to list.
2431 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2433 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2434 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2435 * configure.ac (elf): Add elf-properties.lo.
2436 * Makefile.in: Regenerated.
2437 * configure: Likewise.
2438 * elf-bfd.h (elf_property_kind): New.
2439 (elf_property): Likewise.
2440 (elf_property_list): Likewise.
2441 (elf_properties): Likewise.
2442 (_bfd_elf_parse_gnu_properties): Likewise.
2443 (_bfd_elf_get_property): Likewise.
2444 (_bfd_elf_link_setup_gnu_properties): Likewise.
2445 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2446 and setup_gnu_properties.
2447 (elf_obj_tdata): Add properties.
2448 * elf-properties.c: New file.
2449 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2450 (elf_i386_merge_gnu_properties): Likewise.
2451 (elf_backend_parse_gnu_properties): Likewise.
2452 (elf_backend_merge_gnu_properties): Likewise.
2453 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2454 (elf_x86_64_merge_gnu_properties): Likewise.
2455 (elf_backend_parse_gnu_properties): Likewise.
2456 (elf_backend_merge_gnu_properties): Likewise.
2457 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2458 (elf_backend_parse_gnu_properties): Likewise.
2459 (elf_backend_setup_gnu_properties): Likewise.
2460 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2461 elf_backend_merge_gnu_properties and
2462 elf_backend_setup_gnu_properties.
2464 2017-03-30 Pip Cet <pipcet@gmail.com>
2466 * elf32-wasm32.c: Add relocation code, two relocs.
2467 * reloc.c: Add wasm32 relocations.
2468 * libbfd.h: Regenerate.
2469 * bfd-in2.h: Regenerate.
2470 * bfd/po/bfd.pot: Regenerate.
2472 2017-03-29 Nick Clifton <nickc@redhat.com>
2475 * coff-bfd.h (struct coff_section_data): Add new fields:
2476 saved_bias and bias.
2477 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2478 computed for PE binaries.
2479 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2482 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
2485 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2486 to handle a local symbol with a hash-symbol-entry; without PLT.
2487 Add BFD_ASSERT for an incidental case with GOT entry present.
2488 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2489 isn't forced-or-set local.
2491 2017-03-27 Pip Cet <pipcet@gmail.com>
2493 * wasm-module.c: New file to support WebAssembly modules.
2494 * wasm-module.h: New file to support WebAssembly modules.
2495 * doc/webassembly.texi: Start documenting wasm-module.c.
2496 * config.bfd: Add wasm_vec.
2497 * targets.c: Likewise.
2498 * configure.ac: Likewise.
2499 * Makefile.am: Add entries for wasm-module.c.
2500 * Makefile.in: Regenerate.
2501 * configure: Regenerate.
2502 * po/SRC-POTFILES.in: Regenerate.
2504 2017-03-27 Pip Cet <pipcet@gmail.com>
2506 * cpu-wasm32.c: New file to support wasm32 architecture.
2507 * elf32-wasm32.c: New file to support wasm32 architecture.
2508 * Makefile.am: Add wasm32 architecture.
2509 * archures.c: Likewise.
2510 * config.bfd: Likewise.
2511 * configure.ac: Likewise.
2512 * targets.c: Likewise.
2513 * Makefile.in: Regenerate.
2514 * bfd-in2.h: Regenerate.
2515 * configure: Regenerate.
2516 * po/SRC-POTFILES.in: Regenerate.
2518 2017-03-20 Alan Modra <amodra@gmail.com>
2521 * elf64-ppc.c (compare_symbols): Stabilize sort.
2523 2017-03-18 Alan Modra <amodra@gmail.com>
2525 * elf64-ppc.c (struct ppc_link_hash_table): Add
2526 local_ifunc_resolver and maybe_local_ifunc_resolver.
2527 (ppc_build_one_stub): Set flags on emitting dynamic
2528 relocation to ifunc.
2529 (ppc64_elf_relocate_section): Likewise.
2530 (ppc64_elf_finish_dynamic_symbol): Likewise.
2531 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2532 local dynamic relocs to ifuncs.
2533 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2534 local_ifunc_resolver and maybe_local_ifunc_resolver.
2535 (ppc_elf_relocate_section): Set flag on emitting dynamic
2536 relocation to ifuncs.
2537 (ppc_elf_finish_dynamic_symbol): Likewise.
2538 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2539 dynamic relocs to ifuncs.
2541 2017-03-13 Nick Clifton <nickc@redhat.com>
2544 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2545 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2546 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2547 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2548 * bfd-in2.h: Regenerate.
2549 * libbfd.h: Regenerate.
2550 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2552 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2553 (elfNN_aarch64_howto_table): Likewise.
2554 (aarch64_tls_transition_without_check): Likewise.
2555 (aarch64_reloc_got_type): Likewise.
2556 (elfNN_aarch64_final_link_relocate): Likewise.
2557 (elfNN_aarch64_tls_relax): Likewise.
2558 (elfNN_aarch64_relocate_section): Likewise.
2559 (elfNN_aarch64_gc_sweep_hook): Likewise.
2560 (elfNN_aarch64_check_relocs): Likewise.
2561 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2562 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2564 2017-03-11 Alan Modra <amodra@gmail.com>
2566 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2567 parameter is in fact used. Whitespace fixes.
2568 * elf64-ppc.c: Likewise.
2570 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2572 * rs6000-core.c (CORE_NEW): Simplify macro when
2573 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2575 2017-03-07 Alan Modra <amodra@gmail.com>
2579 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2582 2017-03-05 Alan Modra <amodra@gmail.com>
2584 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2585 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2586 (next_cie_fde_offset): New function.
2587 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2588 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2589 four bytes. Align CIEs to four or eight bytes depending on
2590 per_encoding_aligned8. Align FDEs according to their encoding.
2591 Pad last FDE to output section alignment.
2592 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2594 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2595 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2596 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2598 2017-03-02 Martin Bickel <binutils@ineranves.de>
2601 * elf.c (rewrite_elf_program_header): Do not issue a warning for
2602 empty segments which have a zero filesz, but a non-zero memsz.
2604 2017-03-02 Alan Modra <amodra@gmail.com>
2606 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2608 2017-02-28 Alan Modra <amodra@gmail.com>
2610 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2611 (ppc64_elf_relocate_section): Likewise.
2613 2017-02-28 Alan Modra <amodra@gmail.com>
2616 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2617 rather than elf32_nios2_hash_table or elf_hash_table.
2618 (create_got_section): Likewise.
2619 (nios2_elf32_finish_dynamic_symbol): Likewise.
2620 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2621 (nios2_elf32_size_dynamic_sections): Likewise.
2622 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2623 vars. Use htab equivalents directly instead. Don't create
2624 all dynamic sections on needing just the GOT. Use a goto
2625 rather than a fall-through with reloc test. Ensure
2626 htab->dynobj is set when making dynamic sreloc section.
2627 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2628 equivalent directly instead. Don't segfault on looking for
2629 .dynamic when dynamic sections have not been created. Don't
2630 segfault on .got.plt being discarded.
2631 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2632 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2633 fixme and another not so relevant comment.
2634 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2635 already set, set hash table dynobj on creating .sbss.
2637 2017-02-28 Alan Modra <amodra@gmail.com>
2639 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2640 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2641 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2642 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2643 (ppc64_elf_relocate_section): Likewise.
2644 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2645 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2646 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2647 * libbfd.h: Regenerate.
2648 * bfd-in2.h: Regenerate.
2650 2017-02-28 Alan Modra <amodra@gmail.com>
2652 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2653 dynamic .data.rel.ro read-only.
2654 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2655 rather than section flags when deciding where copy reloc goes.
2656 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2657 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2658 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2659 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2660 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2661 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2662 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2663 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2664 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2665 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2666 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2667 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2668 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2669 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2670 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2671 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2672 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2673 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2674 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2676 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2678 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2679 `jalr $0, $25' instruction encoding.
2681 2017-02-27 Nick Clifton <nickc@redhat.com>
2684 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2685 generating a seg-fault when encountering a symbol that has been
2686 deleted by garbage collection.
2688 2017-02-25 Alan Modra <amodra@gmail.com>
2690 * elf32-arc.c (struct dynamic_sections): Delete.
2691 (enum dyn_section_types): Delete.
2692 (dyn_section_names): Delete.
2693 (arc_create_dynamic_sections): Delete.
2694 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2695 segfault on discarded .rela.plt section.
2696 (elf_arc_size_dynamic_sections): Formatting. Don't call
2697 arc_create_dynamic_sections. Don't allocate memory for sections
2698 handled by the generic linker. Correct code finding relocs in
2699 read-only sections. Set SEC_EXCLUDE on zero size .got,
2700 .got.plt, and .dynbss sections. Do set .interp for pies.
2702 2017-02-24 Andrew Waterman <andrew@sifive.com>
2704 * elfnn-riscv.c (GP_NAME): New macro.
2705 (riscv_global_pointer_value): Use it.
2706 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2707 output section, consider only that section's alignment.
2709 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2711 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
2712 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
2713 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
2714 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
2716 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2718 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
2719 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
2722 2017-02-23 Alan Modra <amodra@gmail.com>
2725 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2727 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2728 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2731 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2734 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2735 processing ahead of the call to `elf_gc_sweep_symbol'.
2737 2017-02-22 Nick Clifton <nickc@redhat.com>
2740 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2741 created section 4-byte alignment.
2743 2017-02-22 Alan Modra <amodra@gmail.com>
2745 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2746 on .got or .plt output section being discarded by script.
2747 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2750 2017-02-21 Alan Modra <amodra@gmail.com>
2752 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2753 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2755 2017-02-20 Alan Modra <amodra@gmail.com>
2758 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2759 if DT_RELSZ/DT_RELASZ is zero.
2761 2017-02-17 Nick Clifton <nickc@redhat.com>
2763 * compress.c (bfd_get_full_section_contents): Remember to reduce
2764 compressed size by the sizeof the compression header when
2765 decompressing the contents.
2767 2017-02-17 Pedro Alves <palves@redhat.com>
2769 * srec.c (Chunk): Rename to ...
2770 (_bfd_srec_len): ... this.
2771 (S3Forced): Rename to ...
2772 (_bfd_srec_forceS3): ... this.
2773 * objcopy.c: Adjust all references.
2775 2017-02-17 Pedro Alves <palves@redhat.com>
2777 * archive.c (bsd_write_armap): Rename to ...
2778 (_bfd_bsd_write_armap): ... this.
2779 (coff_write_armap): Rename to ...
2780 (_bfd_coff_write_armap): ... this.
2781 * libbfd-in.h (bsd_write_armap): Rename to ...
2782 (_bfd_bsd_write_armap): ... this.
2783 (coff_write_armap): Rename to ...
2784 (_bfd_coff_write_armap): ... this.
2785 * aout-target.h, aout-tic30.c: Adjust all users.
2786 * libbfd.h: Regenerate.
2788 2017-02-17 Pedro Alves <palves@redhat.com>
2790 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2791 (warn_deprecated): Rename to ...
2792 (_bfd_warn_deprecated): ... this.
2793 * libbfd.c (warn_deprecated): Rename to ...
2794 (_bfd_warn_deprecated): ... this.
2795 * bfd-in2.h: Regenerate.
2797 2017-02-17 Pedro Alves <palves@redhat.com>
2799 * bfdio.c (real_ftell): Rename to ...
2800 (_bfd_real_ftell): ... this.
2801 (real_fseek): Rename to ...
2802 (_bfd_real_fseek): ... this.
2803 (real_fopen): Rename to ...
2804 (_bfd_real_fopen): ... this.
2805 * libbfd-in.h (real_ftell): Rename to ...
2806 (_bfd_real_ftell): ... this.
2807 (real_fseek): Rename to ...
2808 (_bfd_real_fseek): ... this.
2809 (real_fopen): Rename to ...
2810 (_bfd_real_fopen): ... this.
2811 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2812 * libbfd.h: Regenerate.
2814 2017-02-17 Pedro Alves <palves@redhat.com>
2816 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2817 * libbfd.c (read_unsigned_leb128): Rename to ...
2818 (_bfd_read_unsigned_leb128): ... this.
2819 (read_signed_leb128): Rename to ...
2820 (_bfd_read_signed_leb128): ... this.
2821 (safe_read_leb128): Rename to ...
2822 (_bfd_safe_read_leb128): ... this.
2823 * libbfd-in.h (read_unsigned_leb128): Rename to ...
2824 (_bfd_read_unsigned_leb128): ... this.
2825 (read_signed_leb128): Rename to ...
2826 (_bfd_read_signed_leb128): ... this.
2827 (safe_read_leb128): Rename to ...
2828 (_bfd_safe_read_leb128): ... this.
2829 * libbfd.h: Renegerate.
2831 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2833 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2834 before trying to fine matching file and line information.
2836 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2838 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2839 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2840 not match current bfd, then reload debug information. Record bfd
2841 we're loading debug info for in the stash. If we have debug
2842 informatin in the cache then perform section placement before
2845 2017-02-16 Alan Modra <amodra@gmail.com>
2848 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2849 * elfxx-target.h (elf_backend_no_page_alias): Define.
2850 (elfNN_bed): Init new field.
2851 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2852 ensure PT_LOAD segment starts on a new page.
2853 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2855 2017-02-16 Alan Modra <amodra@gmail.com>
2858 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2861 2017-02-16 Jiong Wang <jiong.wang@arm.com>
2863 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2864 * bfd-in2.h: Regenerated.
2866 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2869 * elf32-i386.c (elf_i386_relocate_section): Allow
2870 "lea foo@GOT, %reg" in PIC.
2872 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2875 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2876 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2877 error against local IFUNC symbol without a base register for
2880 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2882 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2883 `%P: %H:' with `info->callbacks->einfo'.
2884 (ppc_elf_relocate_section): Likewise.
2885 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2886 (ppc64_elf_edit_toc): Likewise.
2887 (ppc64_elf_relocate_section): Likewise.
2889 2017-02-14 Alan Modra <amodra@gmail.com>
2891 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2892 --gc-keep-exported, and test versioned field of sym rather than
2893 looking for @ in name.
2895 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2897 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2900 2017-02-13 Nick Clifton <nickc@redhat.com>
2903 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2906 2017-02-07 Andrew Waterman <andrew@sifive.com>
2908 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2909 entry size if PLT header is written.
2911 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2913 Fix sparc64 dynamic relocation processing to use the dynamic
2915 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2916 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2919 2017-02-03 Nick Clifton <nickc@redhat.com>
2922 * coffcode.h (coff_write_object_contents): Enlarge size of
2923 s_name_buf in order to avoid compile time warning about possible
2925 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2926 32-bits of insn value before printing into buffer.
2928 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2930 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2931 `max_local_dynindx'.
2932 (mips_elf_sort_hash_table): Handle it.
2933 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2934 symbols bump up `max_local_dynindx' rather than
2935 `max_non_got_dynindx'.
2937 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2939 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2940 `min_got_dynindx', `max_unref_got_dynindx' and
2941 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2942 (mips_elf_sort_hash_table): Adjust accordingly.
2944 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2946 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2947 to access the hash table.
2949 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2951 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2952 non-NULL `htab' to the beginning.
2954 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2956 * elflink.c (elf_gc_sweep): Wrap overlong line.
2958 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2960 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2961 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2962 * elfxx-mips.c (mips_elf_link_hash_table): Add
2963 `ignore_branch_isa' member.
2964 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2965 in branch relocation calculation as an error if
2966 `ignore_branch_isa' has been set.
2967 (_bfd_mips_elf_insn32): Rename to...
2968 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2969 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2970 Handle the new parameter.
2972 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2974 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2975 local variable dynobj.
2978 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2979 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2980 executable from read-only sections into sdynrelro.
2981 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2982 dynamic relocs in sdynrelro.
2983 (elf_backend_want_dynrelro): Define.
2985 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2987 * config.bfd (*-*-rtemsaout*): Mark as removed.
2989 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2991 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2992 (arm-*-rtems*): Move to (arm*-*-eabi*).
2993 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2994 (m68-*-rtems*): Move to (m68*-*-elf*).
2996 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2998 * config.bfd (*-*-rtemscoff*): Mark as removed.
3000 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3003 * elflink.c (bfd_elf_record_link_assignment): Revert last
3004 change and don't ever clear `forced_local'. Set `mark'
3006 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3008 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3009 (bfd_elf_size_dynamic_sections): ... here.
3010 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3011 and set `mark' instead in `__tls_get_addr_opt' processing.
3012 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3014 2017-01-24 Alan Modra <amodra@gmail.com>
3016 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3017 where dynamic relocs are preferable. Allow ifunc too.
3018 (ensure_undefweak_dynamic): New function.
3019 (allocate_dynrelocs): Use it here. Move plt handling last and
3020 don't make symbols dynamic, simplifying loop. Only make undef
3021 weak symbols with GOT entries dynamic. Correct condition
3022 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3023 comments. Remove goto.
3024 (ppc_elf_relocate_section): Correct test for using dynamic
3025 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3026 to suit. Set up explicit tls_index entries and implicit GOT
3027 tls_index entries resolvable at link time for
3028 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3029 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3030 (ensure_undefweak_dynamic): New function.
3031 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3032 with GOT entries dynamic. Remove unnecessary test of
3033 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3034 (ppc64_elf_relocate_section): Correct test for using dynamic
3035 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3036 to suit. Set up explicit tls_index entries and implicit GOT
3037 tls_index entries resolvable at link time for __tls_get_addr_opt.
3038 Simplify expression to clear mem for prelink.
3040 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3042 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3044 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3046 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3047 (elf_backend_hash_symbol): Define.
3049 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3052 * elflink.c (bfd_elf_record_link_assignment): Clear any
3053 `forced_local' marking for DSO symbols that are not being
3056 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3058 * elfnn-riscv.c (riscv_elf_object_p): New function.
3060 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3063 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3065 (elf_x86_64_check_relocs): Create .eh_frame section for the
3067 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3068 .eh_frame section for the .plt.bnd section.
3069 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3070 for the .plt.bnd section.
3072 2017-01-12 Nick Clifton <nickc@redhat.com>
3075 * opncls.c (find_separate_debug_file): Add include_dirs
3076 parameter. Only include the directory part of the bfd's filename
3077 in search paths if include_dirs is true. Add a couple of extra
3078 locations for looking for debug files.
3079 ( bfd_follow_gnu_debuglink): Update invocation of
3080 find_separate_debug_file.
3081 (bfd_follow_gnu_debugaltlink): Likewise.
3082 (get_build_id): New function: Finds the build-id of the given bfd.
3083 (get_build_id_name): New function: Computes the name of the
3084 separate debug info file for a bfd, based upon its build-id.
3085 (check_build_id_file): New function: Checks to see if a separate
3086 debug info file exists at the given location, and that its
3087 build-id matches that of the original bfd.
3088 (bfd_follow_build_id_debuglink): New function: Finds a separate
3089 debug info file for a given bfd by using the build-id method.
3090 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3091 method of locating a separate debug info file before using the
3093 * bfd-in2.h: Regenerate.
3095 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3098 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3099 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3100 elf_x86_64_eh_frame_plt_got.
3101 (elf_x86_64_size_dynamic_sections): Get unwind info from
3102 elf_x86_64_bnd_arch_bed for the BND PLT.
3104 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3106 * config.bfd: Add entries for i686-redox and x86_64-redox.
3108 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3110 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3112 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3113 .eh_frame section to 4 bytes for x32.
3114 (elf_x86_64_check_relocs): Likewise.
3116 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3119 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3120 (PLT_GOT_FDE_LENGTH): Likewise.
3121 (elf_i386_plt_layout): Add eh_frame_plt_got and
3122 eh_frame_plt_got_size.
3123 (elf_i386_plt): Updated.
3124 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3125 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3126 (elf_i386_size_dynamic_sections): Allocate and initialize
3127 .eh_frame section for .plt.got.
3128 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3130 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3131 eh_frame_plt_got_size.
3132 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3133 (PLT_GOT_FDE_LENGTH): Likewise.
3134 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3135 eh_frame_plt_got_size.
3136 (elf_x86_64_arch_bed): Updated.
3137 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3138 eh_frame_plt_got_size.
3139 (elf_x86_64_nacl_arch_bed): Likewise.
3140 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3141 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3142 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3143 .eh_frame section for .plt.got.
3144 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3147 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3149 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3150 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3152 2017-01-09 Nick Clifton <nickc@redhat.com>
3154 * dwarf2.c (lookup_address_in_function_table): Return early if
3155 there are no functions in the given comp unit, or if the high
3156 address of the last function in the comp unit is less than the
3159 2017-01-09 Nick Clifton <nickc@redhat.com>
3162 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3163 message if there are too many symbols to load.
3165 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3167 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3168 if relocs are cached.
3170 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3173 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3174 for R_MICROBLAZE_GOTOFF_64.
3176 2017-01-03 Nick Clifton <nickc@redhat.com>
3178 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3179 warning about using a possibly uninitialised variable.
3181 2017-01-02 Alan Modra <amodra@gmail.com>
3183 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3184 (allocate_plt_static, allocate_dynrelocs): Use it.
3186 2017-01-02 Alan Modra <amodra@gmail.com>
3188 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3189 .PARISC.unwind section.
3191 2017-01-02 Alan Modra <amodra@gmail.com>
3194 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3195 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3196 indirect to GOT pointer relative code edit.
3198 2017-01-02 Alan Modra <amodra@gmail.com>
3200 Update year range in copyright notice of all files.
3202 For older changes see ChangeLog-2016
3204 Copyright (C) 2017 Free Software Foundation, Inc.
3206 Copying and distribution of this file, with or without modification,
3207 are permitted in any medium without royalty provided the copyright
3208 notice and this notice are preserved.
3214 version-control: never