1 2016-05-25 H.J. Lu <hongjiu.lu@intel.com>
4 * archive.c (bfd_slurp_armap): Replace
5 bfd_elf64_archive_slurp_armap with
6 _bfd_archive_64_bit_slurp_armap.
7 (bsd_write_armap): Call _bfd_archive_64_bit_write_armap if
8 BFD64 is defined and the archive is too big.
9 (coff_write_armap): Likewise.
10 * archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ...
11 (_bfd_archive_64_bit_slurp_armap): This.
12 (bfd_elf64_archive_write_armap): Renamed to ...
13 (_bfd_archive_64_bit_write_armap): This.
14 * configure.ac: Add --enable-64-bit-archive.
15 (want_64_bit_archive): New. Set to true by default for 64-bit
16 MIPS and s390 ELF targets.
17 (USE_64_BIT_ARCHIVE): New AC_DEFINE.
18 * config.in: Regenerated.
19 * configure: Likewise.
20 * elf64-mips.c (bfd_elf64_archive_functions): Removed.
21 (bfd_elf64_archive_slurp_armap): Likewise.
22 (bfd_elf64_archive_write_armap): Likewise.
23 (bfd_elf64_archive_slurp_extended_name_table): Likewise.
24 (bfd_elf64_archive_construct_extended_name_table): Likewise.
25 (bfd_elf64_archive_truncate_arname): Likewise.
26 (bfd_elf64_archive_read_ar_hdr): Likewise.
27 (bfd_elf64_archive_write_ar_hdr): Likewise.
28 (bfd_elf64_archive_openr_next_archived_file): Likewise.
29 (bfd_elf64_archive_get_elt_at_index): Likewise.
30 (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
31 (bfd_elf64_archive_update_armap_timestamp): Likewise.
32 * elf64-s390.c (bfd_elf64_archive_functions): Removed.
33 (bfd_elf64_archive_slurp_armap): Likewise.
34 (bfd_elf64_archive_write_armap): Likewise.
35 (bfd_elf64_archive_slurp_extended_name_table): Likewise.
36 (bfd_elf64_archive_construct_extended_name_table): Likewise.
37 (bfd_elf64_archive_truncate_arname): Likewise.
38 (bfd_elf64_archive_read_ar_hdr): Likewise.
39 (bfd_elf64_archive_write_ar_hdr): Likewise.
40 (bfd_elf64_archive_openr_next_archived_file): Likewise.
41 (bfd_elf64_archive_get_elt_at_index): Likewise.
42 (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
43 (bfd_elf64_archive_update_armap_timestamp): Likewise.
44 * elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on
45 BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and
46 bfd_elfNN_archive_functions isn't defined.
47 (TARGET_LITTLE_SYM): Likewise.
48 * libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype.
49 (_bfd_archive_64_bit_write_armap): Likewise.
50 (_bfd_archive_64_bit_slurp_extended_name_table): New macro.
51 (_bfd_archive_64_bit_construct_extended_name_table): Likewise.
52 (_bfd_archive_64_bit_truncate_arname): Likewise.
53 (_bfd_archive_64_bit_read_ar_hdr): Likewise.
54 (_bfd_archive_64_bit_write_ar_hdr): Likewise.
55 (_bfd_archive_64_bit_openr_next_archived_file): Likewise.
56 (_bfd_archive_64_bit_get_elt_at_index): Likewise.
57 (_bfd_archive_64_bit_generic_stat_arch_elt): Likewise.
58 (_bfd_archive_64_bit_update_armap_timestamp): Likewise.
59 * libbfd.h: Regenerated.
60 * plugin.c (plugin_vec): Use _bfd_archive_64_bit on
61 BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined.
63 2016-05-25 H.J. Lu <hongjiu.lu@intel.com>
66 * cofflink.c (coff_link_check_archive_element): Return TRUE if
67 linker add_archive_element callback returns FALSE.
68 * ecoff.c (ecoff_link_check_archive_element): Likewise.
69 * elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip
70 archive element if linker add_archive_element callback returns
72 * elflink.c (elf_link_add_archive_symbols): Likewise.
73 * pdp11.c (aout_link_check_ar_symbols): Likewise.
74 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise.
75 * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise.
76 (xcoff_link_check_ar_symbols): Likewise.
78 2016-05-24 Maciej W. Rozycki <macro@imgtec.com>
80 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
81 <bfd_reloc_outofrange>: Unify error reporting code.
83 2016-05-23 Jim Wilson <jim.wilson@linaro.org>
85 * elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and
86 R_AARCH64_NONE. Use HOWTO64 for R_AARCH64_NULL.
87 * relocs.c: Add BFD_RELOC_AARCH64_NULL.
88 * bfd-in2.h: Regenerate.
91 2016-05-23 Kuba Sejdak <jakub.sejdak@phoesys.com>
93 * config.bfd: Add entry for arm-phoenix.
95 2016-05-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
97 * elf32-arm.c (arm_dedicated_stub_section_padding): New function.
98 (elf32_arm_size_stubs): Declare stub_type in a more outer scope and
99 account for padding for stub section requiring one.
100 (elf32_arm_build_stubs): Add comment to stress the importance of
101 zeroing veneer section content.
103 2016-05-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
105 * bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare
107 * bfd-in2.h: Regenerate.
108 * elf32-arm.c (arm_dedicated_stub_output_section_required): New
110 (arm_dedicated_stub_output_section_required_alignment): Likewise.
111 (arm_dedicated_stub_output_section_name): Likewise.
112 (arm_dedicated_stub_input_section_ptr): Likewise.
113 (elf32_arm_create_or_find_stub_sec): Add stub type parameter and
114 function description comment. Add support for dedicated output stub
115 section to given stub types.
116 (elf32_arm_add_stub): Add a stub type parameter and pass it down to
117 elf32_arm_create_or_find_stub_sec.
118 (elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub.
119 (elf32_arm_size_stubs): Pass stub type when calling
120 elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers.
121 (bfd_elf32_arm_keep_private_stub_output_sections): New function.
123 2016-05-20 H.J. Lu <hongjiu.lu@intel.com>
125 * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32
126 when setting need_convert_load.
128 2016-05-20 Maciej W. Rozycki <macro@imgtec.com>
130 * elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for
133 2016-05-19 H.J. Lu <hongjiu.lu@intel.com>
136 * elf32-i386.c (elf_i386_convert_load_reloc): Don't check
138 (elf_i386_convert_load): Don't convert R_386_GOT32.
140 2016-05-20 Alan Modra <amodra@gmail.com>
143 * elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY,
144 SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY.
146 2016-05-19 Cupertino Miranda <cmiranda@synopsys.com>
148 * elf32-arc.c (arc_elf_final_write_processing): Changed.
149 (debug_arc_reloc): Likewise.
150 (elf_arc_relocate_section): Likewise.
151 (elf_arc_check_relocs): Likewise.
152 (elf_arc_adjust_dynamic_symbol): Likewise.
153 (elf_arc_add_symbol_hook): Likewise.
155 2016-05-19 Maciej W. Rozycki <macro@imgtec.com>
157 * config.bfd: Remove `am34-*-linux*' support.
159 2016-05-19 Alan Modra <amodra@gmail.com>
161 * elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic
162 relocs before plt relocs.
164 2016-05-19 Alan Modra <amodra@gmail.com>
166 * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
167 before dereferencing.
169 2016-05-18 Nick Clifton <nickc@redhat.com>
171 * po/sv.po: Updated Swedish translation.
173 2016-05-18 Alan Modra <amodra@gmail.com>
175 * elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
176 for each BFD. Don't goto error_ret_free_local from outside loop.
178 2016-05-17 Maciej W. Rozycki <macro@imgtec.com>
180 * elf-s390-common.c (elf_s390_add_symbol_hook): Remove
181 STB_GNU_UNIQUE handling.
182 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
183 * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise.
184 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
185 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
186 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
187 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
188 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
189 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
190 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
191 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
192 * elf32-i386.c (elf_i386_add_symbol_hook): Remove function.
193 (elf_backend_add_symbol_hook): Remove macro.
194 * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols'
195 for STB_GNU_UNIQUE symbols.
197 2016-05-16 Maciej W. Rozycki <macro@imgtec.com>
199 * elf32-v850.c (v850_elf_copy_notes): New function, factored out
201 (v850_elf_copy_private_bfd_data): ... here. Call the new
202 function and `_bfd_elf_copy_private_bfd_data'.
204 2016-05-13 H.J. Lu <hongjiu.lu@intel.com>
207 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
208 GOTPCREL relocation against large section.
210 2016-05-13 Alan Modra <amodra@gmail.com>
212 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
213 linker dynamic sections in calculating size and address of
214 dynamic tags rather than using output sections. Remove asserts.
215 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
216 * elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
217 * elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
218 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
219 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
220 * elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
221 * elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
222 * elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
223 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
224 * elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
225 * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
226 * elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
227 * elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
228 * elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
229 * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
230 * elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
231 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
232 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
233 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
234 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
235 * elflink.c (bfd_elf_final_link): Likewise.
236 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
237 * elfxx-sparc.c (sparc_finish_dyn): Likewise. Adjust error message.
238 * elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
239 don't set doit. Look up dynobj section.
240 (elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
241 invocation and dynamic tag vma calculation. Don't test
243 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
246 2016-05-13 Alan Modra <amodra@gmail.com>
248 * elflink.c (elf_link_sort_relocs): Wrap overlong lines. Fix
249 octets_per_byte. Put dynamic .rela.plt last in link orders.
250 Assign output_offset for reloc sections rather than writing
251 sorted relocs from block corresponding to output_offset.
253 2016-05-12 Alan Modra <amodra@gmail.com>
255 * elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.
257 2016-05-11 Andrew Bennett <andrew.bennett@imgtec.com>
259 * elfxx-mips.c (print_mips_ases): Add DSPR3.
261 2016-05-11 Alan Modra <amodra@gmail.com>
263 * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
264 (elf32_hppa_check_relocs): Don't set dynobj.
265 (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
266 (elf32_hppa_build_stubs): Likewise.
267 * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
269 2016-05-11 Alan Modra <amodra@gmail.com>
272 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
273 * elf32-ppc.c (ppc_elf_tls_setup): Likewise.
275 2016-05-10 Jiong Wang <jiong.wang@arm.com>
277 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
278 aarch64_tls_transition check.
280 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
282 * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
284 (arm_stub_sym_claimed): New function.
285 (elf32_arm_create_stub): Use veneered symbol name and section if
286 veneer needs to claim its symbol, and keep logic unchanged otherwise.
287 (arm_stub_claim_sym): New function.
288 (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
289 veneered symbol, otherwise create local symbol as before.
291 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
293 * elf32-arm.c (elf32_arm_size_stubs): Use new macros
294 ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
295 and set branch type of a symbol.
296 (bfd_elf32_arm_process_before_allocation): Likewise.
297 (elf32_arm_relocate_section): Likewise and fix identation along the
299 (allocate_dynrelocs_for_symbol): Likewise.
300 (elf32_arm_finish_dynamic_symbol): Likewise.
301 (elf32_arm_swap_symbol_in): Likewise.
302 (elf32_arm_swap_symbol_out): Likewise.
304 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
306 * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
307 * bfd-in2.h: Regenerated.
308 * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
309 parameter to add_stub_section callback.
310 (elf32_arm_create_or_find_stub_sec): Get output section from link_sec
311 and pass it down to add_stub_section.
312 (elf32_arm_add_stub): Set section to stub_sec if NULL before using it
314 (elf32_arm_size_stubs): Add output section parameter to
315 add_stub_section function pointer parameter.
317 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
319 * elf32-arm.c (elf32_arm_create_stub): New function.
320 (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
322 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
324 * elf32-arm.c (enum elf32_arm_stub_type): Delete
325 arm_stub_a8_veneer_lwm enumerator.
326 (arm_stub_a8_veneer_lwm): New unsigned constant to replace
327 aforementioned enumerator.
328 (struct elf32_arm_stub_hash_entry): Delete target_addend
329 field and add source_value.
330 (struct a8_erratum_fix): Delete addend field and add target_offset.
331 (stub_hash_newfunc): Initialize source_value field amd remove
332 initialization for target_addend.
333 (arm_build_one_stub): Stop special casing Thumb relocations: promote
334 the else to being always executed, moving the
335 arm_stub_a8_veneer_b_cond specific code in it. Remove
336 stub_entry->target_addend from points_to computation.
337 (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
338 to target symbol from start of section rather than the offset from the
340 (elf32_arm_size_stubs): Set stub_entry's source_value and target_value
341 fields from struct a8_erratum_fix's offset and target_offset
343 (make_branch_to_a8_stub): Rename target variable to loc. Compute
344 veneered_insn_loc and loc using stub_entry's source_value.
346 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
348 (elf32_arm_merge_eabi_attributes): Add merging logic for
351 2016-05-10 Pip Cet <pipcet@gmail.com>
354 * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
355 Define as _bfd_generic_copy_link_hash_symbol_type when using
358 2016-05-09 Nick Clifton <nickc@redhat.com>
361 * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
362 field before accessing sections array.
364 2016-05-09 Christophe Monat <christophe.monat@st.com>
367 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
368 (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
370 (create_instruction_vldmia): Add is_dp to disambiguate SP/DP
372 (create_instruction_vldmdb): Likewise.
373 (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
374 uses it to re-encode.
376 2016-05-09 Nick Clifton <nickc@redhat.com>
379 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
382 2016-05-09 Alan Modra <amodra@gmail.com>
384 * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
386 2016-05-06 H.J. Lu <hongjiu.lu@intel.com>
389 * elf-bfd.h (elf_link_hash_entry): Update comments for indx,
390 documenting that indx == -3 if symbol is defined in a discarded
392 * elflink.c (elf_link_add_object_symbols): Set indx to -3 if
393 symbol is defined in a discarded section.
394 (elf_link_output_extsym): Strip a global symbol defined in a
397 2016-05-06 H.J. Lu <hongjiu.lu@intel.com>
399 * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
402 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
404 * elf32-i386.c (elf_i386_convert_load): Extract the GOT load
406 (elf_i386_convert_load_reloc): This. New function.
407 * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
409 (elf_x86_64_convert_load_reloc): This. New function.
411 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
413 * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
414 Don't check if contents == NULL.
415 (elf_i386_tls_transition): Add from_relocate_section. Check
416 from_relocate_section instead of contents != NULL. Update
417 elf_i386_check_tls_transition call.
418 (elf_i386_check_relocs): Cache the section contents if
419 keep_memory is FALSE. Pass FALSE as from_relocate_section to
420 elf_i386_tls_transition.
421 (elf_i386_relocate_section): Pass TRUE as from_relocate_section
422 to elf_i386_tls_transition.
423 (elf_backend_caches_rawsize): New.
424 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
426 (elf_x86_64_tls_transition): Add from_relocate_section. Check
427 from_relocate_section instead of contents != NULL.
428 (elf_x86_64_check_relocs): Cache the section contents if
429 keep_memory is FALSE. Pass FALSE as from_relocate_section to
430 elf_x86_64_tls_transition.
431 (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
432 to elf_x86_64_tls_transition.
433 (elf_backend_caches_rawsize): New.
435 2016-05-03 Maciej W. Rozycki <macro@imgtec.com>
438 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
441 2016-05-03 Jiong Wang <jiong.wang@arm.com>
443 * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
444 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
445 * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
446 no_apply_dynamic_relocs.
447 (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
448 dynamic relocations generated.
450 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
452 * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
454 (elf_i386_create_dynamic_sections): Here.
455 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
456 interp setting to ...
457 (elf_x86_64_create_dynamic_sections): Here.
459 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
461 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
462 and replace (EH)->has_got_reloc with GOT_RELOC.
463 (elf_i386_fixup_symbol): Pass has_got_reloc to
464 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
465 (elf_i386_allocate_dynrelocs): Likewise.
466 (elf_i386_relocate_section): Likewise.
467 (elf_i386_finish_dynamic_symbol): Likewise.
468 (elf_i386_convert_load): Pass TRUE to
469 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
470 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
471 GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
472 (elf_x86_64_fixup_symbol): Pass has_got_reloc to
473 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
474 (elf_x86_64_allocate_dynrelocs): Likewise.
475 (elf_x86_64_relocate_section): Likewise.
476 (elf_x86_64_finish_dynamic_symbol): Likewise.
477 (elf_x86_64_convert_load): Pass TRUE to
478 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
480 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
482 * elf32-i386.c (check_relocs_failed): New.
483 (elf_i386_check_relocs): Set check_relocs_failed on error.
484 (elf_i386_relocate_section): Skip if check_relocs failed.
486 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
488 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
489 check_relocs_failed on error.
491 2016-04-29 Nick Clifton <nickc@redhat.com>
494 * elf-bfd.h (struct elf_backend_data): Rename
495 elf_backend_set_special_section_info_and_link to
496 elf_backend_copy_special_section_fields.
497 * elfxx-target.h: Likewise.
498 * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
499 comparing section flags.
500 (copy_special_section_fields): New function.
501 (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
502 Perform two scans over special sections. The first one looks for
503 a direct mapping between the output section and an input section.
504 The second scan looks for a possible match based upon section
506 * elf32-arm.c (elf32_arm_copy_special_section_fields): New
507 function. Handle setting the sh_link field of SHT_ARM_EXIDX
509 * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
510 elf32_i386_copy_solaris_special_section_fields.
511 * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
512 Rename to elf32_sparc_copy_solaris_special_section_fields.
513 * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
514 elf64_x86_64_copy_solaris_special_section_fields.
516 2016-04-28 Nick Clifton <nickc@redhat.com>
518 * po/zh_CN.po: Updated Chinese (simplified) translation.
520 2016-04-27 H.J. Lu <hongjiu.lu@intel.com>
523 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
524 when estimating distances between output sections.
526 2016-04-27 Alan Modra <amodra@gmail.com>
528 * elflink.c (_bfd_elf_is_start_stop): New function.
529 (_bfd_elf_gc_mark_rsec): Use it.
530 * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
532 2016-04-26 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
534 * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
535 * mmo.c (mmo_get_section_contents): Likewise.
536 (mmo_set_section_contents): Likewise.
538 2016-04-26 H.J. Lu <hongjiu.lu@intel.com>
540 * elf-bfd.h (elf_link_hash_table): Update comments for
542 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
543 the unused NULL entry at the head of dynamic symbol table.
544 (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
547 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
549 * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
550 created file from dynobj.
552 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
554 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
555 normal input file if possible.
557 2016-04-21 Nick Clifton <nickc@redhat.com>
559 * aout-adobe.c: Use _bfd_generic_link_check_relocs.
560 * aout-target.h: Likewise.
561 * aout-tic30.c: Likewise.
562 * binary.c: Likewise.
564 * coff-alpha.c: Likewise.
565 * coff-rs6000.c: Likewise.
566 * coff64-rs6000.c: Likewise.
567 * coffcode.h: Likewise.
568 * i386msdos.c: Likewise.
569 * i386os9k.c: Likewise.
572 * libbfd-in.h: Likewise.
573 * libecoff.h: Likewise.
574 * mach-o-target.c: Likewise.
576 * nlm-target.h: Likewise.
579 * plugin.c: Likewise.
580 * ppcboot.c: Likewise.
583 * tekhex.c: Likewise.
584 * versados.c: Likewise.
585 * vms-alpha.c: Likewise.
587 * elfxx-target.h: Use _bfd_elf_link_check_relocs.
588 * linker.c (bfd_link_check_relocs): New function.
589 (_bfd_generic_link_check_relocs): New function.
590 * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
591 _bfd_link_check_relocs field.
592 (struct bfd_target)L Add _bfd_link_check_relocs field.
593 * bfd-in2.h: Regenerate.
594 * libbfd.h: Regenerate.
596 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
598 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
599 (elf_backend_gc_sweep_hook): Likewise.
600 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
601 (elf_backend_gc_sweep_hook): Likewise.
603 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
605 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
608 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
611 * elf64-x86-64.c (check_relocs_failed): New.
612 (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
613 Support relocation agaist local symbol. Set check_relocs_failed.
614 (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check
615 R_X86_64_32 relocation overflow.
616 (elf_x86_64_relocate_section): Skip if check_relocs failed.
617 Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
619 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
621 * elf32-i386.c (elf_i386_check_relocs): Call
622 _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
623 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
625 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
627 * elf-bfd.h (_bfd_elf_link_check_relocs): New.
628 * elflink.c (_bfd_elf_link_check_relocs): New function.
629 (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
630 if check_relocs_after_open_input is FALSE.
632 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
634 * cache.c: Update old style function definitions.
635 * elf32-m68k.c: Likewise.
636 * elf64-mmix.c: Likewise.
637 * stab-syms.c: Likewise.
639 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
641 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
643 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
645 * Makefile.in: Regenerated with automake 1.11.6.
646 * aclocal.m4: Likewise.
647 * doc/Makefile.in: Likewise.
649 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
651 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
652 * bfd-in2.h: Regenerate.
653 * libbfd.h: Regenerate.
654 * elf32-arc.c: Add 'opcode/arc.h' include.
655 (struct arc_relocation_data): Add symbol_name.
656 (arc_special_overflow_checks): New function.
657 (arc_do_relocation): Use arc_special_overflow_checks, reindent as
658 required, add an extra comment.
659 (elf_arc_relocate_section): Setup symbol_name in reloc_data.
661 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
663 * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
665 (elf_arc_relocate_section): Update enum uses.
666 (elf_arc_check_relocs): Likewise.
667 (elf_arc_finish_dynamic_symbol): Likewise.
669 2016-04-14 H.J. Lu <hongjiu.lu@intel.com>
671 * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
674 2016-04-14 Nick Clifton <nickc@redhat.com>
677 * elf-bbfd.h (struct elf_backend_data): New field:
679 New field: elf_backend_set_special_section_info_and_link
680 * elfxx-target.h (elf_backend_strtab_flags): Define if not already
682 (elf_backend_set_special_section_info_and_link): Define if not
684 (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
685 elf_backend_strtab_flags macros to initialise fields in structure.
686 * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
687 being set even if SHF_MERGE is not set.
688 (elf_fake_sections): Likewise.
689 (section_match): New function. Matches two ELF sections based
690 upon fixed characteristics.
691 (find_link): New function. Locates a section in a BFD that
692 matches a section in a different BFD.
693 (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
694 fields of reserved sections.
695 (bfd_elf_compute_section_file_positions): Set the flags for the
696 .shstrtab section based upon the elf_strtab_flags field in the
697 elf_backend_data structure.
698 (swap_out_syms): Likewise for the .strtab section.
699 * elflink.c (bfd_elf_final_link): Set the flags for the
700 .strtab section based upon the elf_strtab_flags field in the
701 elf_backend_data structure.
702 * elf32-i386.c (elf32_i386_set_special_info_link): New function.
703 (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
705 (elf_backend_set_special_section_info_and_link): Define for
707 * elf32-sparc.c: Likewise.
708 * elf64-x86-64.c: Likewise.
710 2016-04-11 H.J. Lu <hongjiu.lu@intel.com>
713 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
715 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
716 Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
717 applies to read-only section.
718 * elf32-i386.c (elf_i386_link_hash_table): Add
719 readonly_dynrelocs_against_ifunc.
720 (elf_i386_allocate_dynrelocs): Updated.
721 (elf_i386_size_dynamic_sections): Issue an error for read-only
722 segment with dynamic IFUNC relocations only if
723 readonly_dynrelocs_against_ifunc is TRUE.
724 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
725 readonly_dynrelocs_against_ifunc.
726 (elf_x86_64_allocate_dynrelocs): Updated.
727 (elf_x86_64_size_dynamic_sections): Issue an error for read-only
728 segment with dynamic IFUNC relocations only if
729 readonly_dynrelocs_against_ifunc is TRUE.
730 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
733 2016-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
735 * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
736 a fall through from error_ret_free_internal. Free local_syms in
737 error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
739 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
741 * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
742 (relocate_plt_for_entry): Likewise.
744 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
746 * elf32-arc.c (elf_arc_check_relocs): Changed
748 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
750 * elf32-arc.c (name_for_global_symbol): Changed assert.
751 (get_replace_function): Created.:
752 (struct arc_relocation_data): Changed to signed types.
753 (defines S, L, P, PDATA): Casted to signed type.
754 (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
755 (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
756 (arc_do_relocation): Changed.
758 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
760 * elf32-arc.c (name_for_global_symbol): Added assert to check for
762 (elf_arc_relocate_section): Added and changed asserts, validating
763 the synamic symbol index.
764 (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
765 relocation if symbol has dynindx set to -1.
767 2016-04-05 Maciej W. Rozycki <macro@imgtec.com>
769 * elflink.c (elf_link_add_object_symbols): Always turn hidden
770 and internal symbols which have a dynamic index into local
773 2016-04-04 Nick Clifton <nickc@redhat.com>
776 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
777 version number if the version is zero.
779 2016-04-01 Alan Modra <amodra@gmail.com>
782 * elflink.c (on_needed_list): Recursively check needed status.
783 (elf_link_add_object_symbols): Adjust.
785 2016-03-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
787 * elf32-avr.c (avr_elf32_load_records_from_section): Free
788 internal_relocs only if they aren't cached.
790 2016-03-29 Nick Clifton <nickc@redhat.com>
793 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
794 assertion on the size of the got section to allow it to be bigger
795 than the number of relocs.
797 2016-03-29 Toni Spets <toni.spets@iki.fi>
800 * coffcode.h (coff_write_object_contents): Revert accidental
803 2016-03-22 Alan Modra <amodra@gmail.com>
806 * dwarf2.c (read_attribute_value): Skip info_ptr check for
807 DW_FORM_flag_present.
809 2016-03-22 Nick Clifton <nickc@redhat.com>
811 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
812 architecture name for backwards compatibility.
814 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
817 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
818 sufficiently recent version of GCC.
819 * configure: Regenerate.
821 2016-03-22 Alan Modra <amodra@gmail.com>
824 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
826 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
828 * archures.c (bfd_mach_arc_nps400): Define.
829 * bfd-in2.h: Regenerate.
830 * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
831 some existing entries to make space.
832 * elf32-arc.c (arc_elf_object_p): Add nps400 case.
833 (arc_elf_final_write_processing): Likewise.
835 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
837 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
839 (arc_elf_final_write_processing): Don't bother setting cpu field
840 in e_flags, this will have been set elsewhere.
842 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
844 * elf32-arc.c (arc_elf_final_write_processing): Switch to using
847 2016-03-21 Nick Clifton <nickc@redhat.com>
849 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
850 * configure: Regenerate.
851 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
852 alloca with call to xmalloc.
853 * elf32-nds32.c: Likewise.
854 * elf64-hppa.c: Likewise.
855 * elfxx-mips.c: Likewise.
857 * pei-x86_64.c: Likewise.
861 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
864 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
866 (elf_i386_relocate_section): Likewise.
867 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
868 (elf_x86_64_relocate_section): Likewise.
870 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
873 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
874 no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
875 relocation overflow check.
877 2016-03-14 H.J. Lu <hongjiu.lu@intel.com>
879 * bfd-in2.h: Regenerated.
881 2016-03-11 Dan Gissel <dgisselq@ieee.org>
884 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
885 uses bytes not octets.
886 * elflink.c (resolve_section): Likewise.
888 (eval_section): Pass the input_bfd to resolve_section.
889 (bfd_elf_perform_complex_relocation): Convert byte offset to
890 octets before read and writing values.
891 (elf_link_input_bfd): Add byte to octet conversions.
892 (elf_reloc_link_order): Likewise.
893 (elf_fixup_link_order): Likewise.
894 (bfd_elf_final_link): Likewise.
895 * reloc.c (_bfd_final_link_relocate): Likewise.
896 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
898 2016-03-10 Nick Clifton <nickc@redhat.com>
900 * config.bfd: Mark the i370 target as obsolete.
902 2016-03-09 Pedro Alves <palves@redhat.com>
904 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
905 gcc ABI)" to printable name.
906 * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
907 of "v850-rh850" as printable name.
909 2016-03-09 Leon Winter <winter-gcc@bfw-online.de>
912 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
913 relocations against absolute symbols.
915 2016-03-09 Alan Modra <amodra@gmail.com>
918 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
919 length elements in the archive.
921 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
924 * elflink.c (elf_link_add_object_symbols): Create dynamic sections
925 for -E/--dynamic-list only when not relocatable.
927 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
930 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
931 count for locally defined local IFUNC symbols in shared object.
932 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
934 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
937 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
940 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
941 Andrew Burgess <andrew.burgess@embecosm.com>
943 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
944 (arc_bfd_put_32): Becomes an alias for bfd_put_32.
945 (arc_elf_howto_init): Added assert to validate relocations.
946 (get_middle_endian_relocation): Delete.
947 (middle_endian_convert): New function.
948 (ME): Redefine, now does nothing.
950 (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
951 definition to call middle_endian_convert. Add a new local
952 variable and make use of this throughout. Added call to
953 arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
955 2016-03-07 Nick Clifton <nickc@redhat.com>
958 * archive.c (bfd_generic_openr_next_archived_file): Allow zero
959 length elements in the archive.
961 2016-03-07 Jiong Wang <jiong.wang@arm.com>
963 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
964 section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
966 2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
969 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
970 executable as definition if the new definition comes from a
973 2016-03-02 Alan Modra <amodra@gmail.com>
975 * Makefile.in: Regenerate.
976 * po/SRC-POTFILES.in: Regenerate.
978 2016-02-29 Cupertino Miranda <cmiranda@synopsys.com>
980 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
981 relocation addend when sections get merged.
983 2016-02-29 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
985 * elf32-arc.c (arc_elf_final_write_processing): Add condition to
987 (elf_arc_relocate_section): Fixes and conditions to support PIE.
988 Assert for code sections dynamic relocs.
990 2016-02-26 Renlin Li <renlin.li@arm.com>
992 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
993 check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
995 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
998 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
999 load with locally bound symbols if PIC is false or there is no
1000 base register. Optimize branch to 0 if PIC is false.
1001 (elf_i386_relocate_section): Don't generate dynamic relocations
1002 against undefined weak symbols if PIC is false.
1003 * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
1004 if we can't estimate relocation overflow with --no-relax.
1005 Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
1006 symbols if PIC is false. Optimize branch to 0 if PIC is false.
1007 (elf_x86_64_relocate_section): Don't generate dynamic relocations
1008 against undefined weak symbols if PIC is false.
1010 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
1013 * bfd.c (bfd): Change flags to 20 bits.
1014 (BFD_CONVERT_ELF_COMMON): New.
1015 (BFD_USE_ELF_STT_COMMON): Likewise.
1016 (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
1017 BFD_USE_ELF_STT_COMMON.
1018 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1019 * configure.ac: Remove --enable-elf-stt-common.
1020 * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
1021 common symbol depending on BFD_CONVERT_ELF_COMMON and
1022 BFD_USE_ELF_STT_COMMON.
1023 * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
1025 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
1027 (elf_link_convert_common_type): New function.
1028 (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
1029 common symbol depending on BFD_CONVERT_ELF_COMMON and
1030 BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx.
1031 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
1032 and BFD_USE_ELF_STT_COMMON to object_flags.
1033 (TARGET_LITTLE_SYM): Likewise.
1034 * syms.c (BSF_KEEP_G): Renamed to ...
1035 (BSF_ELF_COMMON): This.
1036 * bfd-in2.h: Regenerated.
1037 * config.in: Likewise.
1038 * configure: Likewise.
1040 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
1045 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1046 (elf_i386_link_hash_entry): Add has_got_reloc and
1048 (elf_i386_link_hash_table): Add interp.
1049 (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
1051 (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
1053 (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
1054 (elf_i386_fixup_symbol): New function.
1055 (elf_i386_pie_finish_undefweak_symbol): Likewise.
1056 (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
1057 relocations and discard relocations against resolved undefined
1058 weak symbols in executable. Don't make resolved undefined weak
1059 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1060 relocation against undefined weak symbols in PIE.
1061 (elf_i386_size_dynamic_sections): Set interp to .interp section.
1062 (elf_i386_relocate_section): Don't generate dynamic relocations
1063 against resolved undefined weak symbols in PIE, except for
1065 (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
1066 dynamic PLT/GOT relocations for resolved undefined weak symbols.
1067 Don't generate dynamic relocation against resolved undefined weak
1068 symbol in executable.
1069 (elf_i386_finish_dynamic_sections): Call
1070 elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
1071 (elf_backend_fixup_symbol): New.
1072 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1073 (elf_x86_64_link_hash_entry): Add has_got_reloc and
1075 (elf_x86_64_link_hash_table): Add interp.
1076 (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
1078 (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
1080 (elf_x86_64_check_relocs): Set has_got_reloc and
1082 (elf_x86_64_fixup_symbol): New function.
1083 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1084 (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
1085 relocations and discard relocations against resolved undefined
1086 weak symbols in executable. Don't make resolved undefined weak
1087 symbols in executable dynamic.
1088 (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
1089 (elf_x86_64_relocate_section): Check relocation overflow for
1090 dynamic relocations against unresolved weak undefined symbols.
1091 Don't generate dynamic relocations against resolved weak
1092 undefined symbols in PIE.
1093 (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
1094 dynamic PLT/GOT relocations for resolved undefined weak symbols.
1095 Don't generate dynamic relocation against resolved undefined weak
1096 symbol in executable.
1097 (elf_x86_64_finish_dynamic_sections): Call
1098 elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
1099 (elf_backend_fixup_symbol): New.
1101 2016-02-26 Alan Modra <amodra@gmail.com>
1103 * elf64-ppc.c (create_linkage_sections): Create sfpr when
1104 save_restore_funcs, rest of sections when not relocatable.
1105 (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
1106 (sfpr_define): Define all symbols on emitted code.
1107 (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
1108 when relocatable. Move sfpr_define loop earlier.
1110 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1112 * elf64-x86-64.c (elf_x86_64_need_pic): New function.
1113 (elf_x86_64_relocate_section): Use it. Replace
1114 x86_64_elf_howto_table[r_type] with howto.
1116 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1119 * elflink.c (bfd_elf_record_link_assignment): Set versioned if
1120 symbol version is unknown.
1122 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1124 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
1125 to (bfd_vma) -1 when setting needs_plt to 0.
1126 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1128 2016-02-23 H.J. Lu <hongjiu.lu@intel.com>
1130 * elflink.c (bfd_elf_record_link_assignment): Check for shared
1131 library, instead of PIC, and don't check PDE when making linker
1132 assigned symbol dynamic.
1134 2016-02-23 Faraz Shahbazker <faraz.shahbazker@imgtec.com>
1136 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
1137 ABIVERSION for non-executable stack.
1139 2016-02-23 Rich Felker <bugdal@aerifal.cx>
1142 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
1143 Always produce a RELATIVE reloc for a local symbol.
1145 2016-02-23 Hans-Peter Nilsson <hp@axis.com>
1147 Fix test-case ld-elf/pr19617b
1148 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1149 discard unused non-function symbols when --dynamic-list-data.
1151 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
1153 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
1154 dynsym section, even if it is empty, with dynamic sections.
1156 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
1158 * syms.c: Remove BSF_COMMON from comments.
1159 * bfd-in2.h: Regenerated.
1161 2016-02-22 Jiong Wang <jiong.wang@arm.com>
1163 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
1164 for destination. Remove useless function parameters.
1165 (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
1167 2016-02-19 Nick Clifton <nickc@redhat.com>
1170 * aoutx.h (aout_link_add_symbols): Check for out of range string
1174 * reloc.c (bfd_generic_get_relocated_section_contents): Stop
1175 processing if we encounter a reloc without an associated symbol.
1177 2016-02-18 H.J. Lu <hongjiu.lu@intel.com>
1180 * elflink.c (elf_link_add_object_symbols): Always create dynamic
1181 sections for -E/--dynamic-list.
1183 2016-02-17 H.J. Lu <hongjiu.lu@intel.com>
1185 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined
1188 2016-02-16 Joseph Myers <joseph@codesourcery.com>
1190 * plugin.c (plugin_vec): Set match priority to 255.
1191 * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
1192 matching against the plugin vector, take priority from there not
1195 2016-02-15 Nick Clifton <nickc@redhat.com>
1197 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
1198 for length and type fields. Use a signed value for the
1199 suffix_length field.
1201 2016-02-10 H.J. Lu <hongjiu.lu@intel.com>
1204 * elf32-i386.c (elf_i386_relocate_section): Mask off the least
1205 significant bit in GOT offset for R_386_GOT32X.
1207 2016-02-10 Nick Clifton <nickc@redhat.com>
1210 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
1212 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
1213 number of messages about FDE encoding preventing .eh_frame_hdr
1216 2016-02-09 Nick Clifton <nickc@redhat.com>
1218 * oasys.c (oasys_archive_p): Fix indentation.
1219 * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
1220 constant for left shifting.
1222 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
1223 helpful warning message to explain why certain AArch64 relocs
1226 2016-02-05 Simon Marchi <simon.marchi@ericsson.com>
1228 * pe-mips.c (coff_mips_reloc): Fix formatting.
1230 2016-02-05 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1232 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
1233 to bfd_mach_arc_arc600.
1235 2016-02-04 Alan Modra <amodra@gmail.com>
1237 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
1240 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
1243 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
1244 distances in the compressed_size field of the output section.
1246 2016-02-02 Alan Modra <amodra@gmail.com>
1248 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
1249 ELFv2 entry optimization.
1251 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
1254 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
1255 no relocations in relocatable files.
1257 2016-02-01 H.J. Lu <hongjiu.lu@intel.com>
1260 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
1261 if a symbol from a library loaded via DT_NEEDED doesn't match
1262 the symbol referenced by regular object.
1264 2016-02-01 Nathaniel Smith <njs@pobox.com>
1266 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
1269 2016-02-01 Alan Modra <amodra@gmail.com>
1271 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
1272 an out of range reloc_index.
1273 * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
1275 2016-02-01 Kamil Rytarowski <n54@gmx.com>
1277 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
1278 (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
1279 * Makefile.in: Regenerated.
1281 2016-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1283 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
1285 2016-01-31 John David Anglin <danglin@gcc.gnu.org>
1288 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
1290 * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval.
1292 2016-01-30 H.J. Lu <hongjiu.lu@intel.com>
1295 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
1296 against STT_GNU_IFUNC symbol only with dynamic symbols.
1297 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1299 2016-01-28 H.J. Lu <hongjiu.lu@intel.com>
1302 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
1303 decompress debug sections.
1305 2016-01-25 Maciej W. Rozycki <macro@imgtec.com>
1307 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
1310 2016-01-25 Nick Clifton <nickc@redhat.com>
1313 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
1314 dsym filename buffer.
1316 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
1318 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
1320 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
1322 * elfxx-mips.c (BZ16_REG): Correct calculation.
1324 2016-01-21 Nick Clifton <nickc@redhat.com>
1326 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
1327 changing the type of _loc to be bfd_byte *.
1328 (elf_arc_finish_dynamic_symbol): Likewise.
1330 2016-01-21 Nick Clifton <nickc@redhat.com>
1333 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
1334 class of the linker stub bfd.
1335 (elf32_arm_check_relocs): Skip check for pic format after
1336 processing a vxWorks R_ARM_ABS12 reloc.
1337 * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
1338 reporting a class mismatch.
1340 2016-01-21 Jiong Wang <jiong.wang@arm.com>
1342 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
1343 veneer for sym_sec != input_sec.
1344 (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
1345 (elfNN_aarch64_final_link_relocate): Take rela addend into account when
1346 calculation destination.
1348 2016-01-21 Alan Modra <amodra@gmail.com>
1350 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
1351 (swap_linux_prpsinfo64_out): New function.
1352 (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1353 (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
1354 * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset.
1355 (elfcore_write_linux_prpsinfo64): Likewise.
1356 * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
1357 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1358 (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset.
1360 2016-01-21 Alan Modra <amodra@gmail.com>
1362 * elf-linux-core.h: Rename from elf-linux-psinfo.h.
1363 * elf.c: Adjust #include.
1364 * elf32-ppc.c: Don't #include elf-linux-psinfo.h
1365 * Makefile.am (SOURCE_HFILES): Update.
1366 * Makefile.in: Regenerate.
1367 * po/SRC-PORFILES.in: Regenerate.
1369 2016-01-21 Alan Modra <amodra@gmail.com>
1371 * configure.ac: Move corefile selection later in file. Move
1372 tdefaults code immediately after other target vector code.
1373 * configure: Regenerate.
1375 2016-01-20 Mickael Guene <mickael.guene@st.com>
1377 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
1378 section using '.text.noread' pattern.
1380 2016-01-19 John Baldwin <jhb@FreeBSD.org>
1382 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
1384 2016-01-18 Miranda Cupertino <Cupertino.Miranda@synopsys.com>
1385 Zissulescu Claudiu <Claudiu.Zissulescu@synopsys.com>
1387 * arc-plt.def: New file.
1388 * arc-plt.h: Likewise.
1389 * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
1390 elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
1391 elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
1392 elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
1393 (name_for_global_symbol): Added.
1394 (ADD_RELA): Helper to create dynamic relocs.
1395 (new_got_entry_to_list): Create a new got entry in linked list.
1396 (symbol_has_entry_of_type): Search for specific type of entry in
1398 (is_reloc_for_GOT): return FALSE for any TLS related relocs.
1399 (is_reloc_for_TLS, arc_elf_set_private_flags)
1400 (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
1401 (arc_elf_merge_private_bfd_data): New functions.
1402 (debug_arc_reloc): Cleaned debug info printing.
1403 (PDATA reloc): Changed not to perform address alignment.
1404 (reverse_me): Added. Fix for ARC_32 relocs.
1405 (arc_do_relocation): Return bfd_reloc_of when no relocation should
1407 (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
1408 Changed function to access an array of list of GOT entries instead
1409 of just an array of offsets.
1410 (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
1411 (elf_arc_check_relocs): Likewise.
1412 (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
1413 (elf_arc_finish_dynamic_sections): Likewise
1414 (arc_create_dynamic_sections): Modified conditions to create
1416 (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
1417 (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
1418 (relocate_plt_for_entry): Changed to support new way to define PLT
1420 (add_symbol_to_plt): Likewise.
1421 (arc_elf_link_hash_table_create): New function.
1423 2016-01-18 Nick Clifton <nickc@redhat.com>
1426 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
1427 section number into internal section number.
1428 * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
1429 * coffswap.h (coff_swap_sym_in): Likewise.
1430 * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
1431 * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
1432 section number field is big enough to hold the external value.
1434 2016-01-17 Alan Modra <amodra@gmail.com>
1436 * configure: Regenerate.
1438 2016-01-12 Yury Usishchev <y.usishchev@samsung.com>
1440 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
1441 when address in first unwind entry does not match start of
1444 2016-01-08 Richard Sandiford <richard.sandiford@arm.com>
1445 Jiong Wang <jiong.wang@arm.com>
1448 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
1451 2016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
1453 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
1454 place 'R_' before the reloc name returned.
1455 (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
1456 the relocation string.
1458 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1460 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
1461 factored out from...
1462 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1464 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1466 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
1467 attribute check after ELF file header flag check.
1469 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1471 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
1472 return status from `_bfd_elf_merge_object_attributes'.
1474 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1476 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
1477 factored out from...
1478 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1480 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1482 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
1483 handling of input MIPS ABI flags together.
1485 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1487 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
1488 attribute checks for null input.
1490 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1492 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
1493 pointers to target data.
1495 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1497 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
1500 2016-01-01 Alan Modra <amodra@gmail.com>
1502 Update year range in copyright notice of all files.
1504 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
1506 Copyright (C) 2016 Free Software Foundation, Inc.
1508 Copying and distribution of this file, with or without modification,
1509 are permitted in any medium without royalty provided the copyright
1510 notice and this notice are preserved.
1516 version-control: never