1 2017-06-22 Eric Christopher <echristo@gmail.com>
3 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
4 abs to fix a truncation warning.
6 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
8 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
9 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
10 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
11 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
12 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
13 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
14 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
15 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
17 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
19 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
20 (elf_i386_lazy_ibt_plt_entry): Likewise.
21 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
22 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
23 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
24 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
25 (elf_i386_lazy_plt_layout): Likewise.
26 (elf_i386_non_lazy_plt_layout): Likewise.
27 (elf_i386_link_hash_entry): Add plt_second.
28 (elf_i386_link_hash_table): Add plt_second and
30 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
31 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
32 the second PLT. Check the second PLT.
33 (elf_i386_relocate_section): Use the second PLT to resolve
34 PLT reference if needed.
35 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
37 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
38 second PLT. Generate unwind info for the second PLT.
39 (elf_i386_plt_type): Add plt_second.
40 (elf_i386_get_synthetic_symtab): Support the second PLT.
41 (elf_i386_parse_gnu_properties): Support
42 GNU_PROPERTY_X86_FEATURE_1_AND.
43 (elf_i386_merge_gnu_properties): Support
44 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
45 on GNU_PROPERTY_X86_FEATURE_1_IBT
46 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
47 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
48 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
49 is set on all relocatable inputs.
50 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
51 (elf_x32_lazy_ibt_plt_entry): Likewise.
52 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
53 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
54 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
55 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
56 (elf_x86_64_lazy_ibt_plt): Likewise.
57 (elf_x32_lazy_ibt_plt): Likewise.
58 (elf_x86_64_non_lazy_ibt_plt): Likewise.
59 (elf_x32_non_lazy_ibt_plt): Likewise.
60 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
61 (elf_x86_64_parse_gnu_properties): Support
62 GNU_PROPERTY_X86_FEATURE_1_AND.
63 (elf_x86_64_merge_gnu_properties): Support
64 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
65 on GNU_PROPERTY_X86_FEATURE_1_IBT
66 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
67 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
68 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
69 is set on all relocatable inputs.
71 2017-06-22 Nick Clifton <nickc@redhat.com>
74 * som.c (setup_sections): NUL terminate the space_strings buffer.
75 Check that the space.name field does not index beyond the end of
76 the space_strings buffer.
78 2017-06-21 Nick Clifton <nickc@redhat.com>
81 * coff-sh.c (sh_reloc): Check for an out of range reloc.
83 2017-06-21 Nick Clifton <nickc@redhat.com>
86 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
87 type of the size parameter.
88 (_bfd_vms_save_counted_string): Add second parameter - the maximum
89 length of the counted string.
90 * vms.h (_bfd_vms_save_sized_string): Update prototype.
91 (_bfd_vms_save_counted_string): Likewise.
92 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
93 _bfd_vms_save_counted_string.
94 (_bfd_vms_slurp_ehdr): Likewise.
95 (_bfd_vms_slurp_egsd): Likewise.
96 (Parse_module): Likewise.
98 2017-06-21 Alan Modra <amodra@gmail.com>
100 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
101 calls before tocsave calls.
102 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
105 2017-06-21 Nick Clifton <nickc@redhat.com>
108 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
109 bfd_get_full_section_contents returns no contents.
111 2017-06-21 Nick Clifton <nickc@redhat.com>
114 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
117 2017-06-21 Nick Clifton <nickc@redhat.com>
120 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
122 (image_set_ptr): Likewise.
123 (alpha_vms_fix_sec_rel): Likewise.
124 (alpha_vms_slurp_relocs): Likewise.
126 2017-06-21 Nick Clifton <nickc@redhat.com>
129 * ieee.c (ieee_slurp_sections): Check for a NULL return from
131 (ieee_archive_p): Likewise.
132 (ieee_object_p): Likewise.
134 2017-06-21 Nick Clifton <nickc@redhat.com>
137 * elf.c (setup_group): Zero the group section pointer list after
138 allocation so that loops can be caught. Check for NULL pointers
139 when processing a group list.
141 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
144 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
145 the DYNAMIC bit instead of bfd_count_sections.
147 2017-06-19 Nick Clifton <nickc@redhat.com>
150 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
152 (evax_bfd_print_eeom): Likewise.
153 (evax_bfd_print_egsd): Check for an overlarge record length.
154 (evax_bfd_print_etir): Likewise.
156 2017-06-19 Nick Clifton <nickc@redhat.com>
159 * libieee.h (struct common_header_type): Add end_p field.
160 * ieee.c (this_byte_and_next): Do not advance input_p beyond
162 (read_id): Check for a length that exceeds the remaining bytes in
164 (ieee_seek): Initialise end_p.
165 (ieee_archive_p): Likewise.
166 (ieee_object_p): Likewise.
168 2017-06-19 Nick Clifton <nickc@redhat.com>
171 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
172 before reading the EIHS structure entries.
174 2017-06-19 Nick Clifton <nickc@redhat.com>
177 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
178 gsd_size. Check that there are enough bytes remaining to read the
179 type and size of the next egsd. Check that the size of the egsd
180 does not exceed the size of the record.
182 2017-06-19 Alan Modra <amodra@gmail.com>
184 * config.bfd: Correct targ_underscore for cris.
186 2017-06-18 Alan Modra <amodra@gmail.com>
188 * config.bfd: Correct targ_underscore for epiphany, ip2k,
189 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
191 2017-06-16 Nick Clifton <nickc@redhat.com>
193 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
194 bucketlist is empty because there are no symbols to add to the
197 2017-06-16 Alan Modra <amodra@gmail.com>
203 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
204 (BFD_JUMP_TABLE_LINK): Likewise.
205 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
206 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
207 (bfd_elf_define_start_stop): New function.
208 * linker.c (bfd_generic_define_start_stop): New function.
209 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
211 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
212 * aout-target.h (MY_bfd_define_start_stop): Define.
213 * aout-tic30.c (MY_bfd_define_start_stop): Define.
214 * binary.c (binary_bfd_define_start_stop): Define.
215 * bout.c (b_out_bfd_define_start_stop): Define.
216 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
217 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
218 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
219 * coffcode.h (coff_bfd_define_start_stop): Define.
220 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
221 * i386msdos.c (msdos_bfd_define_start_stop): Define.
222 * i386os9k.c (os9k_bfd_define_start_stop): Define.
223 * ieee.c (ieee_bfd_define_start_stop): Define.
224 * ihex.c (ihex_bfd_define_start_stop): Define.
225 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
226 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
227 * mmo.c (mmo_bfd_define_start_stop): Define.
228 * nlm-target.h (nlm_bfd_define_start_stop): Define.
229 * oasys.c (oasys_bfd_define_start_stop): Define.
230 * pef.c (bfd_pef_bfd_define_start_stop): Define.
231 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
232 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
233 * som.c (som_bfd_define_start_stop): Define.
234 * srec.c (srec_bfd_define_start_stop): Define.
235 * tekhex.c (tekhex_bfd_define_start_stop): Define.
236 * versados.c (versados_bfd_define_start_stop): Define.
237 * vms-alpha.c (vms_bfd_define_start_stop): Define.
238 (alpha_vms_bfd_define_start_stop): Define.
239 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
240 * bfd-in2.h: Regenerate.
241 * libbfd.h: Regenerate.
243 2017-06-16 Jiong Wang <jiong.wang@arm.com>
245 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
246 SYMBOL_REFERENCES_LOCAL.
248 2017-06-15 Jiong Wang <jiong.wang@arm.com>
251 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
252 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
253 runtime for if there needs copy relocation elimination.
254 (need_copy_relocation_p): New function. Return true for symbol with
255 pc-relative references and if it's against read-only sections.
256 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
257 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
258 that are related with accessing external objects.
259 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
260 in elfNN_aarch64_check_relocs.
262 2017-06-15 Nick Clifton <nickc@redhat.com>
265 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
268 (ieee_archive_p): Likewise.
270 2017-06-15 Nick Clifton <nickc@redhat.com>
273 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
275 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
277 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
278 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
279 keep both windowed and call0 ABI PLT definitions.
280 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
281 elf_xtensa_*_plt_entry endex.
282 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
284 2017-06-14 Nick Clifton <nickc@redhat.com>
287 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
290 2017-06-14 Nick Clifton <nickc@redhat.com>
293 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
294 maximum value for the ascic pointer. Check that name processing
295 does not read beyond this value.
296 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
299 2017-06-14 Nick Clifton <nickc@redhat.com>
302 * versados.c (versados_mkobject): Zero the allocated tdata structure.
303 (process_otr): Check for an invalid offset in the otr structure.
305 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
307 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
309 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
315 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
316 vtable field to a union.
317 (_bfd_elf_is_start_stop): Removed.
318 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
319 __start_SECNAME and __stop_SECNAME symbols.
320 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
321 * elflink.c (_bfd_elf_is_start_stop): Removed.
322 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
323 _bfd_elf_is_start_stop.
324 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
325 __stop_SECNAME symbols. Updated.
326 (elf_gc_smash_unused_vtentry_relocs): Likewise.
327 (bfd_elf_gc_record_vtinherit): Likewise.
328 (bfd_elf_gc_record_vtentry): Likewise.
330 2017-06-13 Nick Clifton <nickc@redhat.com>
333 * elflink.c (elf_link_adjust_relocs): Generate an error when
334 encountering a reloc against a symbol removed by garbage
337 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
339 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
340 to merge_gnu_properties.
341 * elf-properties.c (elf_merge_gnu_properties): Add struct
342 bfd_link_info * and pass it to merge_gnu_properties.
343 (elf_merge_gnu_property_list): Add struct bfd_link_info *
344 and pass it to elf_merge_gnu_properties.
345 (_bfd_elf_link_setup_gnu_properties): Pass info to
346 elf_merge_gnu_property_list.
347 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
349 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
351 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
354 * binary.c (binary_set_section_contents): Scale lma by octets
355 per byte to set filepos.
357 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
359 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
362 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
364 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
367 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
369 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
370 patched section contents for TLS IE reloc.
371 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
373 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
375 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
376 RELOC_FOR_GLOBAL_SYMBOL macro.
378 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
380 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
383 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
385 * config/tc-arc.c (md_undefined_symbol): Changed.
386 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
388 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
390 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
393 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
395 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
396 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
398 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
400 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
403 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
405 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
406 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
407 is non-zero. Add clarifying comments.
409 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
411 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
412 name. Use local IFUNC symbol name string to report unsupported
413 non-PIC call to IFUNC function.
414 (elf_i386_relocate_section): Dump local IFUNC name with minfo
415 when generating R_386_IRELATIVE relocation.
416 (elf_i386_finish_dynamic_symbol): Likewise.
417 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
419 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
420 when generating R_X86_64_IRELATIVE relocation.
421 (elf_x86_64_finish_dynamic_symbol): Likewise.
423 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
425 * elf.c (setup_group): Make sure BFD sections are created for all
426 group sections in the input file when processing SHF_GROUP
428 (bfd_section_from_shdr): Avoid duplicating logic already
429 implemented in `setup_group'.
431 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
434 * peXXigen.c (pe_print_idata): Use the address of the first thunk
435 if the hint address is zero.
437 2017-06-06 James Clarke <jrtc27@jrtc27.com>
440 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
441 ELF_COMMON_DEF_P for common symbols.
443 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
445 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
446 SEC_GROUP sections as SEC_EXCLUDE.
447 (bfd_elf_set_group_contents): Replace use of abort with an assert.
448 (assign_section_numbers): Use resolve_section_groups flag instead
449 of relocatable link type.
450 (_bfd_elf_init_private_section_data): Use resolve_section_groups
451 flag instead of checking the final_link flag for part of the
452 checks in here. Fix white space as a result.
453 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
454 instead of relocatable link type.
455 (bfd_elf_final_link): Likewise.
457 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
459 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
461 * elf32-score.c (score_elf_final_link_relocate): Likewise.
462 (s3_bfd_score_elf_check_relocs): Likewise.
463 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
464 (score_elf_final_link_relocate): Likewise.
465 (s7_bfd_score_elf_check_relocs): Likewise.
467 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
469 * elflink.c (init_reloc_cookie_rels): Remove unused variable
472 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
474 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
475 from `reloc_count' rather than decrementing it.
476 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
477 `reloc_count' by `int_rels_per_ext_rel'.
478 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
479 `reloc_count' by `int_rels_per_ext_rel' for last relocation
481 (s3_bfd_score_elf_check_relocs): Likewise.
482 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
483 (s7_bfd_score_elf_relocate_section): Likewise.
484 (s7_bfd_score_elf_check_relocs): Likewise.
485 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
486 prototype and function.
487 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
488 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
489 triple rather than once the sum of REL and RELA relocation entry
491 (bfd_elf64_get_reloc_upper_bound): Remove macro.
492 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
493 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
494 storage allocation size determination.
495 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
496 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
497 by `int_rels_per_ext_rel' for last relocation entry
499 (bfd_elf_final_link): Do not multiply `reloc_count' by
500 `int_rels_per_ext_rel' for internal relocation storage
501 allocation size determination.
502 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
503 `int_rels_per_ext_rel' for last relocation entry determination.
504 (elf_gc_smash_unused_vtentry_relocs): Likewise.
505 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
506 (_bfd_mips_elf_relocate_section): Likewise.
508 2017-06-05 Alan Modra <amodra@gmail.com>
511 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
513 2017-06-01 John Baldwin <jhb@FreeBSD.org>
515 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
516 determine structure sizes.
517 (elfcore_grok_freebsd_prstatus): Likewise.
519 2017-06-01 Alan Modra <amodra@gmail.com>
521 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
522 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
524 (is_elfv2_localentry0): New function.
525 (ppc64_elf_tls_setup): Default params->plt_localentry0.
526 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
527 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
528 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
529 optimized localentry:0 stubs.
530 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
531 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
533 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
535 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
537 2017-05-30 Casey Smith <clegg89@gmail.com>
540 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
541 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
543 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
545 * cpu-arc.c (arc_compatible): New function.
547 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
549 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
551 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
554 * bfdio.c (bfd_get_file_size): New function.
555 * bfd-in2.h: Regenerated.
557 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
559 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
562 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
564 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
565 dynobj instead of htab->elf.dynobj.
567 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
569 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
571 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
572 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
573 actual number of internal relocations retrieved. Adjust
574 function description.
575 (bfd_elf64_canonicalize_reloc): Remove macro.
576 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
578 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
580 * archures.c (bfd_mach_sparc_v9m8): Define.
581 (bfd_mach_sparc_v8plusm8): Likewise.
582 (bfd_mach_sparc_v9_p): Adjust to M8.
583 (bfd_mach_sparc_64bit_p): Likewise.
584 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
585 bfd_mach_sparc_v8plusm8.
586 * bfd-in2.h: Regenerated.
587 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
589 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
590 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
591 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
593 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
594 bfd_mach_sparc_v8plusm8.
596 2017-05-19 Alan Modra <amodra@gmail.com>
598 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
599 debug and special sections when no non-note alloc sections in an
602 2017-05-18 Alan Modra <amodra@gmail.com>
604 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
605 * elf-m10300.c: Likewise.
607 * elf32-arc.c: Likewise.
608 * elf32-bfin.c: Likewise.
609 * elf32-m68k.c: Likewise.
610 * elf32-nds32.c: Likewise.
611 * elf32-tilepro.c: Likewise.
612 * elflink.c: Likewise.
613 * elfnn-aarch64.c: Likewise.
614 * elfnn-riscv.c: Likewise.
615 * elfxx-tilegx.c: Likewise.
616 * mach-o.c: Likewise.
617 * peXXigen.c: Likewise.
618 * vms-alpha.c: Likewise.
619 * vms-lib.c: Likewise.
621 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
624 * elflink.c (elf_gc_mark_debug_section): New function.
625 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
626 referenced by kept debug sections.
628 2017-05-16 Alan Modra <amodra@gmail.com>
630 * elf-m10300.c: Rename occurrences of non_ir_ref.
631 * elf32-arm.c: Likewise.
632 * elf32-bfin.c: Likewise.
633 * elf32-cr16.c: Likewise.
634 * elf32-cris.c: Likewise.
635 * elf32-d10v.c: Likewise.
636 * elf32-dlx.c: Likewise.
637 * elf32-fr30.c: Likewise.
638 * elf32-frv.c: Likewise.
639 * elf32-hppa.c: Likewise.
640 * elf32-i370.c: Likewise.
641 * elf32-i386.c: Likewise.
642 * elf32-iq2000.c: Likewise.
643 * elf32-lm32.c: Likewise.
644 * elf32-m32c.c: Likewise.
645 * elf32-m32r.c: Likewise.
646 * elf32-m68hc1x.c: Likewise.
647 * elf32-m68k.c: Likewise.
648 * elf32-mcore.c: Likewise.
649 * elf32-metag.c: Likewise.
650 * elf32-microblaze.c: Likewise.
651 * elf32-moxie.c: Likewise.
652 * elf32-msp430.c: Likewise.
653 * elf32-mt.c: Likewise.
654 * elf32-nios2.c: Likewise.
655 * elf32-or1k.c: Likewise.
656 * elf32-ppc.c: Likewise.
657 * elf32-rl78.c: Likewise.
658 * elf32-s390.c: Likewise.
659 * elf32-score.c: Likewise.
660 * elf32-score7.c: Likewise.
661 * elf32-sh.c: Likewise.
662 * elf32-tic6x.c: Likewise.
663 * elf32-tilepro.c: Likewise.
664 * elf32-v850.c: Likewise.
665 * elf32-vax.c: Likewise.
666 * elf32-xstormy16.c: Likewise.
667 * elf32-xtensa.c: Likewise.
668 * elf64-alpha.c: Likewise.
669 * elf64-hppa.c: Likewise.
670 * elf64-ia64-vms.c: Likewise.
671 * elf64-mmix.c: Likewise.
672 * elf64-ppc.c: Likewise.
673 * elf64-s390.c: Likewise.
674 * elf64-sh64.c: Likewise.
675 * elf64-x86-64.c: Likewise.
676 * elflink.c: Likewise.
677 * elfnn-aarch64.c: Likewise.
678 * elfnn-ia64.c: Likewise.
679 * elfnn-riscv.c: Likewise.
680 * elfxx-mips.c: Likewise.
681 * elfxx-sparc.c: Likewise.
682 * elfxx-tilegx.c: Likewise.
683 * linker.c: Likewise.
685 2017-05-16 Alan Modra <amodra@gmail.com>
687 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
688 * elflink.c (elf_link_add_object_symbols): Update to use
690 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
692 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
694 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
696 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
698 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
700 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
701 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
703 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
705 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
707 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
709 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
710 to plt_second/plt_second_eh_frame.
711 (elf_x86_64_link_hash_newfunc): Updated.
712 (elf_x86_64_allocate_dynrelocs): Likewise.
713 (elf_x86_64_size_dynamic_sections): Likewise.
714 (elf_x86_64_relocate_section): Likewise.
715 (elf_x86_64_finish_dynamic_symbol): Likewise.
716 (elf_x86_64_finish_dynamic_sections): Likewise.
717 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
718 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
720 (elf_backend_setup_gnu_properties): Updated. Create the
721 .plt.sec section instead of the .plt.sec section.
723 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
725 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
726 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
727 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
729 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
731 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
732 (bfd_elf64_set_reloc): Define.
733 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
735 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
737 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
738 (struct bfd_target): New field _bfd_set_reloc.
739 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
740 * reloc.c (_bfd_generic_set_reloc): New function.
741 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
742 * nlm-target.h (nlm_set_reloc): Likewise.
743 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
744 * aout-tic30.c (MY_set_reloc): Likewise.
745 * aout-target.h (MY_set_reloc): Likewise.
746 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
747 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
748 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
749 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
750 * aout-adobe.c (aout_32_set_reloc): Likewise.
751 * bout.c (b_out_set_reloc): Likewise.
752 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
753 * i386os9k.c (aout_32_set_reloc): Likewise.
754 * ieee.c (ieee_set_reloc): Likewise.
755 * oasys.c (oasys_set_reloc): Likewise.
756 * som.c (som_set_reloc): Likewise.
757 * versados.c (versados_set_reloc): Likewise.
758 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
759 _bfd_generic_set_reloc.
760 (rs6000_xcoff64_aix_vec): LIkewise.
761 * libbfd.c (_bfd_norelocs_set_reloc): New function.
762 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
763 * i386msdos.c (msdos_set_reloc): Define to
764 _bfd_norelocs_set_reloc.
765 * elfcode.h (elf_set_reloc): Define.
766 * bfd-in2.h: Regenerated.
768 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
771 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
772 for IFUNC function address.
774 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
776 * elf32-arc.c (FEATURE_LIST_NAME): Define.
777 (CONFLICT_LIST): Likewise.
778 (opcode/arc-attrs.h): Include.
779 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
780 (arc_extract_features): New file.
781 (arc_stralloc): Likewise.
782 (arc_elf_merge_attributes): Likewise.
783 (arc_elf_merge_private_bfd_data): Use object attributes.
784 (bfd_arc_get_mach_from_attributes): New function.
785 (arc_elf_object_p): Use object attributes.
786 (arc_elf_final_write_processing): Likewise.
787 (elf32_arc_obj_attrs_arg_type): New function.
788 (elf32_arc_obj_attrs_handle_unknown): Likewise.
789 (elf32_arc_section_from_shdr): Likewise.
790 (elf_backend_obj_attrs_vendor): Define.
791 (elf_backend_obj_attrs_section): Likewise.
792 (elf_backend_obj_attrs_arg_type): Likewise.
793 (elf_backend_obj_attrs_section_type): Likewise.
794 (elf_backend_obj_attrs_handle_unknown): Likewise.
795 (elf_backend_section_from_shdr): Likewise.
797 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
800 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
801 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
802 and the destination is a Thumb symbol.
804 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
806 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
807 initializer to silence GCC 4.2.
808 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
810 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
812 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
813 (LAZY_PLT_ENTRY_SIZE): This.
814 (NON_LAZY_PLT_ENTRY_SIZE): New.
815 (elf_x86_64_plt0_entry): Renamed to ...
816 (elf_x86_64_lazy_plt0_entry): This.
817 (elf_x86_64_plt_entry): Renamed to ...
818 (elf_x86_64_lazy_plt_entry): This.
819 (elf_x86_64_bnd_plt0_entry): Renamed to ...
820 (elf_x86_64_lazy_bnd_plt0_entry): This.
821 (elf_x86_64_legacy_plt_entry): Removed.
822 (elf_x86_64_bnd_plt_entry): Renamed to ...
823 (elf_x86_64_lazy_bnd_plt_entry): This.
824 (elf_x86_64_legacy_plt2_entry): Renamed to ...
825 (elf_x86_64_non_lazy_plt_entry): This.
826 (elf_x86_64_bnd_plt2_entry): Renamed to ...
827 (elf_x86_64_non_lazy_bnd_plt_entry): This.
828 (elf_x86_64_eh_frame_plt): Renamed to ...
829 (elf_x86_64_eh_frame_lazy_plt): This.
830 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
831 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
832 (elf_x86_64_eh_frame_plt_got): Renamed to ...
833 (elf_x86_64_eh_frame_non_lazy_plt): This.
834 (elf_x86_64_lazy_plt_layout): New.
835 (elf_x86_64_non_lazy_plt_layout): Likewise.
836 (elf_x86_64_plt_layout): Likewise.
837 (elf_x86_64_backend_data): Remove PLT layout information. Add
838 os for target system.
839 (GET_PLT_ENTRY_SIZE): Removed.
840 (elf_x86_64_lazy_plt): New.
841 (elf_x86_64_non_lazy_plt): Likewise.
842 (elf_x86_64_lazy_bnd_plt): Likewise.
843 (elf_x86_64_non_lazy_bnd_plt): Likewise.
844 (elf_x86-64_arch_bed): Updated.
845 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
846 (elf_x86_64_create_dynamic_sections): Removed.
847 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
848 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
849 (elf_x86-64_adjust_dynamic_symbol): Updated.
850 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
851 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
852 size for PLT0 if there is no PLT0. Get plt_entry_size from
853 non_lazy_plt for non-lazy PLT entries.
854 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
855 from non_lazy_plt for non-lazy PLT entries.
856 (elf_x86-64_relocate_section): Updated. Properly get PLT index
858 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
859 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
860 entries with non-lazy PLT layout. Don't fill the second and third
861 slots in the PLT entry if there is no PLT0.
862 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
863 if there is no PLT0. Set sh_entsize on the .plt.got section.
864 (compare_relocs): New.
865 (elf_x86_64_plt_type): Likewise.
866 (elf_x86_64_plt): Likewise.
867 (elf_x86_64_nacl_plt): New. Forward declaration.
868 (elf_x86_64_get_plt_sym_val): Removed.
869 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
870 against all dynamic relocations.
871 (elf_x86_64_link_setup_gnu_properties): New function.
872 (elf_backend_create_dynamic_sections): Updated.
873 (elf_backend_setup_gnu_properties): New.
874 (elf_x86_64_nacl_plt): New.
875 (elf_x86_64_nacl_arch_bed): Updated.
877 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
879 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
880 (LAZY_PLT_ENTRY_SIZE): This.
881 (NON_LAZY_PLT_ENTRY_SIZE): New.
882 (elf_i386_plt0_entry): Renamed to ...
883 (elf_i386_lazy_plt0_entry): This.
884 (elf_i386_plt_entry): Renamed to ...
885 (elf_i386_lazy_plt_entry): This.
886 (elf_i386_pic_plt0_entry): Renamed to ...
887 (elf_i386_pic_lazy_plt0_entry): This.
888 (elf_i386_pic_plt_entry): Renamed to ...
889 (elf_i386_pic_lazy_plt_entry): This.
890 (elf_i386_got_plt_entry): Renamed to ...
891 (elf_i386_non_lazy_plt_entry): This.
892 (elf_i386_pic_got_plt_entry): Renamed to ...
893 (elf_i386_pic_non_lazy_plt_entry): This.
894 (elf_i386_eh_frame_plt): Renamed to ...
895 (elf_i386_eh_frame_lazy_plt): This.
896 (elf_i386_eh_frame_plt_got): Renamed to ...
897 (elf_i386_eh_frame_non_lazy_plt): This.
898 (elf_i386_plt_layout): Renamed to ...
899 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
900 eh_frame_plt_got_size.
901 (elf_i386_non_lazy_plt_layout): New.
902 (elf_i386_plt_layout): Likewise.
903 (elf_i386_non_lazy_plt): Likewise.
904 (GET_PLT_ENTRY_SIZE): Removed.
905 (elf_i386_plt): Renamed to ...
906 (elf_i386_lazy_plt): This.
907 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
908 (elf_i386_arch_bed): Updated.
909 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
910 (elf_i386_create_dynamic_sections): Removed.
911 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
912 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
913 (elf_i386_adjust_dynamic_symbol): Updated.
914 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
915 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
916 size for PLT0 if there is no PLT0.
917 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
918 output section is discarded only if GOT isn't empty.
919 (elf_i386_relocate_section): Updated. Properly get PLT index
921 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
922 second and third slots in the PLT entry if there is no PLT0.
923 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
924 if there is no PLT0. Set sh_entsize on the .plt.got section.
925 (elf_i386_nacl_plt): Forward declaration.
926 (elf_i386_get_plt_sym_val): Removed.
927 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
928 against all dynamic relocations.
929 (elf_i386_link_setup_gnu_properties): New function.
930 (elf_backend_create_dynamic_sections): Updated.
931 (elf_backend_setup_gnu_properties): New.
932 (elf_i386_nacl_plt): Updated.
933 (elf_i386_nacl_arch_bed): Likewise.
934 (elf_i386_vxworks_arch_bed): Likewise.
936 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
938 * elflink.c (elf_output_implib): Remove executable flag from import
940 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
941 library is a relocatable object file.
943 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
946 * elf32-avr.c (avr_should_move_sym): New function.
947 (avr_should_reduce_sym_size): Likewise.
948 (avr_should_increase_sym_size): Likewise.
949 (elf32_avr_relax_delete_bytes): Adjust symbol values
950 and sizes by calling new functions.
952 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
954 * config.bfd (riscv32-*): Enable rv64.
956 2017-05-02 Alan Modra <amodra@gmail.com>
959 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
960 rather than h->root.type == bfd_link_hash_new.
961 (bfd_elf_record_link_assignment): Similarly, call
962 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
964 2017-04-29 Alan Modra <amodra@gmail.com>
967 * reloc.c (reloc_offset_in_range): New function.
968 (bfd_perform_relocation, bfd_install_relocation): Use it.
969 (_bfd_final_link_relocate): Likewise.
971 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
973 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
974 before using .plt.got.
975 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
977 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
979 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
980 instead of "+=" to update 0.
982 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
984 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
985 .plt.got section here.
986 (elf_i386_check_relocs): Don't create the .plt.got section.
987 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
988 the .plt.got and .plt.bnd sections here.
989 (elf_x86_64_check_relocs): Don't create the .plt.got nor
992 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
994 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
996 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
997 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
998 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
999 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1002 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1004 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1006 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1007 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1008 the first relocatable ELF input with GNU properties.
1010 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1012 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1013 VxWorks for non-PIC.
1015 2017-04-27 Alan Modra <amodra@gmail.com>
1017 * elf-bfd.h (struct elf_backend_data): Make asection param of
1018 elf_backend_eh_frame_address_size const.
1019 (_bfd_elf_eh_frame_address_size): Likewise.
1020 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1021 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1022 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1023 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1024 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1025 (next_cie_fde_offset): Constify params.
1026 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1028 2017-04-27 Alan Modra <amodra@gmail.com>
1030 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1031 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1032 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1034 (offset_adjust): New function.
1035 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1036 (adjust_eh_frame_local_symbols): Likewise.
1037 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1038 after changing anything. Return true if anything changed.
1039 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1040 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1042 2017-04-27 Alan Modra <amodra@gmail.com>
1044 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1047 2017-04-27 Alan Modra <amodra@gmail.com>
1049 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1050 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1051 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1052 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1053 for undef and undefweak dyn_relocs.
1054 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1055 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1056 (allocate_got, allocate_dynrelocs): Likewise.
1057 (ppc64_elf_relocate_section): Likewise.
1059 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1061 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1062 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1063 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1064 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1066 2017-04-26 Nick Clifton <nickc@redhat.com>
1069 * reloc.c (bfd_perform_relocation): Check for a negative address
1072 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1075 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1077 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1078 (elf_backend_always_renumber_dynsyms): Define.
1079 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1080 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1081 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1082 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1084 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1086 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1088 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1089 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1090 sections have been created.
1092 2017-04-26 Nick Clifton <nickc@redhat.com>
1095 * compress.c (bfd_init_section_compress_status): Check the return
1096 value from bfd_malloc.
1098 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1100 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1101 no_finish_dynamic_symbol.
1102 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1104 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1105 weak symbol, don't make it dynamic.
1106 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1107 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1108 relocation for GOT reference.
1109 (elf_x86_64_finish_dynamic_symbol): Abort if
1110 no_finish_dynamic_symbol isn't 0.
1112 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1115 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1116 undefined weak symbol, don't make it dynamic.
1117 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1118 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1119 relocation for R_386_GOT32.
1121 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1124 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1126 2017-04-23 Alan Modra <amodra@gmail.com>
1129 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1130 * elf.c (lcomm_sym): New.
1131 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1132 * bfd-in2.h: Regenerate.
1134 2017-04-23 Alan Modra <amodra@gmail.com>
1137 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1138 parameters and comment.
1139 (_bfd_elf_get_reloc_section): Delete.
1140 (_bfd_elf_plt_get_reloc_section): Declare.
1141 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1142 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1144 (_bfd_elf_get_reloc_section): ..here. Delete.
1145 (assign_section_numbers): Call elf_get_reloc_section.
1146 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1147 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1149 2017-04-23 Alan Modra <amodra@gmail.com>
1152 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1155 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1158 * elf32-i386.c (elf_i386_link_hash_entry): Add
1159 no_finish_dynamic_symbol.
1160 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1161 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1162 symbol, don't make it dynamic in PIE.
1163 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1164 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1165 relocation for R_386_GOT32
1166 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1169 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1173 * elflink.c (elf_link_add_object_symbols): Require
1174 --no-dynamic-linker with -E/--dynamic-list when creating
1177 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1179 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1182 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1184 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1185 dynamic symbol sorting.
1187 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1190 * elflink.c (elf_link_add_object_symbols): Preserve
1191 dynamic_ref_after_ir_def when restoring the symbol table for
1192 unneeded dynamic object.
1194 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1197 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1198 on on undefined IFUNC symbol in the second PLT.
1200 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1202 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1204 2017-04-19 Alan Modra <amodra@gmail.com>
1206 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1207 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1208 * elf32-ppc.c:Formatting.
1209 (ensure_undefweak_dynamic): Don't make dynamic when
1210 info->dynamic_undefined_weak is zero.
1211 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1212 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1213 not default visibility. Discard undef and undefweak
1215 (ppc_elf_relocate_section): Adjust to suit.
1216 * elf64-ppc.c: Formatting.
1217 (ensure_undefweak_dynamic): Don't make dynamic when
1218 info->dynamic_undefined_weak is zero.
1219 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1220 info->dynamic_undefined_weak. Discard them earlier.
1222 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1225 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1226 before generating the version definition section.
1228 2017-04-17 Alan Modra <amodra@gmail.com>
1230 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1231 state when a regular object file defines a symbol with
1232 incompatible type to that defined by an earlier shared lib.
1234 2017-04-13 Alan Modra <amodra@gmail.com>
1236 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1238 * elf32-arm.c: Likewise.
1239 * elf32-i386.c: Likewise.
1240 * elf32-mep.c: Likewise.
1241 * elf64-ia64-vms.c: Likewise.
1242 * elf64-x86-64.c: Likewise.
1243 * elflink.c: Likewise.
1244 * elfnn-ia64.c: Likewise.
1245 * elfxx-mips.c: Likewise.
1247 2017-04-13 Alan Modra <amodra@gmail.com>
1249 * aoutx.h: Use %B and %A in error messages throughout file.
1250 * aout-cris.c: Likewise.
1251 * archive.c: Likewise.
1252 * binary.c: Likewise.
1253 * coff-rs6000.c: Likewise.
1254 * coff-tic4x.c: Likewise.
1255 * coffcode.h: Likewise.
1256 * coffgen.c: Likewise.
1257 * cofflink.c: Likewise.
1258 * coffswap.h: Likewise.
1259 * cpu-arm.c: Likewise.
1260 * elf-eh-frame.c: Likewise.
1261 * elf-m10300.c: Likewise.
1263 * elf32-arc.c: Likewise.
1264 * elf32-arm.c: Likewise.
1265 * elf32-bfin.c: Likewise.
1266 * elf32-frv.c: Likewise.
1267 * elf32-iq2000.c: Likewise.
1268 * elf32-m32c.c: Likewise.
1269 * elf32-microblaze.c: Likewise.
1270 * elf32-nds32.c: Likewise.
1271 * elf32-rl78.c: Likewise.
1272 * elf32-rx.c: Likewise.
1273 * elf32-score.c: Likewise.
1274 * elf32-score7.c: Likewise.
1275 * elf32-sh64.c: Likewise.
1276 * elf32-v850.c: Likewise.
1277 * elf32-vax.c: Likewise.
1278 * elf32-visium.c: Likewise.
1279 * elf64-ia64-vms.c: Likewise.
1280 * elf64-mmix.c: Likewise.
1281 * elf64-sh64.c: Likewise.
1282 * elfcode.h: Likewise.
1283 * elfnn-aarch64.c: Likewise.
1284 * elfnn-ia64.c: Likewise.
1285 * elfxx-mips.c: Likewise.
1286 * hpux-core.c: Likewise.
1289 * linker.c: Likewise.
1290 * merge.c: Likewise.
1292 * oasys.c: Likewise.
1293 * pdp11.c: Likewise.
1294 * peXXigen.c: Likewise.
1295 * rs6000-core.c: Likewise.
1296 * vms-alpha.c: Likewise.
1297 * xcofflink.c: Likewise.
1299 2017-04-13 Alan Modra <amodra@gmail.com>
1301 * bfd.c (PRINT_TYPE): Define.
1302 (_doprnt): New function.
1303 (error_handler_internal): Use _doprnt.
1304 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1305 calls in their natural order, throughout file.
1306 * coff-mcore.c: Likewise.
1307 * coff-ppc.c: Likewise.
1308 * coff-tic80.c: Likewise.
1309 * cofflink.c: Likewise.
1310 * elf-s390-common.c: Likewise.
1312 * elf32-arm.c: Likewise.
1313 * elf32-i386.c: Likewise.
1314 * elf32-m32r.c: Likewise.
1315 * elf32-msp430.c: Likewise.
1316 * elf32-spu.c: Likewise.
1317 * elf64-ia64-vms.c: Likewise.
1318 * elf64-sparc.c: Likewise.
1319 * elf64-x86-64.c: Likewise.
1320 * elflink.c: Likewise.
1321 * elfnn-aarch64.c: Likewise.
1322 * elfnn-ia64.c: Likewise.
1323 * elfxx-mips.c: Likewise.
1325 2017-04-13 Alan Modra <amodra@gmail.com>
1327 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1328 branch veneers" error. Fix double space and format message.
1329 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1330 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1332 2017-04-13 Alan Modra <amodra@gmail.com>
1334 * bfd-in2.h: Regenerate.
1336 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1338 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1339 extra `\n' in warning/error messages.
1340 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1341 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1343 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1345 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1346 processor-specific properties with generic ELF target vector.
1348 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
1350 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1351 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1352 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1353 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1355 (link_hash_newfunc): Initialize has_got_reloc and
1357 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1359 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1361 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1363 (_bfd_sparc_elf_fixup_symbol): New function.
1364 (allocate_dynrelocs): Don't allocate space for dynamic
1365 relocations and discard relocations against resolved undefined
1366 weak symbols in executable. Don't make resolved undefined weak
1367 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1368 relocation against undefined weak symbols in PIE.
1369 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1370 relocations against resolved undefined weak symbols in PIE
1371 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1372 without ynamic PLT/GOT relocations for resolved undefined weak
1374 Don't generate dynamic relocation against resolved undefined
1375 weak symbol in executable.
1376 (pie_finish_undefweak_symbol): New function.
1377 (_bfd_sparc_elf_finish_dynamic_sections): Call
1378 pie_finish_undefweak_symbol on all symbols in PIE.
1379 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1380 (_bfd_sparc_elf_fixup_symbol): New function.
1382 2017-04-10 Nick Clifton <nickc@redhat.com>
1384 * config.bfd: Remove ns32k from obsolete list.
1386 2017-04-10 Alan Modra <amodra@gmail.com>
1389 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1390 (special_sections_i): Likewise for .init_array.
1391 (special_sections_p): Likewise for .preinit_array.
1393 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1397 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1398 ELF_COMMON_DEF_P for common symbols.
1399 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1400 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1401 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1402 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1403 07492f668d2173da7a2bda3707ff0985e0f460b6.
1405 2017-04-07 Pedro Alves <palves@redhat.com>
1407 * opncls.c (bfd_get_debug_link_info): Rename to...
1408 (bfd_get_debug_link_info_1): ... this. Change type of second
1409 parameter to void pointer. Adjust.
1410 (bfd_get_debug_link_info): Reimplement on top of
1411 bfd_get_debug_link_info_1.
1412 (separate_debug_file_exists, separate_alt_debug_file_exists):
1413 Change type of second parameter to void pointer. Adjust.
1414 (get_func_type, check_func_type): Change type of second parameter
1416 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1417 the callback functions instead of passing the address of a local.
1418 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1419 find_separate_debug_file.
1420 (get_alt_debug_link_info_shim): Change type of second parameter to
1421 void pointer. Adjust.
1422 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1423 find_separate_debug_file.
1424 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1425 of second parameter to void pointer. Adjust.
1426 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1427 pointer local to find_separate_debug_file.
1429 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1431 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1432 external symbols with a definition.
1433 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1435 2017-04-07 Alan Modra <amodra@gmail.com>
1437 * po/SRC-POTFILES.in: Regenerate.
1439 2017-04-05 Alan Modra <amodra@gmail.com>
1441 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1444 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1446 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1447 numbers for DataDirectory entry indicies passed to
1450 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1452 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1453 each GNU_MBIND section and align GNU_MBIND section to page size.
1454 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1455 segment for each GNU_MBIND section.
1456 (_bfd_elf_init_private_section_data): Copy sh_info from input
1457 for GNU_MBIND section.
1459 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1461 * elfnn-riscv.c (GP_NAME): Delete.
1462 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1463 (_bfd_riscv_relax_lui): Likewise.
1465 2017-04-04 Nick Clifton <nickc@redhat.com>
1468 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1470 (bfd_elf_final_link): Only initialize the extended symbol index
1471 section if there are extended symbol tables to list.
1473 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1475 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1476 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1477 * configure.ac (elf): Add elf-properties.lo.
1478 * Makefile.in: Regenerated.
1479 * configure: Likewise.
1480 * elf-bfd.h (elf_property_kind): New.
1481 (elf_property): Likewise.
1482 (elf_property_list): Likewise.
1483 (elf_properties): Likewise.
1484 (_bfd_elf_parse_gnu_properties): Likewise.
1485 (_bfd_elf_get_property): Likewise.
1486 (_bfd_elf_link_setup_gnu_properties): Likewise.
1487 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1488 and setup_gnu_properties.
1489 (elf_obj_tdata): Add properties.
1490 * elf-properties.c: New file.
1491 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1492 (elf_i386_merge_gnu_properties): Likewise.
1493 (elf_backend_parse_gnu_properties): Likewise.
1494 (elf_backend_merge_gnu_properties): Likewise.
1495 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1496 (elf_x86_64_merge_gnu_properties): Likewise.
1497 (elf_backend_parse_gnu_properties): Likewise.
1498 (elf_backend_merge_gnu_properties): Likewise.
1499 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1500 (elf_backend_parse_gnu_properties): Likewise.
1501 (elf_backend_setup_gnu_properties): Likewise.
1502 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1503 elf_backend_merge_gnu_properties and
1504 elf_backend_setup_gnu_properties.
1506 2017-03-30 Pip Cet <pipcet@gmail.com>
1508 * elf32-wasm32.c: Add relocation code, two relocs.
1509 * reloc.c: Add wasm32 relocations.
1510 * libbfd.h: Regenerate.
1511 * bfd-in2.h: Regenerate.
1512 * bfd/po/bfd.pot: Regenerate.
1514 2017-03-29 Nick Clifton <nickc@redhat.com>
1517 * coff-bfd.h (struct coff_section_data): Add new fields:
1518 saved_bias and bias.
1519 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1520 computed for PE binaries.
1521 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1524 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1527 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1528 to handle a local symbol with a hash-symbol-entry; without PLT.
1529 Add BFD_ASSERT for an incidental case with GOT entry present.
1530 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1531 isn't forced-or-set local.
1533 2017-03-27 Pip Cet <pipcet@gmail.com>
1535 * wasm-module.c: New file to support WebAssembly modules.
1536 * wasm-module.h: New file to support WebAssembly modules.
1537 * doc/webassembly.texi: Start documenting wasm-module.c.
1538 * config.bfd: Add wasm_vec.
1539 * targets.c: Likewise.
1540 * configure.ac: Likewise.
1541 * Makefile.am: Add entries for wasm-module.c.
1542 * Makefile.in: Regenerate.
1543 * configure: Regenerate.
1544 * po/SRC-POTFILES.in: Regenerate.
1546 2017-03-27 Pip Cet <pipcet@gmail.com>
1548 * cpu-wasm32.c: New file to support wasm32 architecture.
1549 * elf32-wasm32.c: New file to support wasm32 architecture.
1550 * Makefile.am: Add wasm32 architecture.
1551 * archures.c: Likewise.
1552 * config.bfd: Likewise.
1553 * configure.ac: Likewise.
1554 * targets.c: Likewise.
1555 * Makefile.in: Regenerate.
1556 * bfd-in2.h: Regenerate.
1557 * configure: Regenerate.
1558 * po/SRC-POTFILES.in: Regenerate.
1560 2017-03-20 Alan Modra <amodra@gmail.com>
1563 * elf64-ppc.c (compare_symbols): Stabilize sort.
1565 2017-03-18 Alan Modra <amodra@gmail.com>
1567 * elf64-ppc.c (struct ppc_link_hash_table): Add
1568 local_ifunc_resolver and maybe_local_ifunc_resolver.
1569 (ppc_build_one_stub): Set flags on emitting dynamic
1570 relocation to ifunc.
1571 (ppc64_elf_relocate_section): Likewise.
1572 (ppc64_elf_finish_dynamic_symbol): Likewise.
1573 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1574 local dynamic relocs to ifuncs.
1575 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1576 local_ifunc_resolver and maybe_local_ifunc_resolver.
1577 (ppc_elf_relocate_section): Set flag on emitting dynamic
1578 relocation to ifuncs.
1579 (ppc_elf_finish_dynamic_symbol): Likewise.
1580 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1581 dynamic relocs to ifuncs.
1583 2017-03-13 Nick Clifton <nickc@redhat.com>
1586 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1587 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1588 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1589 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1590 * bfd-in2.h: Regenerate.
1591 * libbfd.h: Regenerate.
1592 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1594 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1595 (elfNN_aarch64_howto_table): Likewise.
1596 (aarch64_tls_transition_without_check): Likewise.
1597 (aarch64_reloc_got_type): Likewise.
1598 (elfNN_aarch64_final_link_relocate): Likewise.
1599 (elfNN_aarch64_tls_relax): Likewise.
1600 (elfNN_aarch64_relocate_section): Likewise.
1601 (elfNN_aarch64_gc_sweep_hook): Likewise.
1602 (elfNN_aarch64_check_relocs): Likewise.
1603 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1604 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1606 2017-03-11 Alan Modra <amodra@gmail.com>
1608 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1609 parameter is in fact used. Whitespace fixes.
1610 * elf64-ppc.c: Likewise.
1612 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1614 * rs6000-core.c (CORE_NEW): Simplify macro when
1615 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1617 2017-03-07 Alan Modra <amodra@gmail.com>
1621 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1624 2017-03-05 Alan Modra <amodra@gmail.com>
1626 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1627 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1628 (next_cie_fde_offset): New function.
1629 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1630 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1631 four bytes. Align CIEs to four or eight bytes depending on
1632 per_encoding_aligned8. Align FDEs according to their encoding.
1633 Pad last FDE to output section alignment.
1634 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1636 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1637 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1638 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1640 2017-03-02 Martin Bickel <binutils@ineranves.de>
1643 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1644 empty segments which have a zero filesz, but a non-zero memsz.
1646 2017-03-02 Alan Modra <amodra@gmail.com>
1648 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1650 2017-02-28 Alan Modra <amodra@gmail.com>
1652 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1653 (ppc64_elf_relocate_section): Likewise.
1655 2017-02-28 Alan Modra <amodra@gmail.com>
1658 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1659 rather than elf32_nios2_hash_table or elf_hash_table.
1660 (create_got_section): Likewise.
1661 (nios2_elf32_finish_dynamic_symbol): Likewise.
1662 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1663 (nios2_elf32_size_dynamic_sections): Likewise.
1664 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1665 vars. Use htab equivalents directly instead. Don't create
1666 all dynamic sections on needing just the GOT. Use a goto
1667 rather than a fall-through with reloc test. Ensure
1668 htab->dynobj is set when making dynamic sreloc section.
1669 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1670 equivalent directly instead. Don't segfault on looking for
1671 .dynamic when dynamic sections have not been created. Don't
1672 segfault on .got.plt being discarded.
1673 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1674 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1675 fixme and another not so relevant comment.
1676 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1677 already set, set hash table dynobj on creating .sbss.
1679 2017-02-28 Alan Modra <amodra@gmail.com>
1681 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1682 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1683 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1684 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1685 (ppc64_elf_relocate_section): Likewise.
1686 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1687 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1688 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1689 * libbfd.h: Regenerate.
1690 * bfd-in2.h: Regenerate.
1692 2017-02-28 Alan Modra <amodra@gmail.com>
1694 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1695 dynamic .data.rel.ro read-only.
1696 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1697 rather than section flags when deciding where copy reloc goes.
1698 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1699 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1700 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1701 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1702 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1703 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1704 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1705 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1706 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1707 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1708 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1709 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1710 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1711 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1712 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1713 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1714 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1715 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1716 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1718 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1720 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1721 `jalr $0, $25' instruction encoding.
1723 2017-02-27 Nick Clifton <nickc@redhat.com>
1726 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1727 generating a seg-fault when encountering a symbol that has been
1728 deleted by garbage collection.
1730 2017-02-25 Alan Modra <amodra@gmail.com>
1732 * elf32-arc.c (struct dynamic_sections): Delete.
1733 (enum dyn_section_types): Delete.
1734 (dyn_section_names): Delete.
1735 (arc_create_dynamic_sections): Delete.
1736 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1737 segfault on discarded .rela.plt section.
1738 (elf_arc_size_dynamic_sections): Formatting. Don't call
1739 arc_create_dynamic_sections. Don't allocate memory for sections
1740 handled by the generic linker. Correct code finding relocs in
1741 read-only sections. Set SEC_EXCLUDE on zero size .got,
1742 .got.plt, and .dynbss sections. Do set .interp for pies.
1744 2017-02-24 Andrew Waterman <andrew@sifive.com>
1746 * elfnn-riscv.c (GP_NAME): New macro.
1747 (riscv_global_pointer_value): Use it.
1748 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1749 output section, consider only that section's alignment.
1751 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1753 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1754 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1755 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1756 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1758 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1760 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1761 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1764 2017-02-23 Alan Modra <amodra@gmail.com>
1767 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1769 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1770 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1773 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1776 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1777 processing ahead of the call to `elf_gc_sweep_symbol'.
1779 2017-02-22 Nick Clifton <nickc@redhat.com>
1782 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1783 created section 4-byte alignment.
1785 2017-02-22 Alan Modra <amodra@gmail.com>
1787 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1788 on .got or .plt output section being discarded by script.
1789 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1792 2017-02-21 Alan Modra <amodra@gmail.com>
1794 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1795 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1797 2017-02-20 Alan Modra <amodra@gmail.com>
1800 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1801 if DT_RELSZ/DT_RELASZ is zero.
1803 2017-02-17 Nick Clifton <nickc@redhat.com>
1805 * compress.c (bfd_get_full_section_contents): Remember to reduce
1806 compressed size by the sizeof the compression header when
1807 decompressing the contents.
1809 2017-02-17 Pedro Alves <palves@redhat.com>
1811 * srec.c (Chunk): Rename to ...
1812 (_bfd_srec_len): ... this.
1813 (S3Forced): Rename to ...
1814 (_bfd_srec_forceS3): ... this.
1815 * objcopy.c: Adjust all references.
1817 2017-02-17 Pedro Alves <palves@redhat.com>
1819 * archive.c (bsd_write_armap): Rename to ...
1820 (_bfd_bsd_write_armap): ... this.
1821 (coff_write_armap): Rename to ...
1822 (_bfd_coff_write_armap): ... this.
1823 * libbfd-in.h (bsd_write_armap): Rename to ...
1824 (_bfd_bsd_write_armap): ... this.
1825 (coff_write_armap): Rename to ...
1826 (_bfd_coff_write_armap): ... this.
1827 * aout-target.h, aout-tic30.c: Adjust all users.
1828 * libbfd.h: Regenerate.
1830 2017-02-17 Pedro Alves <palves@redhat.com>
1832 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1833 (warn_deprecated): Rename to ...
1834 (_bfd_warn_deprecated): ... this.
1835 * libbfd.c (warn_deprecated): Rename to ...
1836 (_bfd_warn_deprecated): ... this.
1837 * bfd-in2.h: Regenerate.
1839 2017-02-17 Pedro Alves <palves@redhat.com>
1841 * bfdio.c (real_ftell): Rename to ...
1842 (_bfd_real_ftell): ... this.
1843 (real_fseek): Rename to ...
1844 (_bfd_real_fseek): ... this.
1845 (real_fopen): Rename to ...
1846 (_bfd_real_fopen): ... this.
1847 * libbfd-in.h (real_ftell): Rename to ...
1848 (_bfd_real_ftell): ... this.
1849 (real_fseek): Rename to ...
1850 (_bfd_real_fseek): ... this.
1851 (real_fopen): Rename to ...
1852 (_bfd_real_fopen): ... this.
1853 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1854 * libbfd.h: Regenerate.
1856 2017-02-17 Pedro Alves <palves@redhat.com>
1858 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1859 * libbfd.c (read_unsigned_leb128): Rename to ...
1860 (_bfd_read_unsigned_leb128): ... this.
1861 (read_signed_leb128): Rename to ...
1862 (_bfd_read_signed_leb128): ... this.
1863 (safe_read_leb128): Rename to ...
1864 (_bfd_safe_read_leb128): ... this.
1865 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1866 (_bfd_read_unsigned_leb128): ... this.
1867 (read_signed_leb128): Rename to ...
1868 (_bfd_read_signed_leb128): ... this.
1869 (safe_read_leb128): Rename to ...
1870 (_bfd_safe_read_leb128): ... this.
1871 * libbfd.h: Renegerate.
1873 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1875 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1876 before trying to fine matching file and line information.
1878 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1880 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1881 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1882 not match current bfd, then reload debug information. Record bfd
1883 we're loading debug info for in the stash. If we have debug
1884 informatin in the cache then perform section placement before
1887 2017-02-16 Alan Modra <amodra@gmail.com>
1890 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1891 * elfxx-target.h (elf_backend_no_page_alias): Define.
1892 (elfNN_bed): Init new field.
1893 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1894 ensure PT_LOAD segment starts on a new page.
1895 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1897 2017-02-16 Alan Modra <amodra@gmail.com>
1900 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1903 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1905 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1906 * bfd-in2.h: Regenerated.
1908 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1911 * elf32-i386.c (elf_i386_relocate_section): Allow
1912 "lea foo@GOT, %reg" in PIC.
1914 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1917 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1918 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1919 error against local IFUNC symbol without a base register for
1922 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1924 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1925 `%P: %H:' with `info->callbacks->einfo'.
1926 (ppc_elf_relocate_section): Likewise.
1927 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1928 (ppc64_elf_edit_toc): Likewise.
1929 (ppc64_elf_relocate_section): Likewise.
1931 2017-02-14 Alan Modra <amodra@gmail.com>
1933 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1934 --gc-keep-exported, and test versioned field of sym rather than
1935 looking for @ in name.
1937 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1939 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1942 2017-02-13 Nick Clifton <nickc@redhat.com>
1945 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1948 2017-02-07 Andrew Waterman <andrew@sifive.com>
1950 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1951 entry size if PLT header is written.
1953 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1955 Fix sparc64 dynamic relocation processing to use the dynamic
1957 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1958 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1961 2017-02-03 Nick Clifton <nickc@redhat.com>
1964 * coffcode.h (coff_write_object_contents): Enlarge size of
1965 s_name_buf in order to avoid compile time warning about possible
1967 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1968 32-bits of insn value before printing into buffer.
1970 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1972 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1973 `max_local_dynindx'.
1974 (mips_elf_sort_hash_table): Handle it.
1975 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1976 symbols bump up `max_local_dynindx' rather than
1977 `max_non_got_dynindx'.
1979 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1981 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1982 `min_got_dynindx', `max_unref_got_dynindx' and
1983 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1984 (mips_elf_sort_hash_table): Adjust accordingly.
1986 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1988 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1989 to access the hash table.
1991 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1993 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1994 non-NULL `htab' to the beginning.
1996 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1998 * elflink.c (elf_gc_sweep): Wrap overlong line.
2000 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2002 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2003 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2004 * elfxx-mips.c (mips_elf_link_hash_table): Add
2005 `ignore_branch_isa' member.
2006 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2007 in branch relocation calculation as an error if
2008 `ignore_branch_isa' has been set.
2009 (_bfd_mips_elf_insn32): Rename to...
2010 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2011 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2012 Handle the new parameter.
2014 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2016 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2017 local variable dynobj.
2020 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2021 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2022 executable from read-only sections into sdynrelro.
2023 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2024 dynamic relocs in sdynrelro.
2025 (elf_backend_want_dynrelro): Define.
2027 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2029 * config.bfd (*-*-rtemsaout*): Mark as removed.
2031 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2033 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2034 (arm-*-rtems*): Move to (arm*-*-eabi*).
2035 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2036 (m68-*-rtems*): Move to (m68*-*-elf*).
2038 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2040 * config.bfd (*-*-rtemscoff*): Mark as removed.
2042 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2045 * elflink.c (bfd_elf_record_link_assignment): Revert last
2046 change and don't ever clear `forced_local'. Set `mark'
2048 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2050 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2051 (bfd_elf_size_dynamic_sections): ... here.
2052 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2053 and set `mark' instead in `__tls_get_addr_opt' processing.
2054 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2056 2017-01-24 Alan Modra <amodra@gmail.com>
2058 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2059 where dynamic relocs are preferable. Allow ifunc too.
2060 (ensure_undefweak_dynamic): New function.
2061 (allocate_dynrelocs): Use it here. Move plt handling last and
2062 don't make symbols dynamic, simplifying loop. Only make undef
2063 weak symbols with GOT entries dynamic. Correct condition
2064 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2065 comments. Remove goto.
2066 (ppc_elf_relocate_section): Correct test for using dynamic
2067 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2068 to suit. Set up explicit tls_index entries and implicit GOT
2069 tls_index entries resolvable at link time for
2070 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2071 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2072 (ensure_undefweak_dynamic): New function.
2073 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2074 with GOT entries dynamic. Remove unnecessary test of
2075 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2076 (ppc64_elf_relocate_section): Correct test for using dynamic
2077 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2078 to suit. Set up explicit tls_index entries and implicit GOT
2079 tls_index entries resolvable at link time for __tls_get_addr_opt.
2080 Simplify expression to clear mem for prelink.
2082 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2084 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2086 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2088 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2089 (elf_backend_hash_symbol): Define.
2091 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2094 * elflink.c (bfd_elf_record_link_assignment): Clear any
2095 `forced_local' marking for DSO symbols that are not being
2098 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2100 * elfnn-riscv.c (riscv_elf_object_p): New function.
2102 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2105 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2107 (elf_x86_64_check_relocs): Create .eh_frame section for the
2109 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2110 .eh_frame section for the .plt.bnd section.
2111 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2112 for the .plt.bnd section.
2114 2017-01-12 Nick Clifton <nickc@redhat.com>
2117 * opncls.c (find_separate_debug_file): Add include_dirs
2118 parameter. Only include the directory part of the bfd's filename
2119 in search paths if include_dirs is true. Add a couple of extra
2120 locations for looking for debug files.
2121 ( bfd_follow_gnu_debuglink): Update invocation of
2122 find_separate_debug_file.
2123 (bfd_follow_gnu_debugaltlink): Likewise.
2124 (get_build_id): New function: Finds the build-id of the given bfd.
2125 (get_build_id_name): New function: Computes the name of the
2126 separate debug info file for a bfd, based upon its build-id.
2127 (check_build_id_file): New function: Checks to see if a separate
2128 debug info file exists at the given location, and that its
2129 build-id matches that of the original bfd.
2130 (bfd_follow_build_id_debuglink): New function: Finds a separate
2131 debug info file for a given bfd by using the build-id method.
2132 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2133 method of locating a separate debug info file before using the
2135 * bfd-in2.h: Regenerate.
2137 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2140 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2141 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2142 elf_x86_64_eh_frame_plt_got.
2143 (elf_x86_64_size_dynamic_sections): Get unwind info from
2144 elf_x86_64_bnd_arch_bed for the BND PLT.
2146 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
2148 * config.bfd: Add entries for i686-redox and x86_64-redox.
2150 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2152 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2154 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2155 .eh_frame section to 4 bytes for x32.
2156 (elf_x86_64_check_relocs): Likewise.
2158 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2161 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2162 (PLT_GOT_FDE_LENGTH): Likewise.
2163 (elf_i386_plt_layout): Add eh_frame_plt_got and
2164 eh_frame_plt_got_size.
2165 (elf_i386_plt): Updated.
2166 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2167 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2168 (elf_i386_size_dynamic_sections): Allocate and initialize
2169 .eh_frame section for .plt.got.
2170 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2172 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2173 eh_frame_plt_got_size.
2174 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2175 (PLT_GOT_FDE_LENGTH): Likewise.
2176 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2177 eh_frame_plt_got_size.
2178 (elf_x86_64_arch_bed): Updated.
2179 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2180 eh_frame_plt_got_size.
2181 (elf_x86_64_nacl_arch_bed): Likewise.
2182 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2183 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2184 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2185 .eh_frame section for .plt.got.
2186 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2189 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2191 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2192 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2194 2017-01-09 Nick Clifton <nickc@redhat.com>
2196 * dwarf2.c (lookup_address_in_function_table): Return early if
2197 there are no functions in the given comp unit, or if the high
2198 address of the last function in the comp unit is less than the
2201 2017-01-09 Nick Clifton <nickc@redhat.com>
2204 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2205 message if there are too many symbols to load.
2207 2017-01-04 James Clarke <jrtc27@jrtc27.com>
2209 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2210 if relocs are cached.
2212 2017-01-03 Rich Felker <bugdal@aerifal.cx>
2215 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2216 for R_MICROBLAZE_GOTOFF_64.
2218 2017-01-03 Nick Clifton <nickc@redhat.com>
2220 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2221 warning about using a possibly uninitialised variable.
2223 2017-01-02 Alan Modra <amodra@gmail.com>
2225 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2226 (allocate_plt_static, allocate_dynrelocs): Use it.
2228 2017-01-02 Alan Modra <amodra@gmail.com>
2230 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2231 .PARISC.unwind section.
2233 2017-01-02 Alan Modra <amodra@gmail.com>
2236 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2237 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2238 indirect to GOT pointer relative code edit.
2240 2017-01-02 Alan Modra <amodra@gmail.com>
2242 Update year range in copyright notice of all files.
2244 For older changes see ChangeLog-2016
2246 Copyright (C) 2017 Free Software Foundation, Inc.
2248 Copying and distribution of this file, with or without modification,
2249 are permitted in any medium without royalty provided the copyright
2250 notice and this notice are preserved.
2256 version-control: never