1 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
4 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
5 is set on any input relocatable file.
6 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
8 2017-08-23 Alan Modra <amodra@gmail.com>
11 * elf64-ppc.c (ensure_undef_dynamic): Rename from
12 ensure_undefweak_dynamic. Handle undefined too.
13 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
14 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
15 (allocate_dynrelocs): Discard undefined non-default visibility
16 relocs first. Make undefined syms dynamic. Tidy goto.
18 2017-08-21 Alan Modra <amodra@gmail.com>
19 H.J. Lu <hongjiu.lu@intel.com>
22 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
23 * elflink.c (bfd_elf_define_start_stop): Rewrite.
25 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
28 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
29 undefined weak symbols.
31 2017-08-18 Nick Clifton <nickc@redhat.com>
34 * tekhex.c (getsym): Fix check for source pointer walking off the
35 end of the input buffer.
37 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
40 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
41 relocations in debug sections, change abort to _bfd_error_handler.
43 2017-08-14 Nick Clifton <nickc@redhat.com>
46 * elf.c (setup_group): Check for an empty or very small group
48 * po/bfd.pot: Regenerate.
50 2017-08-14 Alan Modra <amodra@gmail.com>
53 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
54 alignment padding here.
55 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
56 in a reverse pass over sections.
58 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
61 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
62 for @plt suffixes first.
63 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
65 2017-08-08 Nick Clifton <nickc@redhat.com>
68 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
69 small section lengths.
70 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
72 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
73 there is enough data present in the note.
75 2017-08-08 Alan Modra <amodra@gmail.com>
78 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
79 got.refcount for GOTOFF relocs, just create .got section.
81 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
83 * elflink.c (elf_link_add_object_symbols): Move common symbol
84 check after bed->common_definition.
86 2017-08-07 Alan Modra <amodra@gmail.com>
89 * elflink.c (bfd_elf_final_link): Don't segfault when sections
90 needed to define various dynamic tags have been discarded.
92 2017-08-07 Nick Clifton <nickc@redhat.com>
95 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
96 has not been set then use the bfd returned by
97 _bfd_elf_link_setup_gnu_properties. If that is null then search
98 through all the input bfds selecting the first normal, ELF format
100 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
102 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
104 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
106 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
107 (elf_i386_check_tls_transition): Check tls_get_addr directly.
108 (elf_i386_convert_load_reloc): Update tls_get_addr check.
109 (elf_i386_link_check_relocs): New function.
110 (bfd_elf32_bfd_link_check_relocs): New.
111 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
113 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
114 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
115 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
116 (elf_x86_64_link_check_relocs): New function.
117 (bfd_elf64_bfd_link_check_relocs): New.
118 (bfd_elf32_bfd_link_check_relocs): Likewise.
120 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
123 * elflink.c (elf_link_add_object_symbols): Treat common symbol
124 as undefined for --no-define-common.
126 2017-08-05 Alan Modra <amodra@gmail.com>
128 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
129 hppa_link_hash_table.
131 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
133 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
134 entries for sysregs with negative indices.
136 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
138 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
139 isn't the S/390 specific elf data.
140 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
142 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
144 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
145 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
146 [R_RISCV_ADD16]: Likewise.
147 [R_RISCV_ADD32]: Likewise.
148 [R_RISCV_ADD64]: Likewise.
149 [R_RISCV_SUB6]: Likewise.
150 [R_RISCV_SUB8]: Likewise.
151 [R_RISCV_SUB16]: Likewise.
152 [R_RISCV_SUB32]: Likewise.
153 [R_RISCV_SUB64]: Likewise.
155 2017-07-31 Alan Modra <amodra@gmail.com>
157 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
158 without ld.so checks.
160 2017-07-29 Alan Modra <amodra@gmail.com>
163 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
164 (ppc64_elf_merge_symbol): Set non_zero_localentry.
165 (is_elfv2_localentry0): Test non_zero_localentry.
166 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
168 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
170 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
171 pointer check for htab->elf.irelplt.
172 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
174 2017-07-27 Nick Clifton <nickc@redhat.com>
177 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
179 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
181 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
183 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
185 (evax_bfd_print_emh): Check for invalid string lengths.
187 2017-07-25 Nick Clifton <nickc@redhat.com>
189 * po/fr.po: Updated French translation.
191 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
194 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
195 16-bit absolute branches into 10-bit pc-relative branches on the
196 MSP430 as well as the MSP430X.
198 2017-07-25 Alan Modra <amodra@gmail.com>
200 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
201 (stub_eh_frame_size): New function.
202 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
203 (group_sections): Init group tls_get_addr_opt_bctrl.
204 (ppc64_elf_size_stubs): Update sizing and initialization of
205 .eh_frame. Iteration over stubs via group list.
206 (ppc64_elf_build_stubs): Iterate over stubs via group list.
207 (ppc64_elf_finish_dynamic_sections): Update finalization of
210 2017-07-24 Nick Clifton <nickc@redhat.com>
213 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
214 of the relocs to the canonicalize_one_reloc routine.
215 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
216 for the _bfd_mach_o_canonicalize_one_reloc field.
217 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
218 res_base parameter. Use to check for corrupt pair relocs.
219 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
221 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
223 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
226 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
227 enough data in the record before attempting to parse it.
228 (_bfd_vms_slurp_eeom): Likewise.
230 (_bfd_vms_slurp_egsd): Check for an invalid section index.
231 (image_set_ptr): Likewise.
232 (alpha_vms_slurp_relocs): Likewise.
234 (alpha_vms_object_p): Check for a truncated record.
236 2017-07-24 Nick Clifton <nickc@redhat.com>
239 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
240 an unrecognized reloc and sets the bfd_error value.
241 * libbfd.h: Regenerate.
242 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
244 * elf32-i386.c (elf_i386_relocate_section): Likewise.
245 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
246 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
247 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
248 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
250 2017-07-23 Alan Modra <amodra@gmail.com>
252 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
255 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
258 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
259 reloc_class_ifunc for ifunc symbols.
261 2017-07-19 Nick Clifton <nickc@redhat.com>
264 * archive.c (bfd_generic_archive_p): If the bfd does not have the
265 correct magic bytes at the start, set the error to wrong format
266 and clear the format selector before returning NULL.
268 2017-07-19 Nick Clifton <nickc@redhat.com>
271 * coff-rs6000.c (_bfd_strntol): New function.
272 (_bfd_strntoll): New function.
273 (GET_VALUE_IN_FIELD): New macro.
274 (EQ_VALUE_IN_FIELD): new macro.
275 (_bfd_xcoff_slurp_armap): Use new macros.
276 (_bfd_xcoff_archive_p): Likewise.
277 (_bfd_xcoff_read_ar_hdr): Likewise.
278 (_bfd_xcoff_openr_next_archived_file): Likewise.
279 (_bfd_xcoff_stat_arch_elt): Likewise.
280 * coff64-rs6000.c (_bfd_strntol): New function.
281 (_bfd_strntoll): New function.
282 (GET_VALUE_IN_FIELD): New macro.
283 (xcoff64_slurp_armap): Use new macros.
285 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
286 John Eric Martin <John.Martin@emmicro-us.com>
288 * bfd-in2.h: Regenerate.
289 * libbfd.h: Regenerate.
290 * elf32-arc.c (JLI): Define.
291 * reloc.c: Add JLI relocations.
293 2017-07-18 Nick Clifton <nickc@redhat.com>
296 * coff-sh.c: Fix spelling typos.
297 * compress.c: Likewise.
298 * cpu-pdp11.c: Likewise.
299 * ecofflink.c: Likewise.
300 * elf-m10300.c: Likewise.
302 * elf32-arm.c: Likewise.
303 * elf32-m68k.c: Likewise.
304 * elf32-nds32.c: Likewise.
305 * elf32-ppc.c: Likewise.
306 * elf32-sh.c: Likewise.
307 * elf32-v850.c: Likewise.
308 * elf64-ppc.c: Likewise.
309 * elf64-x86-64.c: Likewise.
310 * elflink.c: Likewise.
311 * elfnn-aarch64.c: Likewise.
312 * elfxx-mips.c: Likewise.
315 * vms-alpha.c: Likewise.
316 * xcofflink.c: Likewise.
318 2017-07-18 Nick Clifton <nickc@redhat.com>
321 * coffcode.h (handle_COMDAT): Replace abort with an error message
324 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
327 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
330 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
332 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
334 2017-07-16 Alan Modra <amodra@gmail.com>
336 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
337 __tls_index GOT entries when using __tls_get_addr_opt stub.
338 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
340 2017-07-12 Alan Modra <amodra@gmail.com>
342 * po/es.po: Update from translationproject.org/latest/bfd/.
343 * po/fi.po: Likewise.
344 * po/fr.po: Likewise.
345 * po/id.po: Likewise.
346 * po/ja.po: Likewise.
347 * po/ro.po: Likewise.
348 * po/ru.po: Likewise.
349 * po/sr.po: Likewise.
350 * po/sv.po: Likewise.
351 * po/tr.po: Likewise.
352 * po/uk.po: Likewise.
353 * po/vi.po: Likewise.
354 * po/zh_CN.po: Likewise.
355 * po/hr.po: New file from translationproject.org.
356 * configure.ac (ALL_LINGUAS): Add hr. Sort.
357 * configure: Regenerate.
359 2017-07-12 Nick Clifton <nickc@redhat.com>
361 Fix compile time warnings using gcc 7.1.1.
362 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
364 (elf_xtensa_get_gotplt_section): Increase length of got_name
366 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
367 default return of FALSE.
368 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
369 default return of FALSE.
371 2017-07-12 Alan Modra <amodra@gmail.com>
373 * binary.c (binary_set_section_contents): Don't print filepos in
375 (coff_write_object_contents): Cast size_t for error message.
376 (coff_slurp_line_table): Don't use bfd_vma symndx.
377 (coff_slurp_reloc_table): Remove unneeded cast.
378 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
380 (find_abstract_instance_name): Likewise.
381 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
382 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
383 (elf32_arm_check_relocs): Make r_symndx an int.
384 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
386 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
388 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
390 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
391 * elf32-s390.c (elf_s390_check_relocs): Likewise.
392 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
393 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
394 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
395 * elf64-s390.c (elf_s390_check_relocs): Likewise.
396 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
397 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
398 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
399 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
400 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
401 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
402 and use %lu for error message.
403 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
404 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
407 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
409 (elf32_arm_final_link_relocate): Likewise.
410 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
411 * coffcode.h (styp_to_sec_flags): Likewise.
412 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
413 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
414 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
415 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
416 (elf32_bfin_merge_private_bfd_data): Likewise.
417 * elf32-cris.c (cris_elf_relocate_section): Likewise.
418 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
419 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
420 (i370_elf_relocate_section): Likewise.
421 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
422 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
423 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
424 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
425 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
426 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
427 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
428 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
429 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
430 * ieee.c (ieee_write_id, read_id): Likewise.
431 * mach-o.c (bfd_mach_o_write_contents): Likewise.
432 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
433 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
434 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
435 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
436 * stabs.c (_bfd_link_section_stabs): Likewise.
438 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
440 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
441 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
442 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
443 * coff-sh.c (sh_relax_section): Likewise.
444 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
445 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
446 * coffcode.h (coff_slurp_reloc_table): Likewise.
447 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
448 (_bfd_coff_read_string_table): Likewise.
449 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
450 * compress.c (bfd_get_full_section_contents): Likewise.
451 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
452 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
453 * elf.c (bfd_elf_string_from_elf_section): Likewise.
454 * elf32-arc.c (arc_special_overflow_checks): Likewise.
455 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
456 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
457 (elf32_arm_write_section): Likewise.
458 * elf32-bfin.c (bfin_relocate_section): Likewise.
459 (bfinfdpic_relocate_section): Likewise.
460 * elf32-hppa.c (hppa_build_one_stub): Likewise.
461 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
462 * elf32-i386.c (elf_i386_tls_transition): Likewise.
463 (elf_i386_relocate_section): Likewise.
464 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
465 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
466 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
467 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
468 * elf32-metag.c (elf_metag_relocate_section): Likewise.
469 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
470 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
471 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
472 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
473 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
474 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
475 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
476 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
477 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
478 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
479 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
480 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
481 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
482 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
483 * elf32-sh.c (sh_elf_relax_section): Likewise.
484 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
485 (sh_elf_relocate_section): Likewise.
486 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
487 * elf32-spu.c (spu_elf_relocate_section): Likewise.
488 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
489 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
490 * elf32-v850.c (v850_elf_relax_section): Likewise.
491 * elf32-vax.c (elf_vax_check_relocs): Likewise.
492 (elf_vax_relocate_section): Likewise.
493 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
494 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
495 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
496 (do_fix_for_relocatable_link): Likewise.
497 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
498 (elf64_alpha_relax_with_lituse): Likewise.
499 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
500 (elf_hppa_final_link_relocate): Likewise.
501 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
502 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
503 (elf64_vms_link_add_object_symbols): Likewise.
504 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
505 (mmix_final_link_relocate): Likewise.
506 * elf64-s390.c (invalid_tls_insn): Likewise.
507 (elf_s390_relocate_section): Likewise.
508 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
509 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
510 (elf_x86_64_relocate_section): Likewise.
511 * elfcode.h (elf_slurp_symbol_table): Likewise.
512 * elfcore.h (elf_core_file_p): Likewise.
513 * elflink.c (elf_link_read_relocs_from_section): Likewise.
514 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
515 (elfNN_aarch64_relocate_section): Likewise.
516 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
517 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
518 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
519 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
520 (_bfd_mips_elf_relocate_section): Likewise.
521 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
522 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
523 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
524 * ieee.c (ieee_slurp_external_symbols): Likewise.
525 * ihex.c (ihex_write_object_content): Likewise.
526 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
527 * merge.c (_bfd_merged_section_offset): Likewise.
528 * mmo.c (mmo_write_loc_chunk): Likewise.
529 (mmo_write_object_contents): Likewise.
530 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
531 * stabs.c (_bfd_link_section_stabs): Likewise.
532 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
534 2017-07-11 Alan Modra <amodra@gmail.com>
536 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
538 2017-07-11 Alan Modra <amodra@gmail.com>
540 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
541 instruction" error using _bfd_error_handler, not einfo.
543 2017-07-10 Nick Clifton <nickc@redhat.com>
545 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
546 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
548 2017-07-07 John Baldwin <jhb@FreeBSD.org>
550 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
552 2017-07-07 Alan Modra <amodra@gmail.com>
554 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
556 2017-07-07 Alan Modra <amodra@gmail.com>
558 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
559 as long long. Move code replacing "ll" with "I64", and simplify.
561 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
563 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
566 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
568 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
570 (line_info_add_file_name): Likewise.
571 (decode_line_info): Likewise.
573 2017-07-04 Tristan Gingold <gingold@adacore.com>
575 * version.m4: Bump version to 2.29.51
576 * configure: Regenerate.
578 2017-07-04 Jiong Wang <jiong.wang@arm.com>
580 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
581 sanity check at the head of this function.
583 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
585 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
587 (struct attr_abbrev): Add field implicit_const.
588 (dwarf_debug_sections): Add .debug_line_str.
589 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
590 (dwarf_debug_section_assert): Add static assertion.
591 (read_indirect_line_string): New.
592 (read_abbrevs): Support DW_FORM_implicit_const.
593 (is_str_attr): Support DW_FORM_line_strp.
594 (read_attribute_value): Support DW_FORM_line_strp and
595 DW_FORM_implicit_const.
596 (read_attribute): Support DW_FORM_implicit_const.
597 (line_info_add_include_dir, line_info_add_include_dir_stub):
598 (line_info_add_file_name, read_formatted_entries): New.
599 (decode_line_info, parse_comp_unit): Support DWARF 5.
600 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
602 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
604 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
605 abort statement that was put for symbols that are not dynamic.
607 2017-07-03 Tristan Gingold <gingold@adacore.com>
609 * po/bfd.pot: Regenerate
611 2017-07-03 Alan Modra <amodra@gmail.com>
613 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
614 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
615 * elf.c (setup_group): Use "Lx" to print sh_size.
616 (_bfd_elf_setup_sections): Remove unnecessary cast and print
617 unknown section type in hex.
618 (copy_special_section_fields): Style fix.
619 (bfd_section_from_shdr): Correct format for sh_link. Use a
620 common error message for all the variants of unrecognized
622 (assign_file_positions_for_load_sections): Use "Lx" for lma
623 adjust error message.
624 (assign_file_positions_for_non_load_sections): Formatting.
625 (rewrite_elf_program_header): Formatting. Use "Lx" for
626 bfd_vma values in error messages.
627 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
628 ELF_R_SYM value to type expected by format.
629 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
631 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
632 (elf_link_input_bfd): Use "Lx" for r_info.
633 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
635 2017-07-03 Alan Modra <amodra@gmail.com>
637 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
638 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
639 Microsoft C library variant of long long format specifier.
640 (PRINT20): Cast value to bfd_uint64_t not long long.
641 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
642 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
643 long long. Don't cast to bfd_vma.
644 * elf32-score.c (score3_bfd_getl48): Likewise.
645 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
647 2017-07-03 Alan Modra <amodra@gmail.com>
649 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
651 (bfd_elf_print_symbol): Don't cast symbol->flags.
652 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
653 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
654 _bfd_error_handler argument order.
655 (ppc_elf_merge_private_bfd_data): Don't cast flags.
657 2017-07-03 Alan Modra <amodra@gmail.com>
659 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
661 * configure: Regenerate.
662 * config.in: Regenerate.
664 2017-06-29 Andrew Waterman <andrew@sifive.com>
666 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
669 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
671 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
672 unless it is undefined weak.
673 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
674 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
676 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
677 is not dynamic in PIC, abort.
679 2017-06-29 Jiong Wang <jiong.wang@arm.com>
682 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
683 undefined weak symbols into dynamic.
684 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
685 relocation for non-dynamic symbols.
686 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
688 2017-06-29 Jiong Wang <jiong.wang@arm.com>
690 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
691 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
692 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
693 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
694 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
697 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
699 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
700 (elfcore_write_s390_gs_bc): Likewise.
701 * elf.c (elfcore_grok_s390_gs_cb): New function.
702 (elfcore_grok_s390_gs_bc): New function.
703 (elfcore_grok_note): Call them.
704 (elfcore_write_s390_gs_cb): New function.
705 (elfcore_write_s390_gs_bc): New function.
706 (elfcore_write_register_note): Call them.
708 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
710 * libbfd.c (_bfd_generic_get_section_contents): Don't call
711 bfd_get_file_size. Check archive element size.
712 (_bfd_generic_get_section_contents_in_window): Likewise.
714 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
716 * bfd-in2.h: Regenerated.
717 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
718 (bfd_get_file_size): Likewise.
720 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
721 Matthew Fortune <matthew.fortune@imgtec.com>
723 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
724 * cpu-mips.c (I_interaptiv_mr2): New enum value.
725 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
726 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
728 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
729 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
730 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
731 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
732 `bfd_mach_mips_interaptiv_mr2' entries.
733 * bfd-in2.h: Regenerate.
735 2017-06-27 Nick Clifton <nickc@redhat.com>
737 * tekhex.c (pass_over): Revert accidental conversion of a local
738 array to a static array.
740 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
743 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
744 reloc addend if necessary. Adjust diff only if
745 shrinked_insn_address < end_address.
747 2017-06-27 Alan Modra <amodra@gmail.com>
750 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
751 (_bfd_generic_get_section_contents_in_window): Likewise.
753 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
755 * elfnn-riscv.c (perform_relocation): Support the new
756 R_RISCV_32_PCREL relocation.
757 (riscv_elf_relocate_section): Likewise.
758 * elfxx-riscv.c (howto_table): Likewise.
759 (riscv_reloc_map): Likewise.
760 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
761 * libbfd.h: Regenerate.
763 2017-06-27 Alan Modra <amodra@gmail.com>
766 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
767 Use unsigned file pointer type, and remove cast.
768 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
769 Add "count", not "sz".
771 2017-06-26 Pedro Alves <palves@redhat.com>
774 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
777 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
780 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
783 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
785 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
786 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
787 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
788 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
789 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
791 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
794 * compress.c (bfd_get_full_section_contents): Don't check the
796 * libbfd.c (_bfd_generic_get_section_contents): Check for and
797 reject a section whose size + offset is greater than the size
799 (_bfd_generic_get_section_contents_in_window): Likewise.
801 2017-06-26 Nick Clifton <nickc@redhat.com>
804 * tekhex.c (getvalue): Check for the source pointer exceeding the
805 end pointer before the first byte is read.
807 2017-06-26 Nick Clifton <nickc@redhat.com>
810 * opncls.c (get_build_id): Check that the section is big enough
811 to contain the whole note.
812 * compress.c (bfd_get_full_section_contents): Check for and reject
813 a section whose size is greater than the size of the entire file.
814 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
815 contain a notes section.
817 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
819 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
821 (elf_s390_modify_segment_map): Likewise.
822 (bfd_elf_s390_set_options): Lisewise.
824 2017-06-26 Alan Modra <amodra@gmail.com>
826 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
828 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
829 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
830 .preinit_array on --just-syms bfds.
831 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
832 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
833 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
835 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
837 * elf.c (find_link): Bounds check "hint".
839 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
841 * elf32-arm.c (using_thumb_only): Update list of architectures in
842 BFD_ASSERT for which the logic is valid.
843 (using_thumb2_bl): Likewise.
844 (using_thumb2): Likewise and return true for ARMv8-R.
845 (arch_has_arm_nop): Likewise.
846 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
847 merging logic. Update commentis for value 15 of v8m_baseline,
848 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
849 merging of value 15 of Tag_CPU_arch.
851 2017-06-23 Jiong Wang <jiong.wang@arm.com>
853 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
854 BFD_RELOC_AARCH64_ADR_GOT_PAGE
855 * bfd-in2.h: Regenerate.
857 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
859 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
860 the error_alignment label forward. Properly align program
861 property note section.
863 2017-06-22 Eric Christopher <echristo@gmail.com>
865 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
866 abs to fix a truncation warning.
868 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
870 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
871 local undefined weak symbol to 0.
872 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
874 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
876 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
877 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
878 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
879 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
880 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
881 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
882 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
883 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
885 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
887 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
888 (elf_i386_lazy_ibt_plt_entry): Likewise.
889 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
890 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
891 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
892 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
893 (elf_i386_lazy_plt_layout): Likewise.
894 (elf_i386_non_lazy_plt_layout): Likewise.
895 (elf_i386_link_hash_entry): Add plt_second.
896 (elf_i386_link_hash_table): Add plt_second and
898 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
899 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
900 the second PLT. Check the second PLT.
901 (elf_i386_relocate_section): Use the second PLT to resolve
902 PLT reference if needed.
903 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
905 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
906 second PLT. Generate unwind info for the second PLT.
907 (elf_i386_plt_type): Add plt_second.
908 (elf_i386_get_synthetic_symtab): Support the second PLT.
909 (elf_i386_parse_gnu_properties): Support
910 GNU_PROPERTY_X86_FEATURE_1_AND.
911 (elf_i386_merge_gnu_properties): Support
912 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
913 on GNU_PROPERTY_X86_FEATURE_1_IBT
914 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
915 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
916 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
917 is set on all relocatable inputs.
918 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
919 (elf_x32_lazy_ibt_plt_entry): Likewise.
920 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
921 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
922 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
923 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
924 (elf_x86_64_lazy_ibt_plt): Likewise.
925 (elf_x32_lazy_ibt_plt): Likewise.
926 (elf_x86_64_non_lazy_ibt_plt): Likewise.
927 (elf_x32_non_lazy_ibt_plt): Likewise.
928 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
929 (elf_x86_64_parse_gnu_properties): Support
930 GNU_PROPERTY_X86_FEATURE_1_AND.
931 (elf_x86_64_merge_gnu_properties): Support
932 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
933 on GNU_PROPERTY_X86_FEATURE_1_IBT
934 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
935 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
936 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
937 is set on all relocatable inputs.
939 2017-06-22 Nick Clifton <nickc@redhat.com>
942 * som.c (setup_sections): NUL terminate the space_strings buffer.
943 Check that the space.name field does not index beyond the end of
944 the space_strings buffer.
946 2017-06-21 Nick Clifton <nickc@redhat.com>
949 * coff-sh.c (sh_reloc): Check for an out of range reloc.
951 2017-06-21 Nick Clifton <nickc@redhat.com>
954 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
955 type of the size parameter.
956 (_bfd_vms_save_counted_string): Add second parameter - the maximum
957 length of the counted string.
958 * vms.h (_bfd_vms_save_sized_string): Update prototype.
959 (_bfd_vms_save_counted_string): Likewise.
960 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
961 _bfd_vms_save_counted_string.
962 (_bfd_vms_slurp_ehdr): Likewise.
963 (_bfd_vms_slurp_egsd): Likewise.
964 (Parse_module): Likewise.
966 2017-06-21 Alan Modra <amodra@gmail.com>
968 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
969 calls before tocsave calls.
970 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
973 2017-06-21 Nick Clifton <nickc@redhat.com>
976 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
977 bfd_get_full_section_contents returns no contents.
979 2017-06-21 Nick Clifton <nickc@redhat.com>
982 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
985 2017-06-21 Nick Clifton <nickc@redhat.com>
988 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
990 (image_set_ptr): Likewise.
991 (alpha_vms_fix_sec_rel): Likewise.
992 (alpha_vms_slurp_relocs): Likewise.
994 2017-06-21 Nick Clifton <nickc@redhat.com>
997 * ieee.c (ieee_slurp_sections): Check for a NULL return from
999 (ieee_archive_p): Likewise.
1000 (ieee_object_p): Likewise.
1002 2017-06-21 Nick Clifton <nickc@redhat.com>
1005 * elf.c (setup_group): Zero the group section pointer list after
1006 allocation so that loops can be caught. Check for NULL pointers
1007 when processing a group list.
1009 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1011 * elf-s390.h: New file.
1012 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1014 (elf_s390_additional_program_headers): New function.
1015 (elf_s390_modify_segment_map): New function.
1016 (bfd_elf_s390_set_options): New function.
1017 (elf_backend_additional_program_headers)
1018 (elf_backend_modify_segment_map): Add macro definitions.
1020 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1023 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1024 the DYNAMIC bit instead of bfd_count_sections.
1026 2017-06-19 Nick Clifton <nickc@redhat.com>
1029 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1031 (evax_bfd_print_eeom): Likewise.
1032 (evax_bfd_print_egsd): Check for an overlarge record length.
1033 (evax_bfd_print_etir): Likewise.
1035 2017-06-19 Nick Clifton <nickc@redhat.com>
1038 * libieee.h (struct common_header_type): Add end_p field.
1039 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1041 (read_id): Check for a length that exceeds the remaining bytes in
1043 (ieee_seek): Initialise end_p.
1044 (ieee_archive_p): Likewise.
1045 (ieee_object_p): Likewise.
1047 2017-06-19 Nick Clifton <nickc@redhat.com>
1050 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1051 before reading the EIHS structure entries.
1053 2017-06-19 Nick Clifton <nickc@redhat.com>
1056 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1057 gsd_size. Check that there are enough bytes remaining to read the
1058 type and size of the next egsd. Check that the size of the egsd
1059 does not exceed the size of the record.
1061 2017-06-19 Alan Modra <amodra@gmail.com>
1063 * config.bfd: Correct targ_underscore for cris.
1065 2017-06-18 Alan Modra <amodra@gmail.com>
1067 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1068 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1070 2017-06-16 Nick Clifton <nickc@redhat.com>
1072 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1073 bucketlist is empty because there are no symbols to add to the
1076 2017-06-16 Alan Modra <amodra@gmail.com>
1082 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1083 (BFD_JUMP_TABLE_LINK): Likewise.
1084 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1085 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1086 (bfd_elf_define_start_stop): New function.
1087 * linker.c (bfd_generic_define_start_stop): New function.
1088 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1090 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1091 * aout-target.h (MY_bfd_define_start_stop): Define.
1092 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1093 * binary.c (binary_bfd_define_start_stop): Define.
1094 * bout.c (b_out_bfd_define_start_stop): Define.
1095 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1096 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1097 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1098 * coffcode.h (coff_bfd_define_start_stop): Define.
1099 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1100 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1101 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1102 * ieee.c (ieee_bfd_define_start_stop): Define.
1103 * ihex.c (ihex_bfd_define_start_stop): Define.
1104 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1105 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1106 * mmo.c (mmo_bfd_define_start_stop): Define.
1107 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1108 * oasys.c (oasys_bfd_define_start_stop): Define.
1109 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1110 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1111 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1112 * som.c (som_bfd_define_start_stop): Define.
1113 * srec.c (srec_bfd_define_start_stop): Define.
1114 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1115 * versados.c (versados_bfd_define_start_stop): Define.
1116 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1117 (alpha_vms_bfd_define_start_stop): Define.
1118 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1119 * bfd-in2.h: Regenerate.
1120 * libbfd.h: Regenerate.
1122 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1124 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1125 SYMBOL_REFERENCES_LOCAL.
1127 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1130 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1131 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1132 runtime for if there needs copy relocation elimination.
1133 (need_copy_relocation_p): New function. Return true for symbol with
1134 pc-relative references and if it's against read-only sections.
1135 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1136 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1137 that are related with accessing external objects.
1138 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1139 in elfNN_aarch64_check_relocs.
1141 2017-06-15 Nick Clifton <nickc@redhat.com>
1144 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1147 (ieee_archive_p): Likewise.
1149 2017-06-15 Nick Clifton <nickc@redhat.com>
1152 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1154 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1156 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1157 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1158 keep both windowed and call0 ABI PLT definitions.
1159 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1160 elf_xtensa_*_plt_entry endex.
1161 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1163 2017-06-14 Nick Clifton <nickc@redhat.com>
1166 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1169 2017-06-14 Nick Clifton <nickc@redhat.com>
1172 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1173 maximum value for the ascic pointer. Check that name processing
1174 does not read beyond this value.
1175 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1178 2017-06-14 Nick Clifton <nickc@redhat.com>
1181 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1182 (process_otr): Check for an invalid offset in the otr structure.
1184 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1186 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1188 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1194 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1195 vtable field to a union.
1196 (_bfd_elf_is_start_stop): Removed.
1197 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1198 __start_SECNAME and __stop_SECNAME symbols.
1199 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1200 * elflink.c (_bfd_elf_is_start_stop): Removed.
1201 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1202 _bfd_elf_is_start_stop.
1203 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1204 __stop_SECNAME symbols. Updated.
1205 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1206 (bfd_elf_gc_record_vtinherit): Likewise.
1207 (bfd_elf_gc_record_vtentry): Likewise.
1209 2017-06-13 Nick Clifton <nickc@redhat.com>
1212 * elflink.c (elf_link_adjust_relocs): Generate an error when
1213 encountering a reloc against a symbol removed by garbage
1216 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1218 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1219 to merge_gnu_properties.
1220 * elf-properties.c (elf_merge_gnu_properties): Add struct
1221 bfd_link_info * and pass it to merge_gnu_properties.
1222 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1223 and pass it to elf_merge_gnu_properties.
1224 (_bfd_elf_link_setup_gnu_properties): Pass info to
1225 elf_merge_gnu_property_list.
1226 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1228 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1230 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1233 * binary.c (binary_set_section_contents): Scale lma by octets
1234 per byte to set filepos.
1236 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1238 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1241 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1243 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1246 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1248 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1249 patched section contents for TLS IE reloc.
1250 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1252 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1254 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1255 RELOC_FOR_GLOBAL_SYMBOL macro.
1257 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1259 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1262 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1264 * config/tc-arc.c (md_undefined_symbol): Changed.
1265 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1267 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1269 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1272 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1274 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1275 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1277 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1279 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1282 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1284 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1285 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1286 is non-zero. Add clarifying comments.
1288 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1290 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1291 name. Use local IFUNC symbol name string to report unsupported
1292 non-PIC call to IFUNC function.
1293 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1294 when generating R_386_IRELATIVE relocation.
1295 (elf_i386_finish_dynamic_symbol): Likewise.
1296 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1298 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1299 when generating R_X86_64_IRELATIVE relocation.
1300 (elf_x86_64_finish_dynamic_symbol): Likewise.
1302 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1304 * elf.c (setup_group): Make sure BFD sections are created for all
1305 group sections in the input file when processing SHF_GROUP
1307 (bfd_section_from_shdr): Avoid duplicating logic already
1308 implemented in `setup_group'.
1310 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1313 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1314 if the hint address is zero.
1316 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1319 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1320 ELF_COMMON_DEF_P for common symbols.
1322 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1324 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1325 SEC_GROUP sections as SEC_EXCLUDE.
1326 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1327 (assign_section_numbers): Use resolve_section_groups flag instead
1328 of relocatable link type.
1329 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1330 flag instead of checking the final_link flag for part of the
1331 checks in here. Fix white space as a result.
1332 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1333 instead of relocatable link type.
1334 (bfd_elf_final_link): Likewise.
1336 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1338 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1340 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1341 (s3_bfd_score_elf_check_relocs): Likewise.
1342 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1343 (score_elf_final_link_relocate): Likewise.
1344 (s7_bfd_score_elf_check_relocs): Likewise.
1346 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1348 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1351 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1353 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1354 from `reloc_count' rather than decrementing it.
1355 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1356 `reloc_count' by `int_rels_per_ext_rel'.
1357 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1358 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1359 entry determination.
1360 (s3_bfd_score_elf_check_relocs): Likewise.
1361 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1362 (s7_bfd_score_elf_relocate_section): Likewise.
1363 (s7_bfd_score_elf_check_relocs): Likewise.
1364 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1365 prototype and function.
1366 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1367 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1368 triple rather than once the sum of REL and RELA relocation entry
1370 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1371 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1372 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1373 storage allocation size determination.
1374 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1375 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1376 by `int_rels_per_ext_rel' for last relocation entry
1378 (bfd_elf_final_link): Do not multiply `reloc_count' by
1379 `int_rels_per_ext_rel' for internal relocation storage
1380 allocation size determination.
1381 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1382 `int_rels_per_ext_rel' for last relocation entry determination.
1383 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1384 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1385 (_bfd_mips_elf_relocate_section): Likewise.
1387 2017-06-05 Alan Modra <amodra@gmail.com>
1390 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1392 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1394 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1395 determine structure sizes.
1396 (elfcore_grok_freebsd_prstatus): Likewise.
1398 2017-06-01 Alan Modra <amodra@gmail.com>
1400 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1401 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1403 (is_elfv2_localentry0): New function.
1404 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1405 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1406 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1407 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1408 optimized localentry:0 stubs.
1409 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1410 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1412 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1414 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1416 2017-05-30 Casey Smith <clegg89@gmail.com>
1419 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1420 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1422 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1424 * cpu-arc.c (arc_compatible): New function.
1426 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1428 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1430 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1433 * bfdio.c (bfd_get_file_size): New function.
1434 * bfd-in2.h: Regenerated.
1436 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1438 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1441 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1443 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1444 dynobj instead of htab->elf.dynobj.
1446 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1448 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1450 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1451 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1452 actual number of internal relocations retrieved. Adjust
1453 function description.
1454 (bfd_elf64_canonicalize_reloc): Remove macro.
1455 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1457 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1459 * archures.c (bfd_mach_sparc_v9m8): Define.
1460 (bfd_mach_sparc_v8plusm8): Likewise.
1461 (bfd_mach_sparc_v9_p): Adjust to M8.
1462 (bfd_mach_sparc_64bit_p): Likewise.
1463 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1464 bfd_mach_sparc_v8plusm8.
1465 * bfd-in2.h: Regenerated.
1466 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1468 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1469 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1470 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1472 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1473 bfd_mach_sparc_v8plusm8.
1475 2017-05-19 Alan Modra <amodra@gmail.com>
1477 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1478 debug and special sections when no non-note alloc sections in an
1481 2017-05-18 Alan Modra <amodra@gmail.com>
1483 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1484 * elf-m10300.c: Likewise.
1486 * elf32-arc.c: Likewise.
1487 * elf32-bfin.c: Likewise.
1488 * elf32-m68k.c: Likewise.
1489 * elf32-nds32.c: Likewise.
1490 * elf32-tilepro.c: Likewise.
1491 * elflink.c: Likewise.
1492 * elfnn-aarch64.c: Likewise.
1493 * elfnn-riscv.c: Likewise.
1494 * elfxx-tilegx.c: Likewise.
1495 * mach-o.c: Likewise.
1496 * peXXigen.c: Likewise.
1497 * vms-alpha.c: Likewise.
1498 * vms-lib.c: Likewise.
1500 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1503 * elflink.c (elf_gc_mark_debug_section): New function.
1504 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1505 referenced by kept debug sections.
1507 2017-05-16 Alan Modra <amodra@gmail.com>
1509 * elf-m10300.c: Rename occurrences of non_ir_ref.
1510 * elf32-arm.c: Likewise.
1511 * elf32-bfin.c: Likewise.
1512 * elf32-cr16.c: Likewise.
1513 * elf32-cris.c: Likewise.
1514 * elf32-d10v.c: Likewise.
1515 * elf32-dlx.c: Likewise.
1516 * elf32-fr30.c: Likewise.
1517 * elf32-frv.c: Likewise.
1518 * elf32-hppa.c: Likewise.
1519 * elf32-i370.c: Likewise.
1520 * elf32-i386.c: Likewise.
1521 * elf32-iq2000.c: Likewise.
1522 * elf32-lm32.c: Likewise.
1523 * elf32-m32c.c: Likewise.
1524 * elf32-m32r.c: Likewise.
1525 * elf32-m68hc1x.c: Likewise.
1526 * elf32-m68k.c: Likewise.
1527 * elf32-mcore.c: Likewise.
1528 * elf32-metag.c: Likewise.
1529 * elf32-microblaze.c: Likewise.
1530 * elf32-moxie.c: Likewise.
1531 * elf32-msp430.c: Likewise.
1532 * elf32-mt.c: Likewise.
1533 * elf32-nios2.c: Likewise.
1534 * elf32-or1k.c: Likewise.
1535 * elf32-ppc.c: Likewise.
1536 * elf32-rl78.c: Likewise.
1537 * elf32-s390.c: Likewise.
1538 * elf32-score.c: Likewise.
1539 * elf32-score7.c: Likewise.
1540 * elf32-sh.c: Likewise.
1541 * elf32-tic6x.c: Likewise.
1542 * elf32-tilepro.c: Likewise.
1543 * elf32-v850.c: Likewise.
1544 * elf32-vax.c: Likewise.
1545 * elf32-xstormy16.c: Likewise.
1546 * elf32-xtensa.c: Likewise.
1547 * elf64-alpha.c: Likewise.
1548 * elf64-hppa.c: Likewise.
1549 * elf64-ia64-vms.c: Likewise.
1550 * elf64-mmix.c: Likewise.
1551 * elf64-ppc.c: Likewise.
1552 * elf64-s390.c: Likewise.
1553 * elf64-sh64.c: Likewise.
1554 * elf64-x86-64.c: Likewise.
1555 * elflink.c: Likewise.
1556 * elfnn-aarch64.c: Likewise.
1557 * elfnn-ia64.c: Likewise.
1558 * elfnn-riscv.c: Likewise.
1559 * elfxx-mips.c: Likewise.
1560 * elfxx-sparc.c: Likewise.
1561 * elfxx-tilegx.c: Likewise.
1562 * linker.c: Likewise.
1564 2017-05-16 Alan Modra <amodra@gmail.com>
1566 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1567 * elflink.c (elf_link_add_object_symbols): Update to use
1569 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1571 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1573 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1575 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1577 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1579 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1580 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1582 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1584 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1586 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1588 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1589 to plt_second/plt_second_eh_frame.
1590 (elf_x86_64_link_hash_newfunc): Updated.
1591 (elf_x86_64_allocate_dynrelocs): Likewise.
1592 (elf_x86_64_size_dynamic_sections): Likewise.
1593 (elf_x86_64_relocate_section): Likewise.
1594 (elf_x86_64_finish_dynamic_symbol): Likewise.
1595 (elf_x86_64_finish_dynamic_sections): Likewise.
1596 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1597 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1599 (elf_backend_setup_gnu_properties): Updated. Create the
1600 .plt.sec section instead of the .plt.sec section.
1602 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1604 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1605 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1606 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1608 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1610 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1611 (bfd_elf64_set_reloc): Define.
1612 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1614 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1616 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1617 (struct bfd_target): New field _bfd_set_reloc.
1618 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1619 * reloc.c (_bfd_generic_set_reloc): New function.
1620 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1621 * nlm-target.h (nlm_set_reloc): Likewise.
1622 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1623 * aout-tic30.c (MY_set_reloc): Likewise.
1624 * aout-target.h (MY_set_reloc): Likewise.
1625 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1626 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1627 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1628 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1629 * aout-adobe.c (aout_32_set_reloc): Likewise.
1630 * bout.c (b_out_set_reloc): Likewise.
1631 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
1632 * i386os9k.c (aout_32_set_reloc): Likewise.
1633 * ieee.c (ieee_set_reloc): Likewise.
1634 * oasys.c (oasys_set_reloc): Likewise.
1635 * som.c (som_set_reloc): Likewise.
1636 * versados.c (versados_set_reloc): Likewise.
1637 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1638 _bfd_generic_set_reloc.
1639 (rs6000_xcoff64_aix_vec): LIkewise.
1640 * libbfd.c (_bfd_norelocs_set_reloc): New function.
1641 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
1642 * i386msdos.c (msdos_set_reloc): Define to
1643 _bfd_norelocs_set_reloc.
1644 * elfcode.h (elf_set_reloc): Define.
1645 * bfd-in2.h: Regenerated.
1647 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1650 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1651 for IFUNC function address.
1653 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1655 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1656 (CONFLICT_LIST): Likewise.
1657 (opcode/arc-attrs.h): Include.
1658 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1659 (arc_extract_features): New file.
1660 (arc_stralloc): Likewise.
1661 (arc_elf_merge_attributes): Likewise.
1662 (arc_elf_merge_private_bfd_data): Use object attributes.
1663 (bfd_arc_get_mach_from_attributes): New function.
1664 (arc_elf_object_p): Use object attributes.
1665 (arc_elf_final_write_processing): Likewise.
1666 (elf32_arc_obj_attrs_arg_type): New function.
1667 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1668 (elf32_arc_section_from_shdr): Likewise.
1669 (elf_backend_obj_attrs_vendor): Define.
1670 (elf_backend_obj_attrs_section): Likewise.
1671 (elf_backend_obj_attrs_arg_type): Likewise.
1672 (elf_backend_obj_attrs_section_type): Likewise.
1673 (elf_backend_obj_attrs_handle_unknown): Likewise.
1674 (elf_backend_section_from_shdr): Likewise.
1676 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1679 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1680 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1681 and the destination is a Thumb symbol.
1683 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1685 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1686 initializer to silence GCC 4.2.
1687 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1689 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1691 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1692 (LAZY_PLT_ENTRY_SIZE): This.
1693 (NON_LAZY_PLT_ENTRY_SIZE): New.
1694 (elf_x86_64_plt0_entry): Renamed to ...
1695 (elf_x86_64_lazy_plt0_entry): This.
1696 (elf_x86_64_plt_entry): Renamed to ...
1697 (elf_x86_64_lazy_plt_entry): This.
1698 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1699 (elf_x86_64_lazy_bnd_plt0_entry): This.
1700 (elf_x86_64_legacy_plt_entry): Removed.
1701 (elf_x86_64_bnd_plt_entry): Renamed to ...
1702 (elf_x86_64_lazy_bnd_plt_entry): This.
1703 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1704 (elf_x86_64_non_lazy_plt_entry): This.
1705 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1706 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1707 (elf_x86_64_eh_frame_plt): Renamed to ...
1708 (elf_x86_64_eh_frame_lazy_plt): This.
1709 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1710 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1711 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1712 (elf_x86_64_eh_frame_non_lazy_plt): This.
1713 (elf_x86_64_lazy_plt_layout): New.
1714 (elf_x86_64_non_lazy_plt_layout): Likewise.
1715 (elf_x86_64_plt_layout): Likewise.
1716 (elf_x86_64_backend_data): Remove PLT layout information. Add
1717 os for target system.
1718 (GET_PLT_ENTRY_SIZE): Removed.
1719 (elf_x86_64_lazy_plt): New.
1720 (elf_x86_64_non_lazy_plt): Likewise.
1721 (elf_x86_64_lazy_bnd_plt): Likewise.
1722 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1723 (elf_x86-64_arch_bed): Updated.
1724 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1725 (elf_x86_64_create_dynamic_sections): Removed.
1726 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1727 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1728 (elf_x86-64_adjust_dynamic_symbol): Updated.
1729 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1730 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1731 size for PLT0 if there is no PLT0. Get plt_entry_size from
1732 non_lazy_plt for non-lazy PLT entries.
1733 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1734 from non_lazy_plt for non-lazy PLT entries.
1735 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1736 if there is no PLT0.
1737 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1738 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1739 entries with non-lazy PLT layout. Don't fill the second and third
1740 slots in the PLT entry if there is no PLT0.
1741 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1742 if there is no PLT0. Set sh_entsize on the .plt.got section.
1743 (compare_relocs): New.
1744 (elf_x86_64_plt_type): Likewise.
1745 (elf_x86_64_plt): Likewise.
1746 (elf_x86_64_nacl_plt): New. Forward declaration.
1747 (elf_x86_64_get_plt_sym_val): Removed.
1748 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1749 against all dynamic relocations.
1750 (elf_x86_64_link_setup_gnu_properties): New function.
1751 (elf_backend_create_dynamic_sections): Updated.
1752 (elf_backend_setup_gnu_properties): New.
1753 (elf_x86_64_nacl_plt): New.
1754 (elf_x86_64_nacl_arch_bed): Updated.
1756 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1758 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1759 (LAZY_PLT_ENTRY_SIZE): This.
1760 (NON_LAZY_PLT_ENTRY_SIZE): New.
1761 (elf_i386_plt0_entry): Renamed to ...
1762 (elf_i386_lazy_plt0_entry): This.
1763 (elf_i386_plt_entry): Renamed to ...
1764 (elf_i386_lazy_plt_entry): This.
1765 (elf_i386_pic_plt0_entry): Renamed to ...
1766 (elf_i386_pic_lazy_plt0_entry): This.
1767 (elf_i386_pic_plt_entry): Renamed to ...
1768 (elf_i386_pic_lazy_plt_entry): This.
1769 (elf_i386_got_plt_entry): Renamed to ...
1770 (elf_i386_non_lazy_plt_entry): This.
1771 (elf_i386_pic_got_plt_entry): Renamed to ...
1772 (elf_i386_pic_non_lazy_plt_entry): This.
1773 (elf_i386_eh_frame_plt): Renamed to ...
1774 (elf_i386_eh_frame_lazy_plt): This.
1775 (elf_i386_eh_frame_plt_got): Renamed to ...
1776 (elf_i386_eh_frame_non_lazy_plt): This.
1777 (elf_i386_plt_layout): Renamed to ...
1778 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1779 eh_frame_plt_got_size.
1780 (elf_i386_non_lazy_plt_layout): New.
1781 (elf_i386_plt_layout): Likewise.
1782 (elf_i386_non_lazy_plt): Likewise.
1783 (GET_PLT_ENTRY_SIZE): Removed.
1784 (elf_i386_plt): Renamed to ...
1785 (elf_i386_lazy_plt): This.
1786 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1787 (elf_i386_arch_bed): Updated.
1788 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1789 (elf_i386_create_dynamic_sections): Removed.
1790 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1791 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1792 (elf_i386_adjust_dynamic_symbol): Updated.
1793 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1794 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1795 size for PLT0 if there is no PLT0.
1796 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1797 output section is discarded only if GOT isn't empty.
1798 (elf_i386_relocate_section): Updated. Properly get PLT index
1799 if there is no PLT0.
1800 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1801 second and third slots in the PLT entry if there is no PLT0.
1802 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1803 if there is no PLT0. Set sh_entsize on the .plt.got section.
1804 (elf_i386_nacl_plt): Forward declaration.
1805 (elf_i386_get_plt_sym_val): Removed.
1806 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1807 against all dynamic relocations.
1808 (elf_i386_link_setup_gnu_properties): New function.
1809 (elf_backend_create_dynamic_sections): Updated.
1810 (elf_backend_setup_gnu_properties): New.
1811 (elf_i386_nacl_plt): Updated.
1812 (elf_i386_nacl_arch_bed): Likewise.
1813 (elf_i386_vxworks_arch_bed): Likewise.
1815 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1817 * elflink.c (elf_output_implib): Remove executable flag from import
1819 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1820 library is a relocatable object file.
1822 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1825 * elf32-avr.c (avr_should_move_sym): New function.
1826 (avr_should_reduce_sym_size): Likewise.
1827 (avr_should_increase_sym_size): Likewise.
1828 (elf32_avr_relax_delete_bytes): Adjust symbol values
1829 and sizes by calling new functions.
1831 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1833 * config.bfd (riscv32-*): Enable rv64.
1835 2017-05-02 Alan Modra <amodra@gmail.com>
1838 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1839 rather than h->root.type == bfd_link_hash_new.
1840 (bfd_elf_record_link_assignment): Similarly, call
1841 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1843 2017-04-29 Alan Modra <amodra@gmail.com>
1846 * reloc.c (reloc_offset_in_range): New function.
1847 (bfd_perform_relocation, bfd_install_relocation): Use it.
1848 (_bfd_final_link_relocate): Likewise.
1850 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1852 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1853 before using .plt.got.
1854 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1856 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1858 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1859 instead of "+=" to update 0.
1861 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1863 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1864 .plt.got section here.
1865 (elf_i386_check_relocs): Don't create the .plt.got section.
1866 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1867 the .plt.got and .plt.bnd sections here.
1868 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1871 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1873 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1875 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1876 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1877 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1878 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1881 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1883 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1885 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1886 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1887 the first relocatable ELF input with GNU properties.
1889 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1891 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1892 VxWorks for non-PIC.
1894 2017-04-27 Alan Modra <amodra@gmail.com>
1896 * elf-bfd.h (struct elf_backend_data): Make asection param of
1897 elf_backend_eh_frame_address_size const.
1898 (_bfd_elf_eh_frame_address_size): Likewise.
1899 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1900 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1901 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1902 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1903 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1904 (next_cie_fde_offset): Constify params.
1905 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1907 2017-04-27 Alan Modra <amodra@gmail.com>
1909 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1910 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1911 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1913 (offset_adjust): New function.
1914 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1915 (adjust_eh_frame_local_symbols): Likewise.
1916 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1917 after changing anything. Return true if anything changed.
1918 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1919 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1921 2017-04-27 Alan Modra <amodra@gmail.com>
1923 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1926 2017-04-27 Alan Modra <amodra@gmail.com>
1928 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1929 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1930 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1931 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1932 for undef and undefweak dyn_relocs.
1933 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1934 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1935 (allocate_got, allocate_dynrelocs): Likewise.
1936 (ppc64_elf_relocate_section): Likewise.
1938 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1940 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1941 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1942 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1943 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1945 2017-04-26 Nick Clifton <nickc@redhat.com>
1948 * reloc.c (bfd_perform_relocation): Check for a negative address
1951 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1954 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1956 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1957 (elf_backend_always_renumber_dynsyms): Define.
1958 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1959 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1960 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1961 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1963 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1965 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1967 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1968 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1969 sections have been created.
1971 2017-04-26 Nick Clifton <nickc@redhat.com>
1974 * compress.c (bfd_init_section_compress_status): Check the return
1975 value from bfd_malloc.
1977 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1979 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1980 no_finish_dynamic_symbol.
1981 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1983 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1984 weak symbol, don't make it dynamic.
1985 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1986 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1987 relocation for GOT reference.
1988 (elf_x86_64_finish_dynamic_symbol): Abort if
1989 no_finish_dynamic_symbol isn't 0.
1991 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1994 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1995 undefined weak symbol, don't make it dynamic.
1996 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1997 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1998 relocation for R_386_GOT32.
2000 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2003 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2005 2017-04-23 Alan Modra <amodra@gmail.com>
2008 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2009 * elf.c (lcomm_sym): New.
2010 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2011 * bfd-in2.h: Regenerate.
2013 2017-04-23 Alan Modra <amodra@gmail.com>
2016 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2017 parameters and comment.
2018 (_bfd_elf_get_reloc_section): Delete.
2019 (_bfd_elf_plt_get_reloc_section): Declare.
2020 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2021 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2023 (_bfd_elf_get_reloc_section): ..here. Delete.
2024 (assign_section_numbers): Call elf_get_reloc_section.
2025 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2026 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2028 2017-04-23 Alan Modra <amodra@gmail.com>
2031 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2034 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2037 * elf32-i386.c (elf_i386_link_hash_entry): Add
2038 no_finish_dynamic_symbol.
2039 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2040 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2041 symbol, don't make it dynamic in PIE.
2042 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2043 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2044 relocation for R_386_GOT32
2045 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2048 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2052 * elflink.c (elf_link_add_object_symbols): Require
2053 --no-dynamic-linker with -E/--dynamic-list when creating
2056 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2058 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2061 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2063 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2064 dynamic symbol sorting.
2066 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2069 * elflink.c (elf_link_add_object_symbols): Preserve
2070 dynamic_ref_after_ir_def when restoring the symbol table for
2071 unneeded dynamic object.
2073 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2076 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2077 on on undefined IFUNC symbol in the second PLT.
2079 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2081 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2083 2017-04-19 Alan Modra <amodra@gmail.com>
2085 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2086 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2087 * elf32-ppc.c:Formatting.
2088 (ensure_undefweak_dynamic): Don't make dynamic when
2089 info->dynamic_undefined_weak is zero.
2090 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2091 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2092 not default visibility. Discard undef and undefweak
2094 (ppc_elf_relocate_section): Adjust to suit.
2095 * elf64-ppc.c: Formatting.
2096 (ensure_undefweak_dynamic): Don't make dynamic when
2097 info->dynamic_undefined_weak is zero.
2098 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2099 info->dynamic_undefined_weak. Discard them earlier.
2101 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2104 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2105 before generating the version definition section.
2107 2017-04-17 Alan Modra <amodra@gmail.com>
2109 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2110 state when a regular object file defines a symbol with
2111 incompatible type to that defined by an earlier shared lib.
2113 2017-04-13 Alan Modra <amodra@gmail.com>
2115 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2117 * elf32-arm.c: Likewise.
2118 * elf32-i386.c: Likewise.
2119 * elf32-mep.c: Likewise.
2120 * elf64-ia64-vms.c: Likewise.
2121 * elf64-x86-64.c: Likewise.
2122 * elflink.c: Likewise.
2123 * elfnn-ia64.c: Likewise.
2124 * elfxx-mips.c: Likewise.
2126 2017-04-13 Alan Modra <amodra@gmail.com>
2128 * aoutx.h: Use %B and %A in error messages throughout file.
2129 * aout-cris.c: Likewise.
2130 * archive.c: Likewise.
2131 * binary.c: Likewise.
2132 * coff-rs6000.c: Likewise.
2133 * coff-tic4x.c: Likewise.
2134 * coffcode.h: Likewise.
2135 * coffgen.c: Likewise.
2136 * cofflink.c: Likewise.
2137 * coffswap.h: Likewise.
2138 * cpu-arm.c: Likewise.
2139 * elf-eh-frame.c: Likewise.
2140 * elf-m10300.c: Likewise.
2142 * elf32-arc.c: Likewise.
2143 * elf32-arm.c: Likewise.
2144 * elf32-bfin.c: Likewise.
2145 * elf32-frv.c: Likewise.
2146 * elf32-iq2000.c: Likewise.
2147 * elf32-m32c.c: Likewise.
2148 * elf32-microblaze.c: Likewise.
2149 * elf32-nds32.c: Likewise.
2150 * elf32-rl78.c: Likewise.
2151 * elf32-rx.c: Likewise.
2152 * elf32-score.c: Likewise.
2153 * elf32-score7.c: Likewise.
2154 * elf32-sh64.c: Likewise.
2155 * elf32-v850.c: Likewise.
2156 * elf32-vax.c: Likewise.
2157 * elf32-visium.c: Likewise.
2158 * elf64-ia64-vms.c: Likewise.
2159 * elf64-mmix.c: Likewise.
2160 * elf64-sh64.c: Likewise.
2161 * elfcode.h: Likewise.
2162 * elfnn-aarch64.c: Likewise.
2163 * elfnn-ia64.c: Likewise.
2164 * elfxx-mips.c: Likewise.
2165 * hpux-core.c: Likewise.
2168 * linker.c: Likewise.
2169 * merge.c: Likewise.
2171 * oasys.c: Likewise.
2172 * pdp11.c: Likewise.
2173 * peXXigen.c: Likewise.
2174 * rs6000-core.c: Likewise.
2175 * vms-alpha.c: Likewise.
2176 * xcofflink.c: Likewise.
2178 2017-04-13 Alan Modra <amodra@gmail.com>
2180 * bfd.c (PRINT_TYPE): Define.
2181 (_doprnt): New function.
2182 (error_handler_internal): Use _doprnt.
2183 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2184 calls in their natural order, throughout file.
2185 * coff-mcore.c: Likewise.
2186 * coff-ppc.c: Likewise.
2187 * coff-tic80.c: Likewise.
2188 * cofflink.c: Likewise.
2189 * elf-s390-common.c: Likewise.
2191 * elf32-arm.c: Likewise.
2192 * elf32-i386.c: Likewise.
2193 * elf32-m32r.c: Likewise.
2194 * elf32-msp430.c: Likewise.
2195 * elf32-spu.c: Likewise.
2196 * elf64-ia64-vms.c: Likewise.
2197 * elf64-sparc.c: Likewise.
2198 * elf64-x86-64.c: Likewise.
2199 * elflink.c: Likewise.
2200 * elfnn-aarch64.c: Likewise.
2201 * elfnn-ia64.c: Likewise.
2202 * elfxx-mips.c: Likewise.
2204 2017-04-13 Alan Modra <amodra@gmail.com>
2206 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2207 branch veneers" error. Fix double space and format message.
2208 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2209 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2211 2017-04-13 Alan Modra <amodra@gmail.com>
2213 * bfd-in2.h: Regenerate.
2215 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2217 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2218 extra `\n' in warning/error messages.
2219 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2220 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2222 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2224 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2225 processor-specific properties with generic ELF target vector.
2227 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2229 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2230 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2231 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2232 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2234 (link_hash_newfunc): Initialize has_got_reloc and
2236 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2238 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2240 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2242 (_bfd_sparc_elf_fixup_symbol): New function.
2243 (allocate_dynrelocs): Don't allocate space for dynamic
2244 relocations and discard relocations against resolved undefined
2245 weak symbols in executable. Don't make resolved undefined weak
2246 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2247 relocation against undefined weak symbols in PIE.
2248 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2249 relocations against resolved undefined weak symbols in PIE
2250 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2251 without ynamic PLT/GOT relocations for resolved undefined weak
2253 Don't generate dynamic relocation against resolved undefined
2254 weak symbol in executable.
2255 (pie_finish_undefweak_symbol): New function.
2256 (_bfd_sparc_elf_finish_dynamic_sections): Call
2257 pie_finish_undefweak_symbol on all symbols in PIE.
2258 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2259 (_bfd_sparc_elf_fixup_symbol): New function.
2261 2017-04-10 Nick Clifton <nickc@redhat.com>
2263 * config.bfd: Remove ns32k from obsolete list.
2265 2017-04-10 Alan Modra <amodra@gmail.com>
2268 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2269 (special_sections_i): Likewise for .init_array.
2270 (special_sections_p): Likewise for .preinit_array.
2272 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2276 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2277 ELF_COMMON_DEF_P for common symbols.
2278 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2279 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2280 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2281 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2282 07492f668d2173da7a2bda3707ff0985e0f460b6.
2284 2017-04-07 Pedro Alves <palves@redhat.com>
2286 * opncls.c (bfd_get_debug_link_info): Rename to...
2287 (bfd_get_debug_link_info_1): ... this. Change type of second
2288 parameter to void pointer. Adjust.
2289 (bfd_get_debug_link_info): Reimplement on top of
2290 bfd_get_debug_link_info_1.
2291 (separate_debug_file_exists, separate_alt_debug_file_exists):
2292 Change type of second parameter to void pointer. Adjust.
2293 (get_func_type, check_func_type): Change type of second parameter
2295 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2296 the callback functions instead of passing the address of a local.
2297 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2298 find_separate_debug_file.
2299 (get_alt_debug_link_info_shim): Change type of second parameter to
2300 void pointer. Adjust.
2301 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2302 find_separate_debug_file.
2303 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2304 of second parameter to void pointer. Adjust.
2305 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2306 pointer local to find_separate_debug_file.
2308 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2310 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2311 external symbols with a definition.
2312 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2314 2017-04-07 Alan Modra <amodra@gmail.com>
2316 * po/SRC-POTFILES.in: Regenerate.
2318 2017-04-05 Alan Modra <amodra@gmail.com>
2320 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2323 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2325 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2326 numbers for DataDirectory entry indicies passed to
2329 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2331 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2332 each GNU_MBIND section and align GNU_MBIND section to page size.
2333 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2334 segment for each GNU_MBIND section.
2335 (_bfd_elf_init_private_section_data): Copy sh_info from input
2336 for GNU_MBIND section.
2338 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2340 * elfnn-riscv.c (GP_NAME): Delete.
2341 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2342 (_bfd_riscv_relax_lui): Likewise.
2344 2017-04-04 Nick Clifton <nickc@redhat.com>
2347 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2349 (bfd_elf_final_link): Only initialize the extended symbol index
2350 section if there are extended symbol tables to list.
2352 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2354 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2355 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2356 * configure.ac (elf): Add elf-properties.lo.
2357 * Makefile.in: Regenerated.
2358 * configure: Likewise.
2359 * elf-bfd.h (elf_property_kind): New.
2360 (elf_property): Likewise.
2361 (elf_property_list): Likewise.
2362 (elf_properties): Likewise.
2363 (_bfd_elf_parse_gnu_properties): Likewise.
2364 (_bfd_elf_get_property): Likewise.
2365 (_bfd_elf_link_setup_gnu_properties): Likewise.
2366 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2367 and setup_gnu_properties.
2368 (elf_obj_tdata): Add properties.
2369 * elf-properties.c: New file.
2370 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2371 (elf_i386_merge_gnu_properties): Likewise.
2372 (elf_backend_parse_gnu_properties): Likewise.
2373 (elf_backend_merge_gnu_properties): Likewise.
2374 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2375 (elf_x86_64_merge_gnu_properties): Likewise.
2376 (elf_backend_parse_gnu_properties): Likewise.
2377 (elf_backend_merge_gnu_properties): Likewise.
2378 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2379 (elf_backend_parse_gnu_properties): Likewise.
2380 (elf_backend_setup_gnu_properties): Likewise.
2381 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2382 elf_backend_merge_gnu_properties and
2383 elf_backend_setup_gnu_properties.
2385 2017-03-30 Pip Cet <pipcet@gmail.com>
2387 * elf32-wasm32.c: Add relocation code, two relocs.
2388 * reloc.c: Add wasm32 relocations.
2389 * libbfd.h: Regenerate.
2390 * bfd-in2.h: Regenerate.
2391 * bfd/po/bfd.pot: Regenerate.
2393 2017-03-29 Nick Clifton <nickc@redhat.com>
2396 * coff-bfd.h (struct coff_section_data): Add new fields:
2397 saved_bias and bias.
2398 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2399 computed for PE binaries.
2400 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2403 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
2406 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2407 to handle a local symbol with a hash-symbol-entry; without PLT.
2408 Add BFD_ASSERT for an incidental case with GOT entry present.
2409 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2410 isn't forced-or-set local.
2412 2017-03-27 Pip Cet <pipcet@gmail.com>
2414 * wasm-module.c: New file to support WebAssembly modules.
2415 * wasm-module.h: New file to support WebAssembly modules.
2416 * doc/webassembly.texi: Start documenting wasm-module.c.
2417 * config.bfd: Add wasm_vec.
2418 * targets.c: Likewise.
2419 * configure.ac: Likewise.
2420 * Makefile.am: Add entries for wasm-module.c.
2421 * Makefile.in: Regenerate.
2422 * configure: Regenerate.
2423 * po/SRC-POTFILES.in: Regenerate.
2425 2017-03-27 Pip Cet <pipcet@gmail.com>
2427 * cpu-wasm32.c: New file to support wasm32 architecture.
2428 * elf32-wasm32.c: New file to support wasm32 architecture.
2429 * Makefile.am: Add wasm32 architecture.
2430 * archures.c: Likewise.
2431 * config.bfd: Likewise.
2432 * configure.ac: Likewise.
2433 * targets.c: Likewise.
2434 * Makefile.in: Regenerate.
2435 * bfd-in2.h: Regenerate.
2436 * configure: Regenerate.
2437 * po/SRC-POTFILES.in: Regenerate.
2439 2017-03-20 Alan Modra <amodra@gmail.com>
2442 * elf64-ppc.c (compare_symbols): Stabilize sort.
2444 2017-03-18 Alan Modra <amodra@gmail.com>
2446 * elf64-ppc.c (struct ppc_link_hash_table): Add
2447 local_ifunc_resolver and maybe_local_ifunc_resolver.
2448 (ppc_build_one_stub): Set flags on emitting dynamic
2449 relocation to ifunc.
2450 (ppc64_elf_relocate_section): Likewise.
2451 (ppc64_elf_finish_dynamic_symbol): Likewise.
2452 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2453 local dynamic relocs to ifuncs.
2454 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2455 local_ifunc_resolver and maybe_local_ifunc_resolver.
2456 (ppc_elf_relocate_section): Set flag on emitting dynamic
2457 relocation to ifuncs.
2458 (ppc_elf_finish_dynamic_symbol): Likewise.
2459 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2460 dynamic relocs to ifuncs.
2462 2017-03-13 Nick Clifton <nickc@redhat.com>
2465 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2466 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2467 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2468 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2469 * bfd-in2.h: Regenerate.
2470 * libbfd.h: Regenerate.
2471 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2473 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2474 (elfNN_aarch64_howto_table): Likewise.
2475 (aarch64_tls_transition_without_check): Likewise.
2476 (aarch64_reloc_got_type): Likewise.
2477 (elfNN_aarch64_final_link_relocate): Likewise.
2478 (elfNN_aarch64_tls_relax): Likewise.
2479 (elfNN_aarch64_relocate_section): Likewise.
2480 (elfNN_aarch64_gc_sweep_hook): Likewise.
2481 (elfNN_aarch64_check_relocs): Likewise.
2482 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2483 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2485 2017-03-11 Alan Modra <amodra@gmail.com>
2487 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2488 parameter is in fact used. Whitespace fixes.
2489 * elf64-ppc.c: Likewise.
2491 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2493 * rs6000-core.c (CORE_NEW): Simplify macro when
2494 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2496 2017-03-07 Alan Modra <amodra@gmail.com>
2500 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2503 2017-03-05 Alan Modra <amodra@gmail.com>
2505 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2506 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2507 (next_cie_fde_offset): New function.
2508 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2509 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2510 four bytes. Align CIEs to four or eight bytes depending on
2511 per_encoding_aligned8. Align FDEs according to their encoding.
2512 Pad last FDE to output section alignment.
2513 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2515 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2516 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2517 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2519 2017-03-02 Martin Bickel <binutils@ineranves.de>
2522 * elf.c (rewrite_elf_program_header): Do not issue a warning for
2523 empty segments which have a zero filesz, but a non-zero memsz.
2525 2017-03-02 Alan Modra <amodra@gmail.com>
2527 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2529 2017-02-28 Alan Modra <amodra@gmail.com>
2531 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2532 (ppc64_elf_relocate_section): Likewise.
2534 2017-02-28 Alan Modra <amodra@gmail.com>
2537 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2538 rather than elf32_nios2_hash_table or elf_hash_table.
2539 (create_got_section): Likewise.
2540 (nios2_elf32_finish_dynamic_symbol): Likewise.
2541 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2542 (nios2_elf32_size_dynamic_sections): Likewise.
2543 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2544 vars. Use htab equivalents directly instead. Don't create
2545 all dynamic sections on needing just the GOT. Use a goto
2546 rather than a fall-through with reloc test. Ensure
2547 htab->dynobj is set when making dynamic sreloc section.
2548 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2549 equivalent directly instead. Don't segfault on looking for
2550 .dynamic when dynamic sections have not been created. Don't
2551 segfault on .got.plt being discarded.
2552 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2553 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2554 fixme and another not so relevant comment.
2555 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2556 already set, set hash table dynobj on creating .sbss.
2558 2017-02-28 Alan Modra <amodra@gmail.com>
2560 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2561 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2562 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2563 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2564 (ppc64_elf_relocate_section): Likewise.
2565 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2566 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2567 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2568 * libbfd.h: Regenerate.
2569 * bfd-in2.h: Regenerate.
2571 2017-02-28 Alan Modra <amodra@gmail.com>
2573 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2574 dynamic .data.rel.ro read-only.
2575 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2576 rather than section flags when deciding where copy reloc goes.
2577 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2578 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2579 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2580 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2581 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2582 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2583 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2584 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2585 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2586 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2587 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2588 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2589 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2590 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2591 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2592 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2593 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2594 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2595 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2597 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2599 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2600 `jalr $0, $25' instruction encoding.
2602 2017-02-27 Nick Clifton <nickc@redhat.com>
2605 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2606 generating a seg-fault when encountering a symbol that has been
2607 deleted by garbage collection.
2609 2017-02-25 Alan Modra <amodra@gmail.com>
2611 * elf32-arc.c (struct dynamic_sections): Delete.
2612 (enum dyn_section_types): Delete.
2613 (dyn_section_names): Delete.
2614 (arc_create_dynamic_sections): Delete.
2615 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2616 segfault on discarded .rela.plt section.
2617 (elf_arc_size_dynamic_sections): Formatting. Don't call
2618 arc_create_dynamic_sections. Don't allocate memory for sections
2619 handled by the generic linker. Correct code finding relocs in
2620 read-only sections. Set SEC_EXCLUDE on zero size .got,
2621 .got.plt, and .dynbss sections. Do set .interp for pies.
2623 2017-02-24 Andrew Waterman <andrew@sifive.com>
2625 * elfnn-riscv.c (GP_NAME): New macro.
2626 (riscv_global_pointer_value): Use it.
2627 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2628 output section, consider only that section's alignment.
2630 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2632 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
2633 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
2634 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
2635 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
2637 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2639 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
2640 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
2643 2017-02-23 Alan Modra <amodra@gmail.com>
2646 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2648 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2649 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2652 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2655 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2656 processing ahead of the call to `elf_gc_sweep_symbol'.
2658 2017-02-22 Nick Clifton <nickc@redhat.com>
2661 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2662 created section 4-byte alignment.
2664 2017-02-22 Alan Modra <amodra@gmail.com>
2666 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2667 on .got or .plt output section being discarded by script.
2668 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2671 2017-02-21 Alan Modra <amodra@gmail.com>
2673 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2674 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2676 2017-02-20 Alan Modra <amodra@gmail.com>
2679 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2680 if DT_RELSZ/DT_RELASZ is zero.
2682 2017-02-17 Nick Clifton <nickc@redhat.com>
2684 * compress.c (bfd_get_full_section_contents): Remember to reduce
2685 compressed size by the sizeof the compression header when
2686 decompressing the contents.
2688 2017-02-17 Pedro Alves <palves@redhat.com>
2690 * srec.c (Chunk): Rename to ...
2691 (_bfd_srec_len): ... this.
2692 (S3Forced): Rename to ...
2693 (_bfd_srec_forceS3): ... this.
2694 * objcopy.c: Adjust all references.
2696 2017-02-17 Pedro Alves <palves@redhat.com>
2698 * archive.c (bsd_write_armap): Rename to ...
2699 (_bfd_bsd_write_armap): ... this.
2700 (coff_write_armap): Rename to ...
2701 (_bfd_coff_write_armap): ... this.
2702 * libbfd-in.h (bsd_write_armap): Rename to ...
2703 (_bfd_bsd_write_armap): ... this.
2704 (coff_write_armap): Rename to ...
2705 (_bfd_coff_write_armap): ... this.
2706 * aout-target.h, aout-tic30.c: Adjust all users.
2707 * libbfd.h: Regenerate.
2709 2017-02-17 Pedro Alves <palves@redhat.com>
2711 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2712 (warn_deprecated): Rename to ...
2713 (_bfd_warn_deprecated): ... this.
2714 * libbfd.c (warn_deprecated): Rename to ...
2715 (_bfd_warn_deprecated): ... this.
2716 * bfd-in2.h: Regenerate.
2718 2017-02-17 Pedro Alves <palves@redhat.com>
2720 * bfdio.c (real_ftell): Rename to ...
2721 (_bfd_real_ftell): ... this.
2722 (real_fseek): Rename to ...
2723 (_bfd_real_fseek): ... this.
2724 (real_fopen): Rename to ...
2725 (_bfd_real_fopen): ... this.
2726 * libbfd-in.h (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 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2733 * libbfd.h: Regenerate.
2735 2017-02-17 Pedro Alves <palves@redhat.com>
2737 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2738 * libbfd.c (read_unsigned_leb128): Rename to ...
2739 (_bfd_read_unsigned_leb128): ... this.
2740 (read_signed_leb128): Rename to ...
2741 (_bfd_read_signed_leb128): ... this.
2742 (safe_read_leb128): Rename to ...
2743 (_bfd_safe_read_leb128): ... this.
2744 * libbfd-in.h (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.h: Renegerate.
2752 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2754 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2755 before trying to fine matching file and line information.
2757 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2759 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2760 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2761 not match current bfd, then reload debug information. Record bfd
2762 we're loading debug info for in the stash. If we have debug
2763 informatin in the cache then perform section placement before
2766 2017-02-16 Alan Modra <amodra@gmail.com>
2769 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2770 * elfxx-target.h (elf_backend_no_page_alias): Define.
2771 (elfNN_bed): Init new field.
2772 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2773 ensure PT_LOAD segment starts on a new page.
2774 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2776 2017-02-16 Alan Modra <amodra@gmail.com>
2779 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2782 2017-02-16 Jiong Wang <jiong.wang@arm.com>
2784 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2785 * bfd-in2.h: Regenerated.
2787 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2790 * elf32-i386.c (elf_i386_relocate_section): Allow
2791 "lea foo@GOT, %reg" in PIC.
2793 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2796 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2797 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2798 error against local IFUNC symbol without a base register for
2801 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2803 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2804 `%P: %H:' with `info->callbacks->einfo'.
2805 (ppc_elf_relocate_section): Likewise.
2806 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2807 (ppc64_elf_edit_toc): Likewise.
2808 (ppc64_elf_relocate_section): Likewise.
2810 2017-02-14 Alan Modra <amodra@gmail.com>
2812 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2813 --gc-keep-exported, and test versioned field of sym rather than
2814 looking for @ in name.
2816 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2818 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2821 2017-02-13 Nick Clifton <nickc@redhat.com>
2824 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2827 2017-02-07 Andrew Waterman <andrew@sifive.com>
2829 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2830 entry size if PLT header is written.
2832 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2834 Fix sparc64 dynamic relocation processing to use the dynamic
2836 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2837 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2840 2017-02-03 Nick Clifton <nickc@redhat.com>
2843 * coffcode.h (coff_write_object_contents): Enlarge size of
2844 s_name_buf in order to avoid compile time warning about possible
2846 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2847 32-bits of insn value before printing into buffer.
2849 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2851 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2852 `max_local_dynindx'.
2853 (mips_elf_sort_hash_table): Handle it.
2854 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2855 symbols bump up `max_local_dynindx' rather than
2856 `max_non_got_dynindx'.
2858 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2860 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2861 `min_got_dynindx', `max_unref_got_dynindx' and
2862 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2863 (mips_elf_sort_hash_table): Adjust accordingly.
2865 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2867 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2868 to access the hash table.
2870 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2872 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2873 non-NULL `htab' to the beginning.
2875 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2877 * elflink.c (elf_gc_sweep): Wrap overlong line.
2879 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2881 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2882 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2883 * elfxx-mips.c (mips_elf_link_hash_table): Add
2884 `ignore_branch_isa' member.
2885 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2886 in branch relocation calculation as an error if
2887 `ignore_branch_isa' has been set.
2888 (_bfd_mips_elf_insn32): Rename to...
2889 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2890 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2891 Handle the new parameter.
2893 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2895 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2896 local variable dynobj.
2899 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2900 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2901 executable from read-only sections into sdynrelro.
2902 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2903 dynamic relocs in sdynrelro.
2904 (elf_backend_want_dynrelro): Define.
2906 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2908 * config.bfd (*-*-rtemsaout*): Mark as removed.
2910 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2912 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2913 (arm-*-rtems*): Move to (arm*-*-eabi*).
2914 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2915 (m68-*-rtems*): Move to (m68*-*-elf*).
2917 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2919 * config.bfd (*-*-rtemscoff*): Mark as removed.
2921 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2924 * elflink.c (bfd_elf_record_link_assignment): Revert last
2925 change and don't ever clear `forced_local'. Set `mark'
2927 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2929 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2930 (bfd_elf_size_dynamic_sections): ... here.
2931 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2932 and set `mark' instead in `__tls_get_addr_opt' processing.
2933 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2935 2017-01-24 Alan Modra <amodra@gmail.com>
2937 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2938 where dynamic relocs are preferable. Allow ifunc too.
2939 (ensure_undefweak_dynamic): New function.
2940 (allocate_dynrelocs): Use it here. Move plt handling last and
2941 don't make symbols dynamic, simplifying loop. Only make undef
2942 weak symbols with GOT entries dynamic. Correct condition
2943 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2944 comments. Remove goto.
2945 (ppc_elf_relocate_section): Correct test for using dynamic
2946 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2947 to suit. Set up explicit tls_index entries and implicit GOT
2948 tls_index entries resolvable at link time for
2949 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2950 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2951 (ensure_undefweak_dynamic): New function.
2952 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2953 with GOT entries dynamic. Remove unnecessary test of
2954 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2955 (ppc64_elf_relocate_section): Correct test for using dynamic
2956 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2957 to suit. Set up explicit tls_index entries and implicit GOT
2958 tls_index entries resolvable at link time for __tls_get_addr_opt.
2959 Simplify expression to clear mem for prelink.
2961 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2963 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2965 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2967 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2968 (elf_backend_hash_symbol): Define.
2970 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2973 * elflink.c (bfd_elf_record_link_assignment): Clear any
2974 `forced_local' marking for DSO symbols that are not being
2977 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2979 * elfnn-riscv.c (riscv_elf_object_p): New function.
2981 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2984 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2986 (elf_x86_64_check_relocs): Create .eh_frame section for the
2988 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2989 .eh_frame section for the .plt.bnd section.
2990 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2991 for the .plt.bnd section.
2993 2017-01-12 Nick Clifton <nickc@redhat.com>
2996 * opncls.c (find_separate_debug_file): Add include_dirs
2997 parameter. Only include the directory part of the bfd's filename
2998 in search paths if include_dirs is true. Add a couple of extra
2999 locations for looking for debug files.
3000 ( bfd_follow_gnu_debuglink): Update invocation of
3001 find_separate_debug_file.
3002 (bfd_follow_gnu_debugaltlink): Likewise.
3003 (get_build_id): New function: Finds the build-id of the given bfd.
3004 (get_build_id_name): New function: Computes the name of the
3005 separate debug info file for a bfd, based upon its build-id.
3006 (check_build_id_file): New function: Checks to see if a separate
3007 debug info file exists at the given location, and that its
3008 build-id matches that of the original bfd.
3009 (bfd_follow_build_id_debuglink): New function: Finds a separate
3010 debug info file for a given bfd by using the build-id method.
3011 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3012 method of locating a separate debug info file before using the
3014 * bfd-in2.h: Regenerate.
3016 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3019 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3020 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3021 elf_x86_64_eh_frame_plt_got.
3022 (elf_x86_64_size_dynamic_sections): Get unwind info from
3023 elf_x86_64_bnd_arch_bed for the BND PLT.
3025 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3027 * config.bfd: Add entries for i686-redox and x86_64-redox.
3029 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3031 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3033 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3034 .eh_frame section to 4 bytes for x32.
3035 (elf_x86_64_check_relocs): Likewise.
3037 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3040 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3041 (PLT_GOT_FDE_LENGTH): Likewise.
3042 (elf_i386_plt_layout): Add eh_frame_plt_got and
3043 eh_frame_plt_got_size.
3044 (elf_i386_plt): Updated.
3045 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3046 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3047 (elf_i386_size_dynamic_sections): Allocate and initialize
3048 .eh_frame section for .plt.got.
3049 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3051 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3052 eh_frame_plt_got_size.
3053 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3054 (PLT_GOT_FDE_LENGTH): Likewise.
3055 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3056 eh_frame_plt_got_size.
3057 (elf_x86_64_arch_bed): Updated.
3058 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3059 eh_frame_plt_got_size.
3060 (elf_x86_64_nacl_arch_bed): Likewise.
3061 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3062 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3063 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3064 .eh_frame section for .plt.got.
3065 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3068 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3070 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3071 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3073 2017-01-09 Nick Clifton <nickc@redhat.com>
3075 * dwarf2.c (lookup_address_in_function_table): Return early if
3076 there are no functions in the given comp unit, or if the high
3077 address of the last function in the comp unit is less than the
3080 2017-01-09 Nick Clifton <nickc@redhat.com>
3083 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3084 message if there are too many symbols to load.
3086 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3088 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3089 if relocs are cached.
3091 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3094 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3095 for R_MICROBLAZE_GOTOFF_64.
3097 2017-01-03 Nick Clifton <nickc@redhat.com>
3099 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3100 warning about using a possibly uninitialised variable.
3102 2017-01-02 Alan Modra <amodra@gmail.com>
3104 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3105 (allocate_plt_static, allocate_dynrelocs): Use it.
3107 2017-01-02 Alan Modra <amodra@gmail.com>
3109 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3110 .PARISC.unwind section.
3112 2017-01-02 Alan Modra <amodra@gmail.com>
3115 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3116 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3117 indirect to GOT pointer relative code edit.
3119 2017-01-02 Alan Modra <amodra@gmail.com>
3121 Update year range in copyright notice of all files.
3123 For older changes see ChangeLog-2016
3125 Copyright (C) 2017 Free Software Foundation, Inc.
3127 Copying and distribution of this file, with or without modification,
3128 are permitted in any medium without royalty provided the copyright
3129 notice and this notice are preserved.
3135 version-control: never