1 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
3 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
4 normal input file if possible.
6 2016-04-21 Nick Clifton <nickc@redhat.com>
8 * aout-adobe.c: Use _bfd_generic_link_check_relocs.
9 * aout-target.h: Likewise.
10 * aout-tic30.c: Likewise.
13 * coff-alpha.c: Likewise.
14 * coff-rs6000.c: Likewise.
15 * coff64-rs6000.c: Likewise.
16 * coffcode.h: Likewise.
17 * i386msdos.c: Likewise.
18 * i386os9k.c: Likewise.
21 * libbfd-in.h: Likewise.
22 * libecoff.h: Likewise.
23 * mach-o-target.c: Likewise.
25 * nlm-target.h: Likewise.
29 * ppcboot.c: Likewise.
33 * versados.c: Likewise.
34 * vms-alpha.c: Likewise.
36 * elfxx-target.h: Use _bfd_elf_link_check_relocs.
37 * linker.c (bfd_link_check_relocs): New function.
38 (_bfd_generic_link_check_relocs): New function.
39 * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
40 _bfd_link_check_relocs field.
41 (struct bfd_target)L Add _bfd_link_check_relocs field.
42 * bfd-in2.h: Regenerate.
43 * libbfd.h: Regenerate.
45 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
47 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
48 (elf_backend_gc_sweep_hook): Likewise.
49 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
50 (elf_backend_gc_sweep_hook): Likewise.
52 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
54 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
57 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
60 * elf64-x86-64.c (check_relocs_failed): New.
61 (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
62 Support relocation agaist local symbol. Set check_relocs_failed.
63 (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check
64 R_X86_64_32 relocation overflow.
65 (elf_x86_64_relocate_section): Skip if check_relocs failed.
66 Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
68 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
70 * elf32-i386.c (elf_i386_check_relocs): Call
71 _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
72 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
74 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
76 * elf-bfd.h (_bfd_elf_link_check_relocs): New.
77 * elflink.c (_bfd_elf_link_check_relocs): New function.
78 (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
79 if check_relocs_after_open_input is FALSE.
81 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
83 * cache.c: Update old style function definitions.
84 * elf32-m68k.c: Likewise.
85 * elf64-mmix.c: Likewise.
86 * stab-syms.c: Likewise.
88 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
90 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
92 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
94 * Makefile.in: Regenerated with automake 1.11.6.
95 * aclocal.m4: Likewise.
96 * doc/Makefile.in: Likewise.
98 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
100 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
101 * bfd-in2.h: Regenerate.
102 * libbfd.h: Regenerate.
103 * elf32-arc.c: Add 'opcode/arc.h' include.
104 (struct arc_relocation_data): Add symbol_name.
105 (arc_special_overflow_checks): New function.
106 (arc_do_relocation): Use arc_special_overflow_checks, reindent as
107 required, add an extra comment.
108 (elf_arc_relocate_section): Setup symbol_name in reloc_data.
110 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
112 * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
114 (elf_arc_relocate_section): Update enum uses.
115 (elf_arc_check_relocs): Likewise.
116 (elf_arc_finish_dynamic_symbol): Likewise.
118 2016-04-14 H.J. Lu <hongjiu.lu@intel.com>
120 * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
123 2016-04-14 Nick Clifton <nickc@redhat.com>
126 * elf-bbfd.h (struct elf_backend_data): New field:
128 New field: elf_backend_set_special_section_info_and_link
129 * elfxx-target.h (elf_backend_strtab_flags): Define if not already
131 (elf_backend_set_special_section_info_and_link): Define if not
133 (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
134 elf_backend_strtab_flags macros to initialise fields in structure.
135 * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
136 being set even if SHF_MERGE is not set.
137 (elf_fake_sections): Likewise.
138 (section_match): New function. Matches two ELF sections based
139 upon fixed characteristics.
140 (find_link): New function. Locates a section in a BFD that
141 matches a section in a different BFD.
142 (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
143 fields of reserved sections.
144 (bfd_elf_compute_section_file_positions): Set the flags for the
145 .shstrtab section based upon the elf_strtab_flags field in the
146 elf_backend_data structure.
147 (swap_out_syms): Likewise for the .strtab section.
148 * elflink.c (bfd_elf_final_link): Set the flags for the
149 .strtab section based upon the elf_strtab_flags field in the
150 elf_backend_data structure.
151 * elf32-i386.c (elf32_i386_set_special_info_link): New function.
152 (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
154 (elf_backend_set_special_section_info_and_link): Define for
156 * elf32-sparc.c: Likewise.
157 * elf64-x86-64.c: Likewise.
159 2016-04-11 H.J. Lu <hongjiu.lu@intel.com>
162 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
164 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
165 Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
166 applies to read-only section.
167 * elf32-i386.c (elf_i386_link_hash_table): Add
168 readonly_dynrelocs_against_ifunc.
169 (elf_i386_allocate_dynrelocs): Updated.
170 (elf_i386_size_dynamic_sections): Issue an error for read-only
171 segment with dynamic IFUNC relocations only if
172 readonly_dynrelocs_against_ifunc is TRUE.
173 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
174 readonly_dynrelocs_against_ifunc.
175 (elf_x86_64_allocate_dynrelocs): Updated.
176 (elf_x86_64_size_dynamic_sections): Issue an error for read-only
177 segment with dynamic IFUNC relocations only if
178 readonly_dynrelocs_against_ifunc is TRUE.
179 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
182 2016-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
184 * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
185 a fall through from error_ret_free_internal. Free local_syms in
186 error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
188 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
190 * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
191 (relocate_plt_for_entry): Likewise.
193 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
195 * elf32-arc.c (elf_arc_check_relocs): Changed
197 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
199 * elf32-arc.c (name_for_global_symbol): Changed assert.
200 (get_replace_function): Created.:
201 (struct arc_relocation_data): Changed to signed types.
202 (defines S, L, P, PDATA): Casted to signed type.
203 (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
204 (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
205 (arc_do_relocation): Changed.
207 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
209 * elf32-arc.c (name_for_global_symbol): Added assert to check for
211 (elf_arc_relocate_section): Added and changed asserts, validating
212 the synamic symbol index.
213 (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
214 relocation if symbol has dynindx set to -1.
216 2016-04-05 Maciej W. Rozycki <macro@imgtec.com>
218 * elflink.c (elf_link_add_object_symbols): Always turn hidden
219 and internal symbols which have a dynamic index into local
222 2016-04-04 Nick Clifton <nickc@redhat.com>
225 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
226 version number if the version is zero.
228 2016-04-01 Alan Modra <amodra@gmail.com>
231 * elflink.c (on_needed_list): Recursively check needed status.
232 (elf_link_add_object_symbols): Adjust.
234 2016-03-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
236 * elf32-avr.c (avr_elf32_load_records_from_section): Free
237 internal_relocs only if they aren't cached.
239 2016-03-29 Nick Clifton <nickc@redhat.com>
242 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
243 assertion on the size of the got section to allow it to be bigger
244 than the number of relocs.
246 2016-03-29 Toni Spets <toni.spets@iki.fi>
249 * coffcode.h (coff_write_object_contents): Revert accidental
252 2016-03-22 Alan Modra <amodra@gmail.com>
255 * dwarf2.c (read_attribute_value): Skip info_ptr check for
256 DW_FORM_flag_present.
258 2016-03-22 Nick Clifton <nickc@redhat.com>
260 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
261 architecture name for backwards compatibility.
263 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
266 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
267 sufficiently recent version of GCC.
268 * configure: Regenerate.
270 2016-03-22 Alan Modra <amodra@gmail.com>
273 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
275 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
277 * archures.c (bfd_mach_arc_nps400): Define.
278 * bfd-in2.h: Regenerate.
279 * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
280 some existing entries to make space.
281 * elf32-arc.c (arc_elf_object_p): Add nps400 case.
282 (arc_elf_final_write_processing): Likewise.
284 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
286 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
288 (arc_elf_final_write_processing): Don't bother setting cpu field
289 in e_flags, this will have been set elsewhere.
291 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
293 * elf32-arc.c (arc_elf_final_write_processing): Switch to using
296 2016-03-21 Nick Clifton <nickc@redhat.com>
298 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
299 * configure: Regenerate.
300 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
301 alloca with call to xmalloc.
302 * elf32-nds32.c: Likewise.
303 * elf64-hppa.c: Likewise.
304 * elfxx-mips.c: Likewise.
306 * pei-x86_64.c: Likewise.
310 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
313 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
315 (elf_i386_relocate_section): Likewise.
316 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
317 (elf_x86_64_relocate_section): Likewise.
319 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
322 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
323 no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
324 relocation overflow check.
326 2016-03-14 H.J. Lu <hongjiu.lu@intel.com>
328 * bfd-in2.h: Regenerated.
330 2016-03-11 Dan Gissel <dgisselq@ieee.org>
333 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
334 uses bytes not octets.
335 * elflink.c (resolve_section): Likewise.
337 (eval_section): Pass the input_bfd to resolve_section.
338 (bfd_elf_perform_complex_relocation): Convert byte offset to
339 octets before read and writing values.
340 (elf_link_input_bfd): Add byte to octet conversions.
341 (elf_reloc_link_order): Likewise.
342 (elf_fixup_link_order): Likewise.
343 (bfd_elf_final_link): Likewise.
344 * reloc.c (_bfd_final_link_relocate): Likewise.
345 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
347 2016-03-10 Nick Clifton <nickc@redhat.com>
349 * config.bfd: Mark the i370 target as obsolete.
351 2016-03-09 Pedro Alves <palves@redhat.com>
353 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
354 gcc ABI)" to printable name.
355 * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
356 of "v850-rh850" as printable name.
358 2016-03-09 Leon Winter <winter-gcc@bfw-online.de>
361 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
362 relocations against absolute symbols.
364 2016-03-09 Alan Modra <amodra@gmail.com>
367 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
368 length elements in the archive.
370 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
373 * elflink.c (elf_link_add_object_symbols): Create dynamic sections
374 for -E/--dynamic-list only when not relocatable.
376 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
379 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
380 count for locally defined local IFUNC symbols in shared object.
381 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
383 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
386 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
389 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
390 Andrew Burgess <andrew.burgess@embecosm.com>
392 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
393 (arc_bfd_put_32): Becomes an alias for bfd_put_32.
394 (arc_elf_howto_init): Added assert to validate relocations.
395 (get_middle_endian_relocation): Delete.
396 (middle_endian_convert): New function.
397 (ME): Redefine, now does nothing.
399 (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
400 definition to call middle_endian_convert. Add a new local
401 variable and make use of this throughout. Added call to
402 arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
404 2016-03-07 Nick Clifton <nickc@redhat.com>
407 * archive.c (bfd_generic_openr_next_archived_file): Allow zero
408 length elements in the archive.
410 2016-03-07 Jiong Wang <jiong.wang@arm.com>
412 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
413 section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
415 2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
418 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
419 executable as definition if the new definition comes from a
422 2016-03-02 Alan Modra <amodra@gmail.com>
424 * Makefile.in: Regenerate.
425 * po/SRC-POTFILES.in: Regenerate.
427 2016-02-29 Cupertino Miranda <cmiranda@synopsys.com>
429 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
430 relocation addend when sections get merged.
432 2016-02-29 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
434 * elf32-arc.c (arc_elf_final_write_processing): Add condition to
436 (elf_arc_relocate_section): Fixes and conditions to support PIE.
437 Assert for code sections dynamic relocs.
439 2016-02-26 Renlin Li <renlin.li@arm.com>
441 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
442 check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
444 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
447 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
448 load with locally bound symbols if PIC is false or there is no
449 base register. Optimize branch to 0 if PIC is false.
450 (elf_i386_relocate_section): Don't generate dynamic relocations
451 against undefined weak symbols if PIC is false.
452 * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
453 if we can't estimate relocation overflow with --no-relax.
454 Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
455 symbols if PIC is false. Optimize branch to 0 if PIC is false.
456 (elf_x86_64_relocate_section): Don't generate dynamic relocations
457 against undefined weak symbols if PIC is false.
459 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
462 * bfd.c (bfd): Change flags to 20 bits.
463 (BFD_CONVERT_ELF_COMMON): New.
464 (BFD_USE_ELF_STT_COMMON): Likewise.
465 (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
466 BFD_USE_ELF_STT_COMMON.
467 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
468 * configure.ac: Remove --enable-elf-stt-common.
469 * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
470 common symbol depending on BFD_CONVERT_ELF_COMMON and
471 BFD_USE_ELF_STT_COMMON.
472 * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
474 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
476 (elf_link_convert_common_type): New function.
477 (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
478 common symbol depending on BFD_CONVERT_ELF_COMMON and
479 BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx.
480 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
481 and BFD_USE_ELF_STT_COMMON to object_flags.
482 (TARGET_LITTLE_SYM): Likewise.
483 * syms.c (BSF_KEEP_G): Renamed to ...
484 (BSF_ELF_COMMON): This.
485 * bfd-in2.h: Regenerated.
486 * config.in: Likewise.
487 * configure: Likewise.
489 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
494 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
495 (elf_i386_link_hash_entry): Add has_got_reloc and
497 (elf_i386_link_hash_table): Add interp.
498 (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
500 (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
502 (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
503 (elf_i386_fixup_symbol): New function.
504 (elf_i386_pie_finish_undefweak_symbol): Likewise.
505 (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
506 relocations and discard relocations against resolved undefined
507 weak symbols in executable. Don't make resolved undefined weak
508 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
509 relocation against undefined weak symbols in PIE.
510 (elf_i386_size_dynamic_sections): Set interp to .interp section.
511 (elf_i386_relocate_section): Don't generate dynamic relocations
512 against resolved undefined weak symbols in PIE, except for
514 (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
515 dynamic PLT/GOT relocations for resolved undefined weak symbols.
516 Don't generate dynamic relocation against resolved undefined weak
517 symbol in executable.
518 (elf_i386_finish_dynamic_sections): Call
519 elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
520 (elf_backend_fixup_symbol): New.
521 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
522 (elf_x86_64_link_hash_entry): Add has_got_reloc and
524 (elf_x86_64_link_hash_table): Add interp.
525 (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
527 (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
529 (elf_x86_64_check_relocs): Set has_got_reloc and
531 (elf_x86_64_fixup_symbol): New function.
532 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
533 (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
534 relocations and discard relocations against resolved undefined
535 weak symbols in executable. Don't make resolved undefined weak
536 symbols in executable dynamic.
537 (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
538 (elf_x86_64_relocate_section): Check relocation overflow for
539 dynamic relocations against unresolved weak undefined symbols.
540 Don't generate dynamic relocations against resolved weak
541 undefined symbols in PIE.
542 (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
543 dynamic PLT/GOT relocations for resolved undefined weak symbols.
544 Don't generate dynamic relocation against resolved undefined weak
545 symbol in executable.
546 (elf_x86_64_finish_dynamic_sections): Call
547 elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
548 (elf_backend_fixup_symbol): New.
550 2016-02-26 Alan Modra <amodra@gmail.com>
552 * elf64-ppc.c (create_linkage_sections): Create sfpr when
553 save_restore_funcs, rest of sections when not relocatable.
554 (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
555 (sfpr_define): Define all symbols on emitted code.
556 (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
557 when relocatable. Move sfpr_define loop earlier.
559 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
561 * elf64-x86-64.c (elf_x86_64_need_pic): New function.
562 (elf_x86_64_relocate_section): Use it. Replace
563 x86_64_elf_howto_table[r_type] with howto.
565 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
568 * elflink.c (bfd_elf_record_link_assignment): Set versioned if
569 symbol version is unknown.
571 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
573 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
574 to (bfd_vma) -1 when setting needs_plt to 0.
575 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
577 2016-02-23 H.J. Lu <hongjiu.lu@intel.com>
579 * elflink.c (bfd_elf_record_link_assignment): Check for shared
580 library, instead of PIC, and don't check PDE when making linker
581 assigned symbol dynamic.
583 2016-02-23 Faraz Shahbazker <faraz.shahbazker@imgtec.com>
585 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
586 ABIVERSION for non-executable stack.
588 2016-02-23 Rich Felker <bugdal@aerifal.cx>
591 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
592 Always produce a RELATIVE reloc for a local symbol.
594 2016-02-23 Hans-Peter Nilsson <hp@axis.com>
596 Fix test-case ld-elf/pr19617b
597 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
598 discard unused non-function symbols when --dynamic-list-data.
600 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
602 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
603 dynsym section, even if it is empty, with dynamic sections.
605 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
607 * syms.c: Remove BSF_COMMON from comments.
608 * bfd-in2.h: Regenerated.
610 2016-02-22 Jiong Wang <jiong.wang@arm.com>
612 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
613 for destination. Remove useless function parameters.
614 (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
616 2016-02-19 Nick Clifton <nickc@redhat.com>
619 * aoutx.h (aout_link_add_symbols): Check for out of range string
623 * reloc.c (bfd_generic_get_relocated_section_contents): Stop
624 processing if we encounter a reloc without an associated symbol.
626 2016-02-18 H.J. Lu <hongjiu.lu@intel.com>
629 * elflink.c (elf_link_add_object_symbols): Always create dynamic
630 sections for -E/--dynamic-list.
632 2016-02-17 H.J. Lu <hongjiu.lu@intel.com>
634 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined
637 2016-02-16 Joseph Myers <joseph@codesourcery.com>
639 * plugin.c (plugin_vec): Set match priority to 255.
640 * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
641 matching against the plugin vector, take priority from there not
644 2016-02-15 Nick Clifton <nickc@redhat.com>
646 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
647 for length and type fields. Use a signed value for the
650 2016-02-10 H.J. Lu <hongjiu.lu@intel.com>
653 * elf32-i386.c (elf_i386_relocate_section): Mask off the least
654 significant bit in GOT offset for R_386_GOT32X.
656 2016-02-10 Nick Clifton <nickc@redhat.com>
659 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
661 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
662 number of messages about FDE encoding preventing .eh_frame_hdr
665 2016-02-09 Nick Clifton <nickc@redhat.com>
667 * oasys.c (oasys_archive_p): Fix indentation.
668 * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
669 constant for left shifting.
671 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
672 helpful warning message to explain why certain AArch64 relocs
675 2016-02-05 Simon Marchi <simon.marchi@ericsson.com>
677 * pe-mips.c (coff_mips_reloc): Fix formatting.
679 2016-02-05 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
681 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
682 to bfd_mach_arc_arc600.
684 2016-02-04 Alan Modra <amodra@gmail.com>
686 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
689 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
692 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
693 distances in the compressed_size field of the output section.
695 2016-02-02 Alan Modra <amodra@gmail.com>
697 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
698 ELFv2 entry optimization.
700 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
703 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
704 no relocations in relocatable files.
706 2016-02-01 H.J. Lu <hongjiu.lu@intel.com>
709 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
710 if a symbol from a library loaded via DT_NEEDED doesn't match
711 the symbol referenced by regular object.
713 2016-02-01 Nathaniel Smith <njs@pobox.com>
715 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
718 2016-02-01 Alan Modra <amodra@gmail.com>
720 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
721 an out of range reloc_index.
722 * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
724 2016-02-01 Kamil Rytarowski <n54@gmx.com>
726 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
727 (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
728 * Makefile.in: Regenerated.
730 2016-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
732 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
734 2016-01-31 John David Anglin <danglin@gcc.gnu.org>
737 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
739 * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval.
741 2016-01-30 H.J. Lu <hongjiu.lu@intel.com>
744 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
745 against STT_GNU_IFUNC symbol only with dynamic symbols.
746 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
748 2016-01-28 H.J. Lu <hongjiu.lu@intel.com>
751 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
752 decompress debug sections.
754 2016-01-25 Maciej W. Rozycki <macro@imgtec.com>
756 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
759 2016-01-25 Nick Clifton <nickc@redhat.com>
762 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
763 dsym filename buffer.
765 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
767 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
769 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
771 * elfxx-mips.c (BZ16_REG): Correct calculation.
773 2016-01-21 Nick Clifton <nickc@redhat.com>
775 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
776 changing the type of _loc to be bfd_byte *.
777 (elf_arc_finish_dynamic_symbol): Likewise.
779 2016-01-21 Nick Clifton <nickc@redhat.com>
782 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
783 class of the linker stub bfd.
784 (elf32_arm_check_relocs): Skip check for pic format after
785 processing a vxWorks R_ARM_ABS12 reloc.
786 * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
787 reporting a class mismatch.
789 2016-01-21 Jiong Wang <jiong.wang@arm.com>
791 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
792 veneer for sym_sec != input_sec.
793 (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
794 (elfNN_aarch64_final_link_relocate): Take rela addend into account when
795 calculation destination.
797 2016-01-21 Alan Modra <amodra@gmail.com>
799 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
800 (swap_linux_prpsinfo64_out): New function.
801 (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
802 (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
803 * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset.
804 (elfcore_write_linux_prpsinfo64): Likewise.
805 * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
806 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
807 (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset.
809 2016-01-21 Alan Modra <amodra@gmail.com>
811 * elf-linux-core.h: Rename from elf-linux-psinfo.h.
812 * elf.c: Adjust #include.
813 * elf32-ppc.c: Don't #include elf-linux-psinfo.h
814 * Makefile.am (SOURCE_HFILES): Update.
815 * Makefile.in: Regenerate.
816 * po/SRC-PORFILES.in: Regenerate.
818 2016-01-21 Alan Modra <amodra@gmail.com>
820 * configure.ac: Move corefile selection later in file. Move
821 tdefaults code immediately after other target vector code.
822 * configure: Regenerate.
824 2016-01-20 Mickael Guene <mickael.guene@st.com>
826 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
827 section using '.text.noread' pattern.
829 2016-01-19 John Baldwin <jhb@FreeBSD.org>
831 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
833 2016-01-18 Miranda Cupertino <Cupertino.Miranda@synopsys.com>
834 Zissulescu Claudiu <Claudiu.Zissulescu@synopsys.com>
836 * arc-plt.def: New file.
837 * arc-plt.h: Likewise.
838 * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
839 elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
840 elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
841 elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
842 (name_for_global_symbol): Added.
843 (ADD_RELA): Helper to create dynamic relocs.
844 (new_got_entry_to_list): Create a new got entry in linked list.
845 (symbol_has_entry_of_type): Search for specific type of entry in
847 (is_reloc_for_GOT): return FALSE for any TLS related relocs.
848 (is_reloc_for_TLS, arc_elf_set_private_flags)
849 (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
850 (arc_elf_merge_private_bfd_data): New functions.
851 (debug_arc_reloc): Cleaned debug info printing.
852 (PDATA reloc): Changed not to perform address alignment.
853 (reverse_me): Added. Fix for ARC_32 relocs.
854 (arc_do_relocation): Return bfd_reloc_of when no relocation should
856 (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
857 Changed function to access an array of list of GOT entries instead
858 of just an array of offsets.
859 (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
860 (elf_arc_check_relocs): Likewise.
861 (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
862 (elf_arc_finish_dynamic_sections): Likewise
863 (arc_create_dynamic_sections): Modified conditions to create
865 (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
866 (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
867 (relocate_plt_for_entry): Changed to support new way to define PLT
869 (add_symbol_to_plt): Likewise.
870 (arc_elf_link_hash_table_create): New function.
872 2016-01-18 Nick Clifton <nickc@redhat.com>
875 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
876 section number into internal section number.
877 * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
878 * coffswap.h (coff_swap_sym_in): Likewise.
879 * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
880 * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
881 section number field is big enough to hold the external value.
883 2016-01-17 Alan Modra <amodra@gmail.com>
885 * configure: Regenerate.
887 2016-01-12 Yury Usishchev <y.usishchev@samsung.com>
889 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
890 when address in first unwind entry does not match start of
893 2016-01-08 Richard Sandiford <richard.sandiford@arm.com>
894 Jiong Wang <jiong.wang@arm.com>
897 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
900 2016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
902 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
903 place 'R_' before the reloc name returned.
904 (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
905 the relocation string.
907 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
909 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
911 (_bfd_mips_elf_merge_private_bfd_data): ... here.
913 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
915 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
916 attribute check after ELF file header flag check.
918 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
920 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
921 return status from `_bfd_elf_merge_object_attributes'.
923 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
925 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
927 (_bfd_mips_elf_merge_private_bfd_data): ... here.
929 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
931 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
932 handling of input MIPS ABI flags together.
934 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
936 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
937 attribute checks for null input.
939 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
941 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
942 pointers to target data.
944 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
946 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
949 2016-01-01 Alan Modra <amodra@gmail.com>
951 Update year range in copyright notice of all files.
953 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
955 Copyright (C) 2016 Free Software Foundation, Inc.
957 Copying and distribution of this file, with or without modification,
958 are permitted in any medium without royalty provided the copyright
959 notice and this notice are preserved.
965 version-control: never