1 2016-05-03 Maciej W. Rozycki <macro@imgtec.com>
4 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
7 2016-05-03 Jiong Wang <jiong.wang@arm.com>
9 * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
10 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
11 * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
12 no_apply_dynamic_relocs.
13 (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
14 dynamic relocations generated.
16 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
18 * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
20 (elf_i386_create_dynamic_sections): Here.
21 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
23 (elf_x86_64_create_dynamic_sections): Here.
25 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
27 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
28 and replace (EH)->has_got_reloc with GOT_RELOC.
29 (elf_i386_fixup_symbol): Pass has_got_reloc to
30 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
31 (elf_i386_allocate_dynrelocs): Likewise.
32 (elf_i386_relocate_section): Likewise.
33 (elf_i386_finish_dynamic_symbol): Likewise.
34 (elf_i386_convert_load): Pass TRUE to
35 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
36 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
37 GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
38 (elf_x86_64_fixup_symbol): Pass has_got_reloc to
39 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
40 (elf_x86_64_allocate_dynrelocs): Likewise.
41 (elf_x86_64_relocate_section): Likewise.
42 (elf_x86_64_finish_dynamic_symbol): Likewise.
43 (elf_x86_64_convert_load): Pass TRUE to
44 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
46 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
48 * elf32-i386.c (check_relocs_failed): New.
49 (elf_i386_check_relocs): Set check_relocs_failed on error.
50 (elf_i386_relocate_section): Skip if check_relocs failed.
52 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
54 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
55 check_relocs_failed on error.
57 2016-04-29 Nick Clifton <nickc@redhat.com>
60 * elf-bfd.h (struct elf_backend_data): Rename
61 elf_backend_set_special_section_info_and_link to
62 elf_backend_copy_special_section_fields.
63 * elfxx-target.h: Likewise.
64 * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
65 comparing section flags.
66 (copy_special_section_fields): New function.
67 (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
68 Perform two scans over special sections. The first one looks for
69 a direct mapping between the output section and an input section.
70 The second scan looks for a possible match based upon section
72 * elf32-arm.c (elf32_arm_copy_special_section_fields): New
73 function. Handle setting the sh_link field of SHT_ARM_EXIDX
75 * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
76 elf32_i386_copy_solaris_special_section_fields.
77 * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
78 Rename to elf32_sparc_copy_solaris_special_section_fields.
79 * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
80 elf64_x86_64_copy_solaris_special_section_fields.
82 2016-04-28 Nick Clifton <nickc@redhat.com>
84 * po/zh_CN.po: Updated Chinese (simplified) translation.
86 2016-04-27 H.J. Lu <hongjiu.lu@intel.com>
89 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
90 when estimating distances between output sections.
92 2016-04-27 Alan Modra <amodra@gmail.com>
94 * elflink.c (_bfd_elf_is_start_stop): New function.
95 (_bfd_elf_gc_mark_rsec): Use it.
96 * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
98 2016-04-26 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
100 * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
101 * mmo.c (mmo_get_section_contents): Likewise.
102 (mmo_set_section_contents): Likewise.
104 2016-04-26 H.J. Lu <hongjiu.lu@intel.com>
106 * elf-bfd.h (elf_link_hash_table): Update comments for
108 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
109 the unused NULL entry at the head of dynamic symbol table.
110 (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
113 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
115 * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
116 created file from dynobj.
118 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
120 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
121 normal input file if possible.
123 2016-04-21 Nick Clifton <nickc@redhat.com>
125 * aout-adobe.c: Use _bfd_generic_link_check_relocs.
126 * aout-target.h: Likewise.
127 * aout-tic30.c: Likewise.
128 * binary.c: Likewise.
130 * coff-alpha.c: Likewise.
131 * coff-rs6000.c: Likewise.
132 * coff64-rs6000.c: Likewise.
133 * coffcode.h: Likewise.
134 * i386msdos.c: Likewise.
135 * i386os9k.c: Likewise.
138 * libbfd-in.h: Likewise.
139 * libecoff.h: Likewise.
140 * mach-o-target.c: Likewise.
142 * nlm-target.h: Likewise.
145 * plugin.c: Likewise.
146 * ppcboot.c: Likewise.
149 * tekhex.c: Likewise.
150 * versados.c: Likewise.
151 * vms-alpha.c: Likewise.
153 * elfxx-target.h: Use _bfd_elf_link_check_relocs.
154 * linker.c (bfd_link_check_relocs): New function.
155 (_bfd_generic_link_check_relocs): New function.
156 * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
157 _bfd_link_check_relocs field.
158 (struct bfd_target)L Add _bfd_link_check_relocs field.
159 * bfd-in2.h: Regenerate.
160 * libbfd.h: Regenerate.
162 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
164 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
165 (elf_backend_gc_sweep_hook): Likewise.
166 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
167 (elf_backend_gc_sweep_hook): Likewise.
169 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
171 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
174 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
177 * elf64-x86-64.c (check_relocs_failed): New.
178 (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
179 Support relocation agaist local symbol. Set check_relocs_failed.
180 (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check
181 R_X86_64_32 relocation overflow.
182 (elf_x86_64_relocate_section): Skip if check_relocs failed.
183 Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
185 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
187 * elf32-i386.c (elf_i386_check_relocs): Call
188 _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
189 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
191 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
193 * elf-bfd.h (_bfd_elf_link_check_relocs): New.
194 * elflink.c (_bfd_elf_link_check_relocs): New function.
195 (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
196 if check_relocs_after_open_input is FALSE.
198 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
200 * cache.c: Update old style function definitions.
201 * elf32-m68k.c: Likewise.
202 * elf64-mmix.c: Likewise.
203 * stab-syms.c: Likewise.
205 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
207 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
209 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
211 * Makefile.in: Regenerated with automake 1.11.6.
212 * aclocal.m4: Likewise.
213 * doc/Makefile.in: Likewise.
215 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
217 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
218 * bfd-in2.h: Regenerate.
219 * libbfd.h: Regenerate.
220 * elf32-arc.c: Add 'opcode/arc.h' include.
221 (struct arc_relocation_data): Add symbol_name.
222 (arc_special_overflow_checks): New function.
223 (arc_do_relocation): Use arc_special_overflow_checks, reindent as
224 required, add an extra comment.
225 (elf_arc_relocate_section): Setup symbol_name in reloc_data.
227 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
229 * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
231 (elf_arc_relocate_section): Update enum uses.
232 (elf_arc_check_relocs): Likewise.
233 (elf_arc_finish_dynamic_symbol): Likewise.
235 2016-04-14 H.J. Lu <hongjiu.lu@intel.com>
237 * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
240 2016-04-14 Nick Clifton <nickc@redhat.com>
243 * elf-bbfd.h (struct elf_backend_data): New field:
245 New field: elf_backend_set_special_section_info_and_link
246 * elfxx-target.h (elf_backend_strtab_flags): Define if not already
248 (elf_backend_set_special_section_info_and_link): Define if not
250 (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
251 elf_backend_strtab_flags macros to initialise fields in structure.
252 * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
253 being set even if SHF_MERGE is not set.
254 (elf_fake_sections): Likewise.
255 (section_match): New function. Matches two ELF sections based
256 upon fixed characteristics.
257 (find_link): New function. Locates a section in a BFD that
258 matches a section in a different BFD.
259 (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
260 fields of reserved sections.
261 (bfd_elf_compute_section_file_positions): Set the flags for the
262 .shstrtab section based upon the elf_strtab_flags field in the
263 elf_backend_data structure.
264 (swap_out_syms): Likewise for the .strtab section.
265 * elflink.c (bfd_elf_final_link): Set the flags for the
266 .strtab section based upon the elf_strtab_flags field in the
267 elf_backend_data structure.
268 * elf32-i386.c (elf32_i386_set_special_info_link): New function.
269 (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
271 (elf_backend_set_special_section_info_and_link): Define for
273 * elf32-sparc.c: Likewise.
274 * elf64-x86-64.c: Likewise.
276 2016-04-11 H.J. Lu <hongjiu.lu@intel.com>
279 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
281 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
282 Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
283 applies to read-only section.
284 * elf32-i386.c (elf_i386_link_hash_table): Add
285 readonly_dynrelocs_against_ifunc.
286 (elf_i386_allocate_dynrelocs): Updated.
287 (elf_i386_size_dynamic_sections): Issue an error for read-only
288 segment with dynamic IFUNC relocations only if
289 readonly_dynrelocs_against_ifunc is TRUE.
290 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
291 readonly_dynrelocs_against_ifunc.
292 (elf_x86_64_allocate_dynrelocs): Updated.
293 (elf_x86_64_size_dynamic_sections): Issue an error for read-only
294 segment with dynamic IFUNC relocations only if
295 readonly_dynrelocs_against_ifunc is TRUE.
296 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
299 2016-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
301 * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
302 a fall through from error_ret_free_internal. Free local_syms in
303 error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
305 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
307 * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
308 (relocate_plt_for_entry): Likewise.
310 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
312 * elf32-arc.c (elf_arc_check_relocs): Changed
314 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
316 * elf32-arc.c (name_for_global_symbol): Changed assert.
317 (get_replace_function): Created.:
318 (struct arc_relocation_data): Changed to signed types.
319 (defines S, L, P, PDATA): Casted to signed type.
320 (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
321 (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
322 (arc_do_relocation): Changed.
324 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
326 * elf32-arc.c (name_for_global_symbol): Added assert to check for
328 (elf_arc_relocate_section): Added and changed asserts, validating
329 the synamic symbol index.
330 (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
331 relocation if symbol has dynindx set to -1.
333 2016-04-05 Maciej W. Rozycki <macro@imgtec.com>
335 * elflink.c (elf_link_add_object_symbols): Always turn hidden
336 and internal symbols which have a dynamic index into local
339 2016-04-04 Nick Clifton <nickc@redhat.com>
342 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
343 version number if the version is zero.
345 2016-04-01 Alan Modra <amodra@gmail.com>
348 * elflink.c (on_needed_list): Recursively check needed status.
349 (elf_link_add_object_symbols): Adjust.
351 2016-03-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
353 * elf32-avr.c (avr_elf32_load_records_from_section): Free
354 internal_relocs only if they aren't cached.
356 2016-03-29 Nick Clifton <nickc@redhat.com>
359 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
360 assertion on the size of the got section to allow it to be bigger
361 than the number of relocs.
363 2016-03-29 Toni Spets <toni.spets@iki.fi>
366 * coffcode.h (coff_write_object_contents): Revert accidental
369 2016-03-22 Alan Modra <amodra@gmail.com>
372 * dwarf2.c (read_attribute_value): Skip info_ptr check for
373 DW_FORM_flag_present.
375 2016-03-22 Nick Clifton <nickc@redhat.com>
377 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
378 architecture name for backwards compatibility.
380 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
383 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
384 sufficiently recent version of GCC.
385 * configure: Regenerate.
387 2016-03-22 Alan Modra <amodra@gmail.com>
390 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
392 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
394 * archures.c (bfd_mach_arc_nps400): Define.
395 * bfd-in2.h: Regenerate.
396 * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
397 some existing entries to make space.
398 * elf32-arc.c (arc_elf_object_p): Add nps400 case.
399 (arc_elf_final_write_processing): Likewise.
401 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
403 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
405 (arc_elf_final_write_processing): Don't bother setting cpu field
406 in e_flags, this will have been set elsewhere.
408 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
410 * elf32-arc.c (arc_elf_final_write_processing): Switch to using
413 2016-03-21 Nick Clifton <nickc@redhat.com>
415 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
416 * configure: Regenerate.
417 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
418 alloca with call to xmalloc.
419 * elf32-nds32.c: Likewise.
420 * elf64-hppa.c: Likewise.
421 * elfxx-mips.c: Likewise.
423 * pei-x86_64.c: Likewise.
427 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
430 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
432 (elf_i386_relocate_section): Likewise.
433 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
434 (elf_x86_64_relocate_section): Likewise.
436 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
439 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
440 no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
441 relocation overflow check.
443 2016-03-14 H.J. Lu <hongjiu.lu@intel.com>
445 * bfd-in2.h: Regenerated.
447 2016-03-11 Dan Gissel <dgisselq@ieee.org>
450 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
451 uses bytes not octets.
452 * elflink.c (resolve_section): Likewise.
454 (eval_section): Pass the input_bfd to resolve_section.
455 (bfd_elf_perform_complex_relocation): Convert byte offset to
456 octets before read and writing values.
457 (elf_link_input_bfd): Add byte to octet conversions.
458 (elf_reloc_link_order): Likewise.
459 (elf_fixup_link_order): Likewise.
460 (bfd_elf_final_link): Likewise.
461 * reloc.c (_bfd_final_link_relocate): Likewise.
462 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
464 2016-03-10 Nick Clifton <nickc@redhat.com>
466 * config.bfd: Mark the i370 target as obsolete.
468 2016-03-09 Pedro Alves <palves@redhat.com>
470 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
471 gcc ABI)" to printable name.
472 * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
473 of "v850-rh850" as printable name.
475 2016-03-09 Leon Winter <winter-gcc@bfw-online.de>
478 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
479 relocations against absolute symbols.
481 2016-03-09 Alan Modra <amodra@gmail.com>
484 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
485 length elements in the archive.
487 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
490 * elflink.c (elf_link_add_object_symbols): Create dynamic sections
491 for -E/--dynamic-list only when not relocatable.
493 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
496 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
497 count for locally defined local IFUNC symbols in shared object.
498 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
500 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
503 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
506 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
507 Andrew Burgess <andrew.burgess@embecosm.com>
509 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
510 (arc_bfd_put_32): Becomes an alias for bfd_put_32.
511 (arc_elf_howto_init): Added assert to validate relocations.
512 (get_middle_endian_relocation): Delete.
513 (middle_endian_convert): New function.
514 (ME): Redefine, now does nothing.
516 (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
517 definition to call middle_endian_convert. Add a new local
518 variable and make use of this throughout. Added call to
519 arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
521 2016-03-07 Nick Clifton <nickc@redhat.com>
524 * archive.c (bfd_generic_openr_next_archived_file): Allow zero
525 length elements in the archive.
527 2016-03-07 Jiong Wang <jiong.wang@arm.com>
529 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
530 section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
532 2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
535 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
536 executable as definition if the new definition comes from a
539 2016-03-02 Alan Modra <amodra@gmail.com>
541 * Makefile.in: Regenerate.
542 * po/SRC-POTFILES.in: Regenerate.
544 2016-02-29 Cupertino Miranda <cmiranda@synopsys.com>
546 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
547 relocation addend when sections get merged.
549 2016-02-29 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
551 * elf32-arc.c (arc_elf_final_write_processing): Add condition to
553 (elf_arc_relocate_section): Fixes and conditions to support PIE.
554 Assert for code sections dynamic relocs.
556 2016-02-26 Renlin Li <renlin.li@arm.com>
558 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
559 check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
561 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
564 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
565 load with locally bound symbols if PIC is false or there is no
566 base register. Optimize branch to 0 if PIC is false.
567 (elf_i386_relocate_section): Don't generate dynamic relocations
568 against undefined weak symbols if PIC is false.
569 * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
570 if we can't estimate relocation overflow with --no-relax.
571 Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
572 symbols if PIC is false. Optimize branch to 0 if PIC is false.
573 (elf_x86_64_relocate_section): Don't generate dynamic relocations
574 against undefined weak symbols if PIC is false.
576 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
579 * bfd.c (bfd): Change flags to 20 bits.
580 (BFD_CONVERT_ELF_COMMON): New.
581 (BFD_USE_ELF_STT_COMMON): Likewise.
582 (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
583 BFD_USE_ELF_STT_COMMON.
584 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
585 * configure.ac: Remove --enable-elf-stt-common.
586 * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
587 common symbol depending on BFD_CONVERT_ELF_COMMON and
588 BFD_USE_ELF_STT_COMMON.
589 * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
591 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
593 (elf_link_convert_common_type): New function.
594 (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
595 common symbol depending on BFD_CONVERT_ELF_COMMON and
596 BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx.
597 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
598 and BFD_USE_ELF_STT_COMMON to object_flags.
599 (TARGET_LITTLE_SYM): Likewise.
600 * syms.c (BSF_KEEP_G): Renamed to ...
601 (BSF_ELF_COMMON): This.
602 * bfd-in2.h: Regenerated.
603 * config.in: Likewise.
604 * configure: Likewise.
606 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
611 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
612 (elf_i386_link_hash_entry): Add has_got_reloc and
614 (elf_i386_link_hash_table): Add interp.
615 (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
617 (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
619 (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
620 (elf_i386_fixup_symbol): New function.
621 (elf_i386_pie_finish_undefweak_symbol): Likewise.
622 (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
623 relocations and discard relocations against resolved undefined
624 weak symbols in executable. Don't make resolved undefined weak
625 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
626 relocation against undefined weak symbols in PIE.
627 (elf_i386_size_dynamic_sections): Set interp to .interp section.
628 (elf_i386_relocate_section): Don't generate dynamic relocations
629 against resolved undefined weak symbols in PIE, except for
631 (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
632 dynamic PLT/GOT relocations for resolved undefined weak symbols.
633 Don't generate dynamic relocation against resolved undefined weak
634 symbol in executable.
635 (elf_i386_finish_dynamic_sections): Call
636 elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
637 (elf_backend_fixup_symbol): New.
638 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
639 (elf_x86_64_link_hash_entry): Add has_got_reloc and
641 (elf_x86_64_link_hash_table): Add interp.
642 (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
644 (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
646 (elf_x86_64_check_relocs): Set has_got_reloc and
648 (elf_x86_64_fixup_symbol): New function.
649 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
650 (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
651 relocations and discard relocations against resolved undefined
652 weak symbols in executable. Don't make resolved undefined weak
653 symbols in executable dynamic.
654 (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
655 (elf_x86_64_relocate_section): Check relocation overflow for
656 dynamic relocations against unresolved weak undefined symbols.
657 Don't generate dynamic relocations against resolved weak
658 undefined symbols in PIE.
659 (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
660 dynamic PLT/GOT relocations for resolved undefined weak symbols.
661 Don't generate dynamic relocation against resolved undefined weak
662 symbol in executable.
663 (elf_x86_64_finish_dynamic_sections): Call
664 elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
665 (elf_backend_fixup_symbol): New.
667 2016-02-26 Alan Modra <amodra@gmail.com>
669 * elf64-ppc.c (create_linkage_sections): Create sfpr when
670 save_restore_funcs, rest of sections when not relocatable.
671 (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
672 (sfpr_define): Define all symbols on emitted code.
673 (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
674 when relocatable. Move sfpr_define loop earlier.
676 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
678 * elf64-x86-64.c (elf_x86_64_need_pic): New function.
679 (elf_x86_64_relocate_section): Use it. Replace
680 x86_64_elf_howto_table[r_type] with howto.
682 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
685 * elflink.c (bfd_elf_record_link_assignment): Set versioned if
686 symbol version is unknown.
688 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
690 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
691 to (bfd_vma) -1 when setting needs_plt to 0.
692 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
694 2016-02-23 H.J. Lu <hongjiu.lu@intel.com>
696 * elflink.c (bfd_elf_record_link_assignment): Check for shared
697 library, instead of PIC, and don't check PDE when making linker
698 assigned symbol dynamic.
700 2016-02-23 Faraz Shahbazker <faraz.shahbazker@imgtec.com>
702 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
703 ABIVERSION for non-executable stack.
705 2016-02-23 Rich Felker <bugdal@aerifal.cx>
708 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
709 Always produce a RELATIVE reloc for a local symbol.
711 2016-02-23 Hans-Peter Nilsson <hp@axis.com>
713 Fix test-case ld-elf/pr19617b
714 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
715 discard unused non-function symbols when --dynamic-list-data.
717 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
719 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
720 dynsym section, even if it is empty, with dynamic sections.
722 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
724 * syms.c: Remove BSF_COMMON from comments.
725 * bfd-in2.h: Regenerated.
727 2016-02-22 Jiong Wang <jiong.wang@arm.com>
729 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
730 for destination. Remove useless function parameters.
731 (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
733 2016-02-19 Nick Clifton <nickc@redhat.com>
736 * aoutx.h (aout_link_add_symbols): Check for out of range string
740 * reloc.c (bfd_generic_get_relocated_section_contents): Stop
741 processing if we encounter a reloc without an associated symbol.
743 2016-02-18 H.J. Lu <hongjiu.lu@intel.com>
746 * elflink.c (elf_link_add_object_symbols): Always create dynamic
747 sections for -E/--dynamic-list.
749 2016-02-17 H.J. Lu <hongjiu.lu@intel.com>
751 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined
754 2016-02-16 Joseph Myers <joseph@codesourcery.com>
756 * plugin.c (plugin_vec): Set match priority to 255.
757 * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
758 matching against the plugin vector, take priority from there not
761 2016-02-15 Nick Clifton <nickc@redhat.com>
763 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
764 for length and type fields. Use a signed value for the
767 2016-02-10 H.J. Lu <hongjiu.lu@intel.com>
770 * elf32-i386.c (elf_i386_relocate_section): Mask off the least
771 significant bit in GOT offset for R_386_GOT32X.
773 2016-02-10 Nick Clifton <nickc@redhat.com>
776 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
778 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
779 number of messages about FDE encoding preventing .eh_frame_hdr
782 2016-02-09 Nick Clifton <nickc@redhat.com>
784 * oasys.c (oasys_archive_p): Fix indentation.
785 * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
786 constant for left shifting.
788 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
789 helpful warning message to explain why certain AArch64 relocs
792 2016-02-05 Simon Marchi <simon.marchi@ericsson.com>
794 * pe-mips.c (coff_mips_reloc): Fix formatting.
796 2016-02-05 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
798 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
799 to bfd_mach_arc_arc600.
801 2016-02-04 Alan Modra <amodra@gmail.com>
803 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
806 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
809 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
810 distances in the compressed_size field of the output section.
812 2016-02-02 Alan Modra <amodra@gmail.com>
814 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
815 ELFv2 entry optimization.
817 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
820 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
821 no relocations in relocatable files.
823 2016-02-01 H.J. Lu <hongjiu.lu@intel.com>
826 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
827 if a symbol from a library loaded via DT_NEEDED doesn't match
828 the symbol referenced by regular object.
830 2016-02-01 Nathaniel Smith <njs@pobox.com>
832 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
835 2016-02-01 Alan Modra <amodra@gmail.com>
837 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
838 an out of range reloc_index.
839 * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
841 2016-02-01 Kamil Rytarowski <n54@gmx.com>
843 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
844 (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
845 * Makefile.in: Regenerated.
847 2016-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
849 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
851 2016-01-31 John David Anglin <danglin@gcc.gnu.org>
854 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
856 * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval.
858 2016-01-30 H.J. Lu <hongjiu.lu@intel.com>
861 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
862 against STT_GNU_IFUNC symbol only with dynamic symbols.
863 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
865 2016-01-28 H.J. Lu <hongjiu.lu@intel.com>
868 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
869 decompress debug sections.
871 2016-01-25 Maciej W. Rozycki <macro@imgtec.com>
873 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
876 2016-01-25 Nick Clifton <nickc@redhat.com>
879 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
880 dsym filename buffer.
882 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
884 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
886 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
888 * elfxx-mips.c (BZ16_REG): Correct calculation.
890 2016-01-21 Nick Clifton <nickc@redhat.com>
892 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
893 changing the type of _loc to be bfd_byte *.
894 (elf_arc_finish_dynamic_symbol): Likewise.
896 2016-01-21 Nick Clifton <nickc@redhat.com>
899 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
900 class of the linker stub bfd.
901 (elf32_arm_check_relocs): Skip check for pic format after
902 processing a vxWorks R_ARM_ABS12 reloc.
903 * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
904 reporting a class mismatch.
906 2016-01-21 Jiong Wang <jiong.wang@arm.com>
908 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
909 veneer for sym_sec != input_sec.
910 (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
911 (elfNN_aarch64_final_link_relocate): Take rela addend into account when
912 calculation destination.
914 2016-01-21 Alan Modra <amodra@gmail.com>
916 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
917 (swap_linux_prpsinfo64_out): New function.
918 (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
919 (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
920 * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset.
921 (elfcore_write_linux_prpsinfo64): Likewise.
922 * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
923 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
924 (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset.
926 2016-01-21 Alan Modra <amodra@gmail.com>
928 * elf-linux-core.h: Rename from elf-linux-psinfo.h.
929 * elf.c: Adjust #include.
930 * elf32-ppc.c: Don't #include elf-linux-psinfo.h
931 * Makefile.am (SOURCE_HFILES): Update.
932 * Makefile.in: Regenerate.
933 * po/SRC-PORFILES.in: Regenerate.
935 2016-01-21 Alan Modra <amodra@gmail.com>
937 * configure.ac: Move corefile selection later in file. Move
938 tdefaults code immediately after other target vector code.
939 * configure: Regenerate.
941 2016-01-20 Mickael Guene <mickael.guene@st.com>
943 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
944 section using '.text.noread' pattern.
946 2016-01-19 John Baldwin <jhb@FreeBSD.org>
948 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
950 2016-01-18 Miranda Cupertino <Cupertino.Miranda@synopsys.com>
951 Zissulescu Claudiu <Claudiu.Zissulescu@synopsys.com>
953 * arc-plt.def: New file.
954 * arc-plt.h: Likewise.
955 * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
956 elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
957 elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
958 elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
959 (name_for_global_symbol): Added.
960 (ADD_RELA): Helper to create dynamic relocs.
961 (new_got_entry_to_list): Create a new got entry in linked list.
962 (symbol_has_entry_of_type): Search for specific type of entry in
964 (is_reloc_for_GOT): return FALSE for any TLS related relocs.
965 (is_reloc_for_TLS, arc_elf_set_private_flags)
966 (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
967 (arc_elf_merge_private_bfd_data): New functions.
968 (debug_arc_reloc): Cleaned debug info printing.
969 (PDATA reloc): Changed not to perform address alignment.
970 (reverse_me): Added. Fix for ARC_32 relocs.
971 (arc_do_relocation): Return bfd_reloc_of when no relocation should
973 (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
974 Changed function to access an array of list of GOT entries instead
975 of just an array of offsets.
976 (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
977 (elf_arc_check_relocs): Likewise.
978 (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
979 (elf_arc_finish_dynamic_sections): Likewise
980 (arc_create_dynamic_sections): Modified conditions to create
982 (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
983 (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
984 (relocate_plt_for_entry): Changed to support new way to define PLT
986 (add_symbol_to_plt): Likewise.
987 (arc_elf_link_hash_table_create): New function.
989 2016-01-18 Nick Clifton <nickc@redhat.com>
992 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
993 section number into internal section number.
994 * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
995 * coffswap.h (coff_swap_sym_in): Likewise.
996 * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
997 * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
998 section number field is big enough to hold the external value.
1000 2016-01-17 Alan Modra <amodra@gmail.com>
1002 * configure: Regenerate.
1004 2016-01-12 Yury Usishchev <y.usishchev@samsung.com>
1006 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
1007 when address in first unwind entry does not match start of
1010 2016-01-08 Richard Sandiford <richard.sandiford@arm.com>
1011 Jiong Wang <jiong.wang@arm.com>
1014 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
1017 2016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
1019 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
1020 place 'R_' before the reloc name returned.
1021 (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
1022 the relocation string.
1024 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1026 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
1027 factored out from...
1028 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1030 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1032 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
1033 attribute check after ELF file header flag check.
1035 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1037 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
1038 return status from `_bfd_elf_merge_object_attributes'.
1040 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1042 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
1043 factored out from...
1044 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1046 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1048 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
1049 handling of input MIPS ABI flags together.
1051 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1053 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
1054 attribute checks for null input.
1056 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1058 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
1059 pointers to target data.
1061 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1063 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
1066 2016-01-01 Alan Modra <amodra@gmail.com>
1068 Update year range in copyright notice of all files.
1070 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
1072 Copyright (C) 2016 Free Software Foundation, Inc.
1074 Copying and distribution of this file, with or without modification,
1075 are permitted in any medium without royalty provided the copyright
1076 notice and this notice are preserved.
1082 version-control: never