1 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
4 Don't check if contents == NULL.
5 (elf_i386_tls_transition): Add from_relocate_section. Check
6 from_relocate_section instead of contents != NULL. Update
7 elf_i386_check_tls_transition call.
8 (elf_i386_check_relocs): Cache the section contents if
9 keep_memory is FALSE. Pass FALSE as from_relocate_section to
10 elf_i386_tls_transition.
11 (elf_i386_relocate_section): Pass TRUE as from_relocate_section
12 to elf_i386_tls_transition.
13 (elf_backend_caches_rawsize): New.
14 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
16 (elf_x86_64_tls_transition): Add from_relocate_section. Check
17 from_relocate_section instead of contents != NULL.
18 (elf_x86_64_check_relocs): Cache the section contents if
19 keep_memory is FALSE. Pass FALSE as from_relocate_section to
20 elf_x86_64_tls_transition.
21 (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
22 to elf_x86_64_tls_transition.
23 (elf_backend_caches_rawsize): New.
25 2016-05-03 Maciej W. Rozycki <macro@imgtec.com>
28 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
31 2016-05-03 Jiong Wang <jiong.wang@arm.com>
33 * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
34 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
35 * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
36 no_apply_dynamic_relocs.
37 (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
38 dynamic relocations generated.
40 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
42 * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
44 (elf_i386_create_dynamic_sections): Here.
45 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
47 (elf_x86_64_create_dynamic_sections): Here.
49 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
51 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
52 and replace (EH)->has_got_reloc with GOT_RELOC.
53 (elf_i386_fixup_symbol): Pass has_got_reloc to
54 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
55 (elf_i386_allocate_dynrelocs): Likewise.
56 (elf_i386_relocate_section): Likewise.
57 (elf_i386_finish_dynamic_symbol): Likewise.
58 (elf_i386_convert_load): Pass TRUE to
59 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
60 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
61 GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
62 (elf_x86_64_fixup_symbol): Pass has_got_reloc to
63 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
64 (elf_x86_64_allocate_dynrelocs): Likewise.
65 (elf_x86_64_relocate_section): Likewise.
66 (elf_x86_64_finish_dynamic_symbol): Likewise.
67 (elf_x86_64_convert_load): Pass TRUE to
68 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
70 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
72 * elf32-i386.c (check_relocs_failed): New.
73 (elf_i386_check_relocs): Set check_relocs_failed on error.
74 (elf_i386_relocate_section): Skip if check_relocs failed.
76 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
78 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
79 check_relocs_failed on error.
81 2016-04-29 Nick Clifton <nickc@redhat.com>
84 * elf-bfd.h (struct elf_backend_data): Rename
85 elf_backend_set_special_section_info_and_link to
86 elf_backend_copy_special_section_fields.
87 * elfxx-target.h: Likewise.
88 * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
89 comparing section flags.
90 (copy_special_section_fields): New function.
91 (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
92 Perform two scans over special sections. The first one looks for
93 a direct mapping between the output section and an input section.
94 The second scan looks for a possible match based upon section
96 * elf32-arm.c (elf32_arm_copy_special_section_fields): New
97 function. Handle setting the sh_link field of SHT_ARM_EXIDX
99 * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
100 elf32_i386_copy_solaris_special_section_fields.
101 * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
102 Rename to elf32_sparc_copy_solaris_special_section_fields.
103 * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
104 elf64_x86_64_copy_solaris_special_section_fields.
106 2016-04-28 Nick Clifton <nickc@redhat.com>
108 * po/zh_CN.po: Updated Chinese (simplified) translation.
110 2016-04-27 H.J. Lu <hongjiu.lu@intel.com>
113 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
114 when estimating distances between output sections.
116 2016-04-27 Alan Modra <amodra@gmail.com>
118 * elflink.c (_bfd_elf_is_start_stop): New function.
119 (_bfd_elf_gc_mark_rsec): Use it.
120 * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
122 2016-04-26 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
124 * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
125 * mmo.c (mmo_get_section_contents): Likewise.
126 (mmo_set_section_contents): Likewise.
128 2016-04-26 H.J. Lu <hongjiu.lu@intel.com>
130 * elf-bfd.h (elf_link_hash_table): Update comments for
132 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
133 the unused NULL entry at the head of dynamic symbol table.
134 (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
137 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
139 * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
140 created file from dynobj.
142 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
144 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
145 normal input file if possible.
147 2016-04-21 Nick Clifton <nickc@redhat.com>
149 * aout-adobe.c: Use _bfd_generic_link_check_relocs.
150 * aout-target.h: Likewise.
151 * aout-tic30.c: Likewise.
152 * binary.c: Likewise.
154 * coff-alpha.c: Likewise.
155 * coff-rs6000.c: Likewise.
156 * coff64-rs6000.c: Likewise.
157 * coffcode.h: Likewise.
158 * i386msdos.c: Likewise.
159 * i386os9k.c: Likewise.
162 * libbfd-in.h: Likewise.
163 * libecoff.h: Likewise.
164 * mach-o-target.c: Likewise.
166 * nlm-target.h: Likewise.
169 * plugin.c: Likewise.
170 * ppcboot.c: Likewise.
173 * tekhex.c: Likewise.
174 * versados.c: Likewise.
175 * vms-alpha.c: Likewise.
177 * elfxx-target.h: Use _bfd_elf_link_check_relocs.
178 * linker.c (bfd_link_check_relocs): New function.
179 (_bfd_generic_link_check_relocs): New function.
180 * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
181 _bfd_link_check_relocs field.
182 (struct bfd_target)L Add _bfd_link_check_relocs field.
183 * bfd-in2.h: Regenerate.
184 * libbfd.h: Regenerate.
186 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
188 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
189 (elf_backend_gc_sweep_hook): Likewise.
190 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
191 (elf_backend_gc_sweep_hook): Likewise.
193 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
195 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
198 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
201 * elf64-x86-64.c (check_relocs_failed): New.
202 (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
203 Support relocation agaist local symbol. Set check_relocs_failed.
204 (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check
205 R_X86_64_32 relocation overflow.
206 (elf_x86_64_relocate_section): Skip if check_relocs failed.
207 Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
209 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
211 * elf32-i386.c (elf_i386_check_relocs): Call
212 _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
213 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
215 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
217 * elf-bfd.h (_bfd_elf_link_check_relocs): New.
218 * elflink.c (_bfd_elf_link_check_relocs): New function.
219 (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
220 if check_relocs_after_open_input is FALSE.
222 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
224 * cache.c: Update old style function definitions.
225 * elf32-m68k.c: Likewise.
226 * elf64-mmix.c: Likewise.
227 * stab-syms.c: Likewise.
229 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
231 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
233 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
235 * Makefile.in: Regenerated with automake 1.11.6.
236 * aclocal.m4: Likewise.
237 * doc/Makefile.in: Likewise.
239 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
241 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
242 * bfd-in2.h: Regenerate.
243 * libbfd.h: Regenerate.
244 * elf32-arc.c: Add 'opcode/arc.h' include.
245 (struct arc_relocation_data): Add symbol_name.
246 (arc_special_overflow_checks): New function.
247 (arc_do_relocation): Use arc_special_overflow_checks, reindent as
248 required, add an extra comment.
249 (elf_arc_relocate_section): Setup symbol_name in reloc_data.
251 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
253 * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
255 (elf_arc_relocate_section): Update enum uses.
256 (elf_arc_check_relocs): Likewise.
257 (elf_arc_finish_dynamic_symbol): Likewise.
259 2016-04-14 H.J. Lu <hongjiu.lu@intel.com>
261 * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
264 2016-04-14 Nick Clifton <nickc@redhat.com>
267 * elf-bbfd.h (struct elf_backend_data): New field:
269 New field: elf_backend_set_special_section_info_and_link
270 * elfxx-target.h (elf_backend_strtab_flags): Define if not already
272 (elf_backend_set_special_section_info_and_link): Define if not
274 (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
275 elf_backend_strtab_flags macros to initialise fields in structure.
276 * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
277 being set even if SHF_MERGE is not set.
278 (elf_fake_sections): Likewise.
279 (section_match): New function. Matches two ELF sections based
280 upon fixed characteristics.
281 (find_link): New function. Locates a section in a BFD that
282 matches a section in a different BFD.
283 (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
284 fields of reserved sections.
285 (bfd_elf_compute_section_file_positions): Set the flags for the
286 .shstrtab section based upon the elf_strtab_flags field in the
287 elf_backend_data structure.
288 (swap_out_syms): Likewise for the .strtab section.
289 * elflink.c (bfd_elf_final_link): Set the flags for the
290 .strtab section based upon the elf_strtab_flags field in the
291 elf_backend_data structure.
292 * elf32-i386.c (elf32_i386_set_special_info_link): New function.
293 (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
295 (elf_backend_set_special_section_info_and_link): Define for
297 * elf32-sparc.c: Likewise.
298 * elf64-x86-64.c: Likewise.
300 2016-04-11 H.J. Lu <hongjiu.lu@intel.com>
303 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
305 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
306 Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
307 applies to read-only section.
308 * elf32-i386.c (elf_i386_link_hash_table): Add
309 readonly_dynrelocs_against_ifunc.
310 (elf_i386_allocate_dynrelocs): Updated.
311 (elf_i386_size_dynamic_sections): Issue an error for read-only
312 segment with dynamic IFUNC relocations only if
313 readonly_dynrelocs_against_ifunc is TRUE.
314 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
315 readonly_dynrelocs_against_ifunc.
316 (elf_x86_64_allocate_dynrelocs): Updated.
317 (elf_x86_64_size_dynamic_sections): Issue an error for read-only
318 segment with dynamic IFUNC relocations only if
319 readonly_dynrelocs_against_ifunc is TRUE.
320 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
323 2016-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
325 * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
326 a fall through from error_ret_free_internal. Free local_syms in
327 error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
329 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
331 * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
332 (relocate_plt_for_entry): Likewise.
334 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
336 * elf32-arc.c (elf_arc_check_relocs): Changed
338 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
340 * elf32-arc.c (name_for_global_symbol): Changed assert.
341 (get_replace_function): Created.:
342 (struct arc_relocation_data): Changed to signed types.
343 (defines S, L, P, PDATA): Casted to signed type.
344 (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
345 (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
346 (arc_do_relocation): Changed.
348 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
350 * elf32-arc.c (name_for_global_symbol): Added assert to check for
352 (elf_arc_relocate_section): Added and changed asserts, validating
353 the synamic symbol index.
354 (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
355 relocation if symbol has dynindx set to -1.
357 2016-04-05 Maciej W. Rozycki <macro@imgtec.com>
359 * elflink.c (elf_link_add_object_symbols): Always turn hidden
360 and internal symbols which have a dynamic index into local
363 2016-04-04 Nick Clifton <nickc@redhat.com>
366 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
367 version number if the version is zero.
369 2016-04-01 Alan Modra <amodra@gmail.com>
372 * elflink.c (on_needed_list): Recursively check needed status.
373 (elf_link_add_object_symbols): Adjust.
375 2016-03-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
377 * elf32-avr.c (avr_elf32_load_records_from_section): Free
378 internal_relocs only if they aren't cached.
380 2016-03-29 Nick Clifton <nickc@redhat.com>
383 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
384 assertion on the size of the got section to allow it to be bigger
385 than the number of relocs.
387 2016-03-29 Toni Spets <toni.spets@iki.fi>
390 * coffcode.h (coff_write_object_contents): Revert accidental
393 2016-03-22 Alan Modra <amodra@gmail.com>
396 * dwarf2.c (read_attribute_value): Skip info_ptr check for
397 DW_FORM_flag_present.
399 2016-03-22 Nick Clifton <nickc@redhat.com>
401 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
402 architecture name for backwards compatibility.
404 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
407 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
408 sufficiently recent version of GCC.
409 * configure: Regenerate.
411 2016-03-22 Alan Modra <amodra@gmail.com>
414 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
416 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
418 * archures.c (bfd_mach_arc_nps400): Define.
419 * bfd-in2.h: Regenerate.
420 * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
421 some existing entries to make space.
422 * elf32-arc.c (arc_elf_object_p): Add nps400 case.
423 (arc_elf_final_write_processing): Likewise.
425 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
427 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
429 (arc_elf_final_write_processing): Don't bother setting cpu field
430 in e_flags, this will have been set elsewhere.
432 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
434 * elf32-arc.c (arc_elf_final_write_processing): Switch to using
437 2016-03-21 Nick Clifton <nickc@redhat.com>
439 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
440 * configure: Regenerate.
441 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
442 alloca with call to xmalloc.
443 * elf32-nds32.c: Likewise.
444 * elf64-hppa.c: Likewise.
445 * elfxx-mips.c: Likewise.
447 * pei-x86_64.c: Likewise.
451 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
454 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
456 (elf_i386_relocate_section): Likewise.
457 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
458 (elf_x86_64_relocate_section): Likewise.
460 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
463 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
464 no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
465 relocation overflow check.
467 2016-03-14 H.J. Lu <hongjiu.lu@intel.com>
469 * bfd-in2.h: Regenerated.
471 2016-03-11 Dan Gissel <dgisselq@ieee.org>
474 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
475 uses bytes not octets.
476 * elflink.c (resolve_section): Likewise.
478 (eval_section): Pass the input_bfd to resolve_section.
479 (bfd_elf_perform_complex_relocation): Convert byte offset to
480 octets before read and writing values.
481 (elf_link_input_bfd): Add byte to octet conversions.
482 (elf_reloc_link_order): Likewise.
483 (elf_fixup_link_order): Likewise.
484 (bfd_elf_final_link): Likewise.
485 * reloc.c (_bfd_final_link_relocate): Likewise.
486 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
488 2016-03-10 Nick Clifton <nickc@redhat.com>
490 * config.bfd: Mark the i370 target as obsolete.
492 2016-03-09 Pedro Alves <palves@redhat.com>
494 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
495 gcc ABI)" to printable name.
496 * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
497 of "v850-rh850" as printable name.
499 2016-03-09 Leon Winter <winter-gcc@bfw-online.de>
502 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
503 relocations against absolute symbols.
505 2016-03-09 Alan Modra <amodra@gmail.com>
508 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
509 length elements in the archive.
511 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
514 * elflink.c (elf_link_add_object_symbols): Create dynamic sections
515 for -E/--dynamic-list only when not relocatable.
517 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
520 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
521 count for locally defined local IFUNC symbols in shared object.
522 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
524 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
527 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
530 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
531 Andrew Burgess <andrew.burgess@embecosm.com>
533 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
534 (arc_bfd_put_32): Becomes an alias for bfd_put_32.
535 (arc_elf_howto_init): Added assert to validate relocations.
536 (get_middle_endian_relocation): Delete.
537 (middle_endian_convert): New function.
538 (ME): Redefine, now does nothing.
540 (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
541 definition to call middle_endian_convert. Add a new local
542 variable and make use of this throughout. Added call to
543 arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
545 2016-03-07 Nick Clifton <nickc@redhat.com>
548 * archive.c (bfd_generic_openr_next_archived_file): Allow zero
549 length elements in the archive.
551 2016-03-07 Jiong Wang <jiong.wang@arm.com>
553 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
554 section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
556 2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
559 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
560 executable as definition if the new definition comes from a
563 2016-03-02 Alan Modra <amodra@gmail.com>
565 * Makefile.in: Regenerate.
566 * po/SRC-POTFILES.in: Regenerate.
568 2016-02-29 Cupertino Miranda <cmiranda@synopsys.com>
570 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
571 relocation addend when sections get merged.
573 2016-02-29 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
575 * elf32-arc.c (arc_elf_final_write_processing): Add condition to
577 (elf_arc_relocate_section): Fixes and conditions to support PIE.
578 Assert for code sections dynamic relocs.
580 2016-02-26 Renlin Li <renlin.li@arm.com>
582 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
583 check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
585 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
588 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
589 load with locally bound symbols if PIC is false or there is no
590 base register. Optimize branch to 0 if PIC is false.
591 (elf_i386_relocate_section): Don't generate dynamic relocations
592 against undefined weak symbols if PIC is false.
593 * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
594 if we can't estimate relocation overflow with --no-relax.
595 Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
596 symbols if PIC is false. Optimize branch to 0 if PIC is false.
597 (elf_x86_64_relocate_section): Don't generate dynamic relocations
598 against undefined weak symbols if PIC is false.
600 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
603 * bfd.c (bfd): Change flags to 20 bits.
604 (BFD_CONVERT_ELF_COMMON): New.
605 (BFD_USE_ELF_STT_COMMON): Likewise.
606 (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
607 BFD_USE_ELF_STT_COMMON.
608 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
609 * configure.ac: Remove --enable-elf-stt-common.
610 * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
611 common symbol depending on BFD_CONVERT_ELF_COMMON and
612 BFD_USE_ELF_STT_COMMON.
613 * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
615 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
617 (elf_link_convert_common_type): New function.
618 (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
619 common symbol depending on BFD_CONVERT_ELF_COMMON and
620 BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx.
621 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
622 and BFD_USE_ELF_STT_COMMON to object_flags.
623 (TARGET_LITTLE_SYM): Likewise.
624 * syms.c (BSF_KEEP_G): Renamed to ...
625 (BSF_ELF_COMMON): This.
626 * bfd-in2.h: Regenerated.
627 * config.in: Likewise.
628 * configure: Likewise.
630 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
635 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
636 (elf_i386_link_hash_entry): Add has_got_reloc and
638 (elf_i386_link_hash_table): Add interp.
639 (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
641 (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
643 (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
644 (elf_i386_fixup_symbol): New function.
645 (elf_i386_pie_finish_undefweak_symbol): Likewise.
646 (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
647 relocations and discard relocations against resolved undefined
648 weak symbols in executable. Don't make resolved undefined weak
649 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
650 relocation against undefined weak symbols in PIE.
651 (elf_i386_size_dynamic_sections): Set interp to .interp section.
652 (elf_i386_relocate_section): Don't generate dynamic relocations
653 against resolved undefined weak symbols in PIE, except for
655 (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
656 dynamic PLT/GOT relocations for resolved undefined weak symbols.
657 Don't generate dynamic relocation against resolved undefined weak
658 symbol in executable.
659 (elf_i386_finish_dynamic_sections): Call
660 elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
661 (elf_backend_fixup_symbol): New.
662 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
663 (elf_x86_64_link_hash_entry): Add has_got_reloc and
665 (elf_x86_64_link_hash_table): Add interp.
666 (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
668 (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
670 (elf_x86_64_check_relocs): Set has_got_reloc and
672 (elf_x86_64_fixup_symbol): New function.
673 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
674 (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
675 relocations and discard relocations against resolved undefined
676 weak symbols in executable. Don't make resolved undefined weak
677 symbols in executable dynamic.
678 (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
679 (elf_x86_64_relocate_section): Check relocation overflow for
680 dynamic relocations against unresolved weak undefined symbols.
681 Don't generate dynamic relocations against resolved weak
682 undefined symbols in PIE.
683 (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
684 dynamic PLT/GOT relocations for resolved undefined weak symbols.
685 Don't generate dynamic relocation against resolved undefined weak
686 symbol in executable.
687 (elf_x86_64_finish_dynamic_sections): Call
688 elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
689 (elf_backend_fixup_symbol): New.
691 2016-02-26 Alan Modra <amodra@gmail.com>
693 * elf64-ppc.c (create_linkage_sections): Create sfpr when
694 save_restore_funcs, rest of sections when not relocatable.
695 (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
696 (sfpr_define): Define all symbols on emitted code.
697 (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
698 when relocatable. Move sfpr_define loop earlier.
700 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
702 * elf64-x86-64.c (elf_x86_64_need_pic): New function.
703 (elf_x86_64_relocate_section): Use it. Replace
704 x86_64_elf_howto_table[r_type] with howto.
706 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
709 * elflink.c (bfd_elf_record_link_assignment): Set versioned if
710 symbol version is unknown.
712 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
714 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
715 to (bfd_vma) -1 when setting needs_plt to 0.
716 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
718 2016-02-23 H.J. Lu <hongjiu.lu@intel.com>
720 * elflink.c (bfd_elf_record_link_assignment): Check for shared
721 library, instead of PIC, and don't check PDE when making linker
722 assigned symbol dynamic.
724 2016-02-23 Faraz Shahbazker <faraz.shahbazker@imgtec.com>
726 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
727 ABIVERSION for non-executable stack.
729 2016-02-23 Rich Felker <bugdal@aerifal.cx>
732 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
733 Always produce a RELATIVE reloc for a local symbol.
735 2016-02-23 Hans-Peter Nilsson <hp@axis.com>
737 Fix test-case ld-elf/pr19617b
738 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
739 discard unused non-function symbols when --dynamic-list-data.
741 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
743 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
744 dynsym section, even if it is empty, with dynamic sections.
746 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
748 * syms.c: Remove BSF_COMMON from comments.
749 * bfd-in2.h: Regenerated.
751 2016-02-22 Jiong Wang <jiong.wang@arm.com>
753 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
754 for destination. Remove useless function parameters.
755 (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
757 2016-02-19 Nick Clifton <nickc@redhat.com>
760 * aoutx.h (aout_link_add_symbols): Check for out of range string
764 * reloc.c (bfd_generic_get_relocated_section_contents): Stop
765 processing if we encounter a reloc without an associated symbol.
767 2016-02-18 H.J. Lu <hongjiu.lu@intel.com>
770 * elflink.c (elf_link_add_object_symbols): Always create dynamic
771 sections for -E/--dynamic-list.
773 2016-02-17 H.J. Lu <hongjiu.lu@intel.com>
775 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined
778 2016-02-16 Joseph Myers <joseph@codesourcery.com>
780 * plugin.c (plugin_vec): Set match priority to 255.
781 * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
782 matching against the plugin vector, take priority from there not
785 2016-02-15 Nick Clifton <nickc@redhat.com>
787 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
788 for length and type fields. Use a signed value for the
791 2016-02-10 H.J. Lu <hongjiu.lu@intel.com>
794 * elf32-i386.c (elf_i386_relocate_section): Mask off the least
795 significant bit in GOT offset for R_386_GOT32X.
797 2016-02-10 Nick Clifton <nickc@redhat.com>
800 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
802 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
803 number of messages about FDE encoding preventing .eh_frame_hdr
806 2016-02-09 Nick Clifton <nickc@redhat.com>
808 * oasys.c (oasys_archive_p): Fix indentation.
809 * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
810 constant for left shifting.
812 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
813 helpful warning message to explain why certain AArch64 relocs
816 2016-02-05 Simon Marchi <simon.marchi@ericsson.com>
818 * pe-mips.c (coff_mips_reloc): Fix formatting.
820 2016-02-05 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
822 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
823 to bfd_mach_arc_arc600.
825 2016-02-04 Alan Modra <amodra@gmail.com>
827 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
830 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
833 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
834 distances in the compressed_size field of the output section.
836 2016-02-02 Alan Modra <amodra@gmail.com>
838 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
839 ELFv2 entry optimization.
841 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
844 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
845 no relocations in relocatable files.
847 2016-02-01 H.J. Lu <hongjiu.lu@intel.com>
850 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
851 if a symbol from a library loaded via DT_NEEDED doesn't match
852 the symbol referenced by regular object.
854 2016-02-01 Nathaniel Smith <njs@pobox.com>
856 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
859 2016-02-01 Alan Modra <amodra@gmail.com>
861 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
862 an out of range reloc_index.
863 * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
865 2016-02-01 Kamil Rytarowski <n54@gmx.com>
867 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
868 (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
869 * Makefile.in: Regenerated.
871 2016-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
873 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
875 2016-01-31 John David Anglin <danglin@gcc.gnu.org>
878 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
880 * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval.
882 2016-01-30 H.J. Lu <hongjiu.lu@intel.com>
885 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
886 against STT_GNU_IFUNC symbol only with dynamic symbols.
887 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
889 2016-01-28 H.J. Lu <hongjiu.lu@intel.com>
892 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
893 decompress debug sections.
895 2016-01-25 Maciej W. Rozycki <macro@imgtec.com>
897 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
900 2016-01-25 Nick Clifton <nickc@redhat.com>
903 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
904 dsym filename buffer.
906 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
908 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
910 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
912 * elfxx-mips.c (BZ16_REG): Correct calculation.
914 2016-01-21 Nick Clifton <nickc@redhat.com>
916 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
917 changing the type of _loc to be bfd_byte *.
918 (elf_arc_finish_dynamic_symbol): Likewise.
920 2016-01-21 Nick Clifton <nickc@redhat.com>
923 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
924 class of the linker stub bfd.
925 (elf32_arm_check_relocs): Skip check for pic format after
926 processing a vxWorks R_ARM_ABS12 reloc.
927 * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
928 reporting a class mismatch.
930 2016-01-21 Jiong Wang <jiong.wang@arm.com>
932 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
933 veneer for sym_sec != input_sec.
934 (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
935 (elfNN_aarch64_final_link_relocate): Take rela addend into account when
936 calculation destination.
938 2016-01-21 Alan Modra <amodra@gmail.com>
940 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
941 (swap_linux_prpsinfo64_out): New function.
942 (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
943 (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
944 * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset.
945 (elfcore_write_linux_prpsinfo64): Likewise.
946 * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
947 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
948 (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset.
950 2016-01-21 Alan Modra <amodra@gmail.com>
952 * elf-linux-core.h: Rename from elf-linux-psinfo.h.
953 * elf.c: Adjust #include.
954 * elf32-ppc.c: Don't #include elf-linux-psinfo.h
955 * Makefile.am (SOURCE_HFILES): Update.
956 * Makefile.in: Regenerate.
957 * po/SRC-PORFILES.in: Regenerate.
959 2016-01-21 Alan Modra <amodra@gmail.com>
961 * configure.ac: Move corefile selection later in file. Move
962 tdefaults code immediately after other target vector code.
963 * configure: Regenerate.
965 2016-01-20 Mickael Guene <mickael.guene@st.com>
967 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
968 section using '.text.noread' pattern.
970 2016-01-19 John Baldwin <jhb@FreeBSD.org>
972 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
974 2016-01-18 Miranda Cupertino <Cupertino.Miranda@synopsys.com>
975 Zissulescu Claudiu <Claudiu.Zissulescu@synopsys.com>
977 * arc-plt.def: New file.
978 * arc-plt.h: Likewise.
979 * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
980 elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
981 elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
982 elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
983 (name_for_global_symbol): Added.
984 (ADD_RELA): Helper to create dynamic relocs.
985 (new_got_entry_to_list): Create a new got entry in linked list.
986 (symbol_has_entry_of_type): Search for specific type of entry in
988 (is_reloc_for_GOT): return FALSE for any TLS related relocs.
989 (is_reloc_for_TLS, arc_elf_set_private_flags)
990 (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
991 (arc_elf_merge_private_bfd_data): New functions.
992 (debug_arc_reloc): Cleaned debug info printing.
993 (PDATA reloc): Changed not to perform address alignment.
994 (reverse_me): Added. Fix for ARC_32 relocs.
995 (arc_do_relocation): Return bfd_reloc_of when no relocation should
997 (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
998 Changed function to access an array of list of GOT entries instead
999 of just an array of offsets.
1000 (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
1001 (elf_arc_check_relocs): Likewise.
1002 (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
1003 (elf_arc_finish_dynamic_sections): Likewise
1004 (arc_create_dynamic_sections): Modified conditions to create
1006 (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
1007 (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
1008 (relocate_plt_for_entry): Changed to support new way to define PLT
1010 (add_symbol_to_plt): Likewise.
1011 (arc_elf_link_hash_table_create): New function.
1013 2016-01-18 Nick Clifton <nickc@redhat.com>
1016 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
1017 section number into internal section number.
1018 * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
1019 * coffswap.h (coff_swap_sym_in): Likewise.
1020 * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
1021 * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
1022 section number field is big enough to hold the external value.
1024 2016-01-17 Alan Modra <amodra@gmail.com>
1026 * configure: Regenerate.
1028 2016-01-12 Yury Usishchev <y.usishchev@samsung.com>
1030 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
1031 when address in first unwind entry does not match start of
1034 2016-01-08 Richard Sandiford <richard.sandiford@arm.com>
1035 Jiong Wang <jiong.wang@arm.com>
1038 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
1041 2016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
1043 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
1044 place 'R_' before the reloc name returned.
1045 (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
1046 the relocation string.
1048 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1050 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
1051 factored out from...
1052 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1054 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1056 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
1057 attribute check after ELF file header flag check.
1059 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1061 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
1062 return status from `_bfd_elf_merge_object_attributes'.
1064 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1066 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
1067 factored out from...
1068 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1070 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1072 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
1073 handling of input MIPS ABI flags together.
1075 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1077 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
1078 attribute checks for null input.
1080 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1082 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
1083 pointers to target data.
1085 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1087 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
1090 2016-01-01 Alan Modra <amodra@gmail.com>
1092 Update year range in copyright notice of all files.
1094 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
1096 Copyright (C) 2016 Free Software Foundation, Inc.
1098 Copying and distribution of this file, with or without modification,
1099 are permitted in any medium without royalty provided the copyright
1100 notice and this notice are preserved.
1106 version-control: never