1 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
5 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
7 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
9 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
10 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
11 is set on any input relocatable file.
12 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
14 2017-08-23 Alan Modra <amodra@gmail.com>
17 * elf64-ppc.c (ensure_undef_dynamic): Rename from
18 ensure_undefweak_dynamic. Handle undefined too.
19 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
20 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
21 (allocate_dynrelocs): Discard undefined non-default visibility
22 relocs first. Make undefined syms dynamic. Tidy goto.
24 2017-08-21 Alan Modra <amodra@gmail.com>
25 H.J. Lu <hongjiu.lu@intel.com>
28 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
29 * elflink.c (bfd_elf_define_start_stop): Rewrite.
31 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
34 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
35 undefined weak symbols.
37 2017-08-18 Nick Clifton <nickc@redhat.com>
40 * tekhex.c (getsym): Fix check for source pointer walking off the
41 end of the input buffer.
43 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
46 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
47 relocations in debug sections, change abort to _bfd_error_handler.
49 2017-08-14 Nick Clifton <nickc@redhat.com>
52 * elf.c (setup_group): Check for an empty or very small group
54 * po/bfd.pot: Regenerate.
56 2017-08-14 Alan Modra <amodra@gmail.com>
59 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
60 alignment padding here.
61 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
62 in a reverse pass over sections.
64 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
67 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
68 for @plt suffixes first.
69 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
71 2017-08-08 Nick Clifton <nickc@redhat.com>
74 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
75 small section lengths.
76 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
78 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
79 there is enough data present in the note.
81 2017-08-08 Alan Modra <amodra@gmail.com>
84 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
85 got.refcount for GOTOFF relocs, just create .got section.
87 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
89 * elflink.c (elf_link_add_object_symbols): Move common symbol
90 check after bed->common_definition.
92 2017-08-07 Alan Modra <amodra@gmail.com>
95 * elflink.c (bfd_elf_final_link): Don't segfault when sections
96 needed to define various dynamic tags have been discarded.
98 2017-08-07 Nick Clifton <nickc@redhat.com>
101 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
102 has not been set then use the bfd returned by
103 _bfd_elf_link_setup_gnu_properties. If that is null then search
104 through all the input bfds selecting the first normal, ELF format
106 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
108 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
110 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
112 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
113 (elf_i386_check_tls_transition): Check tls_get_addr directly.
114 (elf_i386_convert_load_reloc): Update tls_get_addr check.
115 (elf_i386_link_check_relocs): New function.
116 (bfd_elf32_bfd_link_check_relocs): New.
117 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
119 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
120 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
121 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
122 (elf_x86_64_link_check_relocs): New function.
123 (bfd_elf64_bfd_link_check_relocs): New.
124 (bfd_elf32_bfd_link_check_relocs): Likewise.
126 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
129 * elflink.c (elf_link_add_object_symbols): Treat common symbol
130 as undefined for --no-define-common.
132 2017-08-05 Alan Modra <amodra@gmail.com>
134 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
135 hppa_link_hash_table.
137 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
139 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
140 entries for sysregs with negative indices.
142 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
144 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
145 isn't the S/390 specific elf data.
146 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
148 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
150 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
151 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
152 [R_RISCV_ADD16]: Likewise.
153 [R_RISCV_ADD32]: Likewise.
154 [R_RISCV_ADD64]: Likewise.
155 [R_RISCV_SUB6]: Likewise.
156 [R_RISCV_SUB8]: Likewise.
157 [R_RISCV_SUB16]: Likewise.
158 [R_RISCV_SUB32]: Likewise.
159 [R_RISCV_SUB64]: Likewise.
161 2017-07-31 Alan Modra <amodra@gmail.com>
163 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
164 without ld.so checks.
166 2017-07-29 Alan Modra <amodra@gmail.com>
169 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
170 (ppc64_elf_merge_symbol): Set non_zero_localentry.
171 (is_elfv2_localentry0): Test non_zero_localentry.
172 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
174 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
176 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
177 pointer check for htab->elf.irelplt.
178 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
180 2017-07-27 Nick Clifton <nickc@redhat.com>
183 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
185 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
187 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
189 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
191 (evax_bfd_print_emh): Check for invalid string lengths.
193 2017-07-25 Nick Clifton <nickc@redhat.com>
195 * po/fr.po: Updated French translation.
197 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
200 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
201 16-bit absolute branches into 10-bit pc-relative branches on the
202 MSP430 as well as the MSP430X.
204 2017-07-25 Alan Modra <amodra@gmail.com>
206 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
207 (stub_eh_frame_size): New function.
208 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
209 (group_sections): Init group tls_get_addr_opt_bctrl.
210 (ppc64_elf_size_stubs): Update sizing and initialization of
211 .eh_frame. Iteration over stubs via group list.
212 (ppc64_elf_build_stubs): Iterate over stubs via group list.
213 (ppc64_elf_finish_dynamic_sections): Update finalization of
216 2017-07-24 Nick Clifton <nickc@redhat.com>
219 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
220 of the relocs to the canonicalize_one_reloc routine.
221 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
222 for the _bfd_mach_o_canonicalize_one_reloc field.
223 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
224 res_base parameter. Use to check for corrupt pair relocs.
225 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
227 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
229 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
232 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
233 enough data in the record before attempting to parse it.
234 (_bfd_vms_slurp_eeom): Likewise.
236 (_bfd_vms_slurp_egsd): Check for an invalid section index.
237 (image_set_ptr): Likewise.
238 (alpha_vms_slurp_relocs): Likewise.
240 (alpha_vms_object_p): Check for a truncated record.
242 2017-07-24 Nick Clifton <nickc@redhat.com>
245 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
246 an unrecognized reloc and sets the bfd_error value.
247 * libbfd.h: Regenerate.
248 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
250 * elf32-i386.c (elf_i386_relocate_section): Likewise.
251 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
252 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
253 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
254 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
256 2017-07-23 Alan Modra <amodra@gmail.com>
258 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
261 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
264 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
265 reloc_class_ifunc for ifunc symbols.
267 2017-07-19 Nick Clifton <nickc@redhat.com>
270 * archive.c (bfd_generic_archive_p): If the bfd does not have the
271 correct magic bytes at the start, set the error to wrong format
272 and clear the format selector before returning NULL.
274 2017-07-19 Nick Clifton <nickc@redhat.com>
277 * coff-rs6000.c (_bfd_strntol): New function.
278 (_bfd_strntoll): New function.
279 (GET_VALUE_IN_FIELD): New macro.
280 (EQ_VALUE_IN_FIELD): new macro.
281 (_bfd_xcoff_slurp_armap): Use new macros.
282 (_bfd_xcoff_archive_p): Likewise.
283 (_bfd_xcoff_read_ar_hdr): Likewise.
284 (_bfd_xcoff_openr_next_archived_file): Likewise.
285 (_bfd_xcoff_stat_arch_elt): Likewise.
286 * coff64-rs6000.c (_bfd_strntol): New function.
287 (_bfd_strntoll): New function.
288 (GET_VALUE_IN_FIELD): New macro.
289 (xcoff64_slurp_armap): Use new macros.
291 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
292 John Eric Martin <John.Martin@emmicro-us.com>
294 * bfd-in2.h: Regenerate.
295 * libbfd.h: Regenerate.
296 * elf32-arc.c (JLI): Define.
297 * reloc.c: Add JLI relocations.
299 2017-07-18 Nick Clifton <nickc@redhat.com>
302 * coff-sh.c: Fix spelling typos.
303 * compress.c: Likewise.
304 * cpu-pdp11.c: Likewise.
305 * ecofflink.c: Likewise.
306 * elf-m10300.c: Likewise.
308 * elf32-arm.c: Likewise.
309 * elf32-m68k.c: Likewise.
310 * elf32-nds32.c: Likewise.
311 * elf32-ppc.c: Likewise.
312 * elf32-sh.c: Likewise.
313 * elf32-v850.c: Likewise.
314 * elf64-ppc.c: Likewise.
315 * elf64-x86-64.c: Likewise.
316 * elflink.c: Likewise.
317 * elfnn-aarch64.c: Likewise.
318 * elfxx-mips.c: Likewise.
321 * vms-alpha.c: Likewise.
322 * xcofflink.c: Likewise.
324 2017-07-18 Nick Clifton <nickc@redhat.com>
327 * coffcode.h (handle_COMDAT): Replace abort with an error message
330 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
333 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
336 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
338 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
340 2017-07-16 Alan Modra <amodra@gmail.com>
342 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
343 __tls_index GOT entries when using __tls_get_addr_opt stub.
344 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
346 2017-07-12 Alan Modra <amodra@gmail.com>
348 * po/es.po: Update from translationproject.org/latest/bfd/.
349 * po/fi.po: Likewise.
350 * po/fr.po: Likewise.
351 * po/id.po: Likewise.
352 * po/ja.po: Likewise.
353 * po/ro.po: Likewise.
354 * po/ru.po: Likewise.
355 * po/sr.po: Likewise.
356 * po/sv.po: Likewise.
357 * po/tr.po: Likewise.
358 * po/uk.po: Likewise.
359 * po/vi.po: Likewise.
360 * po/zh_CN.po: Likewise.
361 * po/hr.po: New file from translationproject.org.
362 * configure.ac (ALL_LINGUAS): Add hr. Sort.
363 * configure: Regenerate.
365 2017-07-12 Nick Clifton <nickc@redhat.com>
367 Fix compile time warnings using gcc 7.1.1.
368 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
370 (elf_xtensa_get_gotplt_section): Increase length of got_name
372 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
373 default return of FALSE.
374 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
375 default return of FALSE.
377 2017-07-12 Alan Modra <amodra@gmail.com>
379 * binary.c (binary_set_section_contents): Don't print filepos in
381 (coff_write_object_contents): Cast size_t for error message.
382 (coff_slurp_line_table): Don't use bfd_vma symndx.
383 (coff_slurp_reloc_table): Remove unneeded cast.
384 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
386 (find_abstract_instance_name): Likewise.
387 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
388 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
389 (elf32_arm_check_relocs): Make r_symndx an int.
390 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
392 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
394 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
396 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
397 * elf32-s390.c (elf_s390_check_relocs): Likewise.
398 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
399 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
400 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
401 * elf64-s390.c (elf_s390_check_relocs): Likewise.
402 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
403 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
404 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
405 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
406 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
407 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
408 and use %lu for error message.
409 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
410 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
413 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
415 (elf32_arm_final_link_relocate): Likewise.
416 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
417 * coffcode.h (styp_to_sec_flags): Likewise.
418 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
419 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
420 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
421 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
422 (elf32_bfin_merge_private_bfd_data): Likewise.
423 * elf32-cris.c (cris_elf_relocate_section): Likewise.
424 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
425 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
426 (i370_elf_relocate_section): Likewise.
427 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
428 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
429 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
430 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
431 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
432 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
433 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
434 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
435 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
436 * ieee.c (ieee_write_id, read_id): Likewise.
437 * mach-o.c (bfd_mach_o_write_contents): Likewise.
438 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
439 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
440 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
441 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
442 * stabs.c (_bfd_link_section_stabs): Likewise.
444 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
446 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
447 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
448 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
449 * coff-sh.c (sh_relax_section): Likewise.
450 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
451 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
452 * coffcode.h (coff_slurp_reloc_table): Likewise.
453 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
454 (_bfd_coff_read_string_table): Likewise.
455 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
456 * compress.c (bfd_get_full_section_contents): Likewise.
457 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
458 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
459 * elf.c (bfd_elf_string_from_elf_section): Likewise.
460 * elf32-arc.c (arc_special_overflow_checks): Likewise.
461 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
462 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
463 (elf32_arm_write_section): Likewise.
464 * elf32-bfin.c (bfin_relocate_section): Likewise.
465 (bfinfdpic_relocate_section): Likewise.
466 * elf32-hppa.c (hppa_build_one_stub): Likewise.
467 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
468 * elf32-i386.c (elf_i386_tls_transition): Likewise.
469 (elf_i386_relocate_section): Likewise.
470 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
471 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
472 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
473 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
474 * elf32-metag.c (elf_metag_relocate_section): Likewise.
475 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
476 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
477 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
478 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
479 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
480 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
481 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
482 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
483 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
484 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
485 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
486 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
487 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
488 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
489 * elf32-sh.c (sh_elf_relax_section): Likewise.
490 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
491 (sh_elf_relocate_section): Likewise.
492 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
493 * elf32-spu.c (spu_elf_relocate_section): Likewise.
494 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
495 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
496 * elf32-v850.c (v850_elf_relax_section): Likewise.
497 * elf32-vax.c (elf_vax_check_relocs): Likewise.
498 (elf_vax_relocate_section): Likewise.
499 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
500 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
501 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
502 (do_fix_for_relocatable_link): Likewise.
503 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
504 (elf64_alpha_relax_with_lituse): Likewise.
505 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
506 (elf_hppa_final_link_relocate): Likewise.
507 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
508 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
509 (elf64_vms_link_add_object_symbols): Likewise.
510 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
511 (mmix_final_link_relocate): Likewise.
512 * elf64-s390.c (invalid_tls_insn): Likewise.
513 (elf_s390_relocate_section): Likewise.
514 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
515 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
516 (elf_x86_64_relocate_section): Likewise.
517 * elfcode.h (elf_slurp_symbol_table): Likewise.
518 * elfcore.h (elf_core_file_p): Likewise.
519 * elflink.c (elf_link_read_relocs_from_section): Likewise.
520 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
521 (elfNN_aarch64_relocate_section): Likewise.
522 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
523 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
524 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
525 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
526 (_bfd_mips_elf_relocate_section): Likewise.
527 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
528 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
529 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
530 * ieee.c (ieee_slurp_external_symbols): Likewise.
531 * ihex.c (ihex_write_object_content): Likewise.
532 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
533 * merge.c (_bfd_merged_section_offset): Likewise.
534 * mmo.c (mmo_write_loc_chunk): Likewise.
535 (mmo_write_object_contents): Likewise.
536 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
537 * stabs.c (_bfd_link_section_stabs): Likewise.
538 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
540 2017-07-11 Alan Modra <amodra@gmail.com>
542 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
544 2017-07-11 Alan Modra <amodra@gmail.com>
546 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
547 instruction" error using _bfd_error_handler, not einfo.
549 2017-07-10 Nick Clifton <nickc@redhat.com>
551 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
552 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
554 2017-07-07 John Baldwin <jhb@FreeBSD.org>
556 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
558 2017-07-07 Alan Modra <amodra@gmail.com>
560 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
562 2017-07-07 Alan Modra <amodra@gmail.com>
564 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
565 as long long. Move code replacing "ll" with "I64", and simplify.
567 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
569 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
572 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
574 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
576 (line_info_add_file_name): Likewise.
577 (decode_line_info): Likewise.
579 2017-07-04 Tristan Gingold <gingold@adacore.com>
581 * version.m4: Bump version to 2.29.51
582 * configure: Regenerate.
584 2017-07-04 Jiong Wang <jiong.wang@arm.com>
586 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
587 sanity check at the head of this function.
589 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
591 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
593 (struct attr_abbrev): Add field implicit_const.
594 (dwarf_debug_sections): Add .debug_line_str.
595 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
596 (dwarf_debug_section_assert): Add static assertion.
597 (read_indirect_line_string): New.
598 (read_abbrevs): Support DW_FORM_implicit_const.
599 (is_str_attr): Support DW_FORM_line_strp.
600 (read_attribute_value): Support DW_FORM_line_strp and
601 DW_FORM_implicit_const.
602 (read_attribute): Support DW_FORM_implicit_const.
603 (line_info_add_include_dir, line_info_add_include_dir_stub):
604 (line_info_add_file_name, read_formatted_entries): New.
605 (decode_line_info, parse_comp_unit): Support DWARF 5.
606 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
608 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
610 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
611 abort statement that was put for symbols that are not dynamic.
613 2017-07-03 Tristan Gingold <gingold@adacore.com>
615 * po/bfd.pot: Regenerate
617 2017-07-03 Alan Modra <amodra@gmail.com>
619 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
620 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
621 * elf.c (setup_group): Use "Lx" to print sh_size.
622 (_bfd_elf_setup_sections): Remove unnecessary cast and print
623 unknown section type in hex.
624 (copy_special_section_fields): Style fix.
625 (bfd_section_from_shdr): Correct format for sh_link. Use a
626 common error message for all the variants of unrecognized
628 (assign_file_positions_for_load_sections): Use "Lx" for lma
629 adjust error message.
630 (assign_file_positions_for_non_load_sections): Formatting.
631 (rewrite_elf_program_header): Formatting. Use "Lx" for
632 bfd_vma values in error messages.
633 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
634 ELF_R_SYM value to type expected by format.
635 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
637 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
638 (elf_link_input_bfd): Use "Lx" for r_info.
639 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
641 2017-07-03 Alan Modra <amodra@gmail.com>
643 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
644 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
645 Microsoft C library variant of long long format specifier.
646 (PRINT20): Cast value to bfd_uint64_t not long long.
647 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
648 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
649 long long. Don't cast to bfd_vma.
650 * elf32-score.c (score3_bfd_getl48): Likewise.
651 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
653 2017-07-03 Alan Modra <amodra@gmail.com>
655 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
657 (bfd_elf_print_symbol): Don't cast symbol->flags.
658 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
659 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
660 _bfd_error_handler argument order.
661 (ppc_elf_merge_private_bfd_data): Don't cast flags.
663 2017-07-03 Alan Modra <amodra@gmail.com>
665 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
667 * configure: Regenerate.
668 * config.in: Regenerate.
670 2017-06-29 Andrew Waterman <andrew@sifive.com>
672 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
675 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
677 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
678 unless it is undefined weak.
679 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
680 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
682 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
683 is not dynamic in PIC, abort.
685 2017-06-29 Jiong Wang <jiong.wang@arm.com>
688 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
689 undefined weak symbols into dynamic.
690 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
691 relocation for non-dynamic symbols.
692 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
694 2017-06-29 Jiong Wang <jiong.wang@arm.com>
696 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
697 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
698 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
699 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
700 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
703 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
705 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
706 (elfcore_write_s390_gs_bc): Likewise.
707 * elf.c (elfcore_grok_s390_gs_cb): New function.
708 (elfcore_grok_s390_gs_bc): New function.
709 (elfcore_grok_note): Call them.
710 (elfcore_write_s390_gs_cb): New function.
711 (elfcore_write_s390_gs_bc): New function.
712 (elfcore_write_register_note): Call them.
714 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
716 * libbfd.c (_bfd_generic_get_section_contents): Don't call
717 bfd_get_file_size. Check archive element size.
718 (_bfd_generic_get_section_contents_in_window): Likewise.
720 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
722 * bfd-in2.h: Regenerated.
723 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
724 (bfd_get_file_size): Likewise.
726 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
727 Matthew Fortune <matthew.fortune@imgtec.com>
729 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
730 * cpu-mips.c (I_interaptiv_mr2): New enum value.
731 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
732 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
734 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
735 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
736 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
737 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
738 `bfd_mach_mips_interaptiv_mr2' entries.
739 * bfd-in2.h: Regenerate.
741 2017-06-27 Nick Clifton <nickc@redhat.com>
743 * tekhex.c (pass_over): Revert accidental conversion of a local
744 array to a static array.
746 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
749 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
750 reloc addend if necessary. Adjust diff only if
751 shrinked_insn_address < end_address.
753 2017-06-27 Alan Modra <amodra@gmail.com>
756 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
757 (_bfd_generic_get_section_contents_in_window): Likewise.
759 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
761 * elfnn-riscv.c (perform_relocation): Support the new
762 R_RISCV_32_PCREL relocation.
763 (riscv_elf_relocate_section): Likewise.
764 * elfxx-riscv.c (howto_table): Likewise.
765 (riscv_reloc_map): Likewise.
766 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
767 * libbfd.h: Regenerate.
769 2017-06-27 Alan Modra <amodra@gmail.com>
772 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
773 Use unsigned file pointer type, and remove cast.
774 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
775 Add "count", not "sz".
777 2017-06-26 Pedro Alves <palves@redhat.com>
780 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
783 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
786 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
789 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
791 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
792 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
793 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
794 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
795 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
797 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
800 * compress.c (bfd_get_full_section_contents): Don't check the
802 * libbfd.c (_bfd_generic_get_section_contents): Check for and
803 reject a section whose size + offset is greater than the size
805 (_bfd_generic_get_section_contents_in_window): Likewise.
807 2017-06-26 Nick Clifton <nickc@redhat.com>
810 * tekhex.c (getvalue): Check for the source pointer exceeding the
811 end pointer before the first byte is read.
813 2017-06-26 Nick Clifton <nickc@redhat.com>
816 * opncls.c (get_build_id): Check that the section is big enough
817 to contain the whole note.
818 * compress.c (bfd_get_full_section_contents): Check for and reject
819 a section whose size is greater than the size of the entire file.
820 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
821 contain a notes section.
823 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
825 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
827 (elf_s390_modify_segment_map): Likewise.
828 (bfd_elf_s390_set_options): Lisewise.
830 2017-06-26 Alan Modra <amodra@gmail.com>
832 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
834 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
835 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
836 .preinit_array on --just-syms bfds.
837 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
838 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
839 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
841 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
843 * elf.c (find_link): Bounds check "hint".
845 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
847 * elf32-arm.c (using_thumb_only): Update list of architectures in
848 BFD_ASSERT for which the logic is valid.
849 (using_thumb2_bl): Likewise.
850 (using_thumb2): Likewise and return true for ARMv8-R.
851 (arch_has_arm_nop): Likewise.
852 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
853 merging logic. Update commentis for value 15 of v8m_baseline,
854 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
855 merging of value 15 of Tag_CPU_arch.
857 2017-06-23 Jiong Wang <jiong.wang@arm.com>
859 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
860 BFD_RELOC_AARCH64_ADR_GOT_PAGE
861 * bfd-in2.h: Regenerate.
863 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
865 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
866 the error_alignment label forward. Properly align program
867 property note section.
869 2017-06-22 Eric Christopher <echristo@gmail.com>
871 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
872 abs to fix a truncation warning.
874 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
876 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
877 local undefined weak symbol to 0.
878 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
880 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
882 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
883 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
884 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
885 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
886 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
887 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
888 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
889 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
891 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
893 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
894 (elf_i386_lazy_ibt_plt_entry): Likewise.
895 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
896 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
897 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
898 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
899 (elf_i386_lazy_plt_layout): Likewise.
900 (elf_i386_non_lazy_plt_layout): Likewise.
901 (elf_i386_link_hash_entry): Add plt_second.
902 (elf_i386_link_hash_table): Add plt_second and
904 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
905 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
906 the second PLT. Check the second PLT.
907 (elf_i386_relocate_section): Use the second PLT to resolve
908 PLT reference if needed.
909 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
911 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
912 second PLT. Generate unwind info for the second PLT.
913 (elf_i386_plt_type): Add plt_second.
914 (elf_i386_get_synthetic_symtab): Support the second PLT.
915 (elf_i386_parse_gnu_properties): Support
916 GNU_PROPERTY_X86_FEATURE_1_AND.
917 (elf_i386_merge_gnu_properties): Support
918 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
919 on GNU_PROPERTY_X86_FEATURE_1_IBT
920 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
921 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
922 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
923 is set on all relocatable inputs.
924 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
925 (elf_x32_lazy_ibt_plt_entry): Likewise.
926 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
927 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
928 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
929 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
930 (elf_x86_64_lazy_ibt_plt): Likewise.
931 (elf_x32_lazy_ibt_plt): Likewise.
932 (elf_x86_64_non_lazy_ibt_plt): Likewise.
933 (elf_x32_non_lazy_ibt_plt): Likewise.
934 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
935 (elf_x86_64_parse_gnu_properties): Support
936 GNU_PROPERTY_X86_FEATURE_1_AND.
937 (elf_x86_64_merge_gnu_properties): Support
938 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
939 on GNU_PROPERTY_X86_FEATURE_1_IBT
940 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
941 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
942 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
943 is set on all relocatable inputs.
945 2017-06-22 Nick Clifton <nickc@redhat.com>
948 * som.c (setup_sections): NUL terminate the space_strings buffer.
949 Check that the space.name field does not index beyond the end of
950 the space_strings buffer.
952 2017-06-21 Nick Clifton <nickc@redhat.com>
955 * coff-sh.c (sh_reloc): Check for an out of range reloc.
957 2017-06-21 Nick Clifton <nickc@redhat.com>
960 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
961 type of the size parameter.
962 (_bfd_vms_save_counted_string): Add second parameter - the maximum
963 length of the counted string.
964 * vms.h (_bfd_vms_save_sized_string): Update prototype.
965 (_bfd_vms_save_counted_string): Likewise.
966 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
967 _bfd_vms_save_counted_string.
968 (_bfd_vms_slurp_ehdr): Likewise.
969 (_bfd_vms_slurp_egsd): Likewise.
970 (Parse_module): Likewise.
972 2017-06-21 Alan Modra <amodra@gmail.com>
974 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
975 calls before tocsave calls.
976 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
979 2017-06-21 Nick Clifton <nickc@redhat.com>
982 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
983 bfd_get_full_section_contents returns no contents.
985 2017-06-21 Nick Clifton <nickc@redhat.com>
988 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
991 2017-06-21 Nick Clifton <nickc@redhat.com>
994 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
996 (image_set_ptr): Likewise.
997 (alpha_vms_fix_sec_rel): Likewise.
998 (alpha_vms_slurp_relocs): Likewise.
1000 2017-06-21 Nick Clifton <nickc@redhat.com>
1003 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1005 (ieee_archive_p): Likewise.
1006 (ieee_object_p): Likewise.
1008 2017-06-21 Nick Clifton <nickc@redhat.com>
1011 * elf.c (setup_group): Zero the group section pointer list after
1012 allocation so that loops can be caught. Check for NULL pointers
1013 when processing a group list.
1015 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1017 * elf-s390.h: New file.
1018 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1020 (elf_s390_additional_program_headers): New function.
1021 (elf_s390_modify_segment_map): New function.
1022 (bfd_elf_s390_set_options): New function.
1023 (elf_backend_additional_program_headers)
1024 (elf_backend_modify_segment_map): Add macro definitions.
1026 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1029 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1030 the DYNAMIC bit instead of bfd_count_sections.
1032 2017-06-19 Nick Clifton <nickc@redhat.com>
1035 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1037 (evax_bfd_print_eeom): Likewise.
1038 (evax_bfd_print_egsd): Check for an overlarge record length.
1039 (evax_bfd_print_etir): Likewise.
1041 2017-06-19 Nick Clifton <nickc@redhat.com>
1044 * libieee.h (struct common_header_type): Add end_p field.
1045 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1047 (read_id): Check for a length that exceeds the remaining bytes in
1049 (ieee_seek): Initialise end_p.
1050 (ieee_archive_p): Likewise.
1051 (ieee_object_p): Likewise.
1053 2017-06-19 Nick Clifton <nickc@redhat.com>
1056 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1057 before reading the EIHS structure entries.
1059 2017-06-19 Nick Clifton <nickc@redhat.com>
1062 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1063 gsd_size. Check that there are enough bytes remaining to read the
1064 type and size of the next egsd. Check that the size of the egsd
1065 does not exceed the size of the record.
1067 2017-06-19 Alan Modra <amodra@gmail.com>
1069 * config.bfd: Correct targ_underscore for cris.
1071 2017-06-18 Alan Modra <amodra@gmail.com>
1073 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1074 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1076 2017-06-16 Nick Clifton <nickc@redhat.com>
1078 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1079 bucketlist is empty because there are no symbols to add to the
1082 2017-06-16 Alan Modra <amodra@gmail.com>
1088 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1089 (BFD_JUMP_TABLE_LINK): Likewise.
1090 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1091 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1092 (bfd_elf_define_start_stop): New function.
1093 * linker.c (bfd_generic_define_start_stop): New function.
1094 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1096 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1097 * aout-target.h (MY_bfd_define_start_stop): Define.
1098 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1099 * binary.c (binary_bfd_define_start_stop): Define.
1100 * bout.c (b_out_bfd_define_start_stop): Define.
1101 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1102 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1103 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1104 * coffcode.h (coff_bfd_define_start_stop): Define.
1105 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1106 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1107 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1108 * ieee.c (ieee_bfd_define_start_stop): Define.
1109 * ihex.c (ihex_bfd_define_start_stop): Define.
1110 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1111 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1112 * mmo.c (mmo_bfd_define_start_stop): Define.
1113 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1114 * oasys.c (oasys_bfd_define_start_stop): Define.
1115 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1116 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1117 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1118 * som.c (som_bfd_define_start_stop): Define.
1119 * srec.c (srec_bfd_define_start_stop): Define.
1120 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1121 * versados.c (versados_bfd_define_start_stop): Define.
1122 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1123 (alpha_vms_bfd_define_start_stop): Define.
1124 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1125 * bfd-in2.h: Regenerate.
1126 * libbfd.h: Regenerate.
1128 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1130 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1131 SYMBOL_REFERENCES_LOCAL.
1133 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1136 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1137 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1138 runtime for if there needs copy relocation elimination.
1139 (need_copy_relocation_p): New function. Return true for symbol with
1140 pc-relative references and if it's against read-only sections.
1141 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1142 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1143 that are related with accessing external objects.
1144 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1145 in elfNN_aarch64_check_relocs.
1147 2017-06-15 Nick Clifton <nickc@redhat.com>
1150 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1153 (ieee_archive_p): Likewise.
1155 2017-06-15 Nick Clifton <nickc@redhat.com>
1158 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1160 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1162 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1163 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1164 keep both windowed and call0 ABI PLT definitions.
1165 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1166 elf_xtensa_*_plt_entry endex.
1167 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1169 2017-06-14 Nick Clifton <nickc@redhat.com>
1172 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1175 2017-06-14 Nick Clifton <nickc@redhat.com>
1178 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1179 maximum value for the ascic pointer. Check that name processing
1180 does not read beyond this value.
1181 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1184 2017-06-14 Nick Clifton <nickc@redhat.com>
1187 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1188 (process_otr): Check for an invalid offset in the otr structure.
1190 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1192 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1194 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1200 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1201 vtable field to a union.
1202 (_bfd_elf_is_start_stop): Removed.
1203 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1204 __start_SECNAME and __stop_SECNAME symbols.
1205 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1206 * elflink.c (_bfd_elf_is_start_stop): Removed.
1207 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1208 _bfd_elf_is_start_stop.
1209 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1210 __stop_SECNAME symbols. Updated.
1211 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1212 (bfd_elf_gc_record_vtinherit): Likewise.
1213 (bfd_elf_gc_record_vtentry): Likewise.
1215 2017-06-13 Nick Clifton <nickc@redhat.com>
1218 * elflink.c (elf_link_adjust_relocs): Generate an error when
1219 encountering a reloc against a symbol removed by garbage
1222 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1224 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1225 to merge_gnu_properties.
1226 * elf-properties.c (elf_merge_gnu_properties): Add struct
1227 bfd_link_info * and pass it to merge_gnu_properties.
1228 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1229 and pass it to elf_merge_gnu_properties.
1230 (_bfd_elf_link_setup_gnu_properties): Pass info to
1231 elf_merge_gnu_property_list.
1232 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1234 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1236 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1239 * binary.c (binary_set_section_contents): Scale lma by octets
1240 per byte to set filepos.
1242 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1244 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1247 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1249 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1252 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1254 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1255 patched section contents for TLS IE reloc.
1256 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1258 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1260 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1261 RELOC_FOR_GLOBAL_SYMBOL macro.
1263 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1265 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1268 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1270 * config/tc-arc.c (md_undefined_symbol): Changed.
1271 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1273 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1275 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1278 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1280 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1281 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1283 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1285 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1288 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1290 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1291 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1292 is non-zero. Add clarifying comments.
1294 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1296 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1297 name. Use local IFUNC symbol name string to report unsupported
1298 non-PIC call to IFUNC function.
1299 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1300 when generating R_386_IRELATIVE relocation.
1301 (elf_i386_finish_dynamic_symbol): Likewise.
1302 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1304 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1305 when generating R_X86_64_IRELATIVE relocation.
1306 (elf_x86_64_finish_dynamic_symbol): Likewise.
1308 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1310 * elf.c (setup_group): Make sure BFD sections are created for all
1311 group sections in the input file when processing SHF_GROUP
1313 (bfd_section_from_shdr): Avoid duplicating logic already
1314 implemented in `setup_group'.
1316 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1319 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1320 if the hint address is zero.
1322 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1325 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1326 ELF_COMMON_DEF_P for common symbols.
1328 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1330 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1331 SEC_GROUP sections as SEC_EXCLUDE.
1332 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1333 (assign_section_numbers): Use resolve_section_groups flag instead
1334 of relocatable link type.
1335 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1336 flag instead of checking the final_link flag for part of the
1337 checks in here. Fix white space as a result.
1338 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1339 instead of relocatable link type.
1340 (bfd_elf_final_link): Likewise.
1342 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1344 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1346 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1347 (s3_bfd_score_elf_check_relocs): Likewise.
1348 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1349 (score_elf_final_link_relocate): Likewise.
1350 (s7_bfd_score_elf_check_relocs): Likewise.
1352 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1354 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1357 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1359 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1360 from `reloc_count' rather than decrementing it.
1361 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1362 `reloc_count' by `int_rels_per_ext_rel'.
1363 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1364 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1365 entry determination.
1366 (s3_bfd_score_elf_check_relocs): Likewise.
1367 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1368 (s7_bfd_score_elf_relocate_section): Likewise.
1369 (s7_bfd_score_elf_check_relocs): Likewise.
1370 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1371 prototype and function.
1372 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1373 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1374 triple rather than once the sum of REL and RELA relocation entry
1376 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1377 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1378 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1379 storage allocation size determination.
1380 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1381 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1382 by `int_rels_per_ext_rel' for last relocation entry
1384 (bfd_elf_final_link): Do not multiply `reloc_count' by
1385 `int_rels_per_ext_rel' for internal relocation storage
1386 allocation size determination.
1387 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1388 `int_rels_per_ext_rel' for last relocation entry determination.
1389 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1390 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1391 (_bfd_mips_elf_relocate_section): Likewise.
1393 2017-06-05 Alan Modra <amodra@gmail.com>
1396 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1398 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1400 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1401 determine structure sizes.
1402 (elfcore_grok_freebsd_prstatus): Likewise.
1404 2017-06-01 Alan Modra <amodra@gmail.com>
1406 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1407 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1409 (is_elfv2_localentry0): New function.
1410 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1411 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1412 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1413 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1414 optimized localentry:0 stubs.
1415 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1416 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1418 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1420 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1422 2017-05-30 Casey Smith <clegg89@gmail.com>
1425 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1426 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1428 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1430 * cpu-arc.c (arc_compatible): New function.
1432 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1434 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1436 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1439 * bfdio.c (bfd_get_file_size): New function.
1440 * bfd-in2.h: Regenerated.
1442 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1444 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1447 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1449 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1450 dynobj instead of htab->elf.dynobj.
1452 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1454 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1456 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1457 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1458 actual number of internal relocations retrieved. Adjust
1459 function description.
1460 (bfd_elf64_canonicalize_reloc): Remove macro.
1461 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1463 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1465 * archures.c (bfd_mach_sparc_v9m8): Define.
1466 (bfd_mach_sparc_v8plusm8): Likewise.
1467 (bfd_mach_sparc_v9_p): Adjust to M8.
1468 (bfd_mach_sparc_64bit_p): Likewise.
1469 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1470 bfd_mach_sparc_v8plusm8.
1471 * bfd-in2.h: Regenerated.
1472 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1474 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1475 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1476 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1478 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1479 bfd_mach_sparc_v8plusm8.
1481 2017-05-19 Alan Modra <amodra@gmail.com>
1483 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1484 debug and special sections when no non-note alloc sections in an
1487 2017-05-18 Alan Modra <amodra@gmail.com>
1489 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1490 * elf-m10300.c: Likewise.
1492 * elf32-arc.c: Likewise.
1493 * elf32-bfin.c: Likewise.
1494 * elf32-m68k.c: Likewise.
1495 * elf32-nds32.c: Likewise.
1496 * elf32-tilepro.c: Likewise.
1497 * elflink.c: Likewise.
1498 * elfnn-aarch64.c: Likewise.
1499 * elfnn-riscv.c: Likewise.
1500 * elfxx-tilegx.c: Likewise.
1501 * mach-o.c: Likewise.
1502 * peXXigen.c: Likewise.
1503 * vms-alpha.c: Likewise.
1504 * vms-lib.c: Likewise.
1506 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1509 * elflink.c (elf_gc_mark_debug_section): New function.
1510 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1511 referenced by kept debug sections.
1513 2017-05-16 Alan Modra <amodra@gmail.com>
1515 * elf-m10300.c: Rename occurrences of non_ir_ref.
1516 * elf32-arm.c: Likewise.
1517 * elf32-bfin.c: Likewise.
1518 * elf32-cr16.c: Likewise.
1519 * elf32-cris.c: Likewise.
1520 * elf32-d10v.c: Likewise.
1521 * elf32-dlx.c: Likewise.
1522 * elf32-fr30.c: Likewise.
1523 * elf32-frv.c: Likewise.
1524 * elf32-hppa.c: Likewise.
1525 * elf32-i370.c: Likewise.
1526 * elf32-i386.c: Likewise.
1527 * elf32-iq2000.c: Likewise.
1528 * elf32-lm32.c: Likewise.
1529 * elf32-m32c.c: Likewise.
1530 * elf32-m32r.c: Likewise.
1531 * elf32-m68hc1x.c: Likewise.
1532 * elf32-m68k.c: Likewise.
1533 * elf32-mcore.c: Likewise.
1534 * elf32-metag.c: Likewise.
1535 * elf32-microblaze.c: Likewise.
1536 * elf32-moxie.c: Likewise.
1537 * elf32-msp430.c: Likewise.
1538 * elf32-mt.c: Likewise.
1539 * elf32-nios2.c: Likewise.
1540 * elf32-or1k.c: Likewise.
1541 * elf32-ppc.c: Likewise.
1542 * elf32-rl78.c: Likewise.
1543 * elf32-s390.c: Likewise.
1544 * elf32-score.c: Likewise.
1545 * elf32-score7.c: Likewise.
1546 * elf32-sh.c: Likewise.
1547 * elf32-tic6x.c: Likewise.
1548 * elf32-tilepro.c: Likewise.
1549 * elf32-v850.c: Likewise.
1550 * elf32-vax.c: Likewise.
1551 * elf32-xstormy16.c: Likewise.
1552 * elf32-xtensa.c: Likewise.
1553 * elf64-alpha.c: Likewise.
1554 * elf64-hppa.c: Likewise.
1555 * elf64-ia64-vms.c: Likewise.
1556 * elf64-mmix.c: Likewise.
1557 * elf64-ppc.c: Likewise.
1558 * elf64-s390.c: Likewise.
1559 * elf64-sh64.c: Likewise.
1560 * elf64-x86-64.c: Likewise.
1561 * elflink.c: Likewise.
1562 * elfnn-aarch64.c: Likewise.
1563 * elfnn-ia64.c: Likewise.
1564 * elfnn-riscv.c: Likewise.
1565 * elfxx-mips.c: Likewise.
1566 * elfxx-sparc.c: Likewise.
1567 * elfxx-tilegx.c: Likewise.
1568 * linker.c: Likewise.
1570 2017-05-16 Alan Modra <amodra@gmail.com>
1572 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1573 * elflink.c (elf_link_add_object_symbols): Update to use
1575 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1577 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1579 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1581 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1583 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1585 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1586 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1588 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1590 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1592 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1594 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1595 to plt_second/plt_second_eh_frame.
1596 (elf_x86_64_link_hash_newfunc): Updated.
1597 (elf_x86_64_allocate_dynrelocs): Likewise.
1598 (elf_x86_64_size_dynamic_sections): Likewise.
1599 (elf_x86_64_relocate_section): Likewise.
1600 (elf_x86_64_finish_dynamic_symbol): Likewise.
1601 (elf_x86_64_finish_dynamic_sections): Likewise.
1602 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1603 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1605 (elf_backend_setup_gnu_properties): Updated. Create the
1606 .plt.sec section instead of the .plt.sec section.
1608 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1610 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1611 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1612 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1614 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1616 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1617 (bfd_elf64_set_reloc): Define.
1618 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1620 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1622 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1623 (struct bfd_target): New field _bfd_set_reloc.
1624 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1625 * reloc.c (_bfd_generic_set_reloc): New function.
1626 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1627 * nlm-target.h (nlm_set_reloc): Likewise.
1628 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1629 * aout-tic30.c (MY_set_reloc): Likewise.
1630 * aout-target.h (MY_set_reloc): Likewise.
1631 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1632 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1633 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1634 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1635 * aout-adobe.c (aout_32_set_reloc): Likewise.
1636 * bout.c (b_out_set_reloc): Likewise.
1637 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
1638 * i386os9k.c (aout_32_set_reloc): Likewise.
1639 * ieee.c (ieee_set_reloc): Likewise.
1640 * oasys.c (oasys_set_reloc): Likewise.
1641 * som.c (som_set_reloc): Likewise.
1642 * versados.c (versados_set_reloc): Likewise.
1643 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1644 _bfd_generic_set_reloc.
1645 (rs6000_xcoff64_aix_vec): LIkewise.
1646 * libbfd.c (_bfd_norelocs_set_reloc): New function.
1647 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
1648 * i386msdos.c (msdos_set_reloc): Define to
1649 _bfd_norelocs_set_reloc.
1650 * elfcode.h (elf_set_reloc): Define.
1651 * bfd-in2.h: Regenerated.
1653 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1656 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1657 for IFUNC function address.
1659 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1661 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1662 (CONFLICT_LIST): Likewise.
1663 (opcode/arc-attrs.h): Include.
1664 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1665 (arc_extract_features): New file.
1666 (arc_stralloc): Likewise.
1667 (arc_elf_merge_attributes): Likewise.
1668 (arc_elf_merge_private_bfd_data): Use object attributes.
1669 (bfd_arc_get_mach_from_attributes): New function.
1670 (arc_elf_object_p): Use object attributes.
1671 (arc_elf_final_write_processing): Likewise.
1672 (elf32_arc_obj_attrs_arg_type): New function.
1673 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1674 (elf32_arc_section_from_shdr): Likewise.
1675 (elf_backend_obj_attrs_vendor): Define.
1676 (elf_backend_obj_attrs_section): Likewise.
1677 (elf_backend_obj_attrs_arg_type): Likewise.
1678 (elf_backend_obj_attrs_section_type): Likewise.
1679 (elf_backend_obj_attrs_handle_unknown): Likewise.
1680 (elf_backend_section_from_shdr): Likewise.
1682 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1685 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1686 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1687 and the destination is a Thumb symbol.
1689 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1691 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1692 initializer to silence GCC 4.2.
1693 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1695 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1697 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1698 (LAZY_PLT_ENTRY_SIZE): This.
1699 (NON_LAZY_PLT_ENTRY_SIZE): New.
1700 (elf_x86_64_plt0_entry): Renamed to ...
1701 (elf_x86_64_lazy_plt0_entry): This.
1702 (elf_x86_64_plt_entry): Renamed to ...
1703 (elf_x86_64_lazy_plt_entry): This.
1704 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1705 (elf_x86_64_lazy_bnd_plt0_entry): This.
1706 (elf_x86_64_legacy_plt_entry): Removed.
1707 (elf_x86_64_bnd_plt_entry): Renamed to ...
1708 (elf_x86_64_lazy_bnd_plt_entry): This.
1709 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1710 (elf_x86_64_non_lazy_plt_entry): This.
1711 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1712 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1713 (elf_x86_64_eh_frame_plt): Renamed to ...
1714 (elf_x86_64_eh_frame_lazy_plt): This.
1715 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1716 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1717 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1718 (elf_x86_64_eh_frame_non_lazy_plt): This.
1719 (elf_x86_64_lazy_plt_layout): New.
1720 (elf_x86_64_non_lazy_plt_layout): Likewise.
1721 (elf_x86_64_plt_layout): Likewise.
1722 (elf_x86_64_backend_data): Remove PLT layout information. Add
1723 os for target system.
1724 (GET_PLT_ENTRY_SIZE): Removed.
1725 (elf_x86_64_lazy_plt): New.
1726 (elf_x86_64_non_lazy_plt): Likewise.
1727 (elf_x86_64_lazy_bnd_plt): Likewise.
1728 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1729 (elf_x86-64_arch_bed): Updated.
1730 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1731 (elf_x86_64_create_dynamic_sections): Removed.
1732 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1733 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1734 (elf_x86-64_adjust_dynamic_symbol): Updated.
1735 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1736 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1737 size for PLT0 if there is no PLT0. Get plt_entry_size from
1738 non_lazy_plt for non-lazy PLT entries.
1739 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1740 from non_lazy_plt for non-lazy PLT entries.
1741 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1742 if there is no PLT0.
1743 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1744 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1745 entries with non-lazy PLT layout. Don't fill the second and third
1746 slots in the PLT entry if there is no PLT0.
1747 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1748 if there is no PLT0. Set sh_entsize on the .plt.got section.
1749 (compare_relocs): New.
1750 (elf_x86_64_plt_type): Likewise.
1751 (elf_x86_64_plt): Likewise.
1752 (elf_x86_64_nacl_plt): New. Forward declaration.
1753 (elf_x86_64_get_plt_sym_val): Removed.
1754 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1755 against all dynamic relocations.
1756 (elf_x86_64_link_setup_gnu_properties): New function.
1757 (elf_backend_create_dynamic_sections): Updated.
1758 (elf_backend_setup_gnu_properties): New.
1759 (elf_x86_64_nacl_plt): New.
1760 (elf_x86_64_nacl_arch_bed): Updated.
1762 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1764 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1765 (LAZY_PLT_ENTRY_SIZE): This.
1766 (NON_LAZY_PLT_ENTRY_SIZE): New.
1767 (elf_i386_plt0_entry): Renamed to ...
1768 (elf_i386_lazy_plt0_entry): This.
1769 (elf_i386_plt_entry): Renamed to ...
1770 (elf_i386_lazy_plt_entry): This.
1771 (elf_i386_pic_plt0_entry): Renamed to ...
1772 (elf_i386_pic_lazy_plt0_entry): This.
1773 (elf_i386_pic_plt_entry): Renamed to ...
1774 (elf_i386_pic_lazy_plt_entry): This.
1775 (elf_i386_got_plt_entry): Renamed to ...
1776 (elf_i386_non_lazy_plt_entry): This.
1777 (elf_i386_pic_got_plt_entry): Renamed to ...
1778 (elf_i386_pic_non_lazy_plt_entry): This.
1779 (elf_i386_eh_frame_plt): Renamed to ...
1780 (elf_i386_eh_frame_lazy_plt): This.
1781 (elf_i386_eh_frame_plt_got): Renamed to ...
1782 (elf_i386_eh_frame_non_lazy_plt): This.
1783 (elf_i386_plt_layout): Renamed to ...
1784 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1785 eh_frame_plt_got_size.
1786 (elf_i386_non_lazy_plt_layout): New.
1787 (elf_i386_plt_layout): Likewise.
1788 (elf_i386_non_lazy_plt): Likewise.
1789 (GET_PLT_ENTRY_SIZE): Removed.
1790 (elf_i386_plt): Renamed to ...
1791 (elf_i386_lazy_plt): This.
1792 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1793 (elf_i386_arch_bed): Updated.
1794 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1795 (elf_i386_create_dynamic_sections): Removed.
1796 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1797 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1798 (elf_i386_adjust_dynamic_symbol): Updated.
1799 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1800 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1801 size for PLT0 if there is no PLT0.
1802 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1803 output section is discarded only if GOT isn't empty.
1804 (elf_i386_relocate_section): Updated. Properly get PLT index
1805 if there is no PLT0.
1806 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1807 second and third slots in the PLT entry if there is no PLT0.
1808 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1809 if there is no PLT0. Set sh_entsize on the .plt.got section.
1810 (elf_i386_nacl_plt): Forward declaration.
1811 (elf_i386_get_plt_sym_val): Removed.
1812 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1813 against all dynamic relocations.
1814 (elf_i386_link_setup_gnu_properties): New function.
1815 (elf_backend_create_dynamic_sections): Updated.
1816 (elf_backend_setup_gnu_properties): New.
1817 (elf_i386_nacl_plt): Updated.
1818 (elf_i386_nacl_arch_bed): Likewise.
1819 (elf_i386_vxworks_arch_bed): Likewise.
1821 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1823 * elflink.c (elf_output_implib): Remove executable flag from import
1825 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1826 library is a relocatable object file.
1828 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1831 * elf32-avr.c (avr_should_move_sym): New function.
1832 (avr_should_reduce_sym_size): Likewise.
1833 (avr_should_increase_sym_size): Likewise.
1834 (elf32_avr_relax_delete_bytes): Adjust symbol values
1835 and sizes by calling new functions.
1837 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1839 * config.bfd (riscv32-*): Enable rv64.
1841 2017-05-02 Alan Modra <amodra@gmail.com>
1844 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1845 rather than h->root.type == bfd_link_hash_new.
1846 (bfd_elf_record_link_assignment): Similarly, call
1847 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1849 2017-04-29 Alan Modra <amodra@gmail.com>
1852 * reloc.c (reloc_offset_in_range): New function.
1853 (bfd_perform_relocation, bfd_install_relocation): Use it.
1854 (_bfd_final_link_relocate): Likewise.
1856 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1858 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1859 before using .plt.got.
1860 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1862 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1864 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1865 instead of "+=" to update 0.
1867 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1869 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1870 .plt.got section here.
1871 (elf_i386_check_relocs): Don't create the .plt.got section.
1872 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1873 the .plt.got and .plt.bnd sections here.
1874 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1877 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1879 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1881 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1882 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1883 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1884 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1887 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1889 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1891 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1892 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1893 the first relocatable ELF input with GNU properties.
1895 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1897 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1898 VxWorks for non-PIC.
1900 2017-04-27 Alan Modra <amodra@gmail.com>
1902 * elf-bfd.h (struct elf_backend_data): Make asection param of
1903 elf_backend_eh_frame_address_size const.
1904 (_bfd_elf_eh_frame_address_size): Likewise.
1905 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1906 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1907 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1908 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1909 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1910 (next_cie_fde_offset): Constify params.
1911 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1913 2017-04-27 Alan Modra <amodra@gmail.com>
1915 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1916 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1917 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1919 (offset_adjust): New function.
1920 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1921 (adjust_eh_frame_local_symbols): Likewise.
1922 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1923 after changing anything. Return true if anything changed.
1924 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1925 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1927 2017-04-27 Alan Modra <amodra@gmail.com>
1929 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1932 2017-04-27 Alan Modra <amodra@gmail.com>
1934 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1935 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1936 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1937 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1938 for undef and undefweak dyn_relocs.
1939 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1940 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1941 (allocate_got, allocate_dynrelocs): Likewise.
1942 (ppc64_elf_relocate_section): Likewise.
1944 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1946 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1947 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1948 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1949 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1951 2017-04-26 Nick Clifton <nickc@redhat.com>
1954 * reloc.c (bfd_perform_relocation): Check for a negative address
1957 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1960 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1962 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1963 (elf_backend_always_renumber_dynsyms): Define.
1964 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1965 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1966 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1967 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1969 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1971 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1973 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1974 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1975 sections have been created.
1977 2017-04-26 Nick Clifton <nickc@redhat.com>
1980 * compress.c (bfd_init_section_compress_status): Check the return
1981 value from bfd_malloc.
1983 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1985 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1986 no_finish_dynamic_symbol.
1987 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1989 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1990 weak symbol, don't make it dynamic.
1991 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1992 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1993 relocation for GOT reference.
1994 (elf_x86_64_finish_dynamic_symbol): Abort if
1995 no_finish_dynamic_symbol isn't 0.
1997 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2000 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2001 undefined weak symbol, don't make it dynamic.
2002 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2003 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2004 relocation for R_386_GOT32.
2006 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2009 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2011 2017-04-23 Alan Modra <amodra@gmail.com>
2014 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2015 * elf.c (lcomm_sym): New.
2016 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2017 * bfd-in2.h: Regenerate.
2019 2017-04-23 Alan Modra <amodra@gmail.com>
2022 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2023 parameters and comment.
2024 (_bfd_elf_get_reloc_section): Delete.
2025 (_bfd_elf_plt_get_reloc_section): Declare.
2026 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2027 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2029 (_bfd_elf_get_reloc_section): ..here. Delete.
2030 (assign_section_numbers): Call elf_get_reloc_section.
2031 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2032 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2034 2017-04-23 Alan Modra <amodra@gmail.com>
2037 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2040 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2043 * elf32-i386.c (elf_i386_link_hash_entry): Add
2044 no_finish_dynamic_symbol.
2045 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2046 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2047 symbol, don't make it dynamic in PIE.
2048 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2049 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2050 relocation for R_386_GOT32
2051 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2054 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2058 * elflink.c (elf_link_add_object_symbols): Require
2059 --no-dynamic-linker with -E/--dynamic-list when creating
2062 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2064 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2067 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2069 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2070 dynamic symbol sorting.
2072 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2075 * elflink.c (elf_link_add_object_symbols): Preserve
2076 dynamic_ref_after_ir_def when restoring the symbol table for
2077 unneeded dynamic object.
2079 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2082 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2083 on on undefined IFUNC symbol in the second PLT.
2085 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2087 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2089 2017-04-19 Alan Modra <amodra@gmail.com>
2091 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2092 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2093 * elf32-ppc.c:Formatting.
2094 (ensure_undefweak_dynamic): Don't make dynamic when
2095 info->dynamic_undefined_weak is zero.
2096 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2097 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2098 not default visibility. Discard undef and undefweak
2100 (ppc_elf_relocate_section): Adjust to suit.
2101 * elf64-ppc.c: Formatting.
2102 (ensure_undefweak_dynamic): Don't make dynamic when
2103 info->dynamic_undefined_weak is zero.
2104 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2105 info->dynamic_undefined_weak. Discard them earlier.
2107 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2110 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2111 before generating the version definition section.
2113 2017-04-17 Alan Modra <amodra@gmail.com>
2115 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2116 state when a regular object file defines a symbol with
2117 incompatible type to that defined by an earlier shared lib.
2119 2017-04-13 Alan Modra <amodra@gmail.com>
2121 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2123 * elf32-arm.c: Likewise.
2124 * elf32-i386.c: Likewise.
2125 * elf32-mep.c: Likewise.
2126 * elf64-ia64-vms.c: Likewise.
2127 * elf64-x86-64.c: Likewise.
2128 * elflink.c: Likewise.
2129 * elfnn-ia64.c: Likewise.
2130 * elfxx-mips.c: Likewise.
2132 2017-04-13 Alan Modra <amodra@gmail.com>
2134 * aoutx.h: Use %B and %A in error messages throughout file.
2135 * aout-cris.c: Likewise.
2136 * archive.c: Likewise.
2137 * binary.c: Likewise.
2138 * coff-rs6000.c: Likewise.
2139 * coff-tic4x.c: Likewise.
2140 * coffcode.h: Likewise.
2141 * coffgen.c: Likewise.
2142 * cofflink.c: Likewise.
2143 * coffswap.h: Likewise.
2144 * cpu-arm.c: Likewise.
2145 * elf-eh-frame.c: Likewise.
2146 * elf-m10300.c: Likewise.
2148 * elf32-arc.c: Likewise.
2149 * elf32-arm.c: Likewise.
2150 * elf32-bfin.c: Likewise.
2151 * elf32-frv.c: Likewise.
2152 * elf32-iq2000.c: Likewise.
2153 * elf32-m32c.c: Likewise.
2154 * elf32-microblaze.c: Likewise.
2155 * elf32-nds32.c: Likewise.
2156 * elf32-rl78.c: Likewise.
2157 * elf32-rx.c: Likewise.
2158 * elf32-score.c: Likewise.
2159 * elf32-score7.c: Likewise.
2160 * elf32-sh64.c: Likewise.
2161 * elf32-v850.c: Likewise.
2162 * elf32-vax.c: Likewise.
2163 * elf32-visium.c: Likewise.
2164 * elf64-ia64-vms.c: Likewise.
2165 * elf64-mmix.c: Likewise.
2166 * elf64-sh64.c: Likewise.
2167 * elfcode.h: Likewise.
2168 * elfnn-aarch64.c: Likewise.
2169 * elfnn-ia64.c: Likewise.
2170 * elfxx-mips.c: Likewise.
2171 * hpux-core.c: Likewise.
2174 * linker.c: Likewise.
2175 * merge.c: Likewise.
2177 * oasys.c: Likewise.
2178 * pdp11.c: Likewise.
2179 * peXXigen.c: Likewise.
2180 * rs6000-core.c: Likewise.
2181 * vms-alpha.c: Likewise.
2182 * xcofflink.c: Likewise.
2184 2017-04-13 Alan Modra <amodra@gmail.com>
2186 * bfd.c (PRINT_TYPE): Define.
2187 (_doprnt): New function.
2188 (error_handler_internal): Use _doprnt.
2189 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2190 calls in their natural order, throughout file.
2191 * coff-mcore.c: Likewise.
2192 * coff-ppc.c: Likewise.
2193 * coff-tic80.c: Likewise.
2194 * cofflink.c: Likewise.
2195 * elf-s390-common.c: Likewise.
2197 * elf32-arm.c: Likewise.
2198 * elf32-i386.c: Likewise.
2199 * elf32-m32r.c: Likewise.
2200 * elf32-msp430.c: Likewise.
2201 * elf32-spu.c: Likewise.
2202 * elf64-ia64-vms.c: Likewise.
2203 * elf64-sparc.c: Likewise.
2204 * elf64-x86-64.c: Likewise.
2205 * elflink.c: Likewise.
2206 * elfnn-aarch64.c: Likewise.
2207 * elfnn-ia64.c: Likewise.
2208 * elfxx-mips.c: Likewise.
2210 2017-04-13 Alan Modra <amodra@gmail.com>
2212 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2213 branch veneers" error. Fix double space and format message.
2214 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2215 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2217 2017-04-13 Alan Modra <amodra@gmail.com>
2219 * bfd-in2.h: Regenerate.
2221 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2223 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2224 extra `\n' in warning/error messages.
2225 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2226 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2228 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2230 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2231 processor-specific properties with generic ELF target vector.
2233 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2235 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2236 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2237 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2238 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2240 (link_hash_newfunc): Initialize has_got_reloc and
2242 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2244 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2246 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2248 (_bfd_sparc_elf_fixup_symbol): New function.
2249 (allocate_dynrelocs): Don't allocate space for dynamic
2250 relocations and discard relocations against resolved undefined
2251 weak symbols in executable. Don't make resolved undefined weak
2252 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2253 relocation against undefined weak symbols in PIE.
2254 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2255 relocations against resolved undefined weak symbols in PIE
2256 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2257 without ynamic PLT/GOT relocations for resolved undefined weak
2259 Don't generate dynamic relocation against resolved undefined
2260 weak symbol in executable.
2261 (pie_finish_undefweak_symbol): New function.
2262 (_bfd_sparc_elf_finish_dynamic_sections): Call
2263 pie_finish_undefweak_symbol on all symbols in PIE.
2264 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2265 (_bfd_sparc_elf_fixup_symbol): New function.
2267 2017-04-10 Nick Clifton <nickc@redhat.com>
2269 * config.bfd: Remove ns32k from obsolete list.
2271 2017-04-10 Alan Modra <amodra@gmail.com>
2274 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2275 (special_sections_i): Likewise for .init_array.
2276 (special_sections_p): Likewise for .preinit_array.
2278 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2282 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2283 ELF_COMMON_DEF_P for common symbols.
2284 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2285 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2286 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2287 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2288 07492f668d2173da7a2bda3707ff0985e0f460b6.
2290 2017-04-07 Pedro Alves <palves@redhat.com>
2292 * opncls.c (bfd_get_debug_link_info): Rename to...
2293 (bfd_get_debug_link_info_1): ... this. Change type of second
2294 parameter to void pointer. Adjust.
2295 (bfd_get_debug_link_info): Reimplement on top of
2296 bfd_get_debug_link_info_1.
2297 (separate_debug_file_exists, separate_alt_debug_file_exists):
2298 Change type of second parameter to void pointer. Adjust.
2299 (get_func_type, check_func_type): Change type of second parameter
2301 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2302 the callback functions instead of passing the address of a local.
2303 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2304 find_separate_debug_file.
2305 (get_alt_debug_link_info_shim): Change type of second parameter to
2306 void pointer. Adjust.
2307 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2308 find_separate_debug_file.
2309 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2310 of second parameter to void pointer. Adjust.
2311 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2312 pointer local to find_separate_debug_file.
2314 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2316 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2317 external symbols with a definition.
2318 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2320 2017-04-07 Alan Modra <amodra@gmail.com>
2322 * po/SRC-POTFILES.in: Regenerate.
2324 2017-04-05 Alan Modra <amodra@gmail.com>
2326 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2329 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2331 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2332 numbers for DataDirectory entry indicies passed to
2335 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2337 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2338 each GNU_MBIND section and align GNU_MBIND section to page size.
2339 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2340 segment for each GNU_MBIND section.
2341 (_bfd_elf_init_private_section_data): Copy sh_info from input
2342 for GNU_MBIND section.
2344 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2346 * elfnn-riscv.c (GP_NAME): Delete.
2347 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2348 (_bfd_riscv_relax_lui): Likewise.
2350 2017-04-04 Nick Clifton <nickc@redhat.com>
2353 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2355 (bfd_elf_final_link): Only initialize the extended symbol index
2356 section if there are extended symbol tables to list.
2358 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2360 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2361 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2362 * configure.ac (elf): Add elf-properties.lo.
2363 * Makefile.in: Regenerated.
2364 * configure: Likewise.
2365 * elf-bfd.h (elf_property_kind): New.
2366 (elf_property): Likewise.
2367 (elf_property_list): Likewise.
2368 (elf_properties): Likewise.
2369 (_bfd_elf_parse_gnu_properties): Likewise.
2370 (_bfd_elf_get_property): Likewise.
2371 (_bfd_elf_link_setup_gnu_properties): Likewise.
2372 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2373 and setup_gnu_properties.
2374 (elf_obj_tdata): Add properties.
2375 * elf-properties.c: New file.
2376 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2377 (elf_i386_merge_gnu_properties): Likewise.
2378 (elf_backend_parse_gnu_properties): Likewise.
2379 (elf_backend_merge_gnu_properties): Likewise.
2380 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2381 (elf_x86_64_merge_gnu_properties): Likewise.
2382 (elf_backend_parse_gnu_properties): Likewise.
2383 (elf_backend_merge_gnu_properties): Likewise.
2384 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2385 (elf_backend_parse_gnu_properties): Likewise.
2386 (elf_backend_setup_gnu_properties): Likewise.
2387 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2388 elf_backend_merge_gnu_properties and
2389 elf_backend_setup_gnu_properties.
2391 2017-03-30 Pip Cet <pipcet@gmail.com>
2393 * elf32-wasm32.c: Add relocation code, two relocs.
2394 * reloc.c: Add wasm32 relocations.
2395 * libbfd.h: Regenerate.
2396 * bfd-in2.h: Regenerate.
2397 * bfd/po/bfd.pot: Regenerate.
2399 2017-03-29 Nick Clifton <nickc@redhat.com>
2402 * coff-bfd.h (struct coff_section_data): Add new fields:
2403 saved_bias and bias.
2404 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2405 computed for PE binaries.
2406 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2409 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
2412 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2413 to handle a local symbol with a hash-symbol-entry; without PLT.
2414 Add BFD_ASSERT for an incidental case with GOT entry present.
2415 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2416 isn't forced-or-set local.
2418 2017-03-27 Pip Cet <pipcet@gmail.com>
2420 * wasm-module.c: New file to support WebAssembly modules.
2421 * wasm-module.h: New file to support WebAssembly modules.
2422 * doc/webassembly.texi: Start documenting wasm-module.c.
2423 * config.bfd: Add wasm_vec.
2424 * targets.c: Likewise.
2425 * configure.ac: Likewise.
2426 * Makefile.am: Add entries for wasm-module.c.
2427 * Makefile.in: Regenerate.
2428 * configure: Regenerate.
2429 * po/SRC-POTFILES.in: Regenerate.
2431 2017-03-27 Pip Cet <pipcet@gmail.com>
2433 * cpu-wasm32.c: New file to support wasm32 architecture.
2434 * elf32-wasm32.c: New file to support wasm32 architecture.
2435 * Makefile.am: Add wasm32 architecture.
2436 * archures.c: Likewise.
2437 * config.bfd: Likewise.
2438 * configure.ac: Likewise.
2439 * targets.c: Likewise.
2440 * Makefile.in: Regenerate.
2441 * bfd-in2.h: Regenerate.
2442 * configure: Regenerate.
2443 * po/SRC-POTFILES.in: Regenerate.
2445 2017-03-20 Alan Modra <amodra@gmail.com>
2448 * elf64-ppc.c (compare_symbols): Stabilize sort.
2450 2017-03-18 Alan Modra <amodra@gmail.com>
2452 * elf64-ppc.c (struct ppc_link_hash_table): Add
2453 local_ifunc_resolver and maybe_local_ifunc_resolver.
2454 (ppc_build_one_stub): Set flags on emitting dynamic
2455 relocation to ifunc.
2456 (ppc64_elf_relocate_section): Likewise.
2457 (ppc64_elf_finish_dynamic_symbol): Likewise.
2458 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2459 local dynamic relocs to ifuncs.
2460 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2461 local_ifunc_resolver and maybe_local_ifunc_resolver.
2462 (ppc_elf_relocate_section): Set flag on emitting dynamic
2463 relocation to ifuncs.
2464 (ppc_elf_finish_dynamic_symbol): Likewise.
2465 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2466 dynamic relocs to ifuncs.
2468 2017-03-13 Nick Clifton <nickc@redhat.com>
2471 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2472 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2473 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2474 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2475 * bfd-in2.h: Regenerate.
2476 * libbfd.h: Regenerate.
2477 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2479 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2480 (elfNN_aarch64_howto_table): Likewise.
2481 (aarch64_tls_transition_without_check): Likewise.
2482 (aarch64_reloc_got_type): Likewise.
2483 (elfNN_aarch64_final_link_relocate): Likewise.
2484 (elfNN_aarch64_tls_relax): Likewise.
2485 (elfNN_aarch64_relocate_section): Likewise.
2486 (elfNN_aarch64_gc_sweep_hook): Likewise.
2487 (elfNN_aarch64_check_relocs): Likewise.
2488 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2489 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2491 2017-03-11 Alan Modra <amodra@gmail.com>
2493 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2494 parameter is in fact used. Whitespace fixes.
2495 * elf64-ppc.c: Likewise.
2497 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2499 * rs6000-core.c (CORE_NEW): Simplify macro when
2500 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2502 2017-03-07 Alan Modra <amodra@gmail.com>
2506 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2509 2017-03-05 Alan Modra <amodra@gmail.com>
2511 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2512 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2513 (next_cie_fde_offset): New function.
2514 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2515 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2516 four bytes. Align CIEs to four or eight bytes depending on
2517 per_encoding_aligned8. Align FDEs according to their encoding.
2518 Pad last FDE to output section alignment.
2519 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2521 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2522 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2523 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2525 2017-03-02 Martin Bickel <binutils@ineranves.de>
2528 * elf.c (rewrite_elf_program_header): Do not issue a warning for
2529 empty segments which have a zero filesz, but a non-zero memsz.
2531 2017-03-02 Alan Modra <amodra@gmail.com>
2533 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2535 2017-02-28 Alan Modra <amodra@gmail.com>
2537 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2538 (ppc64_elf_relocate_section): Likewise.
2540 2017-02-28 Alan Modra <amodra@gmail.com>
2543 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2544 rather than elf32_nios2_hash_table or elf_hash_table.
2545 (create_got_section): Likewise.
2546 (nios2_elf32_finish_dynamic_symbol): Likewise.
2547 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2548 (nios2_elf32_size_dynamic_sections): Likewise.
2549 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2550 vars. Use htab equivalents directly instead. Don't create
2551 all dynamic sections on needing just the GOT. Use a goto
2552 rather than a fall-through with reloc test. Ensure
2553 htab->dynobj is set when making dynamic sreloc section.
2554 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2555 equivalent directly instead. Don't segfault on looking for
2556 .dynamic when dynamic sections have not been created. Don't
2557 segfault on .got.plt being discarded.
2558 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2559 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2560 fixme and another not so relevant comment.
2561 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2562 already set, set hash table dynobj on creating .sbss.
2564 2017-02-28 Alan Modra <amodra@gmail.com>
2566 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2567 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2568 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2569 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2570 (ppc64_elf_relocate_section): Likewise.
2571 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2572 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2573 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2574 * libbfd.h: Regenerate.
2575 * bfd-in2.h: Regenerate.
2577 2017-02-28 Alan Modra <amodra@gmail.com>
2579 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2580 dynamic .data.rel.ro read-only.
2581 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2582 rather than section flags when deciding where copy reloc goes.
2583 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2584 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2585 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2586 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2587 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2588 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2589 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2590 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2591 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2592 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2593 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2594 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2595 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2596 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2597 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2598 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2599 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2600 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2601 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2603 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2605 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2606 `jalr $0, $25' instruction encoding.
2608 2017-02-27 Nick Clifton <nickc@redhat.com>
2611 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2612 generating a seg-fault when encountering a symbol that has been
2613 deleted by garbage collection.
2615 2017-02-25 Alan Modra <amodra@gmail.com>
2617 * elf32-arc.c (struct dynamic_sections): Delete.
2618 (enum dyn_section_types): Delete.
2619 (dyn_section_names): Delete.
2620 (arc_create_dynamic_sections): Delete.
2621 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2622 segfault on discarded .rela.plt section.
2623 (elf_arc_size_dynamic_sections): Formatting. Don't call
2624 arc_create_dynamic_sections. Don't allocate memory for sections
2625 handled by the generic linker. Correct code finding relocs in
2626 read-only sections. Set SEC_EXCLUDE on zero size .got,
2627 .got.plt, and .dynbss sections. Do set .interp for pies.
2629 2017-02-24 Andrew Waterman <andrew@sifive.com>
2631 * elfnn-riscv.c (GP_NAME): New macro.
2632 (riscv_global_pointer_value): Use it.
2633 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2634 output section, consider only that section's alignment.
2636 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2638 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
2639 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
2640 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
2641 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
2643 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2645 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
2646 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
2649 2017-02-23 Alan Modra <amodra@gmail.com>
2652 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2654 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2655 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2658 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2661 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2662 processing ahead of the call to `elf_gc_sweep_symbol'.
2664 2017-02-22 Nick Clifton <nickc@redhat.com>
2667 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2668 created section 4-byte alignment.
2670 2017-02-22 Alan Modra <amodra@gmail.com>
2672 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2673 on .got or .plt output section being discarded by script.
2674 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2677 2017-02-21 Alan Modra <amodra@gmail.com>
2679 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2680 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2682 2017-02-20 Alan Modra <amodra@gmail.com>
2685 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2686 if DT_RELSZ/DT_RELASZ is zero.
2688 2017-02-17 Nick Clifton <nickc@redhat.com>
2690 * compress.c (bfd_get_full_section_contents): Remember to reduce
2691 compressed size by the sizeof the compression header when
2692 decompressing the contents.
2694 2017-02-17 Pedro Alves <palves@redhat.com>
2696 * srec.c (Chunk): Rename to ...
2697 (_bfd_srec_len): ... this.
2698 (S3Forced): Rename to ...
2699 (_bfd_srec_forceS3): ... this.
2700 * objcopy.c: Adjust all references.
2702 2017-02-17 Pedro Alves <palves@redhat.com>
2704 * archive.c (bsd_write_armap): Rename to ...
2705 (_bfd_bsd_write_armap): ... this.
2706 (coff_write_armap): Rename to ...
2707 (_bfd_coff_write_armap): ... this.
2708 * libbfd-in.h (bsd_write_armap): Rename to ...
2709 (_bfd_bsd_write_armap): ... this.
2710 (coff_write_armap): Rename to ...
2711 (_bfd_coff_write_armap): ... this.
2712 * aout-target.h, aout-tic30.c: Adjust all users.
2713 * libbfd.h: Regenerate.
2715 2017-02-17 Pedro Alves <palves@redhat.com>
2717 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2718 (warn_deprecated): Rename to ...
2719 (_bfd_warn_deprecated): ... this.
2720 * libbfd.c (warn_deprecated): Rename to ...
2721 (_bfd_warn_deprecated): ... this.
2722 * bfd-in2.h: Regenerate.
2724 2017-02-17 Pedro Alves <palves@redhat.com>
2726 * bfdio.c (real_ftell): Rename to ...
2727 (_bfd_real_ftell): ... this.
2728 (real_fseek): Rename to ...
2729 (_bfd_real_fseek): ... this.
2730 (real_fopen): Rename to ...
2731 (_bfd_real_fopen): ... this.
2732 * libbfd-in.h (real_ftell): Rename to ...
2733 (_bfd_real_ftell): ... this.
2734 (real_fseek): Rename to ...
2735 (_bfd_real_fseek): ... this.
2736 (real_fopen): Rename to ...
2737 (_bfd_real_fopen): ... this.
2738 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2739 * libbfd.h: Regenerate.
2741 2017-02-17 Pedro Alves <palves@redhat.com>
2743 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2744 * libbfd.c (read_unsigned_leb128): Rename to ...
2745 (_bfd_read_unsigned_leb128): ... this.
2746 (read_signed_leb128): Rename to ...
2747 (_bfd_read_signed_leb128): ... this.
2748 (safe_read_leb128): Rename to ...
2749 (_bfd_safe_read_leb128): ... this.
2750 * libbfd-in.h (read_unsigned_leb128): Rename to ...
2751 (_bfd_read_unsigned_leb128): ... this.
2752 (read_signed_leb128): Rename to ...
2753 (_bfd_read_signed_leb128): ... this.
2754 (safe_read_leb128): Rename to ...
2755 (_bfd_safe_read_leb128): ... this.
2756 * libbfd.h: Renegerate.
2758 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2760 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2761 before trying to fine matching file and line information.
2763 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2765 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2766 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2767 not match current bfd, then reload debug information. Record bfd
2768 we're loading debug info for in the stash. If we have debug
2769 informatin in the cache then perform section placement before
2772 2017-02-16 Alan Modra <amodra@gmail.com>
2775 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2776 * elfxx-target.h (elf_backend_no_page_alias): Define.
2777 (elfNN_bed): Init new field.
2778 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2779 ensure PT_LOAD segment starts on a new page.
2780 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2782 2017-02-16 Alan Modra <amodra@gmail.com>
2785 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2788 2017-02-16 Jiong Wang <jiong.wang@arm.com>
2790 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2791 * bfd-in2.h: Regenerated.
2793 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2796 * elf32-i386.c (elf_i386_relocate_section): Allow
2797 "lea foo@GOT, %reg" in PIC.
2799 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2802 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2803 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2804 error against local IFUNC symbol without a base register for
2807 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2809 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2810 `%P: %H:' with `info->callbacks->einfo'.
2811 (ppc_elf_relocate_section): Likewise.
2812 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2813 (ppc64_elf_edit_toc): Likewise.
2814 (ppc64_elf_relocate_section): Likewise.
2816 2017-02-14 Alan Modra <amodra@gmail.com>
2818 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2819 --gc-keep-exported, and test versioned field of sym rather than
2820 looking for @ in name.
2822 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2824 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2827 2017-02-13 Nick Clifton <nickc@redhat.com>
2830 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2833 2017-02-07 Andrew Waterman <andrew@sifive.com>
2835 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2836 entry size if PLT header is written.
2838 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2840 Fix sparc64 dynamic relocation processing to use the dynamic
2842 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2843 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2846 2017-02-03 Nick Clifton <nickc@redhat.com>
2849 * coffcode.h (coff_write_object_contents): Enlarge size of
2850 s_name_buf in order to avoid compile time warning about possible
2852 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2853 32-bits of insn value before printing into buffer.
2855 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2857 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2858 `max_local_dynindx'.
2859 (mips_elf_sort_hash_table): Handle it.
2860 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2861 symbols bump up `max_local_dynindx' rather than
2862 `max_non_got_dynindx'.
2864 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2866 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2867 `min_got_dynindx', `max_unref_got_dynindx' and
2868 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2869 (mips_elf_sort_hash_table): Adjust accordingly.
2871 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2873 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2874 to access the hash table.
2876 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2878 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2879 non-NULL `htab' to the beginning.
2881 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2883 * elflink.c (elf_gc_sweep): Wrap overlong line.
2885 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2887 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2888 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2889 * elfxx-mips.c (mips_elf_link_hash_table): Add
2890 `ignore_branch_isa' member.
2891 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2892 in branch relocation calculation as an error if
2893 `ignore_branch_isa' has been set.
2894 (_bfd_mips_elf_insn32): Rename to...
2895 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2896 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2897 Handle the new parameter.
2899 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2901 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2902 local variable dynobj.
2905 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2906 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2907 executable from read-only sections into sdynrelro.
2908 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2909 dynamic relocs in sdynrelro.
2910 (elf_backend_want_dynrelro): Define.
2912 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2914 * config.bfd (*-*-rtemsaout*): Mark as removed.
2916 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2918 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2919 (arm-*-rtems*): Move to (arm*-*-eabi*).
2920 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2921 (m68-*-rtems*): Move to (m68*-*-elf*).
2923 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2925 * config.bfd (*-*-rtemscoff*): Mark as removed.
2927 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2930 * elflink.c (bfd_elf_record_link_assignment): Revert last
2931 change and don't ever clear `forced_local'. Set `mark'
2933 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2935 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2936 (bfd_elf_size_dynamic_sections): ... here.
2937 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2938 and set `mark' instead in `__tls_get_addr_opt' processing.
2939 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2941 2017-01-24 Alan Modra <amodra@gmail.com>
2943 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2944 where dynamic relocs are preferable. Allow ifunc too.
2945 (ensure_undefweak_dynamic): New function.
2946 (allocate_dynrelocs): Use it here. Move plt handling last and
2947 don't make symbols dynamic, simplifying loop. Only make undef
2948 weak symbols with GOT entries dynamic. Correct condition
2949 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2950 comments. Remove goto.
2951 (ppc_elf_relocate_section): Correct test for using dynamic
2952 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2953 to suit. Set up explicit tls_index entries and implicit GOT
2954 tls_index entries resolvable at link time for
2955 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2956 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2957 (ensure_undefweak_dynamic): New function.
2958 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2959 with GOT entries dynamic. Remove unnecessary test of
2960 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2961 (ppc64_elf_relocate_section): Correct test for using dynamic
2962 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2963 to suit. Set up explicit tls_index entries and implicit GOT
2964 tls_index entries resolvable at link time for __tls_get_addr_opt.
2965 Simplify expression to clear mem for prelink.
2967 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2969 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2971 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2973 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2974 (elf_backend_hash_symbol): Define.
2976 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2979 * elflink.c (bfd_elf_record_link_assignment): Clear any
2980 `forced_local' marking for DSO symbols that are not being
2983 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2985 * elfnn-riscv.c (riscv_elf_object_p): New function.
2987 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2990 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2992 (elf_x86_64_check_relocs): Create .eh_frame section for the
2994 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2995 .eh_frame section for the .plt.bnd section.
2996 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2997 for the .plt.bnd section.
2999 2017-01-12 Nick Clifton <nickc@redhat.com>
3002 * opncls.c (find_separate_debug_file): Add include_dirs
3003 parameter. Only include the directory part of the bfd's filename
3004 in search paths if include_dirs is true. Add a couple of extra
3005 locations for looking for debug files.
3006 ( bfd_follow_gnu_debuglink): Update invocation of
3007 find_separate_debug_file.
3008 (bfd_follow_gnu_debugaltlink): Likewise.
3009 (get_build_id): New function: Finds the build-id of the given bfd.
3010 (get_build_id_name): New function: Computes the name of the
3011 separate debug info file for a bfd, based upon its build-id.
3012 (check_build_id_file): New function: Checks to see if a separate
3013 debug info file exists at the given location, and that its
3014 build-id matches that of the original bfd.
3015 (bfd_follow_build_id_debuglink): New function: Finds a separate
3016 debug info file for a given bfd by using the build-id method.
3017 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3018 method of locating a separate debug info file before using the
3020 * bfd-in2.h: Regenerate.
3022 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3025 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3026 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3027 elf_x86_64_eh_frame_plt_got.
3028 (elf_x86_64_size_dynamic_sections): Get unwind info from
3029 elf_x86_64_bnd_arch_bed for the BND PLT.
3031 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3033 * config.bfd: Add entries for i686-redox and x86_64-redox.
3035 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3037 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3039 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3040 .eh_frame section to 4 bytes for x32.
3041 (elf_x86_64_check_relocs): Likewise.
3043 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3046 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3047 (PLT_GOT_FDE_LENGTH): Likewise.
3048 (elf_i386_plt_layout): Add eh_frame_plt_got and
3049 eh_frame_plt_got_size.
3050 (elf_i386_plt): Updated.
3051 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3052 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3053 (elf_i386_size_dynamic_sections): Allocate and initialize
3054 .eh_frame section for .plt.got.
3055 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3057 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3058 eh_frame_plt_got_size.
3059 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3060 (PLT_GOT_FDE_LENGTH): Likewise.
3061 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3062 eh_frame_plt_got_size.
3063 (elf_x86_64_arch_bed): Updated.
3064 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3065 eh_frame_plt_got_size.
3066 (elf_x86_64_nacl_arch_bed): Likewise.
3067 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3068 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3069 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3070 .eh_frame section for .plt.got.
3071 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3074 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3076 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3077 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3079 2017-01-09 Nick Clifton <nickc@redhat.com>
3081 * dwarf2.c (lookup_address_in_function_table): Return early if
3082 there are no functions in the given comp unit, or if the high
3083 address of the last function in the comp unit is less than the
3086 2017-01-09 Nick Clifton <nickc@redhat.com>
3089 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3090 message if there are too many symbols to load.
3092 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3094 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3095 if relocs are cached.
3097 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3100 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3101 for R_MICROBLAZE_GOTOFF_64.
3103 2017-01-03 Nick Clifton <nickc@redhat.com>
3105 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3106 warning about using a possibly uninitialised variable.
3108 2017-01-02 Alan Modra <amodra@gmail.com>
3110 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3111 (allocate_plt_static, allocate_dynrelocs): Use it.
3113 2017-01-02 Alan Modra <amodra@gmail.com>
3115 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3116 .PARISC.unwind section.
3118 2017-01-02 Alan Modra <amodra@gmail.com>
3121 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3122 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3123 indirect to GOT pointer relative code edit.
3125 2017-01-02 Alan Modra <amodra@gmail.com>
3127 Update year range in copyright notice of all files.
3129 For older changes see ChangeLog-2016
3131 Copyright (C) 2017 Free Software Foundation, Inc.
3133 Copying and distribution of this file, with or without modification,
3134 are permitted in any medium without royalty provided the copyright
3135 notice and this notice are preserved.
3141 version-control: never