1 2015-10-11 John David Anglin <danglin@gcc.gnu.org>
3 * elf-hppa.h (elf_hppa_action_discarded): Ignore relocations in
6 2015-10-07 Cupertino Miranda <cmiranda@synopsys.com>
8 * archures.c: Remove support for older ARC. Added support for new
9 ARC cpus (ARC600, ARC601, ARC700, ARCV2).
10 * bfd-in2.h: Likewise.
11 * config.bfd: Likewise.
12 * cpu-arc.c: Likewise.
13 * elf32-arc.c: Totally changed file with a refactored
14 inplementation of the ARC port.
15 * libbfd.h: Added ARC specific relocation types.
18 2015-10-06 H.J. Lu <hongjiu.lu@intel.com>
20 * bfd.c (bfd_update_compression_header): Clear the ch_reserved
21 field in 64-bit output.
22 (bfd_convert_section_contents): Likewise.
24 2015-10-05 H.J. Lu <hongjiu.lu@intel.com>
27 * elflink.c (elf_link_add_object_symbols): Don't re-export a
28 symbol if it isn't undefined.
30 2015-10-04 H.J. Lu <hongjiu.lu@intel.com>
32 * config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec,
33 i386_pei_vec and x86_64_pei_vec for Solaris2/x86.
35 2015-10-02 Renlin Li <renlin.li@arm.com>
37 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Add
38 TLSIE_MOVW_GOTTPREL_G1.
39 (aarch64_tls_transition_without_check): Add
40 TLSIE_MOVW_GOTTPREL_G1 to TLSLE_MOVW_TPREL_G2
41 transition for local symbol.
42 (elfNN_aarch64_tls_relax): Add a argument to pass tp offset.
43 Add TLSIE_MOVW_GOTTPREL_G1 relaxation.
44 (elfNN_aarch64_relocate_section): Call elfNN_aarch64_tls_relax
47 2015-10-02 Renlin Li <renlin.li@arm.com>
49 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Add
50 relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC,
52 (aarch64_tls_transition_without_check): Add relaxation support.
53 (aarch64_reloc_got_type): Add support.
54 (elfNN_aarch64_final_link_relocate): Likewise.
55 (elfNN_aarch64_tls_relax): Likewise.
56 (elfNN_aarch64_relocate_section): Likewise.
57 (elfNN_aarch64_gc_sweep_hook): Likewise.
58 (elfNN_aarch64_check_relocs): Likewise.
59 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
60 (_bfd_aarch64_elf_resolve_relocation): Likewise.
62 2015-10-02 Renlin Li <renlin.li@arm.com>
64 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for
65 BFD_RELOC_AARCH64_TLSDESC_OFF_G1.
67 2015-10-02 Renlin Li <renlin.li@arm.com>
69 * elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC):
70 Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1.
71 (aarch64_tls_transition_without_check): Likewise
72 (elfNN_aarch64_tls_relax): Likwise.
74 2015-10-02 Renlin Li <renlin.li@arm.com>
76 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
77 for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.
79 2015-10-02 Renlin Li <renlin.li@arm.com>
81 * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
82 AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
83 * libbfd.h: Regenerate.
84 * bfd-in2.h: Likewise.
85 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
86 TLSIE_MOVW_GOTTPREL_G1 check overflow.
87 (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
88 and TLSIE_MOVW_GOTTPREL_G0_NC.
89 (elfNN_aarch64_final_link_relocate): Likewise.
90 (elfNN_aarch64_relocate_section): Likewise.
91 (elfNN_aarch64_gc_sweep_hook): Likewise.
92 (elfNN_aarch64_check_relocs): Likewise.
93 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
94 (_bfd_aarch64_elf_resolve_relocation): Likewise.
96 2015-10-02 Renlin Li <renlin.li@arm.com>
98 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
99 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
100 (elfNN_aarch64_final_link_relocate): Likewise.
101 (elfNN_aarch64_relocate_section): Likewise.
102 (elfNN_aarch64_gc_sweep_hook): Likewise.
103 (elfNN_aarch64_check_relocs): Likewise.
104 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
105 (_bfd_aarch64_elf_resolve_relocation): Likewise.
107 2015-10-02 Renlin Li <renlin.li@arm.com>
109 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
110 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
111 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
112 * libbfd.h: Regenerate.
113 * bfd-in2.h: Likewise
115 2015-10-02 Renlin Li <renlin.li@arm.com>
117 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
118 BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
119 (elfNN_aarch64_final_link_relocate): Likewise.
120 (elfNN_aarch64_relocate_section): Likewise.
121 (elfNN_aarch64_gc_sweep_hook): Likewise.
122 (elfNN_aarch64_check_relocs): Likewise.
123 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
124 (_bfd_aarch64_elf_resolve_relocation): Likewise.
126 2015-10-02 Renlin Li <renlin.li@arm.com>
128 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry.
129 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
130 BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
131 * bfd-in2.h: Regenerate.
132 * libbfd.h: Likewise.
134 2015-10-02 Renlin Li <renlin.li@arm.com>
136 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
137 BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support.
138 (elfNN_aarch64_final_link_relocate): Likewise.
139 (elfNN_aarch64_gc_sweep_hook): Likewise.
140 (elfNN_aarch64_check_relocs): Likewise.
141 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
142 (_bfd_aarch64_elf_resolve_relocation): Likewise.
144 2015-10-02 Renlin Li <renlin.li@arm.com>
146 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
147 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
149 * libbfd.h: Regnerate.
150 * bfd-in2.h: Regenerate.
152 2015-10-02 Renlin Li <renlin.li@arm.com>
154 * elfnn-aarch64.c (aarch64_reloc_got_type): Add support
155 for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
156 (elfNN_aarch64_gc_sweep_hook): Likewise.
157 (elfNN_aarch64_check_relocs): Likewise
158 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
159 (_bfd_aarch64_elf_resolve_relocation): Likewise
160 (elfNN_aarch64_final_link_relocate): Likewise
162 2015-010-02 Renlin Li <renlin.li@arm.com>
164 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New.
165 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
167 * libbfd.h: Regenerate.
168 * bfd-in2.h: Regenerate.
170 2015-10-02 Renlin Li <renlin.li@arm.com>
172 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
173 BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
174 (elfNN_aarch64_gc_sweep_hook): Likewise.
175 (elfNN_aarch64_check_relocs): Likewise
176 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
177 (_bfd_aarch64_elf_resolve_relocation): Likewise
178 (elfNN_aarch64_final_link_relocate): Calculate offset within GOT.
180 2015-10-02 Renlin Li <renlin.li@arm.com>
182 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to
185 2015-10-01 H.J. Lu <hongjiu.lu@intel.com>
188 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
189 pointer_equality_needed for R_X86_64_PC32 reloc in non-code
192 2015-10-01 Renlin Li <renlin.li@arm.com>
194 * elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
195 (elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.
197 2015-10-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
199 * config.bfd (targ_selvecs): Remove sh_elf32_vec and
200 sh_elf32_le_vec from sh*-*-linux cases.
202 2015-10-01 Alan Modra <amodra@gmail.com>
205 * elflink.c (_bfd_elf_merge_sections): Revert last change.
207 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
210 * elf32-i386.c (elf_i386_check_relocs): Set
211 pointer_equality_needed for R_386_PC32 reloc in non-code
214 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
217 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds
218 that have the compatible ELF machine code with the output bfd.
220 2015-09-30 Alan Modra <amodra@gmail.com>
223 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that
224 will be handled by elf_link_input_bfd. Rename abfd param to obfd.
226 2015-09-30 Rich Felker <dalias@libc.org>
228 * config.bfd (targ_selvecs): Add fdpic and misc targets
231 2015-09-29 Andrew Stubbs <ams@codesourcery.com>
232 H.J. Lu <hongjiu.lu@intel.com>
235 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
236 * bfd-in2.h: Regenerated.
238 2015-08-11 Peter Zotov <whitequark@whitequark.org>
241 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
242 (R_OR1K_16_PCREL): Likewise.
243 (R_OR1K_8_PCREL): Likewise.
245 2015-09-23 Nick Clifton <nickc@redhat.com>
247 * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
248 order to avoid problems with left shifting negative values.
249 (abs32code): Likewise.
250 * mach-o.c (FILE_ALIGN): Likewise.
251 * coff-rs6000.c (xcoff_debug_sections): Delete unused static
253 * elf32-visium.c (visium_reloc_map): Likewise.
254 * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless
255 calls to abs function.
256 * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise.
257 * elf32-score.c (score_elf_final_link_relocate): Likewise.
258 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
259 * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead
260 of shifting to create a negative mask.
261 * elf32-msp430.c (elf_backend_special_sections): Define.
262 * elfxx-mips.c (got_ofst_reloc_p): Delete unused function.
263 (got_hi16_reloc_p): Delete unused function.
264 * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of
267 2015-09-23 Nick Clifton <nickc@redhat.com>
270 * elf-bfd.h (struct elf_section_list): New structure.
271 (struct elf_obj_tdata): Replace symtab_shndx_hdr with
272 symtab_shndx_list. Delete symtab_shndx_section.
273 (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list.
274 * elf.c (bfd_elf_get_syms): If symtab index sections are present,
275 scan them for the section that matches the provided symbol table.
276 (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections.
277 (assign_section_numbers): Use the first symtab index table in the
279 (_bfd_elf_compute_section_file_positions): Replace use of
280 symtab_shndx_hdr with use of symtab_shndx_list.
281 (find_section_in_list): New function.
282 (assign_file_postions_except_relocs): Use new function.
283 (_bfd_elf_copy_private_symbol_data): Likewise.
284 (swap_out_syms): Handle multiple symbol table index sections.
285 * elf32-m32c.c (m32c_elf_relax_section): Replace use of
286 symtab_shndx_hdr with use of symtab_shndx_list.
287 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
288 * elf32-rx.c (rx_relax_section): Likewise.
289 * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise.
290 * elflink.c (bfd_elf_final_link): Likewise.
292 2015-09-21 H.J. Lu <hongjiu.lu@intel.com>
294 * bfd.c (bfd_update_compression_header): Use bfd_put_32 on
296 (bfd_check_compression_header): Use bfd_get_32 on ch_type.
297 (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
300 2015-09-20 Rich Felker <dalias@libc.org>
302 * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
303 .interp when info->nointerp.
304 (bfd_elf_size_dynamic_sections): Adjust assert.
305 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp
307 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
308 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
309 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
310 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
311 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
312 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
313 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
314 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
315 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
316 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
317 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
318 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
319 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
320 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
321 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
322 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
323 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
324 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
325 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
326 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.
327 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
328 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
329 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
330 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
331 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
332 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
333 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
334 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
335 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
336 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
337 * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
338 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
339 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
340 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
342 2015-09-18 Doug Evans <xdje42@gmail.com>
344 * targets.c (enum bfd_flavour): Add comment.
345 (bfd_flavour_name): New function.
346 * bfd-in2.h: Regenerate.
348 2015-09-18 Alan Modra <amodra@gmail.com>
350 * elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename
351 from no_tls_get_addr_opt.
352 * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt.
353 (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at
356 2015-09-17 Alan Modra <amodra@gmail.com>
359 * elflink.c (elf_link_adjust_relocs): Correct start of insertion
362 2015-09-16 Alan Modra <amodra@gmail.com>
365 * elflink.c (elf_link_adjust_relocs): Modify insertion sort to
366 insert a run. Return status in case of malloc failure.
369 2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
371 * elf32-xtensa.c (elf_xtensa_be_plt_entry)
372 (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for
374 (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix
375 up instructions according to ABI.
377 2015-09-14 Rich Felker <dalias@libc.org>
379 * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
380 instead of clearing it on cross-section relocations.
381 (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
383 2015-09-12 Helge Deller <deller@gmx.de>
386 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
389 2015-09-09 Jiong Wang <jiong.wang@arm.com>
391 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
393 2015-09-09 Jiong Wang <jiong.wang@arm.com>
395 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three
396 TLS local dynamic traditional relocations types.
397 (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to
398 local executable relaxation.
400 2015-09-03 H.J. Lu <hongjiu.lu@intel.com>
402 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove
405 2015-09-02 H.J. Lu <hongjiu.lu@intel.com>
407 * elf32-i386.c (R_386_irelative): Renamed to ...
409 (R_386_vt_offset): Updated.
410 (elf_i386_rtype_to_howto): Likewise.
411 (elf_i386_relocate_section): Likewise.
413 2015-09-01 H.J. Lu <hongjiu.lu@intel.com>
416 * elf32-i386.c (elf_i386_link_hash_entry): Add
417 func_pointer_refcount.
418 (elf_i386_link_hash_newfunc): Clear func_pointer_refcount.
419 (elf_i386_get_local_sym_hash): Likewise.
420 (elf_i386_copy_indirect_symbol): Also copy
421 func_pointer_refcount.
422 (elf_i386_check_relocs): Increment func_pointer_refcount.
423 (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount.
424 (elf_i386_allocate_dynrelocs): Don't create the PLT entry if
425 there are only function pointer relocations which can be
426 resolved at run-time. Keep dynanamic relocations for run-time
427 function pointer initialization.
428 (elf_i386_relocate_section): Copy dynamic function pointer
430 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
431 func_pointer_refcount.
432 (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount.
433 (elf_x86_64_get_local_sym_hash): Likewise.
434 (elf_x86_64_copy_indirect_symbol): Also copy
435 func_pointer_refcount.
436 (elf_x86_64_check_relocs): Increment func_pointer_refcount.
437 (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount.
438 (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if
439 there are only function pointer relocations which can be
440 resolved at run-time. Keep dynanamic relocations for run-time
441 function pointer initialization.
442 (elf_x86_64_relocate_section): Copy dynamic function pointer
445 2015-09-01 Alan Modra <amodra@gmail.com>
447 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value
448 if .opd section has been edited.
450 2015-09-01 Alan Modra <amodra@gmail.com>
453 * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout.
454 (enum ppc_stub_type): Add ppc_stub_save_res.
455 (struct map_stub): Add "next" and "needs_save_res".
456 (struct ppc_link_hash_entry): Add "save_res" flag.
457 (struct ppc_link_hash_table): Add "group".
458 (sfpr_define): Add stub_sec param. Define symbol in stub_sec if
459 stub_sec is non-null. Set "save_res".
460 (save_res_funcs): Make file scope, rename from funcs. Adjust uses.
461 (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms.
462 (ppc_build_one_stub): Handle ppc_stub_save_res.
463 (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding
464 stub for linker defined save_res sym.
465 (group_sections): Init new fields of struct map_stub.
466 (ppc64_elf_size_stubs): Reserve space for save/restore func copy.
467 (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit
469 (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res.
471 2015-08-31 Alan Modra <amodra@gmail.com>
473 * elf64-ppc.c (get_r2off): Return -1 on error.
474 (ppc_build_one_stub): Adjust for get_r2off change. Don't emit
475 addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
476 (ppc_size_one_stub): Corresponding size changes for r2off stubs.
477 Add condition in test for -R objects.
479 2015-08-31 Alan Modra <amodra@gmail.com>
481 * section.c (section_id): Make file scope.
482 (bfd_get_next_section_id): New function.
483 * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl.
484 (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add
485 group. Update all uses.
486 (struct ppc_link_hash_table): Delete top_id, top_index, and
487 input_list. Add sec_info_arr_size. Rename stub_group to
488 sec_info, and make group info indirect. Update stub_group refs
490 (ppc_add_stub): Don't look for stub_sec on link_sec stub_group
492 (ppc_build_one_stub): Delete FIXME.
493 (ppc64_elf_setup_section_lists): Size htab->sec_info for all
494 sections, not just input sections. Don't create htab->input_list.
495 (ppc64_elf_next_input_section): Update to use sec_info union as
498 (group_sections): Pass "info" param rather than "htab". Iterate
499 over output sections rather than input_list. Use sec_info union
500 as list pointers. Alloc atruct map_stub, and return fail status.
501 * bfd-in2.h: Regenerate.
503 2015-08-31 Alan Modra <amodra@gmail.com>
505 * elflink.c (elf_sort_symbol): Use correctly sized type for
506 calculating signed section->id difference.
507 (elf_link_add_object_symbols): Likewise.
508 * pef.c (bfd_pef_scan_start_address): Warning fix.
509 * vms-alpha.c (vms_new_section_hook): Likewise.
511 2015-08-31 Alan Modra <amodra@gmail.com>
513 * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
514 (find_relocs_at_address_addr): Make "reloc_type" an enum.
515 (nds32_elf_relax_delete_blanks): Warning fix.
516 (nds32_elf_relax_loadstore): Correct loop bound.
518 2015-08-31 Alan Modra <amodra@gmail.com>
520 * section.c (struct bfd_section): Make "id" and "index" unsigned.
521 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
522 * elf.c (elf_map_symbols): Likewise.
523 * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
524 (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
525 (ppc64_elf_setup_section_lists): Ditto for local vars.
526 * elf32-arm.c: Similarly to elf64-ppc.c.
527 * elf32-avr.c: Likewise.
528 * elf32-hppa.c: Likewise.
529 * elf32-m68hc1x.c: Likewise.
530 * elf32-metag.c: Likewise.
531 * elf32-nios2.c: Likewise.
532 * elfnn-aarch64.c: Likewise.
533 * simple.c (struct saved_offsets): Make "section_count" unsigned.
534 * bfd-in2.h: Regenerate.
536 2015-08-27 Alan Modra <amodra@gmail.com>
539 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
540 (elf_backend_sort_relocs_p): Define.
542 2015-08-26 Alan Modra <amodra@gmail.com>
545 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
546 (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
547 (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
549 (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
551 2015-08-26 Matthew Fortune <matthew.fortune@imgtec.com>
554 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
555 ISA value to a bfd machine number.
556 (bfd_mips_isa_ext): Update the ISA level and revision if
557 necessary. Use mips_mach_extends_p to decide if the ISA extension
559 (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
560 be inferred from the ABI setting. Set the ISA level from the
561 maximum of the incoming and outgoing ISA levels.
563 2015-08-25 Nick Clifton <nickc@redhat.com>
566 * elf.c (bfd_section_from_shdr): Replace assertions with warnings
567 about multiple symbol tables.
569 2015-08-25 Renlin Li <renlin.li@arm.com>
571 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
573 * bfd-in2.h: Regenerate.
575 2015-08-22 Alan Modra <amodra@gmail.com>
577 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
578 Don't copy fields not set by _bfd_elf_swap_verdef_in.
580 2015-08-19 Jiong Wang <jiong.wang@arm.com>
582 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
583 types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
584 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
585 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
586 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
587 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
588 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
589 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
590 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
591 (elfNN_aarch64_final_link_relocate): Likewise.
592 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
593 (_bfd_aarch64_elf_resolve_relocation): Likewise.
595 2015-08-19 Jiong Wang <jiong.wang@arm.com>
597 * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
598 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
599 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
600 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
601 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
602 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
603 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
604 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
605 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
606 * bfd-in2.h: Regenerate.
607 * libbfd.h: Regenerate.
609 2015-08-19 Jiong Wang <jiong.wang@arm.com>
612 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
613 types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
614 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
615 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
616 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
617 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
618 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
619 (elfNN_aarch64_final_link_relocate): Likewise.
620 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
621 (_bfd_aarch64_elf_resolve_relocation): Likewise.
623 2015-08-19 Jiong Wang <jiong.wang@arm.com>
625 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
626 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
627 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
628 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
629 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
630 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
631 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
632 * bfd-in2.h: Regenerate.
633 * libbfd.h: Regenerate.
635 2015-08-19 Jiong Wang <jiong.wang@arm.com>
637 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
638 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
639 (aarch64_reloc_got_type): Likewise.
640 (elfNN_aarch64_final_link_relocate): Likewise.
641 (elfNN_aarch64_relocate_section): Likewise.
642 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
643 (_bfd_aarch64_elf_resolve_relocation): Likewise.
645 2015-08-19 Jiong Wang <jiong.wang@arm.com>
647 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
648 * bfd-in2.h: Regenerate.
649 * libbfd.h: Regenerate.
650 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
651 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
653 2015-08-19 Alan Modra <amodra@gmail.com>
655 * elf-s390-common.c: Simplify expressions using
656 bfd_linke_executable, bfd_link_pie and bfd_link_pic.
657 * elf32-arm.c: Likewise.
658 * elf32-bfin.c: Likewise.
659 * elf32-frv.c: Likewise.
660 * elf32-m68k.c: Likewise.
661 * elf32-nios2.c: Likewise.
662 * elf32-ppc.c: Likewise.
663 * elf32-s390.c: Likewise.
664 * elf32-sh.c: Likewise.
665 * elf64-alpha.c: Likewise.
666 * elf64-ppc.c: Likewise.
667 * elf64-s390.c: Likewise.
668 * elflink.c: Likewise.
670 2015-08-18 Jiong Wang <jiong.wang@arm.com>
672 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
673 (elfNN_aarch64_relocate_section): Likewise.
674 (elfNN_aarch64_gc_sweep_hook): Likewise.
675 (elfNN_aarch64_check_relocs): Likewise.
677 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
680 * elf-bfd.h (elf_link_hash_table): Add dynsym.
681 * elf32-i386.c (elf_i386_reloc_type_class): Return
682 reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
683 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
684 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
685 (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
686 (elf_final_link_info): Remove dynsym_sec.
687 (elf_link_output_extsym): Replace dynsym_sec with dynsym.
688 (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
689 dynsym_sec with dynsym.
691 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
693 * bfd/aoutx.h: Replace shared, executable, relocatable and pie
694 fields with bfd_link_executable, bfd_link_dll,
695 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
696 * bfd/bout.c: Likewise.
697 * bfd/coff-alpha.c: Likewise.
698 * bfd/coff-arm.c: Likewise.
699 * bfd/coff-i386.c: Likewise.
700 * bfd/coff-i960.c: Likewise.
701 * bfd/coff-m68k.c: Likewise.
702 * bfd/coff-mcore.c: Likewise.
703 * bfd/coff-mips.c: Likewise.
704 * bfd/coff-ppc.c: Likewise.
705 * bfd/coff-rs6000.c: Likewise.
706 * bfd/coff-sh.c: Likewise.
707 * bfd/coff-tic80.c: Likewise.
708 * bfd/coff-x86_64.c: Likewise.
709 * bfd/coff64-rs6000.c: Likewise.
710 * bfd/coffgen.c: Likewise.
711 * bfd/cofflink.c: Likewise.
712 * bfd/ecoff.c: Likewise.
713 * bfd/ecofflink.c: Likewise.
714 * bfd/elf-bfd.h: Likewise.
715 * bfd/elf-eh-frame.c: Likewise.
716 * bfd/elf-ifunc.c: Likewise.
717 * bfd/elf-m10200.c: Likewise.
718 * bfd/elf-m10300.c: Likewise.
719 * bfd/elf-s390-common.c: Likewise.
720 * bfd/elf-vxworks.c: Likewise.
721 * bfd/elf.c: Likewise.
722 * bfd/elf32-arm.c: Likewise.
723 * bfd/elf32-avr.c: Likewise.
724 * bfd/elf32-bfin.c: Likewise.
725 * bfd/elf32-cr16.c: Likewise.
726 * bfd/elf32-cr16c.c: Likewise.
727 * bfd/elf32-cris.c: Likewise.
728 * bfd/elf32-crx.c: Likewise.
729 * bfd/elf32-d10v.c: Likewise.
730 * bfd/elf32-dlx.c: Likewise.
731 * bfd/elf32-epiphany.c: Likewise.
732 * bfd/elf32-fr30.c: Likewise.
733 * bfd/elf32-frv.c: Likewise.
734 * bfd/elf32-ft32.c: Likewise.
735 * bfd/elf32-h8300.c: Likewise.
736 * bfd/elf32-hppa.c: Likewise.
737 * bfd/elf32-i370.c: Likewise.
738 * bfd/elf32-i386.c: Likewise.
739 * bfd/elf32-i860.c: Likewise.
740 * bfd/elf32-ip2k.c: Likewise.
741 * bfd/elf32-iq2000.c: Likewise.
742 * bfd/elf32-lm32.c: Likewise.
743 * bfd/elf32-m32c.c: Likewise.
744 * bfd/elf32-m32r.c: Likewise.
745 * bfd/elf32-m68hc11.c: Likewise.
746 * bfd/elf32-m68hc1x.c: Likewise.
747 * bfd/elf32-m68k.c: Likewise.
748 * bfd/elf32-mcore.c: Likewise.
749 * bfd/elf32-mep.c: Likewise.
750 * bfd/elf32-metag.c: Likewise.
751 * bfd/elf32-microblaze.c: Likewise.
752 * bfd/elf32-moxie.c: Likewise.
753 * bfd/elf32-msp430.c: Likewise.
754 * bfd/elf32-mt.c: Likewise.
755 * bfd/elf32-nds32.c: Likewise.
756 * bfd/elf32-nios2.c: Likewise.
757 * bfd/elf32-or1k.c: Likewise.
758 * bfd/elf32-ppc.c: Likewise.
759 * bfd/elf32-rl78.c: Likewise.
760 * bfd/elf32-rx.c: Likewise.
761 * bfd/elf32-s390.c: Likewise.
762 * bfd/elf32-score.c: Likewise.
763 * bfd/elf32-score7.c: Likewise.
764 * bfd/elf32-sh-symbian.c: Likewise.
765 * bfd/elf32-sh.c: Likewise.
766 * bfd/elf32-sh64.c: Likewise.
767 * bfd/elf32-spu.c: Likewise.
768 * bfd/elf32-tic6x.c: Likewise.
769 * bfd/elf32-tilepro.c: Likewise.
770 * bfd/elf32-v850.c: Likewise.
771 * bfd/elf32-vax.c: Likewise.
772 * bfd/elf32-visium.c: Likewise.
773 * bfd/elf32-xc16x.c: Likewise.
774 * bfd/elf32-xstormy16.c: Likewise.
775 * bfd/elf32-xtensa.c: Likewise.
776 * bfd/elf64-alpha.c: Likewise.
777 * bfd/elf64-hppa.c: Likewise.
778 * bfd/elf64-ia64-vms.c: Likewise.
779 * bfd/elf64-mmix.c: Likewise.
780 * bfd/elf64-ppc.c: Likewise.
781 * bfd/elf64-s390.c: Likewise.
782 * bfd/elf64-sh64.c: Likewise.
783 * bfd/elf64-x86-64.c: Likewise.
784 * bfd/elflink.c: Likewise.
785 * bfd/elfnn-aarch64.c: Likewise.
786 * bfd/elfnn-ia64.c: Likewise.
787 * bfd/elfxx-mips.c: Likewise.
788 * bfd/elfxx-sparc.c: Likewise.
789 * bfd/elfxx-tilegx.c: Likewise.
790 * bfd/i386linux.c: Likewise.
791 * bfd/linker.c: Likewise.
792 * bfd/m68klinux.c: Likewise.
793 * bfd/pdp11.c: Likewise.
794 * bfd/pe-mips.c: Likewise.
795 * bfd/peXXigen.c: Likewise.
796 * bfd/reloc.c: Likewise.
797 * bfd/reloc16.c: Likewise.
798 * bfd/sparclinux.c: Likewise.
799 * bfd/sunos.c: Likewise.
800 * bfd/vms-alpha.c: Likewise.
801 * bfd/xcofflink.c: Likewise.
803 2015-08-18 Alan Modra <amodra@gmail.com>
806 * Makefile.am: Use $(SED) in place of sed throughout.
807 * Makefile.in: Regenerate.
809 2015-08-18 Alan Modra <amodra@gmail.com>
811 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
812 if already defined, and set linker_def.
813 (ppc64_elf_set_toc): Use .TOC. value if defined other than by
816 2015-08-14 Alan Modra <amodra@gmail.com>
819 * elf32-or1k.c: Revert 2015-08-11 change.
821 2015-08-13 H.J. Lu <hongjiu.lu@intel.com>
824 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
825 for read-only segment with dynamic IFUNC relocations.
826 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
828 2015-08-12 Simon Dardis <simon.dardis@imgtec.com>
830 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
831 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
832 mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
833 Update to use 'or' instead of 'addu/daddu'.
834 (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
835 (move_insns_32): Reorder table.
837 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
839 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
840 relocations in debug sections.
841 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
843 2015-08-11 Jiong Wang <jiong.wang@arm.com>
845 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
846 message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
848 2015-08-11 Jiong Wang <jiong.wang@arm.com>
850 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
851 (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
853 2015-08-11 Jiong Wang <jiong.wang@arm.com>
855 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
856 Loose the check for symbol from ABS section.
857 (elfNN_aarch64_size_stubs): Pass sym_sec.
859 2015-08-11 Jiong Wang <jiong.wang@arm.com>
862 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
863 calls go through plt stub.
864 (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
865 JUMP26 relocation to support inserting veneer for call to plt stub.
867 2015-08-11 Jiong Wang <jiong.wang@arm.com>
869 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
870 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
871 (aarch64_reloc_got_type): Likewise.
872 (elfNN_aarch64_final_link_relocate): Likewise.
873 (elfNN_aarch64_relocate_section): Likewise.
874 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
875 (_bfd_aarch64_elf_resolve_relocation): Likewise.
877 2015-08-11 Jiong Wang <jiong.wang@arm.com>
879 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
880 * bfd-in2.h: Regenerate.
881 * libbfd.h: Regenerate.
882 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
883 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
885 2015-08-11 Jiong Wang <jiong.wang@arm.com>
887 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
888 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
889 (aarch64_reloc_got_type): Likewise.
890 (elfNN_aarch64_final_link_relocate): Likewise.
891 (elfNN_aarch64_relocate_section): Likewise.
892 (elfNN_aarch64_gc_sweep_hook): Likewise.
893 (elfNN_aarch64_check_relocs): Likewise.
894 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
895 (_bfd_aarch64_elf_resolve_relocation): Likewise.
897 2015-08-11 Jiong Wang <jiong.wang@arm.com>
899 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
900 * bfd-in2.h: Regenerate.
901 * libbfd.h: Regenerate.
902 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
903 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
905 2015-08-11 Jiong Wang <jiong.wang@arm.com>
907 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
908 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
909 (aarch64_reloc_got_type): Likewise.
910 (elfNN_aarch64_final_link_relocate): Likewise.
911 (elfNN_aarch64_relocate_section): Likewise.
912 (elfNN_aarch64_gc_sweep_hook): Likewise.
913 (elfNN_aarch64_check_relocs): Likewise.
914 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
915 (_bfd_aarch64_elf_resolve_relocation): Likewise.
917 2015-08-11 Jiong Wang <jiong.wang@arm.com>
919 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
920 * bfd-in2.h: Regenerate.
921 * libbfd.h: Regenerate.
922 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
923 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
925 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
928 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
929 relocations in debug sections.
930 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
932 2015-08-11 Peter Zotov <whitequark@whitequark.org>
935 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
936 (R_OR1K_16_PCREL): Likewise.
937 (R_OR1K_8_PCREL): Likewise.
939 2015-08-11 Nick Clifton <nickc@redhat.com>
942 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
946 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
948 * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
950 (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
952 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
954 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
956 2015-08-10 H.J. Lu <hongjiu.lu@intel.com>
958 * elf-bfd.h (elf_symbol_version): New enum.
959 (elf_link_hash_entry): Replace hidden with versioned.
960 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
961 version if the symbol is unversioned. Initialize versioned.
962 (_bfd_elf_add_default_symbol): Don't look for symbol version
963 if the symbol is unversioned or hidden. Initialize versioned.
964 (elf_collect_hash_codes): Don't look for symbol version if the
965 symbol is unversioned.
966 (elf_collect_gnu_hash_codes): Likewise.
967 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
968 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
970 (elf_link_output_extsym): Likewise.
972 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
975 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
976 sh_link and sh_info fields in stripped section headers, we also
977 check if the sh_type, sh_flags, sh_addralign and sh_entsize
978 fields of the output section match the output. Since
979 --only-keep-debug turns all non-debug sections into SHT_NOBITS
980 sections, the output SHT_NOBITS type matches any input type.
982 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
985 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
986 if the new symbol matches the existing one. The new hidden
987 versioned symbol matches the existing symbol if they have the
988 same symbol version. Update the existing symbol only if they
990 (_bfd_elf_add_default_symbol): Update call to
991 _bfd_elf_merge_symbol.
992 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
994 (elf_link_add_object_symbols): Override a definition only if the
995 new symbol matches the existing one.
996 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
997 the hidden versioned symbol.
998 (elf_link_output_extsym): Bind a symbol locally when linking
999 executable if it is locally defined, hidden versioned, not
1000 referenced by shared library and not exported. Turn on
1001 VERSYM_HIDDEN only if the hidden versioned symbol is defined
1004 2015-08-05 Nick Clifton <nickc@redhat.com>
1006 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
1007 sh_info fields of sections whose type has been changed to
1010 2015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
1011 Tyler Hicks <tyhicks@canonical.com>
1014 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
1015 and stack overflow when char is signed and \200-\376 was in place of hex
1016 digit; also fixes \377 was handled as EOF instead of "incorrect character".
1017 (ihex_read_section): Changed for consistency.
1018 (ihex_bad_byte): Prevent (now impossible to trigger) stack
1019 overflow and incorrect escape sequence handling.
1020 * srec.c (srec_bad_byte): Likewise.
1022 2015-08-03 Hans-Peter Nilsson <hp@axis.com>
1024 * elf32-cris.c (cris_elf_relocate_section)
1025 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
1026 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
1027 just link_info->symbolic, to check if a symbol should be bound
1030 2015-07-30 H.J. Lu <hongjiu.lu@intel.com>
1033 * elflink.c (_bfd_elf_add_default_symbol): Add the default
1034 symbol if not performing a relocatable link.
1035 (elf_link_add_object_symbols): Adjust the default symbol if
1036 not performing a relocatable link.
1038 2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
1040 * elflink.c (elf_link_add_object_symbols): Remove
1041 !info->relocatable check for info->executable. Add
1042 !info->relocatable check for !info->executable.
1043 (elf_link_output_extsym): Remove
1044 !info->relocatable check for info->executable.
1046 2015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
1048 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
1049 assignment loop for bfd plugin objects.
1051 2015-07-28 Alan Modra <amodra@gmail.com>
1053 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
1054 segment for loaded sections after nonloaded sections if the
1055 sections are on the same page.
1057 2015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
1059 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
1060 * config.in, configure: Regenerate.
1062 2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
1064 * configure: Regenerated.
1066 2015-07-27 Nick Clifton <nickc@redhat.com>
1068 * elf32-msp430.c (uses_large_model): New function.
1069 (msp430_elf_eh_frame_address_size): New function.
1070 (elf_backend_eh_frame_address_size): Define.
1072 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1075 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
1077 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1080 * elf32-arm.c (elf_backend_extern_protected_data): Define.
1082 2015-07-25 H.J. Lu <hongjiu.lu@intel.com>
1085 * elflink.c (elf_link_output_extsym): Check symbol version
1086 section check only if not linking executable, the symbol is
1087 referenced by shared library or not locally defined.
1089 2015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
1091 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
1092 check if a symbol should be bound symbolically.
1093 * elf32-hppa.c (elf32_hppa_check_relocs,
1094 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
1095 elf32_hppa_finish_dynamic_symbol): Likewise.
1096 * elf32-m68k.c (elf_m68k_check_relocs,
1097 elf_m68k_relocate_section): Likewise.
1098 * elf32-nios2.c (nios2_elf32_relocate_section,
1099 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
1100 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
1101 elf32_tic6x_relocate_section): Likewise.
1103 2015-07-24 Alan Modra <amodra@gmail.com>
1105 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
1106 prefix for reloc section corresponding to rela section associated
1107 with renamed debug section.
1109 2015-07-24 Alan Modra <amodra@gmail.com>
1111 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
1114 2015-07-23 Joseph Myers <joseph@codesourcery.com>
1116 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
1117 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
1118 difference, not to host pointer.
1120 2015-07-22 Alan Modra <amodra@gmail.com>
1122 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
1123 return -1 if symbol referenced is not defined. Tidy.
1125 2015-07-20 Alan Modra <amodra@gmail.com>
1127 * po/SRC-POTFILES.in: Regenerate.
1129 2015-07-17 Jiong Wang <jiong.wang@arm.com>
1131 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
1132 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
1134 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1136 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1137 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1138 (aarch64_reloc_got_type): Ditto.
1139 (elfNN_aarch64_final_link_relocate): Ditto.
1140 (elfNN_aarch64_relocate_section): Ditto.
1141 (elfNN_aarch64_gc_sweep_hook): Ditto.
1142 (elfNN_aarch64_check_relocs): Ditto.
1143 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1144 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1146 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1148 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
1149 * bfd-in2.h: Regenerate.
1150 * libbfd.h: Regenerate.
1151 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1152 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1154 2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
1157 * bfd.c (bfd_convert_section_size): New function.
1158 (bfd_convert_section_contents): Likewise.
1159 * bfd-in2.h: Regenerated.
1161 2015-07-09 Catherine Moore <clm@codesourcery.com>
1163 * elflink.c (bfd_elf_size_dynamic_sections): Call to
1164 _bfd_elf_maybe_strip_eh_frame_hdr should be before
1165 bed->elf_backend_size_dynamic_sections.
1167 2015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
1169 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
1171 2015-07-05 Richard Sandiford <richard.sandiford@arm.com>
1173 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
1174 plus addend rather than the original st_value when looking up
1175 entries in opd->adjust.
1177 2015-07-03 Kai Tietz <ktietz@redhat.com>
1178 Nick Clifton <nickc@redhat.com>
1181 * coffcode.h (coff_bfd_gc_sections): Define default
1182 to bfd_coff_gc_sections function.
1183 (coff_gc_mark_hook_fn): New type.
1184 * coffgen.c (init_reloc_cookie): Copy and adjust coff
1185 related code about gc-sections from elflink.c to here.
1186 (fini_reloc_cookie): Likewise.
1187 (init_reloc_cookie_rels): Likewise.
1188 (fini_reloc_cookie_rels): Likewise.
1189 (init_reloc_cookie_for_section): Likewise.
1190 (fini_reloc_cookie_for_section): Likewise.
1191 (_bfd_coff_gc_mark_hook): Likewise.
1192 (_bfd_coff_gc_mark_rsec): Likewise.
1193 (_bfd_coff_gc_mark_reloc): Likewise.
1194 (_bfd_coff_gc_mark): Likewise.
1195 (_bfd_coff_gc_mark_extra_sections): Likewise.
1196 (coff_gc_sweep_symbol_info): Likewise.
1197 (coff_gc_sweep_symbol): Likewise.
1198 (gc_sweep_hook_fn): Likewise.
1199 (coff_gc_sweep): Likewise.
1200 (bfd_coff_gc_sections): Likewise.
1201 (_bfd_coff_gc_keep): Likewise.
1202 * libcoff-in.h (coff_reloc_cookie): New struct.
1203 (bfd_coff_gc_sections): New prototype.
1204 * libcoff.h: Regenerate.
1206 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1207 Cesar Philippidis <cesar@codesourcery.com>
1209 * bfd-in2.h: Regenerated.
1210 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
1211 (elf_nios2_r1_howto_table_rel): This.
1212 (elf_nios2_r2_howto_table_rel): New.
1214 (lookup_howto): Add ABFD parameter. Adjust to look up in either
1215 the R1 or R2 relocation table, as determined by ABFD.
1216 (nios2_reloc_map): Add R2 relocations.
1217 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
1218 Pass it the ABFD parameter.
1219 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
1220 return an R1 or R2 relocation.
1221 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
1222 Pass it the ABFD parameter.
1223 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
1225 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
1226 * libbfd.h: Regenerated.
1227 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
1228 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
1229 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
1230 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
1231 (BFD_RELOC_NIOS2_R2_T2I4): New.
1232 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
1233 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
1234 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
1235 (BFD_RELOC_NIOS2_R2_X2L5): New.
1236 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
1237 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
1238 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
1239 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
1241 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1242 Cesar Philippidis <cesar@codesourcery.com>
1244 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
1245 * bfd-in2.h: Regenerated.
1246 * cpu-nios2.c (nios2_compatible): New.
1247 (N): Use nios2_compatible instead of bfd_default_compatible.
1248 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
1249 (arch_info_struct): New.
1250 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
1251 * elf32-nios2.c (is_nios2_elf): New.
1252 (nios2_elf32_merge_private_bfd_data): New.
1253 (nios2_elf32_object_p): New.
1254 (bfd_elf32_bfd_merge_private_bfd_data): Define.
1255 (elf_backend_object_p): Define.
1257 2015-07-01 H.J. Lu <hongjiu.lu@intel.com>
1259 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
1261 2015-06-30 Nick Clifton <nickc@redhat.com>
1264 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
1265 (write_obj_attribute): Likewise.
1266 (elf_new_obj_attr): Likewise.
1267 (bfd_elf_get_obj_attr_int): Likewise.
1268 (bfd_elf_add_obj_attr_int): Likewise.
1269 (bfd_elf_add_obj_attr_string): Likewise.
1270 (bfd_elf_add_obj_attr_int_string): Likewise.
1271 (gnu_obj_attrs_arg_type): Likewise.
1272 (_bfd_elf_obj_attrs_arg_type): Likewise.
1273 (_bfd_elf_parse_attributes): Likewise.
1274 (_bfd_elf_merge_unknown_attribute_list): Likewise.
1275 * elf-bfd.h (struct obj_attribute_list): Likewise.
1278 2015-06-28 H.J. Lu <hongjiu.lu@intel.com>
1280 * bfd-in.h (compressed_debug_section_type): Remove
1281 COMPRESS_DEBUG_ZLIB.
1282 * bfd-in2.h : Regenerated.
1284 2015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
1286 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
1287 instead of !shared to indicate an application vs shared library.
1288 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1289 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
1290 (_bfd_mips_elf_get_target_dtag): Likewise.
1292 2015-06-25 DJ Delorie <dj@redhat.com>
1294 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
1295 REL loads to match RELA stores.
1297 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1299 * elf.c (_bfd_elf_compute_section_file_positions): Don't
1300 initialize sh_size for .shstrtab here.
1302 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1305 * elf-bfd.h (elf_sym_strtab): New.
1306 (elf_link_hash_table): Add strtabcount, strtabsize and
1308 (_bfd_elf_stringtab_init): Removed.
1309 * elf.c (_bfd_elf_stringtab_init): Removed.
1310 (_bfd_elf_compute_section_file_positions): Replace
1311 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
1312 _bfd_stringtab_size with
1313 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
1314 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
1315 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
1317 (swap_out_syms): Likewise.
1318 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
1319 with elf_strtab_hash. Remove symbuf, symbuf_count,
1320 symbuf_size and shndxbuf_size.
1321 (elf_link_flush_output_syms): Removed.
1322 (elf_link_output_sym): Renamed to ...
1323 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
1324 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
1326 (elf_link_swap_symbols_out): New.
1327 (elf_link_output_extsym): Replace elf_link_output_sym with
1328 elf_link_output_symstrtab.
1329 (elf_link_input_bfd): Likewise.
1330 (elf_final_link_free): Replace _bfd_stringtab_free with
1331 _bfd_elf_strtab_free. Remove symbuf.
1332 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
1333 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
1334 symbuf_size nor shndxbuf_size. Initialize strtabsize and
1335 strtab. Initialize symshndxbuf to -1 when number of sections
1336 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
1337 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
1338 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
1339 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
1340 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
1341 _bfd_elf_strtab_emit.
1343 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1345 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
1348 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1350 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
1351 space for the first .plt entry.
1352 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
1353 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1354 there are PLT relocations.
1355 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
1356 allocate space for the first .plt entry.
1357 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
1358 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1359 there are PLT relocations.
1361 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1364 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
1365 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
1368 2015-06-23 Jiong Wang <jiong.wang@arm.com>
1370 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
1371 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
1372 relocations against read-only sections.
1374 2015-06-18 Nick Clifton <nickc@redhat.com>
1377 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
1379 2015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
1381 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
1382 * bfd-in2.h : Regenerate.
1384 2015-06-16 Alan Modra <amodra@gmail.com>
1386 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
1389 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
1391 * elf-bfd.h : Remove struct elf_build_id.
1392 * bfd.c : Add struct bfd_build_id.
1393 * bfd-in2.h: Regenerate.
1394 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
1395 * libpei.h: Add protoype and macros for
1396 bfd_XXi_slurp_codeview_record.
1397 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
1398 * peicode.h (pe_bfd_read_buildid): Add.
1399 (pe_bfd_object_p): Use pe_bfd_read_buildid().
1401 2015-06-15 Renlin Li <renlin.li@arm.com>
1403 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
1404 * bfd-in2.h: Regenerate.
1405 * libbfd.h: Regenerate.
1406 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1407 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
1409 2015-06-15 Alan Modra <amodra@gmail.com>
1411 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
1412 2014-03-26 change. Call _bfd_clear_contents for relocs against
1413 local and global symbols defined in discarded input sections.
1415 2015-06-05 Nick Clifton <nickc@redhat.com>
1417 * elf32-msp430.c (rl78_sym_diff_handler): New function.
1418 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
1419 (msp430x_howto_table): Likewise.
1421 2015-06-05 Alan Modra <amodra@gmail.com>
1423 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
1424 relocs with insns moved by --ppc476-workaround. Correct
1425 output of REL16 relocs.
1427 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1429 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1430 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1431 (elfNN_aarch64_final_link_relocate): Ditto.
1432 (elfNN_aarch64_gc_swap_hook): Ditto.
1433 (elfNN_aarch64_check_relocs): Ditto.
1434 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1436 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1438 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
1439 * bfd-in2.h: Regenerate.
1440 * libbfd.h: Regenerate.
1441 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1442 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1444 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1446 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
1447 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1448 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
1449 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1451 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1453 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1454 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1455 (elfNN_aarch64_final_link_relocate): Ditto.
1456 (elfNN_aarch64_gc_swap_hook): Ditto.
1457 (elfNN_aarch64_check_relocs): Ditto.
1458 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1460 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1462 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
1463 * bfd-in2.h: Regenerate.
1464 * libbfd.h: Regenerate.
1465 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1466 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1468 2015-05-28 Catherine Moore <clm@codesourcery.com>
1469 Bernd Schmidt <bernds@codesourcery.com>
1470 Paul Brook <paul@codesourcery.com>
1473 * bfd-in2.h: Regenerated.
1474 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
1475 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
1476 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
1478 (compact_eh_frame_hdr_info): Declare.
1479 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
1480 fields and compact-eh fields.
1481 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
1482 (bfd_elf_section_data): Add eh_frame_entry_field.
1483 (elf_section_eh_frame_entry): Define.
1484 (bfd_elf_parse_eh_frame_entries): Declare.
1485 (_bfd_elf_parse_eh_frame_entry): Declare.
1486 (_bfd_elf_end_eh_frame_parsing): Declare.
1487 (_bfd_elf_write_section_eh_frame_entry): Declare.
1488 (_bfd_elf_eh_frame_entry_present): Declare.
1489 (_bfd_elf_section_for_symbol): Declare.
1490 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
1491 (bfd_elf_record_eh_frame_entry): New function.
1492 (_bfd_elf_parse_eh_frame_entry): New function.
1493 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
1494 (cmp_eh_frame_hdr): New function.
1495 (add_eh_frame_hdr_terminator): New function.
1496 (_bfd_elf_end_eh_frame_parsing): New function.
1497 (find_merged_cie): Update hdr_info field references.
1498 (_bfd_elf_discard_section_eh_frame): Likewise.
1499 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
1500 (_bfd_elf_eh_frame_entry_present): New function.
1501 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
1502 (_bfd_elf_write_section_eh_frame_entry): New function.
1503 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
1504 (_bfd_elf_fixup_eh_frame_hdr): New function.
1505 (write_compact_eh_frame_hdr): New function.
1506 (write_dwarf_eh_frame_hdr): New function.
1507 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
1508 * elflink.c (_bfd_elf_section_for_symbol): New function.
1509 (elf_section_ignore_discarded_relocs): Add Compact EH support.
1510 (elf_link_input_bfd): Likewise.
1511 (bfd_elf_final_link): Likewise.
1512 (_bfd_elf_gc_mark): Likewise.
1513 (bfd_elf_parse_eh_frame_entries): New function.
1514 (bfd_elf_gc_sections): Add Compact EH support.
1515 (bfd_elf_discard_info): Likewise.
1516 * elfxx-mips.c: Include dwarf2.h.
1517 (_bfd_mips_elf_compact_eh_encoding): New function.
1518 (_bfd_mips_elf_cant_unwind_opcode): New function.
1519 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
1520 (_bfd_mips_elf_cant_unwind_opcode): Declare.
1521 (elf_backend_compact_eh_encoding): Define.
1522 (elf_backend_cant_unwind_opcode): Define.
1523 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
1524 (elf_backend_cant_unwind_opcode): Provide default.
1525 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
1526 elf_backend_cant_unwind_opcode.
1527 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
1529 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
1532 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1533 for now binding only if pointer equality isn't needed.
1534 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1535 binding only if pointer equality isn't needed.
1536 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1537 section for now binding only if pointer equality isn't needed.
1538 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1539 binding only if pointer equality isn't needed.
1541 2015-05-26 H.J. Lu <hongjiu.lu@intel.com>
1544 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
1545 in .rel.plt/.rela.plt.
1546 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1548 2015-05-19 Jiong Wang <jiong.wang@arm.com>
1550 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
1551 relocation case labels alphabetically.
1552 (elfNN_aarch64_final_link_relocate): Ditto.
1553 (elfNN_aarch64_tls_relax): Ditto.
1554 (elfNN_aarch64_relocate_section): Ditto.
1555 (elfNN_aarch64_gc_sweep_hook): Ditto.
1556 (elfNN_aarch64_check_relocs): Ditto.
1557 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1558 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1560 2015-05-18 Jiong Wang <jiong.wang@arm.com>
1562 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
1565 2015-05-16 H.J. Lu <hongjiu.lu@intel.com>
1567 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1569 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1571 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1572 section for now binding.
1573 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1576 2015-05-14 H.J. Lu <hongjiu.lu@intel.com>
1578 * bfd.c (bfd_update_compression_header): Also write the zlib
1579 header if the SHF_COMPRESSED bit cleared..
1580 (bfd_check_compression_header): Return the uncompressed size.
1581 * compress.c (decompress_contents): Don't skip the zlib header.
1582 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
1583 which doesn't have the zlib header.
1584 (bfd_init_section_decompress_status): Likewise.
1585 (bfd_get_full_section_contents): Updated.
1586 (bfd_is_section_compressed): Likewise.
1587 (bfd_is_section_compressed_with_header): Return the uncompressed
1589 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
1590 * bfd-in2.h: Regenerated.
1592 2015-05-14 Jiong Wang <jiong.wang@arm.com>
1594 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
1597 2015-05-14 Max Filippov <jcmvbkbc@gmail.com>
1599 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
1600 as GOT reference when plt.refcount is not positive.
1602 2015-05-12 H.J. Lu <hongjiu.lu@intel.com>
1604 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
1605 for the first .plt entry only if needed.
1606 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1608 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1610 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
1611 (ALL_MACHINES_CFILES): Likewise.
1612 * archures.c (bfd_mach_iamcu): New.
1613 (bfd_mach_i386_iamcu): Likewise.
1614 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
1615 (bfd_iamcu_arch): Likewise.
1616 (bfd_archures_list): Add &bfd_iamcu_arch.
1617 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
1619 (targ_archs): Add bfd_iamcu_arch if needed.
1620 * configure.ac: Support iamcu_elf32_vec.
1621 * cpu-iamcu.c: New file.
1622 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
1623 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
1624 * targets.c (iamcu_elf32_vec): New.
1625 (_bfd_target_vector): Add iamcu_elf32_vec.
1626 * Makefile.in: Regenerated.
1627 * bfd-in2.h: Likewise.
1628 * configure: Likewise.
1630 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1632 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
1634 2015-05-10 H.J. Lu <hongjiu.lu@intel.com>
1636 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
1637 and output_bfd with abfd.
1638 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
1640 2015-05-06 Toni Spets <toni.spets@iki.fi>
1643 * peXXigen.c (rsrc_process_section): Skip discarded resource
1646 2015-05-01 H.J. Lu <hongjiu.lu@intel.com>
1648 * config.bfd: Support i[3-7]86-*-elf*.
1650 2015-04-30 H.J. Lu <hongjiu.lu@intel.com>
1652 * elf32-i386.c (elf_backend_post_process_headers): Undef for
1655 2015-04-30 Nick Clifton <nickc@redhat.com>
1658 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
1660 (mep_reloc): Delete unused function.
1662 2015-04-29 Nick Clifton <nickc@redhat.com>
1665 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
1668 2015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1670 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
1671 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
1672 elf_s390_merge_obj_attributes.
1673 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
1675 2015-04-24 Jiong Wang <jiong.wang@arm.com>
1678 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
1679 GOT_NORMAL for both sgot/srelgot section.
1680 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
1681 and generate necessary runtime relocation for GOT entry.
1683 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1686 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
1688 2015-04-24 Jiong Wang <jiong.wang@arm.com>
1690 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
1691 PC-relative relocation for external symbol.
1693 2015-04-24 Nick Clifton <nickc@redhat.com>
1696 * compress.c (decompress_contents): Zero initialse the z_stream
1699 2015-04-24 Nick Clifton <nickc@redhat.com>
1701 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
1702 local labels to include local labels with a numeric suffix and
1705 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1708 * section.c (SEC_MEP_VLIW): New.
1709 * bfd-in2.h: Regenerated.
1711 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1714 * compress.c (bfd_compress_section_contents): Remove the
1715 write_compress argument.
1716 (bfd_init_section_compress_status): Updated.
1717 (bfd_compress_section): Likewise.
1718 * elf.c (_bfd_elf_set_reloc_sh_name): New.
1719 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
1720 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
1721 _bfd_elf_set_reloc_sh_name.
1722 (elf_fake_sections): Don't rename DWARF debug section for
1723 linker output if it will be compressed. Instead, set
1724 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
1725 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
1726 sh_name != (unsigned int) -1. Don't finalize nor assign
1727 shstrtab section here. Delay setting output section names to
1728 _bfd_elf_write_object_contents.
1729 (_bfd_elf_compute_section_file_positions): Update comments on
1730 sh_offset for shstrtab section.
1731 (assign_file_positions_for_non_load_sections): Set sh_offset to
1732 -1 for shstrtab section.
1733 (assign_file_positions_except_relocs): Likewise.
1734 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
1735 when compressing DWARF debug sections. Place shstrtab section
1736 after DWARF debug sections have been compressed.
1737 (_bfd_elf_write_object_contents): Setting sh_name for output
1740 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1743 * bfd.c (bfd): Add is_linker_input.
1744 * elf.c (convert_debug_to_zdebug): New.
1745 (convert_zdebug_to_debug): Likewise.
1746 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
1747 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
1748 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
1749 instead of a pointer to section.
1750 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
1752 * section.c (SEC_ELF_RENAME): New.
1753 * bfd-in2.h: Regenerated.
1755 2015-04-23 Alan Modra <amodra@gmail.com>
1757 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
1758 (ppc64_elf_next_toc_section): Align multi-got toc base.
1759 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
1761 2015-04-22 H.J. Lu <hongjiu.lu@intel.com>
1764 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
1765 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
1766 (elf_i386_create_dynamic_sections): Always allow copy relocs for
1767 building executables.
1768 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
1769 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
1770 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
1771 PIE and R_386_GOTOFF.
1772 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
1774 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1776 * elf.c (assign_section_numbers): Always set up sh_name.
1778 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1780 * elf.c (assign_file_positions_for_non_load_sections): Iterate
1781 sections by pointer.
1782 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
1784 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
1786 * bfd-in.h (compressed_debug_section_type): New.
1787 * compress.c (bfd_compress_section_contents): Add an argument
1788 for linker write compression and always generate .zdebug_*
1789 section when linking.
1790 (bfd_init_section_compress_status): Pass FALSE to
1791 bfd_compress_section_contents.
1792 (bfd_compress_section): New function.
1793 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
1794 on DWARF debug sections if COMPRESS_DEBUG is set and rename
1795 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
1796 (assign_file_positions_for_non_load_sections): Set sh_offset
1797 to -1 if SEC_ELF_COMPRESS is set.
1798 (assign_file_positions_except_relocs): Likwise.
1799 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
1800 (_bfd_elf_assign_file_positions_for_non_load): This. Change
1801 return time to bfd_boolean. Compress the section if
1802 SEC_ELF_COMPRESS is set.
1803 (_bfd_elf_write_object_contents): Updated.
1804 (_bfd_elf_set_section_contents): Write section contents to
1805 the buffer if SEC_ELF_COMPRESS is set.
1806 * merge.c: Include "elf-bfd.h".
1807 (sec_merge_emit): Add arguments for contents and offset. Write
1808 to contents with offset if contents isn't NULL.
1809 (_bfd_write_merged_section): Write section contents to the
1810 buffer if SEC_ELF_COMPRESS is set. Pass contents and
1811 output_offset to sec_merge_emit.
1812 * elflink.c (bfd_elf_final_link): Allocate the buffer for
1813 output section contents if SEC_ELF_COMPRESS is set.
1814 * section.c (SEC_ELF_COMPRESS): New.
1815 * bfd-in2.h: Regenerated.
1817 2015-04-15 Alan Modra <amodra@gmail.com>
1819 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
1821 2015-04-14 Nick Clifton <nickc@redhat.com>
1823 * elf32-rl78.c (RL78_OP_REL): New macro.
1824 (rl78_elf_howto_table): Use it for complex relocs.
1825 (get_symbol_value): Handle the cases when the info or status
1827 (get_romstart): Cache the status returned by get_symbol_value.
1828 (get_ramstart): Likewise.
1829 (RL78_STACK_PUSH): Generate an error message if the stack
1831 (RL78_STACK_POP): Likewise for underflows.
1832 (rl78_compute_complex_reloc): New function. Contains the basic
1833 processing code for all RL78 complex relocs.
1834 (rl78_special_reloc): New function. Provides special reloc
1835 handling for complex relocs.
1836 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
1837 (rl78_offset_for_reloc): Likewise.
1839 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
1842 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
1843 info->extern_protected_data when warning copy relocs against
1845 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
1846 when checking protected non-function symbols.
1848 2015-04-13 John Baldwin <jhb@FreeBSD.org>
1850 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
1852 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
1854 2015-04-13 H.J. Lu <hongjiu.lu@intel.com>
1857 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
1858 if the object has been claimed by plugin.
1860 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
1862 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
1863 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
1864 protected data symbol when building shared library.
1865 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
1866 R_X86_64_GOTOFF64 against undefined symbol and replace
1867 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
1868 R_X86_64_GOTOFF64 against protected data symbol when building
1871 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1874 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
1875 against protected data symbol when building shared library.
1876 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
1877 R_X86_64_GOTOFF64 against protected data symbol when building
1880 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1884 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
1885 * elf32-i386.c (elf_backend_extern_protected_data): New.
1887 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1888 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1889 copy relocs against protected symbols if extern_protected_data
1891 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
1892 non-function symbols if extern_protected_data is true.
1893 * elfxx-target.h (elf_backend_extern_protected_data): New.
1895 (elfNN_bed): Initialize extern_protected_data with
1896 elf_backend_extern_protected_data.
1898 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1900 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
1901 and free with bfd_alloc and bfd_release on compressed buffer.
1902 Release buffer if compressed section isn't smaller.
1904 2015-04-10 Alan Modra <amodra@gmail.com>
1907 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
1908 on adding a protected visibility variable to .dynbss.
1910 2015-04-10 Alan Modra <amodra@gmail.com>
1912 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
1915 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
1916 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
1917 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1918 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
1919 extern_protected_data test.
1920 (_bfd_elf_symbol_refs_local_p): Likewise.
1921 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
1922 (elfNN_bed): Delete elf_backend_extern_protected_data init.
1924 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
1926 * compress.c (bfd_compress_section_contents): Update comments.
1927 (bfd_init_section_decompress_status): Likewise.
1928 (bfd_init_section_compress_status): Likewise.
1930 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
1932 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
1934 (TARGET_LITTLE_SYM): Likewise.
1936 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1938 * elf32-xtensa.c (splay-tree.h): include header.
1939 (text_action_struct): drop next pointer.
1940 (text_action_list_struct): drop head pointer, add count and
1942 (find_fill_action): instead of linear search in text_action_list
1944 (text_action_compare, action_first, action_next): new functions.
1945 (text_action_add, text_action_add_literal): instead of linear
1946 search and insertion insert new node into the tree.
1947 (removed_by_actions): pass additional parameter: action_list,
1948 use it to traverse the tree.
1949 (offset_with_removed_text): pass additional action_list parameter
1950 to removed_by_actions.
1951 (map_action_fn_context): new typedef.
1952 (map_action_fn_context_struct): new structure.
1953 (map_action_fn): new function.
1954 (map_removal_by_action): use splay_tree_foreach to build map.
1955 (find_insn_action): replace linear search in text_action_list
1956 with series of splay_tree_lookups.
1957 (print_action, print_action_list_fn): new functions.
1958 (print_action_list): use splay_tree_foreach.
1959 (init_xtensa_relax_info): drop action_list.head initialization.
1960 Initialize the tree.
1961 (compute_text_actions): use non-zero action_list_count instead of
1962 non-NULL action list.
1963 (xlate_map_context): new typedef.
1964 (xlate_map_context_struct): new structure.
1965 (xlate_map_fn): new function.
1966 (build_xlate_map): use splay_tree_foreach to build map.
1967 (action_remove_bytes_fn): new function.
1968 (relax_section): use zero action_list_count instead of NULL
1969 action list. Use splay_tree_foreach to count final section size.
1970 Drop unused variable 'removed'.
1972 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1974 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
1975 (removed_literal_map_entry_struct): new structure.
1976 (removed_literal_list_struct): add new fields: n_map and map.
1977 (map_removed_literal, removed_literal_compare): new functions.
1978 (find_removed_literal): build index array for literals ordered
1979 by VMA, use binary search to find removed literal.
1981 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1983 * elf32-xtensa.c (removal_by_action_entry_struct,
1984 removal_by_action_map_struct): new structures.
1985 (removal_by_action_entry, removal_by_action_map): new typedefs.
1986 (text_action_list_struct): add new field: map.
1987 (map_removal_by_action, removed_by_actions_map,
1988 offset_with_removed_text_map): new functions.
1989 (relax_section): replace offset_with_removed_text with
1990 offset_with_removed_text_map.
1991 (translate_reloc, relax_property_section, relax_section_symbols):
1992 replace removed_by_actions with removed_by_actions_map.
1994 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1996 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
1997 reloc_range): new typedef.
1998 (reloc_range_list_struct, reloc_range_list_entry_struct,
1999 reloc_range_struct): new structures.
2000 (reloc_range_compare, build_reloc_ranges,
2001 reloc_range_list_append, reloc_range_list_remove,
2002 reloc_range_list_update_range, free_reloc_range_list): new
2004 (compute_text_actions): precompute relocation opcodes before the
2005 loop. Add relevant_relocs variable, initialize it before the
2006 loop, pass it to the check_section_ebb_pcrels_fit.
2007 (check_section_ebb_pcrels_fit): add new parameter:
2008 relevant_relocs. Update address range in the relevant_relocs if
2009 it's non-NULL and iterate only over relevant relocations.
2011 2015-04-09 Nick Clifton <nickc@redhat.com>
2013 * elf32-rx.c (describe_flags): Report the settings of the string
2015 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
2018 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2020 * compress.c (bfd_compress_section_contents): Work around a GCC
2021 uninitialized warning bug fixed in GCC 4.7.
2023 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2025 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
2027 * bfd.c (bfd::flags): Increase size to 18 bits.
2028 (BFD_COMPRESS_GABI): New.
2029 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
2030 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
2031 (bfd_update_compression_header): New fuction.
2032 (bfd_check_compression_header): Likewise.
2033 (bfd_get_compression_header_size): Likewise.
2034 (bfd_is_section_compressed_with_header): Likewise.
2035 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
2036 (bfd_compress_section_contents): Return the uncompressed size if
2037 the full section contents is compressed successfully. Support
2038 converting from/to .zdebug* sections.
2039 (bfd_get_full_section_contents): Call
2040 bfd_get_compression_header_size to get compression header size.
2041 (bfd_is_section_compressed): Renamed to ...
2042 (bfd_is_section_compressed_with_header): This. Add a pointer
2043 argument to return compression header size.
2044 (bfd_is_section_compressed): Use it.
2045 (bfd_init_section_decompress_status): Call
2046 bfd_get_compression_header_size to get compression header size.
2047 Return FALSE if uncompressed section size is 0.
2048 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
2049 from/to .zdebug* sections.
2050 * bfd-in2.h: Regenerated.
2052 2015-04-07 Alan Modra <amodra@gmail.com>
2054 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
2055 mapped to output .got section.
2057 2015-04-07 Alan Modra <amodra@gmail.com>
2059 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
2060 and has_addr16_lo. Make has_sda_refs a bitfield.
2061 (ppc_elf_check_relocs): Set new flags.
2062 (ppc_elf_link_hash_table_create): Update default_params.
2063 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
2064 where we won't be making .dynbss entries or editing code. Set
2065 params->pic_fixup when we'll edit code for protected var access.
2066 (allocate_dynrelocs): Allocate got entry for edited code and
2068 (struct ppc_elf_relax_info): Add picfixup_size.
2069 (ppc_elf_relax_section): Rename struct one_fixup to struct
2070 one_branch_fixup. Rename fixups to branch_fixups. Size space for
2072 (ppc_elf_relocate_section): Edit non-PIC accessing protected
2073 visibility variables to PIC. Don't emit dyn_relocs for code
2075 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
2077 2015-04-07 Nick Clifton <nickc@redhat.com>
2079 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
2080 local labels as local.
2082 2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
2084 * compress.c (get_uncompressed_size): Removed.
2085 (bfd_compress_section_contents): Use bfd_putb64 to write
2086 uncompressed section size.
2087 (bfd_init_section_decompress_status): Replace
2088 get_uncompressed_size with bfd_getb64.
2090 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2092 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
2093 SHF_COMPRESSED bit if not decompress.
2095 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2097 * compress.c (get_uncompressed_size): New. Extracted from ...
2098 (bfd_init_section_decompress_status): This. Use it.
2100 2015-04-02 Andrew Turner <andrew@freebsd.org>
2102 * config.bfd: Add aarch64-*-freebsd* target triple.
2104 2015-04-02 H.J. Lu <hongjiu.lu@intel.com>
2106 * configure: Regenerated.
2108 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
2109 Marcus Shawcroft <marcus.shawcroft@arm.com>
2110 Jiong Wang <jiong.wang@arm.com>
2112 * bfd-in.h (bfd_elf64_aarch64_set_options)
2113 (bfd_elf32_aarch64_set_options): Add parameter.
2114 * bfd-in2.h: Regenerated.
2115 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
2116 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
2117 (_bfd_aarch64_erratum_843419_stub_name)
2118 (_bfd_aarch64_erratum_843419_fixup)
2119 (_bfd_aarch64_erratum_843419_scan)
2120 (_bfd_aarch64_erratum_843419_branch_to_stub)
2121 (_bfd_aarch64_erratum_843419_p): Define.
2122 (enum elf_aarch64_stub_type): Define
2123 aarch64_stub_erratum_843419_veneer.
2124 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
2125 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
2126 and fix_erratum_843419_adr.
2127 (stub_hash_newfunc): Initialize adrp_offset;
2128 (_bfd_aarch64_add_stub_entry_after): Define.
2129 (aarch64_map_one_stub, aarch64_build_one_stub)
2130 (aarch64_size_one_stub): Handle
2131 aarch64_stub_erratum_843419_veneer.
2132 (_bfd_aarch64_resize_stubs): Round stub section size.
2133 (elfNN_aarch64_size_stubs): Add scan for 843419.
2134 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
2135 fix_erratum_843419 and fix_erratum_843419_adr.
2136 (struct erratum_835769_branch_to_stub_data): Add info.
2137 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
2138 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
2139 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
2140 (_bfd_aarch64_sign_extend): Define.
2141 (reencode_adr_imm): Remove static. Rename to:
2142 (_bfd_aarch64_reencode_adr_imm): Define.
2143 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
2144 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
2145 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
2146 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
2149 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
2151 * configure: Regenerated.
2153 2015-03-31 Ed Schouten <ed@nuxi.nl>
2155 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
2156 for x86_64-*-cloudabi*.
2157 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
2158 * configure: Regenerated.
2159 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
2160 (TARGET_LITTLE_NAME): Likewise.
2161 (ELF_OSABI): Likewise.
2162 (elf64_bed): Likewise.
2163 * targets.c (x86_64_elf64_cloudabi_vec): New.
2164 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
2166 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
2168 * configure.ac: Revert the AM_ZLIB change.
2169 * Makefile.in: Regenerated.
2170 * aclocal.m4: Likewise.
2171 * configure: Likewise.
2172 * doc/Makefile.in: Likewise.
2174 2015-03-30 H.J. Lu <hongjiu.lu@intel.com>
2177 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
2178 (_bfd_elf_get_reloc_section): New.
2179 * elf.c (_bfd_elf_get_reloc_section): Likewise.
2180 (assign_section_numbers): Call get_reloc_section to look up the
2181 section the relocs apply.
2182 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
2183 (elfNN_bed): Initialize get_reloc_section with
2184 elf_backend_get_reloc_section.
2186 2015-03-29 H.J. Lu <hongjiu.lu@intel.com>
2188 * Makefile.am (ZLIB): New.
2189 (ZLIBINC): Likewise.
2190 (AM_CFLAGS): Add $(ZLIBINC).
2191 (libbfd_la_LIBADD): Add $(ZLIB).
2192 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
2193 (decompress_contents): Don't check HAVE_ZLIB_H.
2194 (bfd_compress_section_contents): Likewise.
2195 (bfd_get_full_section_contents): Likewise.
2196 (bfd_init_section_decompress_status): Likewise.
2197 (bfd_init_section_compress_status): Likewise.
2198 * configure.ac (AM_ZLIB): Removed.
2199 (zlibdir): New. AC_SUBST.
2200 (zlibinc): Likewise.
2201 Add --with-system-zlib.
2202 * Makefile.in: Regenerated.
2203 * acinclude.m4: Likewise.
2204 * config.in: Likewise.
2205 * configure: Likewise.
2206 * doc/Makefile.in: Likewise.
2208 2015-03-27 Alan Modra <amodra@gmail.com>
2212 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
2213 protected_def when symbol section is read-only. Adjust all calls.
2214 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
2216 2015-03-26 Tejas Belagod <tejas.belagod@arm.com>
2218 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
2219 _bfd_final_link_relocate with aarch64_relocate.
2221 2015-03-26 H.J. Lu <hongjiu.lu@intel.com>
2224 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
2225 (bfd_elf_gc_sections): Likewise.
2227 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2229 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
2230 size for initial branch.
2231 (elfNN_aarch64_build_stubs): Write initial branch.
2232 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
2233 mapping symbol on initial branch.
2235 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2237 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
2238 Update erratum count.
2240 2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2242 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
2243 first matching debug section.
2245 2015-03-24 H.J. Lu <hongjiu.lu@intel.com>
2248 * compress.c (bfd_compress_section_contents): Don't write the
2249 zlib header and set contents as well as compress_status if
2250 compression didn't make the section smaller.
2251 (bfd_init_section_compress_status): Don't check compression
2254 2015-03-24 Nick Clifton <nickc@redhat.com>
2257 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
2258 range auxillary sections.
2260 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2262 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
2264 (_bfd_aarch64_get_stub_for_link_section): Define.
2266 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2268 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
2269 update of section_group[].stub_sec.
2271 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2273 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
2274 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
2275 Delete fixes, fix_table_size and associated code. Call
2276 _bfd_aarch64_add_stub_entry_in_group. Rename to...
2277 (bfd_aarch64_erratum_835769_scan): Define.
2278 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
2279 erratum_835769_fix_table_size, i and associated code. Relocate
2280 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
2281 correction. Delete construction of stub entry from
2282 erratum_835769_fixes array.
2284 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2286 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
2287 _bfd_aarch64_add_stub_entry_in_group.
2289 2015-03-24 Alan Modra <amodra@gmail.com>
2291 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
2292 stubs, even those for undefined weak symbols. Otherwise, don't
2293 report relocation overflow on branches to undefined strong
2294 symbols. Fix memory leak.
2295 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
2296 overflow on branches to undefined strong symbols.
2298 2015-03-23 Keith Seitz <keiths@redhat.com>
2300 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
2303 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2305 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
2306 construction into...
2307 (_bfd_aarch64_erratum_835769_stub_name): Define.
2309 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2311 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
2312 stub resize code into...
2313 (bfd_aarch64_resize_stubs): Define.
2315 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2317 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
2318 creation code into...
2319 (bfd_aarch64_create_stub_section): Define.
2321 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2323 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
2324 from elf_aarch64_create_or_find_stub_sec.
2325 (_bfd_aarch64_add_stub_entry_in_group): Rename from
2326 elfNN_aarch64_add_stub. Call
2327 _bfd_aarch64_create_or_find_stub_sec.
2328 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
2329 _bfd_aarch64_add_stub_entry_in_group.
2331 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2333 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
2334 sense of boolean return.
2335 (elfNN_aarch64_size_stubs): Adjust for above.
2337 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2339 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
2340 Remove unused parameter.
2341 (elfNN_aarch64_size_stubs): Adjust for above.
2343 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2345 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
2347 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2349 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
2350 (num_aarch64_erratum_835769_fixes): Remove.
2351 (elfNN_aarch64_size_stubs): Remove assignments to above.
2353 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2355 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
2357 (aarch64_erratum_seqeunce): Rename rtn to rt2.
2359 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2361 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
2363 2015-03-19 Nick Clifton <nickc@redhat.com>
2365 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
2366 the RL78 core based upon the flags.
2367 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
2369 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
2370 (elf32_rl78_machine): Always return bfd_mach_rl78.
2372 2015-03-19 Nick Clifton <nickc@redhat.com>
2375 * compress.c (bfd_compress_section_contents): Do not define this
2376 function if it is not used.
2378 2015-03-18 H.J. Lu <hongjiu.lu@intel.com>
2380 * compress.c (bfd_compress_section_contents): Make it static.
2381 * bfd/bfd-in2.h: Regenerated.
2383 2015-03-18 Eric Youngdale <eyoungdale@ptc.com>
2386 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
2387 suitable for the AMD64.
2389 2015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
2390 Nick Clifton <nickc@redhat.com>
2393 * coffgen.c (make_a_section_from_file): Only prepend a z to a
2394 debug section's name if the section was actually compressed.
2395 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
2396 * compress.c (bfd_init_section_compress_status): Do not compress
2397 the section if doing so would make it bigger. In such cases leave
2398 the section alone and return COMPRESS_SECTION_NONE.
2400 2015-03-17 Alan Modra <amodra@gmail.com>
2402 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
2403 on nothing to do, before malloc of returned symbol array.
2405 2015-03-16 Nick Clifton <nickc@redhat.com>
2407 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
2408 stored in the elf_section_data structure then load them as
2411 2015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2413 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
2414 relocs against code sections.
2415 * elf32-s390.c: Define elf_backend_sort_relocs_p.
2416 * elf64-s390.c: Likewise.
2418 2015-03-11 Alan Modra <amodra@gmail.com>
2420 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
2421 reverse order. Account for larger size of __tls_get_addr_opt stub.
2423 2015-03-10 Yuri Gribov <y.gribov@samsung.arm>
2426 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
2428 (elf32_arm_print_private_bfd_data): Likewise.
2430 2015-03-06 Nick Clifton <nickc@redhat.com>
2433 * elflink.c (put_value): Like previous delta, but for the 32-bit
2436 2015-03-05 Nick Clifton <nickc@redhat.com>
2439 * elflink.c (put_value): Avoid using an undefined shift
2442 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
2446 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2447 * elf32-i386.c (elf_backend_extern_protected_data): New.
2449 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2450 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2451 copy relocs against protected symbols if extern_protected_data
2453 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2454 non-function symbols if extern_protected_data is true.
2455 * elfxx-target.h (elf_backend_extern_protected_data): New.
2457 (elfNN_bed): Initialize extern_protected_data with
2458 elf_backend_extern_protected_data.
2460 2015-03-05 Nick Clifton <nickc@redhat.com>
2463 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
2464 lookup fails, check for an address bias in the dwarf info, and if
2465 one exists, retry the lookup with the biased value.
2466 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
2467 Determines if a bias exists bewteen the addresses of functions
2468 based on DWARF information vs symbol table information.
2469 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
2470 * libbfd.h: Regenerate.
2472 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2474 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
2475 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
2476 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
2478 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2480 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
2481 (aarch64_size_one_stub): Likewise.
2482 (aarch64_map_one_stub): Likewise.
2484 2015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
2486 * cpu-s390.c (N): New macro.
2487 (bfd_s390_31_arch): New. Define only if default target word size
2488 is 64 bits. Otherwise define...
2489 (bfd_390_64_arch): ...this. Make static.
2490 (bfd_s390_arch): Define according to the default target word size.
2491 Let the 'next' field point to the alternate arch.
2493 2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
2496 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
2497 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
2498 to be used with MOVK rather than MOVZ.
2500 2015-03-03 DJ Delorie <dj@redhat.com>
2502 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
2505 2015-02-28 Alan Modra <amodra@gmail.com>
2507 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
2510 2015-02-27 H.J. Lu <hongjiu.lu@intel.com>
2512 * elf32-i386.c (need_convert_mov_to_lea): New.
2513 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
2514 (elf_i386_convert_mov_to_lea): Return TRUE if
2515 need_convert_mov_to_lea is unset.
2516 * elf64-x86-64.c (need_convert_mov_to_lea): New.
2517 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
2518 (elf_x86_64_convert_mov_to_lea): Return TRUE if
2519 need_convert_mov_to_lea is unset.
2521 2015-02-27 Nick Clifton <nickc@redhat.com>
2524 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
2525 string length overflow when the string table length is actually
2528 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
2530 * bfd/bfd-in2.h: Regenerate.
2531 * bfd/libbfd.h: Regenerate.
2533 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2535 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
2536 TLSDESC_LD_PREL19 field width and masks.
2537 (aarch64_tls_transition_without_check)
2538 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2539 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2540 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2541 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
2542 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2543 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2545 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2547 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
2549 (aarch64_tls_transition_without_check)
2550 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2551 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2552 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2553 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
2554 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2555 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2556 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2558 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2560 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
2561 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
2562 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2563 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2564 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2565 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
2566 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2567 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2568 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2570 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2572 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
2573 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
2574 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
2575 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
2576 (elfNN_aarch64_check_relocs): Handle
2577 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
2579 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2580 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2582 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2584 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
2586 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2588 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
2589 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
2590 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
2593 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2595 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
2598 2015-02-26 Nick Clifton <nickc@redhat.com>
2601 * coffcode.h (coff_compute_section_file_positions): Report
2602 negative page sizes.
2603 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
2604 (assign_file_positions_for_non_load_sections): Replace assertion
2605 with an error message.
2606 (rewrite_elf_program_header): Handle excessive segment
2608 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
2609 (bfd_mach_o_read_section_64): Likewise.
2610 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
2611 print a bfd name, not %A.
2613 2015-02-26 Alan Modra <amodra@gmail.com>
2615 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
2616 thread-safe stubs for iplt.
2617 (build_tls_get_addr_stub): Restore r2 immediately after call.
2619 2015-02-26 Terry Guo <terry.guo@arm.com>
2621 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
2622 merge Tag_ABI_HardFP_use.
2624 2015-02-26 Alan Modra <amodra@gmail.com>
2626 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
2627 Use text relocs rather than giving an error on trying to use
2628 .dynbss for protected shared lib vars.
2629 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
2631 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2633 * elf32-avr.c (struct elf_avr_section_data): New structure.
2634 (struct avr_relax_info): New structure.
2635 (elf_avr_new_section_hook): New function.
2636 (struct elf_avr_section_data): Add relax_info.
2637 (get_avr_relax_info): New function.
2638 (init_avr_relax_info): New function.
2639 (elf32_avr_relax_delete_bytes): Find next property record before
2640 deleting bytes. When deleting don't move bytes beyond the next
2642 (avr_elf32_assign_records_to_section): New function.
2643 (avr_property_record_compare): New function.
2644 (avr_load_all_property_sections): New function.
2645 (elf32_avr_relax_section): Load property data. After relaxing the
2646 section, move any .align directives that have enough deleted bytes
2648 (bfd_elf32_new_section_hook): Define.
2650 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2652 * elf32-avr.h (struct avr_property_header): New strucure.
2653 (avr_elf32_load_property_records): Declare.
2654 (avr_elf32_property_record_name): Declare.
2655 * elf32-avr.c: Add bfd_stdint.h include.
2656 (retrieve_local_syms): New function.
2657 (get_elf_r_symndx_section): New function.
2658 (get_elf_r_symndx_offset): New function.
2659 (internal_reloc_compare): New function.
2660 (struct avr_find_section_data): New structure.
2661 (avr_is_section_for_address): New function.
2662 (avr_find_section_for_address): New function.
2663 (avr_elf32_load_records_from_section): New function.
2664 (avr_elf32_load_property_records): New function.
2665 (avr_elf32_property_record_name): New function.
2667 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2669 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
2670 (AVR_PROPERTY_RECORDS_VERSION): Define.
2671 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
2672 (struct avr_property_record): New structure.
2674 2015-02-24 Nick Clifton <nickc@redhat.com>
2676 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
2678 (v850_elf_make_note_section): New function. Creates a note
2680 (v850_elf_create_sections): New function. Create a note section
2681 if one is not already present.
2682 (v850_elf_set_note): New function. Adds a note to a bfd.
2683 (v850_elf_copy_private_bfd_data): New function. Copies V850
2685 (v850_elf_merge_notes): New function. Merges V850 notes.
2686 (print_v850_note): New function. Displays a V850 note.
2687 (v850_elf_print_notes): New function. Displays all notes attached
2689 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
2690 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
2691 (v850_elf_fake_sections): Set the type of the V850 note section.
2692 * bfd-in.h (v850_elf_create_sections): Add prototype.
2693 (v850_elf_set_note): Add prototype.
2694 * bfd-in2.h: Regenerate.
2696 2015-02-24 Nick Clifton <nickc@redhat.com>
2698 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
2699 * configure: Regenerate.
2700 * config.in: Regenerate.
2701 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
2702 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
2703 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
2706 2015-02-24 Nick Clifton <nickc@redhat.com>
2708 * pdp11.c (set_section_contents): Pad the .text and .data sections
2709 to their aligned sizes.
2711 2015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
2713 * config.bfd: Add h8300-*-linux.
2714 * configure.ac: Add h8300_elf32_linux_vec.
2715 * configure: Regenerate.
2716 * elf32-h8300.c: Likewise.
2717 * targets.c(_bfd_target_vector): Likewise.
2719 2015-02-23 Nick Clifton <nickc@redhat.com>
2722 * cpu-w65.c: Correct typos in license notice.
2725 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
2726 symbols at end of sections. Adjust function sizes.
2728 2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
2730 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
2731 (elfcore_write_s390_vxrs_high): Likewise.
2732 * elf.c (elfcore_grok_s390_vxrs_low): New function.
2733 (elfcore_grok_s390_vxrs_high): New function.
2734 (elfcore_grok_note): Call them.
2735 (elfcore_write_s390_vxrs_low): New function.
2736 (elfcore_write_s390_vxrs_high): New function.
2737 (elfcore_write_register_note): Call them.
2739 2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
2742 * verilog.c (verilog_write_record): Correct buffer size.
2744 2015-02-19 Alan Modra <amodra@gmail.com>
2746 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
2748 2015-02-19 Alan Modra <amodra@gmail.com>
2751 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
2752 (elf_link_output_extsym): Drop local and global undefined syms.
2753 Tidy. Expand comment.
2755 2015-02-17 Alan Modra <amodra@gmail.com>
2758 * elflink.c (struct elf_outext_info): Remove need_second_pass
2760 (elf_link_output_extsym): Delete code handling second forced
2761 local pass. Move code emitting NULL STT_FILE symbol later, so
2762 that it can be omitted if forced local is stripped. Don't
2763 emit the NULL STT_FILE if no file symbols have been output.
2764 (bfd_elf_final_link): Remove second forced local pass.
2765 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
2766 (ppc_elf_size_dynamic_sections): Likewise.
2767 * elf64-ppc.c (ppc_build_one_stub): Likewise.
2768 (build_global_entry_stubs): Likewise.
2769 (ppc64_elf_build_stubs): Likewise.
2771 2015-02-16 H.J. Lu <hongjiu.lu@intel.com>
2774 * elflink.c (elf_link_output_extsym): Only check filesym_count
2775 when outputting a NULL FILE symbol. Set second_pass_sym to
2776 h->forced_local && !h->root.linker_def.
2778 2015-02-15 H.J. Lu <hongjiu.lu@intel.com>
2780 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
2781 on _TLS_MODULE_BASE_.
2782 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
2784 2015-02-15 Alan Modra <amodra@gmail.com>
2786 * dwarf2.c (read_rangelist): Correct buffer overflow check
2787 Whitespace throughout file.
2789 2015-02-14 Alan Modra <amodra@gmail.com>
2792 * bfd.c (struct bfd): Add lto_output.
2793 * linker.c (_bfd_handle_already_linked): Explicitly test for
2794 objects added by the lto plugin.
2795 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
2796 no_export flags from archive.
2797 * archive.c (open_nested_file): New function, setting lto_output
2798 and no_export, extracted from..
2799 (find_nested_archive): ..here. Flip params. Rename from
2800 _bfd_find_nested_archive.
2801 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
2802 (_bfd_look_for_bfd_in_cache): Copy no_export.
2803 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
2804 my_archive->no_export test.
2805 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
2806 Don't use the file name when adding lto_output STT_FILE sym.
2807 * bfd-in2.h: Regenerate.
2809 2015-02-13 Alan Modra <amodra@gmail.com>
2812 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
2813 now redundant assert.
2815 2015-02-12 Nick Clifton <nickc@redhat.com>
2818 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
2819 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
2820 (read_indirect_string, read_alt_indirect_string)
2821 (read_alt_indirect_ref, read_address, read_abbrevs)
2822 (read_attribute_value, read_attribute, decode_line_info)
2823 (find_abstract_instance_name, read_rangelist)
2824 (scan_unit_for_symbols, parse_comp_unit)
2825 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
2826 end pointers to reading functions and check for offsets taking
2827 pointers out of range. Replace calls to read_*_leb128 with calls
2828 to safe_read_leb128.
2830 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
2832 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
2833 computed file_name address being before the start of the string
2836 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
2839 * bfd.c (bfd_plugin_format): New.
2840 (bfd): Add plugin_format and plugin_dummy_bfd.
2841 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
2842 argument to return TRUE if any plugin is found. Set plugin_format.
2844 (bfd_plugin_target_p): New.
2845 (bfd_plugin_specified_p): Likewise.
2846 (bfd_plugin_target_p): Likewise.
2847 (register_ld_plugin_object_p): Likewise.
2848 (bfd_plugin_set_plugin): Set has_plugin.
2849 (load_plugin): Cache try_load_plugin result.
2850 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
2852 * plugin.h (bfd_plugin_target_p): New.
2853 (bfd_plugin_specified_p): Likewise.
2854 (register_ld_plugin_object_p): Likewise.
2855 * bfd-in2.h: Regenerated.
2857 2015-02-11 Pedro Alves <palves@redhat.com>
2859 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
2860 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
2861 * libbfd.h: Regenerate.
2862 * libcoff.h: Regenerate.
2864 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
2865 * mach-o.h [__cplusplus]: Wrap in extern "C".
2866 * som.h [__cplusplus]: Wrap in extern "C".
2868 2015-02-10 Nick Clifton <nickc@redhat.com>
2871 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
2873 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
2874 size and number of relocs.
2875 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
2877 * versados.c (process_otr): Check the esdid value before using it
2878 to access the EDATA.
2880 2015-02-09 Ed Maste <emaste@freebsd.org>
2882 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
2883 uninitialized and unused variable.
2884 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2886 2015-02-09 Alan Modra <amodra@gmail.com>
2888 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
2890 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2891 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
2893 2015-02-09 Alan Modra <amodra@gmail.com>
2895 * elflink.c: Whitespace, formatting fixes.
2896 (elf_link_input_bfd): Clarify comment.
2897 (elf_link_output_extsym): Exclude symbols in linker created
2898 sections when testing for plugin symbols.
2900 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
2903 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
2904 warning for relocation in readonly section for -z text.
2905 (elf_i386_size_dynamic_sections): Likewise.
2906 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
2907 (elf_x86_64_size_dynamic_sections): Likewise.
2909 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
2913 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
2914 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
2915 referenced from a non-IR file.
2917 2015-02-06 Nick Clifton <nickc@redhat.com>
2920 * peXXigen.c (rsrc_print_resource_entries): Add range check for
2921 addresses that wrap around the address space.
2922 (rsrc_parse_entry): Likewise.
2924 2015-02-03 H.J. Lu <hongjiu.lu@intel.com>
2928 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
2929 undefined if it is referenced from a non-IR file.
2931 2015-02-03 Nick Clifton <nickc@redhat.com>
2934 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
2935 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
2936 index or an out of range fdr index.
2937 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
2938 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2939 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2940 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2941 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
2942 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
2943 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2944 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2945 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
2946 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2947 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2948 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
2949 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2950 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2951 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2952 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2953 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2954 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2955 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
2956 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2957 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2958 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2959 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2960 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2961 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2962 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2963 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2964 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2965 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
2966 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2967 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2968 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2969 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2970 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2971 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2972 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2973 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
2974 * elf32-vax.c (rtype_to_howto): Likewise.
2975 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2976 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2977 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2978 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2979 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2980 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
2981 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
2982 of range symbol indicies.
2983 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
2984 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
2985 (bfd_mach_o_build_dysymtab): Likewise.
2986 (bfd_mach_o_write_symtab_content): Set the string table size to
2988 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
2990 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
2992 * tekhex.c (first_phase): Check for src pointer reaching end of
2995 2015-02-03 Will Newton <will.newton@linaro.org>
2997 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
2998 Set st_value to zero for undefined symbols if the reference
2999 is weak or pointer_equality_needed is FALSE.
3001 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
3002 comment discussing why we clear st_value for some symbols.
3004 2015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3006 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
3007 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
3009 2015-01-29 Alan Modra <amodra@gmail.com>
3011 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
3012 optimization. Tidy mask for GOT_TLSGD optimization.
3013 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
3014 location of nop zapping high insn too.
3016 2015-01-28 Alan Modra <amodra@gmail.com>
3018 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
3019 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
3020 in .toc indicate xlc compiled code that might require a rw .toc.
3022 2015-01-28 James Bowman <james.bowman@ftdichip.com>
3024 * Makefile.am: Add FT32 files.
3025 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
3026 (bfd_mach_ft32): Define.
3027 (bfd_ft32_arch): Declare.
3028 (bfd_archures_list): Add bfd_ft32_arch.
3029 * config.bfd: Handle FT32.
3030 * configure.ac: Likewise.
3031 * cpu-ft32.c: New file.
3032 * elf32-ft32.c: New file.
3033 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
3034 BFD_RELOC_FT32_18): Define.
3035 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
3036 * bfd-in2.h: Regenerate.
3037 * libbfd.h: Regenerate.
3038 * Makefile.in: Regenerate.
3039 * configure: Regenerate.
3040 * po/SRC-POTFILES.in: Regenerate.
3042 2015-01-27 Nick Clifton <nickc@redhat.com>
3045 * pdp11.c (aout_get_external_symbols): Return false if there are
3048 * dwarf2.c (concat_filename): Check for an empty directory table.
3049 (scan_unit_for_symbols): Check for reading off the end of the
3051 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
3053 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
3056 2015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3058 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
3060 2015-01-22 DJ Delorie <dj@redhat.com>
3062 * elf32-m32c.c (m32c_apply_reloc_24): New.
3063 (m32c_elf_howto_table): Use it for R_M32C_24.
3064 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
3066 2015-01-22 Nick Clifton <nickc@redhat.com>
3069 * coffcode.h (handle_COMDAT): When searching for the section
3070 symbol, make sure that there is space left in the symbol table.
3071 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
3073 2015-01-21 Nick Clifton <nickc@redhat.com>
3076 * coffcode.h (coff_set_arch_mach_hook): Check return value from
3078 (coff_slurp_line_table): Return FALSE if the line number
3079 information was corrupt.
3080 (coff_slurp_symbol_table): Return FALSE if the symbol information
3082 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
3083 initialise the fields of the dyld_info structure.
3084 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
3085 error message and a return value.
3086 (bfd_mach_o_layout_commands): Change the function to boolean.
3087 Return FALSE if the function fails.
3088 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
3090 (bfd_mach_o_read_command): Fail if an unrecognised command is
3092 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
3094 (slurp_symtab): Check the return from bfd_malloc.
3095 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
3096 encountered an error.
3097 (_bfd_XXi_final_link_postscript): Fail if a section could not be
3099 * peicode.h (pe_bfd_object_p): Fail if the header could not be
3101 * tekhex.c (first_phase): Fail if the section is too big.
3102 * versados.c (struct esdid): Add content_size field.
3103 (process_otr): Use and check the new field.
3104 (versados_get_section_contents): Check that the section exists and
3105 that the requested data is available.
3107 2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
3109 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
3111 2015-01-20 Alan Modra <amodra@gmail.com>
3114 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
3115 ELF_COMMON_DEF syms.
3117 2015-01-19 Alan Modra <amodra@gmail.com>
3120 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
3121 linker script assignments too.
3122 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
3123 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
3125 2015-01-19 Alan Modra <amodra@gmail.com>
3127 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
3128 to allow return of first howto.
3129 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
3130 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
3131 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
3132 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
3133 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
3134 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
3135 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
3136 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
3137 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
3138 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
3139 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
3140 (spu_elf_reloc_type_lookup): Adjust to suit.
3142 2015-01-19 Alan Modra <amodra@gmail.com>
3144 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
3145 (bfd_get_section_limit): ..here.
3146 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
3147 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
3148 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
3149 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
3150 bfd_reloc_outofrange check.
3151 * bfd-in2.h: Regenerate.
3153 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
3154 on zero size relocs.
3155 * ecoff.c (ecoff_reloc_link_order): Likewise.
3156 * elf32-nds32.c (nds32_relocate_contents): Likewise.
3157 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3159 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
3160 (_bfd_clear_contents): Likewise.
3161 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
3162 (mips_elf_perform_relocation): Likewise.
3164 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
3165 from malloc on zero size alloc.
3166 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3167 * elflink.c (elf_reloc_link_order): Likewise.
3168 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3169 * pdp11.c (aout_link_reloc_link_order): Likewise.
3170 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3172 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
3173 bitsize 0, and complain_overflow_dont.
3174 * coff-sparc.c (coff_sparc_howto_table): Likewise.
3175 * elf-hppa.h (elf_hppa_howto_table): Likewise.
3176 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
3177 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
3178 * elf32-arc.c (elf_arc_howto_table): Likewise.
3179 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
3180 * elf32-avr.c (elf_avr_howto_table): Likewise.
3181 * elf32-bfin.c (bfin_howto_table): Likewise.
3182 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
3183 * elf32-cris.c (cris_elf_howto_table): Likewise.
3184 * elf32-crx.c (crx_elf_howto_table): Likewise.
3185 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
3186 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
3187 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
3188 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
3189 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
3190 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3191 * elf32-h8300.c (h8_elf_howto_table): Likewise.
3192 * elf32-i370.c (i370_elf_howto_raw): Likewise.
3193 * elf32-i386.c (elf_howto_table): Likewise.
3194 * elf32-i860.c (elf32_i860_howto_table): Likewise.
3195 * elf32-i960.c (elf32_i960_relocate): Likewise.
3196 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
3197 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
3198 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
3199 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
3200 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
3201 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
3202 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
3203 * elf32-m68k.c (howto_table): Likewise.
3204 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
3205 * elf32-mep.c (mep_elf_howto_table): Likewise.
3206 * elf32-metag.c (elf_metag_howto_table): Likewise.
3207 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
3208 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
3209 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
3210 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
3211 * elf32-mt.c (mt_elf_howto_table): Likewise.
3212 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
3213 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
3214 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
3215 * elf32-pj.c (pj_elf_howto_table): Likewise.
3216 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
3217 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
3218 * elf32-rx.c (rx_elf_howto_table): Likewise.
3219 * elf32-s390.c (elf_howto_table): Likewise.
3220 * elf32-score.c (elf32_score_howto_table): Likewise.
3221 * elf32-score7.c (elf32_score_howto_table): Likewise.
3222 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
3223 * elf32-spu.c (elf_howto_table): Likewise.
3224 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
3225 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
3226 * elf32-v850.c (v850_elf_howto_table): Likewise.
3227 * elf32-vax.c (howto_table): Likewise.
3228 * elf32-visium.c (visium_elf_howto_table): Likewise.
3229 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
3230 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
3231 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
3232 * elf32-xtensa.c (elf_howto_table): Likewise.
3233 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
3234 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
3235 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
3236 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
3237 * elf64-s390.c (elf_howto_table): Likewise.
3238 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
3239 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
3240 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
3241 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
3242 (elfNN_aarch64_howto_none): Likewise.
3243 * elfxx-ia64.c (ia64_howto_table): Likewise.
3244 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
3245 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
3246 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
3248 2015-01-15 H.J. Lu <hongjiu.lu@intel.com>
3251 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
3252 about -fPIC if the symbol is undefined when building executable.
3254 2015-01-15 Nick Clifton <nickc@redhat.com>
3257 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
3258 error message. Never return an invalid howto pointer.
3259 * elf32-cr16.c (cr16_info_to_howto): Likewise.
3260 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3261 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3262 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3263 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3264 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
3265 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3266 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3267 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3268 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
3269 * elf32-vax.c (rtype_to_howto): Likewise.
3270 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3271 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
3272 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
3273 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3274 (sh_elf_reloc): Check that the reloc is in range.
3275 * reloc.c (bfd_perform_relocation): Check that the section is big
3276 enough for the entire reloc.
3277 (bfd_generic_get_relocated_section_contents): Report unexpected
3278 return values from perform_reloc.
3280 2015-01-15 Nick Clifton <nickc@redhat.com>
3282 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
3283 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
3286 2015-01-15 Alan Modra <amodra@gmail.com>
3288 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
3289 any output section matching a linker created dynobj section.
3291 2015-01-15 Alan Modra <amodra@gmail.com>
3294 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
3295 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
3296 Don't assign symtab file position unless symbols will be output.
3297 Merge blocks with condition in common. Don't call
3298 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
3299 unless other symbols are output. Move assignment of symtab_shndx
3300 file position. Localize variable.
3302 2015-01-14 Jiong Wang <jiong.wang@arm.com>
3304 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
3305 trying to defer them to runtime.
3307 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3309 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
3310 to check if a symbol should be bound symbolically.
3312 2015-01-13 Jiong Wang <jiong.wang@arm.com>
3314 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
3315 for TLSLE_MOVW_TPREL_G2.
3317 2015-01-13 Jiong Wang <jiong.wang@arm.com>
3320 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
3321 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
3322 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
3325 2015-01-12 Terry Guo <terry.guo@arm.com>
3327 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
3329 (_bfd_elf_gc_mark_extra_sections): Use it.
3331 2015-01-11 H.J. Lu <hongjiu.lu@intel.com>
3334 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
3335 only discard space for pc-relative relocs symbols which turn
3336 out to need copy relocs.
3338 2015-01-09 Nick Clifton <nickc@redhat.com>
3340 * tekhex.c (getvalue): Fix thinko in test for correct extraction
3342 (getsym): Return false if there was not enough data to extract the
3345 2015-01-09 Anthony Green <green@moxielogic.com>
3347 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
3349 2015-01-08 Nick Clifton <nickc@redhat.com>
3351 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
3352 16-bit absolute BR instructions to 10-bit pc-relative JMP
3355 2015-01-08 Nick Clifton <nickc@redhat.com>
3358 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
3359 to load the line table.
3360 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
3362 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
3363 the Data Directory Size is too large.
3365 2015-01-06 H.J. Lu <hongjiu.lu@intel.com>
3368 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
3369 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3371 2015-01-06 Nick Clifton <nickc@redhat.com>
3374 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
3377 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
3378 (bfd_perform_relocation): Include the size of the reloc in the
3379 test for an out of range relocation.
3380 (bfd_generic_get_relocated_section_contents): Remove reloc range
3383 * coff-i860.c (CALC_ADDEND): Always set an addend value.
3384 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
3385 avoid reading off the end of the buffer.
3387 (first_phase): Likewise.
3388 (pass_over): Pass an end pointer to the invoked function.
3390 2015-01-05 H.J. Lu <hongjiu.lu@intel.com>
3393 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
3395 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3397 2015-01-05 Nick Clifton <nickc@redhat.com>
3400 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
3401 is at least big enough for the header to be read.
3402 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
3403 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
3404 (bfd_mach_o_read_command): Prevetn duplicate error messages about
3405 unrecognized commands.
3406 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
3407 when indexing into the string table.
3409 2015-01-01 Alan Modra <amodra@gmail.com>
3411 Update year range in copyright notice of all files.
3413 For older changes see ChangeLog-2014
3415 Copyright (C) 2015 Free Software Foundation, Inc.
3417 Copying and distribution of this file, with or without modification,
3418 are permitted in any medium without royalty provided the copyright
3419 notice and this notice are preserved.
3425 version-control: never