1 2015-10-26 H.J. Lu <hongjiu.lu@intel.com>
4 * elf32-i386.c (elf_i386_convert_load): Call
5 bfd_link_get_defined_symbol to check if a symbol is defined.
6 * elf64-x86-64.c (elf_x86_64_convert_load): Call
7 bfd_link_get_defined_symbol to get defined symbol section and
9 * linker.c (bfd_link_get_defined_symbol): New function.
10 * bfd-in2.h: Regenerated.
12 2015-10-23 Alan Modra <amodra@gmail.com>
17 * elflink.c (_bfd_elf_gc_mark_hook): Delete code handling __start_*
18 and __stop_* symbol refs.
19 (_bfd_elf_gc_mark_rsec): Add start_stop parameter. Handle __start_*
20 and __stop_* symbol refs here..
21 (_bfd_elf_gc_mark_reloc): ..and here.
22 * elf-bfd.h (_bfd_elf_gc_mark_hook): Update prototype.
23 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Update
24 _bfd_elf_gc_mark_rsec call.
26 2015-10-23 Alan Modra <amodra@gmail.com>
30 * elflink.c (elf_gc_sweep): Revert last patch.
31 (_bfd_elf_gc_mark_hook): Don't set SEC_KEEP here.
33 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
36 * elflink.c (elf_gc_sweep): Always keep sections marked with
39 2015-10-22 Hans-Peter Nilsson <hp@bitrange.com>
41 * mmo.c (struct mmo_data_struct): New members
42 symbol_consistency_override_calculated and ignore_symbol_consistency.
43 (mmo_section_has_contents, mmo_ignore_symbol_consistency): New
45 (mmo_create_symbol): Check with mmo_ignore_symbol_consistency if to
46 report an error for unexpected value of Main.
47 (mmo_write_symbols_and_terminator): Similar.
49 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
51 * elf32-i386.c (elf_i386_convert_load): Use call_nop_byte and
52 check call_nop_as_suffix for 1-byte NOP padding to pad call.
53 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise.
55 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
57 * elf64-x86-64.c: Include opcode/i386.h.
58 (x86_64_elf_howto_table): Add R_X86_64_GOTPCRELX and
59 R_X86_64_REX_GOTPCRELX.
60 (R_X86_64_standard): Replace R_X86_64_PLT32_BND with
61 R_X86_64_REX_GOTPCRELX.
62 (x86_64_reloc_map): Add BFD_RELOC_X86_64_GOTPCRELX and
63 BFD_RELOC_X86_64_REX_GOTPCRELX.
64 (need_convert_mov_to_lea): Renamed to ...
65 (need_convert_load): This.
66 (elf_x86_64_check_relocs): Handle R_X86_64_GOTPCRELX and
67 R_X86_64_REX_GOTPCRELX. Replace need_convert_mov_to_lea with
69 (elf_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPCRELX and
70 R_X86_64_REX_GOTPCRELX.
71 (elf_x86_64_size_dynamic_sections): Likewise.
72 (elf_x86_64_relocate_section): Likewise.
73 (elf_x86_64_convert_mov_to_lea): Renamed to ...
74 (elf_x86_64_convert_load): This. Replace need_convert_mov_to_lea
75 with need_convert_load. Support R_X86_64_GOTPCRELX and
76 R_X86_64_REX_GOTPCRELX transformations.
77 * reloc.c (BFD_RELOC_X86_64_GOTPCRELX): New.
78 (BFD_RELOC_X86_64_REX_GOTPCRELX): Likewise.
79 * bfd-in2.h: Regenerated.
82 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
84 * elf32-i386.c: Include opcode/i386.h.
85 (elf_howto_table): Add R_386_GOT32X.
86 (R_386_ext2): Replace R_386_IRELATIVE with R_386_GOT32X.
87 (elf_i386_reloc_type_lookup): Handle BFD_RELOC_386_GOT32X.
88 (need_convert_mov_to_lea): Renamed to ...
89 (need_convert_load): This.
90 (elf_i386_check_relocs): Handle R_386_GOT32X. Replace
91 need_convert_mov_to_lea with need_convert_load.
92 (elf_i386_gc_sweep_hook): Handle R_386_GOT32X.
93 (elf_i386_size_dynamic_sections): Likewise.
94 (elf_i386_relocate_section): Likewise.
95 (elf_i386_convert_mov_to_lea): Renamed to ...
96 (elf_i386_convert_load): This. Replace need_convert_mov_to_lea
97 with need_convert_load. Support R_386_GOT32X transformations.
98 * reloc.c (BFD_RELOC_386_GOT32X): New.
99 * bfd-in2.h: Regenerated.
100 * libbfd.h: Likewise.
102 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
104 * elf32-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
105 only when linking an executable.
106 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
108 * elf64-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
109 only when linking an executable.
110 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
113 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
115 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Set the PLT
116 reference counters for local IFUNC calls.
117 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
119 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
121 * elf32-s390.c (elf_s390_check_relocs): Fallthrough to the PLT
122 slot allocating code for GOTOFF relocs on ifunc symbols.
123 (elf_s390_gc_sweep_hook): Decrement plt refcount for GOTOFF relocs
125 (elf_s390_relocate_section): Redirect a GOTOFF reloc to an iplt
128 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
131 * elf32-s390.c (elf_s390_reloc_type_class): Return
132 reloc_class_ifunc for ifunc symbols.
133 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
135 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
137 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Call
138 elf_s390_finish_ifunc_symbol only for actually defined symbols.
139 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
141 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
143 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Remove
145 * elf32-s390.c (allocate_dynrelocs): Don't use last parameter.
146 * elf64-s390.c (allocate_dynrelocs): Don't use last parameter.
148 2015-10-20 Hans-Peter Nilsson <hp@bitrange.com>
150 * mmo.c (mmo_write_symbols_and_terminator): Correct printed value
151 of Main in error message.
153 2015-10-18 Doug Evans <xdje42@gmail.com>
155 * targets.c (bfd_flavour_name): "MMO" is spelled "mmo".
157 2015-10-17 Alan Modra <amodra@gmail.com>
159 * elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve
160 eh_frame FDE for ELFv1.
162 2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
164 * elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol
166 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
168 2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
170 * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check
172 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
174 2015-10-15 H.J. Lu <hongjiu.lu@intel.com>
176 * elflink.c (_bfd_elf_merge_symbol): Fix typos in comments
178 2015-10-15 Alan Modra <amodra@gmail.com>
180 * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion
181 that input and output .note.renesas sections are same size.
182 Instead, only copy input to output if they are.
184 2015-10-15 Riku Voipio <riku.voipio@iki.fi>
187 * elfcore.h (elf_core_file_p): Use the file_ptr type to hold the
189 * elfcode.h (elf_object_p): Likewise.
191 2015-10-14 Rich Felker <dalias@libc.org>
194 * elf32-sh.c (sh_elf_size_dynamic_sections): Always emit
195 DT_PLTGOT for FDPIC output.
197 2015-10-13 Alan Modra <amodra@gmail.com>
199 * elf.c (_bfd_elf_map_sections_to_segments): Don't set
200 PT_GNU_RELRO p_flags.
201 (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO
204 2015-10-12 H.J. Lu <hongjiu.lu@intel.com>
207 * elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned
208 definition after the default version.
210 2015-10-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
213 * elf32-s390.c (elf_s390_gc_sweep_hook): Do not reduce got
214 refcount for relocs not really requiring a got slot.
215 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
217 2015-10-11 John David Anglin <danglin@gcc.gnu.org>
219 * elf-hppa.h (elf_hppa_action_discarded): Ignore relocations in
222 2015-10-07 Cupertino Miranda <cmiranda@synopsys.com>
224 * archures.c: Remove support for older ARC. Added support for new
225 ARC cpus (ARC600, ARC601, ARC700, ARCV2).
226 * bfd-in2.h: Likewise.
227 * config.bfd: Likewise.
228 * cpu-arc.c: Likewise.
229 * elf32-arc.c: Totally changed file with a refactored
230 inplementation of the ARC port.
231 * libbfd.h: Added ARC specific relocation types.
234 2015-10-06 H.J. Lu <hongjiu.lu@intel.com>
236 * bfd.c (bfd_update_compression_header): Clear the ch_reserved
237 field in 64-bit output.
238 (bfd_convert_section_contents): Likewise.
240 2015-10-05 H.J. Lu <hongjiu.lu@intel.com>
243 * elflink.c (elf_link_add_object_symbols): Don't re-export a
244 symbol if it isn't undefined.
246 2015-10-04 H.J. Lu <hongjiu.lu@intel.com>
248 * config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec,
249 i386_pei_vec and x86_64_pei_vec for Solaris2/x86.
251 2015-10-02 Renlin Li <renlin.li@arm.com>
253 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Add
254 TLSIE_MOVW_GOTTPREL_G1.
255 (aarch64_tls_transition_without_check): Add
256 TLSIE_MOVW_GOTTPREL_G1 to TLSLE_MOVW_TPREL_G2
257 transition for local symbol.
258 (elfNN_aarch64_tls_relax): Add a argument to pass tp offset.
259 Add TLSIE_MOVW_GOTTPREL_G1 relaxation.
260 (elfNN_aarch64_relocate_section): Call elfNN_aarch64_tls_relax
263 2015-10-02 Renlin Li <renlin.li@arm.com>
265 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Add
266 relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC,
268 (aarch64_tls_transition_without_check): Add relaxation support.
269 (aarch64_reloc_got_type): Add support.
270 (elfNN_aarch64_final_link_relocate): Likewise.
271 (elfNN_aarch64_tls_relax): Likewise.
272 (elfNN_aarch64_relocate_section): Likewise.
273 (elfNN_aarch64_gc_sweep_hook): Likewise.
274 (elfNN_aarch64_check_relocs): Likewise.
275 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
276 (_bfd_aarch64_elf_resolve_relocation): Likewise.
278 2015-10-02 Renlin Li <renlin.li@arm.com>
280 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for
281 BFD_RELOC_AARCH64_TLSDESC_OFF_G1.
283 2015-10-02 Renlin Li <renlin.li@arm.com>
285 * elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC):
286 Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1.
287 (aarch64_tls_transition_without_check): Likewise
288 (elfNN_aarch64_tls_relax): Likwise.
290 2015-10-02 Renlin Li <renlin.li@arm.com>
292 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
293 for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.
295 2015-10-02 Renlin Li <renlin.li@arm.com>
297 * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
298 AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
299 * libbfd.h: Regenerate.
300 * bfd-in2.h: Likewise.
301 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
302 TLSIE_MOVW_GOTTPREL_G1 check overflow.
303 (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
304 and TLSIE_MOVW_GOTTPREL_G0_NC.
305 (elfNN_aarch64_final_link_relocate): Likewise.
306 (elfNN_aarch64_relocate_section): Likewise.
307 (elfNN_aarch64_gc_sweep_hook): Likewise.
308 (elfNN_aarch64_check_relocs): Likewise.
309 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
310 (_bfd_aarch64_elf_resolve_relocation): Likewise.
312 2015-10-02 Renlin Li <renlin.li@arm.com>
314 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
315 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
316 (elfNN_aarch64_final_link_relocate): Likewise.
317 (elfNN_aarch64_relocate_section): Likewise.
318 (elfNN_aarch64_gc_sweep_hook): Likewise.
319 (elfNN_aarch64_check_relocs): Likewise.
320 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
321 (_bfd_aarch64_elf_resolve_relocation): Likewise.
323 2015-10-02 Renlin Li <renlin.li@arm.com>
325 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
326 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
327 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
328 * libbfd.h: Regenerate.
329 * bfd-in2.h: Likewise
331 2015-10-02 Renlin Li <renlin.li@arm.com>
333 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
334 BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
335 (elfNN_aarch64_final_link_relocate): Likewise.
336 (elfNN_aarch64_relocate_section): Likewise.
337 (elfNN_aarch64_gc_sweep_hook): Likewise.
338 (elfNN_aarch64_check_relocs): Likewise.
339 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
340 (_bfd_aarch64_elf_resolve_relocation): Likewise.
342 2015-10-02 Renlin Li <renlin.li@arm.com>
344 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry.
345 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
346 BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
347 * bfd-in2.h: Regenerate.
348 * libbfd.h: Likewise.
350 2015-10-02 Renlin Li <renlin.li@arm.com>
352 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
353 BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support.
354 (elfNN_aarch64_final_link_relocate): Likewise.
355 (elfNN_aarch64_gc_sweep_hook): Likewise.
356 (elfNN_aarch64_check_relocs): Likewise.
357 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
358 (_bfd_aarch64_elf_resolve_relocation): Likewise.
360 2015-10-02 Renlin Li <renlin.li@arm.com>
362 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
363 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
365 * libbfd.h: Regnerate.
366 * bfd-in2.h: Regenerate.
368 2015-10-02 Renlin Li <renlin.li@arm.com>
370 * elfnn-aarch64.c (aarch64_reloc_got_type): Add support
371 for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
372 (elfNN_aarch64_gc_sweep_hook): Likewise.
373 (elfNN_aarch64_check_relocs): Likewise
374 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
375 (_bfd_aarch64_elf_resolve_relocation): Likewise
376 (elfNN_aarch64_final_link_relocate): Likewise
378 2015-010-02 Renlin Li <renlin.li@arm.com>
380 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New.
381 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
383 * libbfd.h: Regenerate.
384 * bfd-in2.h: Regenerate.
386 2015-10-02 Renlin Li <renlin.li@arm.com>
388 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
389 BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
390 (elfNN_aarch64_gc_sweep_hook): Likewise.
391 (elfNN_aarch64_check_relocs): Likewise
392 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
393 (_bfd_aarch64_elf_resolve_relocation): Likewise
394 (elfNN_aarch64_final_link_relocate): Calculate offset within GOT.
396 2015-10-02 Renlin Li <renlin.li@arm.com>
398 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to
401 2015-10-01 H.J. Lu <hongjiu.lu@intel.com>
404 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
405 pointer_equality_needed for R_X86_64_PC32 reloc in non-code
408 2015-10-01 Renlin Li <renlin.li@arm.com>
410 * elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
411 (elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.
413 2015-10-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
415 * config.bfd (targ_selvecs): Remove sh_elf32_vec and
416 sh_elf32_le_vec from sh*-*-linux cases.
418 2015-10-01 Alan Modra <amodra@gmail.com>
421 * elflink.c (_bfd_elf_merge_sections): Revert last change.
423 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
426 * elf32-i386.c (elf_i386_check_relocs): Set
427 pointer_equality_needed for R_386_PC32 reloc in non-code
430 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
433 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds
434 that have the compatible ELF machine code with the output bfd.
436 2015-09-30 Alan Modra <amodra@gmail.com>
439 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that
440 will be handled by elf_link_input_bfd. Rename abfd param to obfd.
442 2015-09-30 Rich Felker <dalias@libc.org>
444 * config.bfd (targ_selvecs): Add fdpic and misc targets
447 2015-09-29 Andrew Stubbs <ams@codesourcery.com>
448 H.J. Lu <hongjiu.lu@intel.com>
451 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
452 * bfd-in2.h: Regenerated.
454 2015-08-11 Peter Zotov <whitequark@whitequark.org>
457 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
458 (R_OR1K_16_PCREL): Likewise.
459 (R_OR1K_8_PCREL): Likewise.
461 2015-09-23 Nick Clifton <nickc@redhat.com>
463 * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
464 order to avoid problems with left shifting negative values.
465 (abs32code): Likewise.
466 * mach-o.c (FILE_ALIGN): Likewise.
467 * coff-rs6000.c (xcoff_debug_sections): Delete unused static
469 * elf32-visium.c (visium_reloc_map): Likewise.
470 * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless
471 calls to abs function.
472 * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise.
473 * elf32-score.c (score_elf_final_link_relocate): Likewise.
474 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
475 * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead
476 of shifting to create a negative mask.
477 * elf32-msp430.c (elf_backend_special_sections): Define.
478 * elfxx-mips.c (got_ofst_reloc_p): Delete unused function.
479 (got_hi16_reloc_p): Delete unused function.
480 * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of
483 2015-09-23 Nick Clifton <nickc@redhat.com>
486 * elf-bfd.h (struct elf_section_list): New structure.
487 (struct elf_obj_tdata): Replace symtab_shndx_hdr with
488 symtab_shndx_list. Delete symtab_shndx_section.
489 (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list.
490 * elf.c (bfd_elf_get_syms): If symtab index sections are present,
491 scan them for the section that matches the provided symbol table.
492 (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections.
493 (assign_section_numbers): Use the first symtab index table in the
495 (_bfd_elf_compute_section_file_positions): Replace use of
496 symtab_shndx_hdr with use of symtab_shndx_list.
497 (find_section_in_list): New function.
498 (assign_file_postions_except_relocs): Use new function.
499 (_bfd_elf_copy_private_symbol_data): Likewise.
500 (swap_out_syms): Handle multiple symbol table index sections.
501 * elf32-m32c.c (m32c_elf_relax_section): Replace use of
502 symtab_shndx_hdr with use of symtab_shndx_list.
503 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
504 * elf32-rx.c (rx_relax_section): Likewise.
505 * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise.
506 * elflink.c (bfd_elf_final_link): Likewise.
508 2015-09-21 H.J. Lu <hongjiu.lu@intel.com>
510 * bfd.c (bfd_update_compression_header): Use bfd_put_32 on
512 (bfd_check_compression_header): Use bfd_get_32 on ch_type.
513 (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
516 2015-09-20 Rich Felker <dalias@libc.org>
518 * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
519 .interp when info->nointerp.
520 (bfd_elf_size_dynamic_sections): Adjust assert.
521 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp
523 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
524 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
525 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
526 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
527 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
528 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
529 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
530 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
531 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
532 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
533 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
534 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
535 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
536 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
537 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
538 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
539 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
540 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
541 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
542 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.
543 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
544 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
545 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
546 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
547 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
548 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
549 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
550 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
551 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
552 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
553 * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
554 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
555 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
556 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
558 2015-09-18 Doug Evans <xdje42@gmail.com>
560 * targets.c (enum bfd_flavour): Add comment.
561 (bfd_flavour_name): New function.
562 * bfd-in2.h: Regenerate.
564 2015-09-18 Alan Modra <amodra@gmail.com>
566 * elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename
567 from no_tls_get_addr_opt.
568 * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt.
569 (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at
572 2015-09-17 Alan Modra <amodra@gmail.com>
575 * elflink.c (elf_link_adjust_relocs): Correct start of insertion
578 2015-09-16 Alan Modra <amodra@gmail.com>
581 * elflink.c (elf_link_adjust_relocs): Modify insertion sort to
582 insert a run. Return status in case of malloc failure.
585 2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
587 * elf32-xtensa.c (elf_xtensa_be_plt_entry)
588 (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for
590 (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix
591 up instructions according to ABI.
593 2015-09-14 Rich Felker <dalias@libc.org>
595 * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
596 instead of clearing it on cross-section relocations.
597 (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
599 2015-09-12 Helge Deller <deller@gmx.de>
602 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
605 2015-09-09 Jiong Wang <jiong.wang@arm.com>
607 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
609 2015-09-09 Jiong Wang <jiong.wang@arm.com>
611 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three
612 TLS local dynamic traditional relocations types.
613 (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to
614 local executable relaxation.
616 2015-09-03 H.J. Lu <hongjiu.lu@intel.com>
618 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove
621 2015-09-02 H.J. Lu <hongjiu.lu@intel.com>
623 * elf32-i386.c (R_386_irelative): Renamed to ...
625 (R_386_vt_offset): Updated.
626 (elf_i386_rtype_to_howto): Likewise.
627 (elf_i386_relocate_section): Likewise.
629 2015-09-01 H.J. Lu <hongjiu.lu@intel.com>
632 * elf32-i386.c (elf_i386_link_hash_entry): Add
633 func_pointer_refcount.
634 (elf_i386_link_hash_newfunc): Clear func_pointer_refcount.
635 (elf_i386_get_local_sym_hash): Likewise.
636 (elf_i386_copy_indirect_symbol): Also copy
637 func_pointer_refcount.
638 (elf_i386_check_relocs): Increment func_pointer_refcount.
639 (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount.
640 (elf_i386_allocate_dynrelocs): Don't create the PLT entry if
641 there are only function pointer relocations which can be
642 resolved at run-time. Keep dynanamic relocations for run-time
643 function pointer initialization.
644 (elf_i386_relocate_section): Copy dynamic function pointer
646 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
647 func_pointer_refcount.
648 (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount.
649 (elf_x86_64_get_local_sym_hash): Likewise.
650 (elf_x86_64_copy_indirect_symbol): Also copy
651 func_pointer_refcount.
652 (elf_x86_64_check_relocs): Increment func_pointer_refcount.
653 (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount.
654 (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if
655 there are only function pointer relocations which can be
656 resolved at run-time. Keep dynanamic relocations for run-time
657 function pointer initialization.
658 (elf_x86_64_relocate_section): Copy dynamic function pointer
661 2015-09-01 Alan Modra <amodra@gmail.com>
663 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value
664 if .opd section has been edited.
666 2015-09-01 Alan Modra <amodra@gmail.com>
669 * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout.
670 (enum ppc_stub_type): Add ppc_stub_save_res.
671 (struct map_stub): Add "next" and "needs_save_res".
672 (struct ppc_link_hash_entry): Add "save_res" flag.
673 (struct ppc_link_hash_table): Add "group".
674 (sfpr_define): Add stub_sec param. Define symbol in stub_sec if
675 stub_sec is non-null. Set "save_res".
676 (save_res_funcs): Make file scope, rename from funcs. Adjust uses.
677 (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms.
678 (ppc_build_one_stub): Handle ppc_stub_save_res.
679 (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding
680 stub for linker defined save_res sym.
681 (group_sections): Init new fields of struct map_stub.
682 (ppc64_elf_size_stubs): Reserve space for save/restore func copy.
683 (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit
685 (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res.
687 2015-08-31 Alan Modra <amodra@gmail.com>
689 * elf64-ppc.c (get_r2off): Return -1 on error.
690 (ppc_build_one_stub): Adjust for get_r2off change. Don't emit
691 addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
692 (ppc_size_one_stub): Corresponding size changes for r2off stubs.
693 Add condition in test for -R objects.
695 2015-08-31 Alan Modra <amodra@gmail.com>
697 * section.c (section_id): Make file scope.
698 (bfd_get_next_section_id): New function.
699 * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl.
700 (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add
701 group. Update all uses.
702 (struct ppc_link_hash_table): Delete top_id, top_index, and
703 input_list. Add sec_info_arr_size. Rename stub_group to
704 sec_info, and make group info indirect. Update stub_group refs
706 (ppc_add_stub): Don't look for stub_sec on link_sec stub_group
708 (ppc_build_one_stub): Delete FIXME.
709 (ppc64_elf_setup_section_lists): Size htab->sec_info for all
710 sections, not just input sections. Don't create htab->input_list.
711 (ppc64_elf_next_input_section): Update to use sec_info union as
714 (group_sections): Pass "info" param rather than "htab". Iterate
715 over output sections rather than input_list. Use sec_info union
716 as list pointers. Alloc atruct map_stub, and return fail status.
717 * bfd-in2.h: Regenerate.
719 2015-08-31 Alan Modra <amodra@gmail.com>
721 * elflink.c (elf_sort_symbol): Use correctly sized type for
722 calculating signed section->id difference.
723 (elf_link_add_object_symbols): Likewise.
724 * pef.c (bfd_pef_scan_start_address): Warning fix.
725 * vms-alpha.c (vms_new_section_hook): Likewise.
727 2015-08-31 Alan Modra <amodra@gmail.com>
729 * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
730 (find_relocs_at_address_addr): Make "reloc_type" an enum.
731 (nds32_elf_relax_delete_blanks): Warning fix.
732 (nds32_elf_relax_loadstore): Correct loop bound.
734 2015-08-31 Alan Modra <amodra@gmail.com>
736 * section.c (struct bfd_section): Make "id" and "index" unsigned.
737 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
738 * elf.c (elf_map_symbols): Likewise.
739 * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
740 (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
741 (ppc64_elf_setup_section_lists): Ditto for local vars.
742 * elf32-arm.c: Similarly to elf64-ppc.c.
743 * elf32-avr.c: Likewise.
744 * elf32-hppa.c: Likewise.
745 * elf32-m68hc1x.c: Likewise.
746 * elf32-metag.c: Likewise.
747 * elf32-nios2.c: Likewise.
748 * elfnn-aarch64.c: Likewise.
749 * simple.c (struct saved_offsets): Make "section_count" unsigned.
750 * bfd-in2.h: Regenerate.
752 2015-08-27 Alan Modra <amodra@gmail.com>
755 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
756 (elf_backend_sort_relocs_p): Define.
758 2015-08-26 Alan Modra <amodra@gmail.com>
761 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
762 (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
763 (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
765 (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
767 2015-08-26 Matthew Fortune <matthew.fortune@imgtec.com>
770 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
771 ISA value to a bfd machine number.
772 (bfd_mips_isa_ext): Update the ISA level and revision if
773 necessary. Use mips_mach_extends_p to decide if the ISA extension
775 (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
776 be inferred from the ABI setting. Set the ISA level from the
777 maximum of the incoming and outgoing ISA levels.
779 2015-08-25 Nick Clifton <nickc@redhat.com>
782 * elf.c (bfd_section_from_shdr): Replace assertions with warnings
783 about multiple symbol tables.
785 2015-08-25 Renlin Li <renlin.li@arm.com>
787 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
789 * bfd-in2.h: Regenerate.
791 2015-08-22 Alan Modra <amodra@gmail.com>
793 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
794 Don't copy fields not set by _bfd_elf_swap_verdef_in.
796 2015-08-19 Jiong Wang <jiong.wang@arm.com>
798 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
799 types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
800 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
801 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
802 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
803 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
804 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
805 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
806 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
807 (elfNN_aarch64_final_link_relocate): Likewise.
808 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
809 (_bfd_aarch64_elf_resolve_relocation): Likewise.
811 2015-08-19 Jiong Wang <jiong.wang@arm.com>
813 * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
814 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
815 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
816 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
817 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
818 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
819 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
820 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
821 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
822 * bfd-in2.h: Regenerate.
823 * libbfd.h: Regenerate.
825 2015-08-19 Jiong Wang <jiong.wang@arm.com>
828 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
829 types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
830 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
831 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
832 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
833 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
834 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
835 (elfNN_aarch64_final_link_relocate): Likewise.
836 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
837 (_bfd_aarch64_elf_resolve_relocation): Likewise.
839 2015-08-19 Jiong Wang <jiong.wang@arm.com>
841 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
842 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
843 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
844 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
845 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
846 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
847 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
848 * bfd-in2.h: Regenerate.
849 * libbfd.h: Regenerate.
851 2015-08-19 Jiong Wang <jiong.wang@arm.com>
853 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
854 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
855 (aarch64_reloc_got_type): Likewise.
856 (elfNN_aarch64_final_link_relocate): Likewise.
857 (elfNN_aarch64_relocate_section): Likewise.
858 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
859 (_bfd_aarch64_elf_resolve_relocation): Likewise.
861 2015-08-19 Jiong Wang <jiong.wang@arm.com>
863 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
864 * bfd-in2.h: Regenerate.
865 * libbfd.h: Regenerate.
866 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
867 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
869 2015-08-19 Alan Modra <amodra@gmail.com>
871 * elf-s390-common.c: Simplify expressions using
872 bfd_linke_executable, bfd_link_pie and bfd_link_pic.
873 * elf32-arm.c: Likewise.
874 * elf32-bfin.c: Likewise.
875 * elf32-frv.c: Likewise.
876 * elf32-m68k.c: Likewise.
877 * elf32-nios2.c: Likewise.
878 * elf32-ppc.c: Likewise.
879 * elf32-s390.c: Likewise.
880 * elf32-sh.c: Likewise.
881 * elf64-alpha.c: Likewise.
882 * elf64-ppc.c: Likewise.
883 * elf64-s390.c: Likewise.
884 * elflink.c: Likewise.
886 2015-08-18 Jiong Wang <jiong.wang@arm.com>
888 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
889 (elfNN_aarch64_relocate_section): Likewise.
890 (elfNN_aarch64_gc_sweep_hook): Likewise.
891 (elfNN_aarch64_check_relocs): Likewise.
893 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
896 * elf-bfd.h (elf_link_hash_table): Add dynsym.
897 * elf32-i386.c (elf_i386_reloc_type_class): Return
898 reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
899 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
900 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
901 (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
902 (elf_final_link_info): Remove dynsym_sec.
903 (elf_link_output_extsym): Replace dynsym_sec with dynsym.
904 (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
905 dynsym_sec with dynsym.
907 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
909 * bfd/aoutx.h: Replace shared, executable, relocatable and pie
910 fields with bfd_link_executable, bfd_link_dll,
911 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
912 * bfd/bout.c: Likewise.
913 * bfd/coff-alpha.c: Likewise.
914 * bfd/coff-arm.c: Likewise.
915 * bfd/coff-i386.c: Likewise.
916 * bfd/coff-i960.c: Likewise.
917 * bfd/coff-m68k.c: Likewise.
918 * bfd/coff-mcore.c: Likewise.
919 * bfd/coff-mips.c: Likewise.
920 * bfd/coff-ppc.c: Likewise.
921 * bfd/coff-rs6000.c: Likewise.
922 * bfd/coff-sh.c: Likewise.
923 * bfd/coff-tic80.c: Likewise.
924 * bfd/coff-x86_64.c: Likewise.
925 * bfd/coff64-rs6000.c: Likewise.
926 * bfd/coffgen.c: Likewise.
927 * bfd/cofflink.c: Likewise.
928 * bfd/ecoff.c: Likewise.
929 * bfd/ecofflink.c: Likewise.
930 * bfd/elf-bfd.h: Likewise.
931 * bfd/elf-eh-frame.c: Likewise.
932 * bfd/elf-ifunc.c: Likewise.
933 * bfd/elf-m10200.c: Likewise.
934 * bfd/elf-m10300.c: Likewise.
935 * bfd/elf-s390-common.c: Likewise.
936 * bfd/elf-vxworks.c: Likewise.
937 * bfd/elf.c: Likewise.
938 * bfd/elf32-arm.c: Likewise.
939 * bfd/elf32-avr.c: Likewise.
940 * bfd/elf32-bfin.c: Likewise.
941 * bfd/elf32-cr16.c: Likewise.
942 * bfd/elf32-cr16c.c: Likewise.
943 * bfd/elf32-cris.c: Likewise.
944 * bfd/elf32-crx.c: Likewise.
945 * bfd/elf32-d10v.c: Likewise.
946 * bfd/elf32-dlx.c: Likewise.
947 * bfd/elf32-epiphany.c: Likewise.
948 * bfd/elf32-fr30.c: Likewise.
949 * bfd/elf32-frv.c: Likewise.
950 * bfd/elf32-ft32.c: Likewise.
951 * bfd/elf32-h8300.c: Likewise.
952 * bfd/elf32-hppa.c: Likewise.
953 * bfd/elf32-i370.c: Likewise.
954 * bfd/elf32-i386.c: Likewise.
955 * bfd/elf32-i860.c: Likewise.
956 * bfd/elf32-ip2k.c: Likewise.
957 * bfd/elf32-iq2000.c: Likewise.
958 * bfd/elf32-lm32.c: Likewise.
959 * bfd/elf32-m32c.c: Likewise.
960 * bfd/elf32-m32r.c: Likewise.
961 * bfd/elf32-m68hc11.c: Likewise.
962 * bfd/elf32-m68hc1x.c: Likewise.
963 * bfd/elf32-m68k.c: Likewise.
964 * bfd/elf32-mcore.c: Likewise.
965 * bfd/elf32-mep.c: Likewise.
966 * bfd/elf32-metag.c: Likewise.
967 * bfd/elf32-microblaze.c: Likewise.
968 * bfd/elf32-moxie.c: Likewise.
969 * bfd/elf32-msp430.c: Likewise.
970 * bfd/elf32-mt.c: Likewise.
971 * bfd/elf32-nds32.c: Likewise.
972 * bfd/elf32-nios2.c: Likewise.
973 * bfd/elf32-or1k.c: Likewise.
974 * bfd/elf32-ppc.c: Likewise.
975 * bfd/elf32-rl78.c: Likewise.
976 * bfd/elf32-rx.c: Likewise.
977 * bfd/elf32-s390.c: Likewise.
978 * bfd/elf32-score.c: Likewise.
979 * bfd/elf32-score7.c: Likewise.
980 * bfd/elf32-sh-symbian.c: Likewise.
981 * bfd/elf32-sh.c: Likewise.
982 * bfd/elf32-sh64.c: Likewise.
983 * bfd/elf32-spu.c: Likewise.
984 * bfd/elf32-tic6x.c: Likewise.
985 * bfd/elf32-tilepro.c: Likewise.
986 * bfd/elf32-v850.c: Likewise.
987 * bfd/elf32-vax.c: Likewise.
988 * bfd/elf32-visium.c: Likewise.
989 * bfd/elf32-xc16x.c: Likewise.
990 * bfd/elf32-xstormy16.c: Likewise.
991 * bfd/elf32-xtensa.c: Likewise.
992 * bfd/elf64-alpha.c: Likewise.
993 * bfd/elf64-hppa.c: Likewise.
994 * bfd/elf64-ia64-vms.c: Likewise.
995 * bfd/elf64-mmix.c: Likewise.
996 * bfd/elf64-ppc.c: Likewise.
997 * bfd/elf64-s390.c: Likewise.
998 * bfd/elf64-sh64.c: Likewise.
999 * bfd/elf64-x86-64.c: Likewise.
1000 * bfd/elflink.c: Likewise.
1001 * bfd/elfnn-aarch64.c: Likewise.
1002 * bfd/elfnn-ia64.c: Likewise.
1003 * bfd/elfxx-mips.c: Likewise.
1004 * bfd/elfxx-sparc.c: Likewise.
1005 * bfd/elfxx-tilegx.c: Likewise.
1006 * bfd/i386linux.c: Likewise.
1007 * bfd/linker.c: Likewise.
1008 * bfd/m68klinux.c: Likewise.
1009 * bfd/pdp11.c: Likewise.
1010 * bfd/pe-mips.c: Likewise.
1011 * bfd/peXXigen.c: Likewise.
1012 * bfd/reloc.c: Likewise.
1013 * bfd/reloc16.c: Likewise.
1014 * bfd/sparclinux.c: Likewise.
1015 * bfd/sunos.c: Likewise.
1016 * bfd/vms-alpha.c: Likewise.
1017 * bfd/xcofflink.c: Likewise.
1019 2015-08-18 Alan Modra <amodra@gmail.com>
1022 * Makefile.am: Use $(SED) in place of sed throughout.
1023 * Makefile.in: Regenerate.
1025 2015-08-18 Alan Modra <amodra@gmail.com>
1027 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
1028 if already defined, and set linker_def.
1029 (ppc64_elf_set_toc): Use .TOC. value if defined other than by
1032 2015-08-14 Alan Modra <amodra@gmail.com>
1035 * elf32-or1k.c: Revert 2015-08-11 change.
1037 2015-08-13 H.J. Lu <hongjiu.lu@intel.com>
1040 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
1041 for read-only segment with dynamic IFUNC relocations.
1042 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1044 2015-08-12 Simon Dardis <simon.dardis@imgtec.com>
1046 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
1047 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
1048 mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
1049 Update to use 'or' instead of 'addu/daddu'.
1050 (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
1051 (move_insns_32): Reorder table.
1053 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1055 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
1056 relocations in debug sections.
1057 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1059 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1061 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
1062 message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
1064 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1066 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
1067 (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
1069 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1071 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
1072 Loose the check for symbol from ABS section.
1073 (elfNN_aarch64_size_stubs): Pass sym_sec.
1075 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1078 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
1079 calls go through plt stub.
1080 (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
1081 JUMP26 relocation to support inserting veneer for call to plt stub.
1083 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1085 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1086 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1087 (aarch64_reloc_got_type): Likewise.
1088 (elfNN_aarch64_final_link_relocate): Likewise.
1089 (elfNN_aarch64_relocate_section): Likewise.
1090 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1091 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1093 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1095 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
1096 * bfd-in2.h: Regenerate.
1097 * libbfd.h: Regenerate.
1098 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1099 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1101 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1103 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1104 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1105 (aarch64_reloc_got_type): Likewise.
1106 (elfNN_aarch64_final_link_relocate): Likewise.
1107 (elfNN_aarch64_relocate_section): Likewise.
1108 (elfNN_aarch64_gc_sweep_hook): Likewise.
1109 (elfNN_aarch64_check_relocs): Likewise.
1110 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1111 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1113 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1115 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
1116 * bfd-in2.h: Regenerate.
1117 * libbfd.h: Regenerate.
1118 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1119 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1121 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1123 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1124 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1125 (aarch64_reloc_got_type): Likewise.
1126 (elfNN_aarch64_final_link_relocate): Likewise.
1127 (elfNN_aarch64_relocate_section): Likewise.
1128 (elfNN_aarch64_gc_sweep_hook): Likewise.
1129 (elfNN_aarch64_check_relocs): Likewise.
1130 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1131 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1133 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1135 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
1136 * bfd-in2.h: Regenerate.
1137 * libbfd.h: Regenerate.
1138 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1139 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1141 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1144 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
1145 relocations in debug sections.
1146 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1148 2015-08-11 Peter Zotov <whitequark@whitequark.org>
1151 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
1152 (R_OR1K_16_PCREL): Likewise.
1153 (R_OR1K_8_PCREL): Likewise.
1155 2015-08-11 Nick Clifton <nickc@redhat.com>
1158 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
1162 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
1164 * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
1165 used_by_bfd pointer.
1166 (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
1168 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1170 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
1172 2015-08-10 H.J. Lu <hongjiu.lu@intel.com>
1174 * elf-bfd.h (elf_symbol_version): New enum.
1175 (elf_link_hash_entry): Replace hidden with versioned.
1176 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
1177 version if the symbol is unversioned. Initialize versioned.
1178 (_bfd_elf_add_default_symbol): Don't look for symbol version
1179 if the symbol is unversioned or hidden. Initialize versioned.
1180 (elf_collect_hash_codes): Don't look for symbol version if the
1181 symbol is unversioned.
1182 (elf_collect_gnu_hash_codes): Likewise.
1183 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
1184 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
1186 (elf_link_output_extsym): Likewise.
1188 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
1191 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
1192 sh_link and sh_info fields in stripped section headers, we also
1193 check if the sh_type, sh_flags, sh_addralign and sh_entsize
1194 fields of the output section match the output. Since
1195 --only-keep-debug turns all non-debug sections into SHT_NOBITS
1196 sections, the output SHT_NOBITS type matches any input type.
1198 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
1201 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
1202 if the new symbol matches the existing one. The new hidden
1203 versioned symbol matches the existing symbol if they have the
1204 same symbol version. Update the existing symbol only if they
1206 (_bfd_elf_add_default_symbol): Update call to
1207 _bfd_elf_merge_symbol.
1208 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
1210 (elf_link_add_object_symbols): Override a definition only if the
1211 new symbol matches the existing one.
1212 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
1213 the hidden versioned symbol.
1214 (elf_link_output_extsym): Bind a symbol locally when linking
1215 executable if it is locally defined, hidden versioned, not
1216 referenced by shared library and not exported. Turn on
1217 VERSYM_HIDDEN only if the hidden versioned symbol is defined
1220 2015-08-05 Nick Clifton <nickc@redhat.com>
1222 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
1223 sh_info fields of sections whose type has been changed to
1226 2015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
1227 Tyler Hicks <tyhicks@canonical.com>
1230 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
1231 and stack overflow when char is signed and \200-\376 was in place of hex
1232 digit; also fixes \377 was handled as EOF instead of "incorrect character".
1233 (ihex_read_section): Changed for consistency.
1234 (ihex_bad_byte): Prevent (now impossible to trigger) stack
1235 overflow and incorrect escape sequence handling.
1236 * srec.c (srec_bad_byte): Likewise.
1238 2015-08-03 Hans-Peter Nilsson <hp@axis.com>
1240 * elf32-cris.c (cris_elf_relocate_section)
1241 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
1242 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
1243 just link_info->symbolic, to check if a symbol should be bound
1246 2015-07-30 H.J. Lu <hongjiu.lu@intel.com>
1249 * elflink.c (_bfd_elf_add_default_symbol): Add the default
1250 symbol if not performing a relocatable link.
1251 (elf_link_add_object_symbols): Adjust the default symbol if
1252 not performing a relocatable link.
1254 2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
1256 * elflink.c (elf_link_add_object_symbols): Remove
1257 !info->relocatable check for info->executable. Add
1258 !info->relocatable check for !info->executable.
1259 (elf_link_output_extsym): Remove
1260 !info->relocatable check for info->executable.
1262 2015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
1264 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
1265 assignment loop for bfd plugin objects.
1267 2015-07-28 Alan Modra <amodra@gmail.com>
1269 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
1270 segment for loaded sections after nonloaded sections if the
1271 sections are on the same page.
1273 2015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
1275 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
1276 * config.in, configure: Regenerate.
1278 2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
1280 * configure: Regenerated.
1282 2015-07-27 Nick Clifton <nickc@redhat.com>
1284 * elf32-msp430.c (uses_large_model): New function.
1285 (msp430_elf_eh_frame_address_size): New function.
1286 (elf_backend_eh_frame_address_size): Define.
1288 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1291 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
1293 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1296 * elf32-arm.c (elf_backend_extern_protected_data): Define.
1298 2015-07-25 H.J. Lu <hongjiu.lu@intel.com>
1301 * elflink.c (elf_link_output_extsym): Check symbol version
1302 section check only if not linking executable, the symbol is
1303 referenced by shared library or not locally defined.
1305 2015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
1307 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
1308 check if a symbol should be bound symbolically.
1309 * elf32-hppa.c (elf32_hppa_check_relocs,
1310 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
1311 elf32_hppa_finish_dynamic_symbol): Likewise.
1312 * elf32-m68k.c (elf_m68k_check_relocs,
1313 elf_m68k_relocate_section): Likewise.
1314 * elf32-nios2.c (nios2_elf32_relocate_section,
1315 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
1316 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
1317 elf32_tic6x_relocate_section): Likewise.
1319 2015-07-24 Alan Modra <amodra@gmail.com>
1321 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
1322 prefix for reloc section corresponding to rela section associated
1323 with renamed debug section.
1325 2015-07-24 Alan Modra <amodra@gmail.com>
1327 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
1330 2015-07-23 Joseph Myers <joseph@codesourcery.com>
1332 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
1333 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
1334 difference, not to host pointer.
1336 2015-07-22 Alan Modra <amodra@gmail.com>
1338 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
1339 return -1 if symbol referenced is not defined. Tidy.
1341 2015-07-20 Alan Modra <amodra@gmail.com>
1343 * po/SRC-POTFILES.in: Regenerate.
1345 2015-07-17 Jiong Wang <jiong.wang@arm.com>
1347 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
1348 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
1350 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1352 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1353 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1354 (aarch64_reloc_got_type): Ditto.
1355 (elfNN_aarch64_final_link_relocate): Ditto.
1356 (elfNN_aarch64_relocate_section): Ditto.
1357 (elfNN_aarch64_gc_sweep_hook): Ditto.
1358 (elfNN_aarch64_check_relocs): Ditto.
1359 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1360 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1362 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1364 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
1365 * bfd-in2.h: Regenerate.
1366 * libbfd.h: Regenerate.
1367 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1368 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1370 2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
1373 * bfd.c (bfd_convert_section_size): New function.
1374 (bfd_convert_section_contents): Likewise.
1375 * bfd-in2.h: Regenerated.
1377 2015-07-09 Catherine Moore <clm@codesourcery.com>
1379 * elflink.c (bfd_elf_size_dynamic_sections): Call to
1380 _bfd_elf_maybe_strip_eh_frame_hdr should be before
1381 bed->elf_backend_size_dynamic_sections.
1383 2015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
1385 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
1387 2015-07-05 Richard Sandiford <richard.sandiford@arm.com>
1389 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
1390 plus addend rather than the original st_value when looking up
1391 entries in opd->adjust.
1393 2015-07-03 Kai Tietz <ktietz@redhat.com>
1394 Nick Clifton <nickc@redhat.com>
1397 * coffcode.h (coff_bfd_gc_sections): Define default
1398 to bfd_coff_gc_sections function.
1399 (coff_gc_mark_hook_fn): New type.
1400 * coffgen.c (init_reloc_cookie): Copy and adjust coff
1401 related code about gc-sections from elflink.c to here.
1402 (fini_reloc_cookie): Likewise.
1403 (init_reloc_cookie_rels): Likewise.
1404 (fini_reloc_cookie_rels): Likewise.
1405 (init_reloc_cookie_for_section): Likewise.
1406 (fini_reloc_cookie_for_section): Likewise.
1407 (_bfd_coff_gc_mark_hook): Likewise.
1408 (_bfd_coff_gc_mark_rsec): Likewise.
1409 (_bfd_coff_gc_mark_reloc): Likewise.
1410 (_bfd_coff_gc_mark): Likewise.
1411 (_bfd_coff_gc_mark_extra_sections): Likewise.
1412 (coff_gc_sweep_symbol_info): Likewise.
1413 (coff_gc_sweep_symbol): Likewise.
1414 (gc_sweep_hook_fn): Likewise.
1415 (coff_gc_sweep): Likewise.
1416 (bfd_coff_gc_sections): Likewise.
1417 (_bfd_coff_gc_keep): Likewise.
1418 * libcoff-in.h (coff_reloc_cookie): New struct.
1419 (bfd_coff_gc_sections): New prototype.
1420 * libcoff.h: Regenerate.
1422 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1423 Cesar Philippidis <cesar@codesourcery.com>
1425 * bfd-in2.h: Regenerated.
1426 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
1427 (elf_nios2_r1_howto_table_rel): This.
1428 (elf_nios2_r2_howto_table_rel): New.
1430 (lookup_howto): Add ABFD parameter. Adjust to look up in either
1431 the R1 or R2 relocation table, as determined by ABFD.
1432 (nios2_reloc_map): Add R2 relocations.
1433 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
1434 Pass it the ABFD parameter.
1435 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
1436 return an R1 or R2 relocation.
1437 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
1438 Pass it the ABFD parameter.
1439 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
1441 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
1442 * libbfd.h: Regenerated.
1443 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
1444 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
1445 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
1446 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
1447 (BFD_RELOC_NIOS2_R2_T2I4): New.
1448 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
1449 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
1450 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
1451 (BFD_RELOC_NIOS2_R2_X2L5): New.
1452 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
1453 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
1454 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
1455 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
1457 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1458 Cesar Philippidis <cesar@codesourcery.com>
1460 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
1461 * bfd-in2.h: Regenerated.
1462 * cpu-nios2.c (nios2_compatible): New.
1463 (N): Use nios2_compatible instead of bfd_default_compatible.
1464 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
1465 (arch_info_struct): New.
1466 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
1467 * elf32-nios2.c (is_nios2_elf): New.
1468 (nios2_elf32_merge_private_bfd_data): New.
1469 (nios2_elf32_object_p): New.
1470 (bfd_elf32_bfd_merge_private_bfd_data): Define.
1471 (elf_backend_object_p): Define.
1473 2015-07-01 H.J. Lu <hongjiu.lu@intel.com>
1475 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
1477 2015-06-30 Nick Clifton <nickc@redhat.com>
1480 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
1481 (write_obj_attribute): Likewise.
1482 (elf_new_obj_attr): Likewise.
1483 (bfd_elf_get_obj_attr_int): Likewise.
1484 (bfd_elf_add_obj_attr_int): Likewise.
1485 (bfd_elf_add_obj_attr_string): Likewise.
1486 (bfd_elf_add_obj_attr_int_string): Likewise.
1487 (gnu_obj_attrs_arg_type): Likewise.
1488 (_bfd_elf_obj_attrs_arg_type): Likewise.
1489 (_bfd_elf_parse_attributes): Likewise.
1490 (_bfd_elf_merge_unknown_attribute_list): Likewise.
1491 * elf-bfd.h (struct obj_attribute_list): Likewise.
1494 2015-06-28 H.J. Lu <hongjiu.lu@intel.com>
1496 * bfd-in.h (compressed_debug_section_type): Remove
1497 COMPRESS_DEBUG_ZLIB.
1498 * bfd-in2.h : Regenerated.
1500 2015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
1502 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
1503 instead of !shared to indicate an application vs shared library.
1504 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1505 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
1506 (_bfd_mips_elf_get_target_dtag): Likewise.
1508 2015-06-25 DJ Delorie <dj@redhat.com>
1510 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
1511 REL loads to match RELA stores.
1513 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1515 * elf.c (_bfd_elf_compute_section_file_positions): Don't
1516 initialize sh_size for .shstrtab here.
1518 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1521 * elf-bfd.h (elf_sym_strtab): New.
1522 (elf_link_hash_table): Add strtabcount, strtabsize and
1524 (_bfd_elf_stringtab_init): Removed.
1525 * elf.c (_bfd_elf_stringtab_init): Removed.
1526 (_bfd_elf_compute_section_file_positions): Replace
1527 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
1528 _bfd_stringtab_size with
1529 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
1530 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
1531 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
1533 (swap_out_syms): Likewise.
1534 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
1535 with elf_strtab_hash. Remove symbuf, symbuf_count,
1536 symbuf_size and shndxbuf_size.
1537 (elf_link_flush_output_syms): Removed.
1538 (elf_link_output_sym): Renamed to ...
1539 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
1540 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
1542 (elf_link_swap_symbols_out): New.
1543 (elf_link_output_extsym): Replace elf_link_output_sym with
1544 elf_link_output_symstrtab.
1545 (elf_link_input_bfd): Likewise.
1546 (elf_final_link_free): Replace _bfd_stringtab_free with
1547 _bfd_elf_strtab_free. Remove symbuf.
1548 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
1549 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
1550 symbuf_size nor shndxbuf_size. Initialize strtabsize and
1551 strtab. Initialize symshndxbuf to -1 when number of sections
1552 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
1553 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
1554 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
1555 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
1556 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
1557 _bfd_elf_strtab_emit.
1559 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1561 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
1564 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1566 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
1567 space for the first .plt entry.
1568 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
1569 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1570 there are PLT relocations.
1571 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
1572 allocate space for the first .plt entry.
1573 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
1574 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1575 there are PLT relocations.
1577 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1580 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
1581 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
1584 2015-06-23 Jiong Wang <jiong.wang@arm.com>
1586 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
1587 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
1588 relocations against read-only sections.
1590 2015-06-18 Nick Clifton <nickc@redhat.com>
1593 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
1595 2015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
1597 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
1598 * bfd-in2.h : Regenerate.
1600 2015-06-16 Alan Modra <amodra@gmail.com>
1602 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
1605 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
1607 * elf-bfd.h : Remove struct elf_build_id.
1608 * bfd.c : Add struct bfd_build_id.
1609 * bfd-in2.h: Regenerate.
1610 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
1611 * libpei.h: Add protoype and macros for
1612 bfd_XXi_slurp_codeview_record.
1613 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
1614 * peicode.h (pe_bfd_read_buildid): Add.
1615 (pe_bfd_object_p): Use pe_bfd_read_buildid().
1617 2015-06-15 Renlin Li <renlin.li@arm.com>
1619 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
1620 * bfd-in2.h: Regenerate.
1621 * libbfd.h: Regenerate.
1622 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1623 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
1625 2015-06-15 Alan Modra <amodra@gmail.com>
1627 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
1628 2014-03-26 change. Call _bfd_clear_contents for relocs against
1629 local and global symbols defined in discarded input sections.
1631 2015-06-05 Nick Clifton <nickc@redhat.com>
1633 * elf32-msp430.c (rl78_sym_diff_handler): New function.
1634 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
1635 (msp430x_howto_table): Likewise.
1637 2015-06-05 Alan Modra <amodra@gmail.com>
1639 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
1640 relocs with insns moved by --ppc476-workaround. Correct
1641 output of REL16 relocs.
1643 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1645 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1646 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1647 (elfNN_aarch64_final_link_relocate): Ditto.
1648 (elfNN_aarch64_gc_swap_hook): Ditto.
1649 (elfNN_aarch64_check_relocs): Ditto.
1650 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1652 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1654 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
1655 * bfd-in2.h: Regenerate.
1656 * libbfd.h: Regenerate.
1657 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1658 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1660 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1662 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
1663 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1664 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
1665 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1667 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1669 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1670 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1671 (elfNN_aarch64_final_link_relocate): Ditto.
1672 (elfNN_aarch64_gc_swap_hook): Ditto.
1673 (elfNN_aarch64_check_relocs): Ditto.
1674 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1676 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1678 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
1679 * bfd-in2.h: Regenerate.
1680 * libbfd.h: Regenerate.
1681 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1682 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1684 2015-05-28 Catherine Moore <clm@codesourcery.com>
1685 Bernd Schmidt <bernds@codesourcery.com>
1686 Paul Brook <paul@codesourcery.com>
1689 * bfd-in2.h: Regenerated.
1690 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
1691 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
1692 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
1694 (compact_eh_frame_hdr_info): Declare.
1695 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
1696 fields and compact-eh fields.
1697 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
1698 (bfd_elf_section_data): Add eh_frame_entry_field.
1699 (elf_section_eh_frame_entry): Define.
1700 (bfd_elf_parse_eh_frame_entries): Declare.
1701 (_bfd_elf_parse_eh_frame_entry): Declare.
1702 (_bfd_elf_end_eh_frame_parsing): Declare.
1703 (_bfd_elf_write_section_eh_frame_entry): Declare.
1704 (_bfd_elf_eh_frame_entry_present): Declare.
1705 (_bfd_elf_section_for_symbol): Declare.
1706 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
1707 (bfd_elf_record_eh_frame_entry): New function.
1708 (_bfd_elf_parse_eh_frame_entry): New function.
1709 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
1710 (cmp_eh_frame_hdr): New function.
1711 (add_eh_frame_hdr_terminator): New function.
1712 (_bfd_elf_end_eh_frame_parsing): New function.
1713 (find_merged_cie): Update hdr_info field references.
1714 (_bfd_elf_discard_section_eh_frame): Likewise.
1715 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
1716 (_bfd_elf_eh_frame_entry_present): New function.
1717 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
1718 (_bfd_elf_write_section_eh_frame_entry): New function.
1719 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
1720 (_bfd_elf_fixup_eh_frame_hdr): New function.
1721 (write_compact_eh_frame_hdr): New function.
1722 (write_dwarf_eh_frame_hdr): New function.
1723 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
1724 * elflink.c (_bfd_elf_section_for_symbol): New function.
1725 (elf_section_ignore_discarded_relocs): Add Compact EH support.
1726 (elf_link_input_bfd): Likewise.
1727 (bfd_elf_final_link): Likewise.
1728 (_bfd_elf_gc_mark): Likewise.
1729 (bfd_elf_parse_eh_frame_entries): New function.
1730 (bfd_elf_gc_sections): Add Compact EH support.
1731 (bfd_elf_discard_info): Likewise.
1732 * elfxx-mips.c: Include dwarf2.h.
1733 (_bfd_mips_elf_compact_eh_encoding): New function.
1734 (_bfd_mips_elf_cant_unwind_opcode): New function.
1735 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
1736 (_bfd_mips_elf_cant_unwind_opcode): Declare.
1737 (elf_backend_compact_eh_encoding): Define.
1738 (elf_backend_cant_unwind_opcode): Define.
1739 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
1740 (elf_backend_cant_unwind_opcode): Provide default.
1741 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
1742 elf_backend_cant_unwind_opcode.
1743 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
1745 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
1748 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1749 for now binding only if pointer equality isn't needed.
1750 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1751 binding only if pointer equality isn't needed.
1752 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1753 section for now binding only if pointer equality isn't needed.
1754 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1755 binding only if pointer equality isn't needed.
1757 2015-05-26 H.J. Lu <hongjiu.lu@intel.com>
1760 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
1761 in .rel.plt/.rela.plt.
1762 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1764 2015-05-19 Jiong Wang <jiong.wang@arm.com>
1766 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
1767 relocation case labels alphabetically.
1768 (elfNN_aarch64_final_link_relocate): Ditto.
1769 (elfNN_aarch64_tls_relax): Ditto.
1770 (elfNN_aarch64_relocate_section): Ditto.
1771 (elfNN_aarch64_gc_sweep_hook): Ditto.
1772 (elfNN_aarch64_check_relocs): Ditto.
1773 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1774 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1776 2015-05-18 Jiong Wang <jiong.wang@arm.com>
1778 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
1781 2015-05-16 H.J. Lu <hongjiu.lu@intel.com>
1783 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1785 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1787 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1788 section for now binding.
1789 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1792 2015-05-14 H.J. Lu <hongjiu.lu@intel.com>
1794 * bfd.c (bfd_update_compression_header): Also write the zlib
1795 header if the SHF_COMPRESSED bit cleared..
1796 (bfd_check_compression_header): Return the uncompressed size.
1797 * compress.c (decompress_contents): Don't skip the zlib header.
1798 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
1799 which doesn't have the zlib header.
1800 (bfd_init_section_decompress_status): Likewise.
1801 (bfd_get_full_section_contents): Updated.
1802 (bfd_is_section_compressed): Likewise.
1803 (bfd_is_section_compressed_with_header): Return the uncompressed
1805 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
1806 * bfd-in2.h: Regenerated.
1808 2015-05-14 Jiong Wang <jiong.wang@arm.com>
1810 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
1813 2015-05-14 Max Filippov <jcmvbkbc@gmail.com>
1815 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
1816 as GOT reference when plt.refcount is not positive.
1818 2015-05-12 H.J. Lu <hongjiu.lu@intel.com>
1820 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
1821 for the first .plt entry only if needed.
1822 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1824 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1826 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
1827 (ALL_MACHINES_CFILES): Likewise.
1828 * archures.c (bfd_mach_iamcu): New.
1829 (bfd_mach_i386_iamcu): Likewise.
1830 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
1831 (bfd_iamcu_arch): Likewise.
1832 (bfd_archures_list): Add &bfd_iamcu_arch.
1833 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
1835 (targ_archs): Add bfd_iamcu_arch if needed.
1836 * configure.ac: Support iamcu_elf32_vec.
1837 * cpu-iamcu.c: New file.
1838 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
1839 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
1840 * targets.c (iamcu_elf32_vec): New.
1841 (_bfd_target_vector): Add iamcu_elf32_vec.
1842 * Makefile.in: Regenerated.
1843 * bfd-in2.h: Likewise.
1844 * configure: Likewise.
1846 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1848 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
1850 2015-05-10 H.J. Lu <hongjiu.lu@intel.com>
1852 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
1853 and output_bfd with abfd.
1854 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
1856 2015-05-06 Toni Spets <toni.spets@iki.fi>
1859 * peXXigen.c (rsrc_process_section): Skip discarded resource
1862 2015-05-01 H.J. Lu <hongjiu.lu@intel.com>
1864 * config.bfd: Support i[3-7]86-*-elf*.
1866 2015-04-30 H.J. Lu <hongjiu.lu@intel.com>
1868 * elf32-i386.c (elf_backend_post_process_headers): Undef for
1871 2015-04-30 Nick Clifton <nickc@redhat.com>
1874 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
1876 (mep_reloc): Delete unused function.
1878 2015-04-29 Nick Clifton <nickc@redhat.com>
1881 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
1884 2015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1886 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
1887 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
1888 elf_s390_merge_obj_attributes.
1889 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
1891 2015-04-24 Jiong Wang <jiong.wang@arm.com>
1894 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
1895 GOT_NORMAL for both sgot/srelgot section.
1896 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
1897 and generate necessary runtime relocation for GOT entry.
1899 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1902 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
1904 2015-04-24 Jiong Wang <jiong.wang@arm.com>
1906 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
1907 PC-relative relocation for external symbol.
1909 2015-04-24 Nick Clifton <nickc@redhat.com>
1912 * compress.c (decompress_contents): Zero initialse the z_stream
1915 2015-04-24 Nick Clifton <nickc@redhat.com>
1917 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
1918 local labels to include local labels with a numeric suffix and
1921 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1924 * section.c (SEC_MEP_VLIW): New.
1925 * bfd-in2.h: Regenerated.
1927 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1930 * compress.c (bfd_compress_section_contents): Remove the
1931 write_compress argument.
1932 (bfd_init_section_compress_status): Updated.
1933 (bfd_compress_section): Likewise.
1934 * elf.c (_bfd_elf_set_reloc_sh_name): New.
1935 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
1936 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
1937 _bfd_elf_set_reloc_sh_name.
1938 (elf_fake_sections): Don't rename DWARF debug section for
1939 linker output if it will be compressed. Instead, set
1940 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
1941 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
1942 sh_name != (unsigned int) -1. Don't finalize nor assign
1943 shstrtab section here. Delay setting output section names to
1944 _bfd_elf_write_object_contents.
1945 (_bfd_elf_compute_section_file_positions): Update comments on
1946 sh_offset for shstrtab section.
1947 (assign_file_positions_for_non_load_sections): Set sh_offset to
1948 -1 for shstrtab section.
1949 (assign_file_positions_except_relocs): Likewise.
1950 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
1951 when compressing DWARF debug sections. Place shstrtab section
1952 after DWARF debug sections have been compressed.
1953 (_bfd_elf_write_object_contents): Setting sh_name for output
1956 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1959 * bfd.c (bfd): Add is_linker_input.
1960 * elf.c (convert_debug_to_zdebug): New.
1961 (convert_zdebug_to_debug): Likewise.
1962 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
1963 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
1964 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
1965 instead of a pointer to section.
1966 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
1968 * section.c (SEC_ELF_RENAME): New.
1969 * bfd-in2.h: Regenerated.
1971 2015-04-23 Alan Modra <amodra@gmail.com>
1973 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
1974 (ppc64_elf_next_toc_section): Align multi-got toc base.
1975 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
1977 2015-04-22 H.J. Lu <hongjiu.lu@intel.com>
1980 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
1981 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
1982 (elf_i386_create_dynamic_sections): Always allow copy relocs for
1983 building executables.
1984 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
1985 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
1986 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
1987 PIE and R_386_GOTOFF.
1988 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
1990 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1992 * elf.c (assign_section_numbers): Always set up sh_name.
1994 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1996 * elf.c (assign_file_positions_for_non_load_sections): Iterate
1997 sections by pointer.
1998 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
2000 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
2002 * bfd-in.h (compressed_debug_section_type): New.
2003 * compress.c (bfd_compress_section_contents): Add an argument
2004 for linker write compression and always generate .zdebug_*
2005 section when linking.
2006 (bfd_init_section_compress_status): Pass FALSE to
2007 bfd_compress_section_contents.
2008 (bfd_compress_section): New function.
2009 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
2010 on DWARF debug sections if COMPRESS_DEBUG is set and rename
2011 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
2012 (assign_file_positions_for_non_load_sections): Set sh_offset
2013 to -1 if SEC_ELF_COMPRESS is set.
2014 (assign_file_positions_except_relocs): Likwise.
2015 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
2016 (_bfd_elf_assign_file_positions_for_non_load): This. Change
2017 return time to bfd_boolean. Compress the section if
2018 SEC_ELF_COMPRESS is set.
2019 (_bfd_elf_write_object_contents): Updated.
2020 (_bfd_elf_set_section_contents): Write section contents to
2021 the buffer if SEC_ELF_COMPRESS is set.
2022 * merge.c: Include "elf-bfd.h".
2023 (sec_merge_emit): Add arguments for contents and offset. Write
2024 to contents with offset if contents isn't NULL.
2025 (_bfd_write_merged_section): Write section contents to the
2026 buffer if SEC_ELF_COMPRESS is set. Pass contents and
2027 output_offset to sec_merge_emit.
2028 * elflink.c (bfd_elf_final_link): Allocate the buffer for
2029 output section contents if SEC_ELF_COMPRESS is set.
2030 * section.c (SEC_ELF_COMPRESS): New.
2031 * bfd-in2.h: Regenerated.
2033 2015-04-15 Alan Modra <amodra@gmail.com>
2035 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
2037 2015-04-14 Nick Clifton <nickc@redhat.com>
2039 * elf32-rl78.c (RL78_OP_REL): New macro.
2040 (rl78_elf_howto_table): Use it for complex relocs.
2041 (get_symbol_value): Handle the cases when the info or status
2043 (get_romstart): Cache the status returned by get_symbol_value.
2044 (get_ramstart): Likewise.
2045 (RL78_STACK_PUSH): Generate an error message if the stack
2047 (RL78_STACK_POP): Likewise for underflows.
2048 (rl78_compute_complex_reloc): New function. Contains the basic
2049 processing code for all RL78 complex relocs.
2050 (rl78_special_reloc): New function. Provides special reloc
2051 handling for complex relocs.
2052 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
2053 (rl78_offset_for_reloc): Likewise.
2055 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
2058 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
2059 info->extern_protected_data when warning copy relocs against
2061 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
2062 when checking protected non-function symbols.
2064 2015-04-13 John Baldwin <jhb@FreeBSD.org>
2066 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
2068 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
2070 2015-04-13 H.J. Lu <hongjiu.lu@intel.com>
2073 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
2074 if the object has been claimed by plugin.
2076 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
2078 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
2079 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
2080 protected data symbol when building shared library.
2081 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
2082 R_X86_64_GOTOFF64 against undefined symbol and replace
2083 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
2084 R_X86_64_GOTOFF64 against protected data symbol when building
2087 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2090 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
2091 against protected data symbol when building shared library.
2092 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
2093 R_X86_64_GOTOFF64 against protected data symbol when building
2096 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2100 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2101 * elf32-i386.c (elf_backend_extern_protected_data): New.
2103 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2104 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2105 copy relocs against protected symbols if extern_protected_data
2107 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2108 non-function symbols if extern_protected_data is true.
2109 * elfxx-target.h (elf_backend_extern_protected_data): New.
2111 (elfNN_bed): Initialize extern_protected_data with
2112 elf_backend_extern_protected_data.
2114 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2116 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
2117 and free with bfd_alloc and bfd_release on compressed buffer.
2118 Release buffer if compressed section isn't smaller.
2120 2015-04-10 Alan Modra <amodra@gmail.com>
2123 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
2124 on adding a protected visibility variable to .dynbss.
2126 2015-04-10 Alan Modra <amodra@gmail.com>
2128 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
2131 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
2132 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
2133 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2134 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
2135 extern_protected_data test.
2136 (_bfd_elf_symbol_refs_local_p): Likewise.
2137 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
2138 (elfNN_bed): Delete elf_backend_extern_protected_data init.
2140 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
2142 * compress.c (bfd_compress_section_contents): Update comments.
2143 (bfd_init_section_decompress_status): Likewise.
2144 (bfd_init_section_compress_status): Likewise.
2146 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
2148 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
2150 (TARGET_LITTLE_SYM): Likewise.
2152 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2154 * elf32-xtensa.c (splay-tree.h): include header.
2155 (text_action_struct): drop next pointer.
2156 (text_action_list_struct): drop head pointer, add count and
2158 (find_fill_action): instead of linear search in text_action_list
2160 (text_action_compare, action_first, action_next): new functions.
2161 (text_action_add, text_action_add_literal): instead of linear
2162 search and insertion insert new node into the tree.
2163 (removed_by_actions): pass additional parameter: action_list,
2164 use it to traverse the tree.
2165 (offset_with_removed_text): pass additional action_list parameter
2166 to removed_by_actions.
2167 (map_action_fn_context): new typedef.
2168 (map_action_fn_context_struct): new structure.
2169 (map_action_fn): new function.
2170 (map_removal_by_action): use splay_tree_foreach to build map.
2171 (find_insn_action): replace linear search in text_action_list
2172 with series of splay_tree_lookups.
2173 (print_action, print_action_list_fn): new functions.
2174 (print_action_list): use splay_tree_foreach.
2175 (init_xtensa_relax_info): drop action_list.head initialization.
2176 Initialize the tree.
2177 (compute_text_actions): use non-zero action_list_count instead of
2178 non-NULL action list.
2179 (xlate_map_context): new typedef.
2180 (xlate_map_context_struct): new structure.
2181 (xlate_map_fn): new function.
2182 (build_xlate_map): use splay_tree_foreach to build map.
2183 (action_remove_bytes_fn): new function.
2184 (relax_section): use zero action_list_count instead of NULL
2185 action list. Use splay_tree_foreach to count final section size.
2186 Drop unused variable 'removed'.
2188 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2190 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
2191 (removed_literal_map_entry_struct): new structure.
2192 (removed_literal_list_struct): add new fields: n_map and map.
2193 (map_removed_literal, removed_literal_compare): new functions.
2194 (find_removed_literal): build index array for literals ordered
2195 by VMA, use binary search to find removed literal.
2197 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2199 * elf32-xtensa.c (removal_by_action_entry_struct,
2200 removal_by_action_map_struct): new structures.
2201 (removal_by_action_entry, removal_by_action_map): new typedefs.
2202 (text_action_list_struct): add new field: map.
2203 (map_removal_by_action, removed_by_actions_map,
2204 offset_with_removed_text_map): new functions.
2205 (relax_section): replace offset_with_removed_text with
2206 offset_with_removed_text_map.
2207 (translate_reloc, relax_property_section, relax_section_symbols):
2208 replace removed_by_actions with removed_by_actions_map.
2210 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2212 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
2213 reloc_range): new typedef.
2214 (reloc_range_list_struct, reloc_range_list_entry_struct,
2215 reloc_range_struct): new structures.
2216 (reloc_range_compare, build_reloc_ranges,
2217 reloc_range_list_append, reloc_range_list_remove,
2218 reloc_range_list_update_range, free_reloc_range_list): new
2220 (compute_text_actions): precompute relocation opcodes before the
2221 loop. Add relevant_relocs variable, initialize it before the
2222 loop, pass it to the check_section_ebb_pcrels_fit.
2223 (check_section_ebb_pcrels_fit): add new parameter:
2224 relevant_relocs. Update address range in the relevant_relocs if
2225 it's non-NULL and iterate only over relevant relocations.
2227 2015-04-09 Nick Clifton <nickc@redhat.com>
2229 * elf32-rx.c (describe_flags): Report the settings of the string
2231 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
2234 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2236 * compress.c (bfd_compress_section_contents): Work around a GCC
2237 uninitialized warning bug fixed in GCC 4.7.
2239 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2241 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
2243 * bfd.c (bfd::flags): Increase size to 18 bits.
2244 (BFD_COMPRESS_GABI): New.
2245 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
2246 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
2247 (bfd_update_compression_header): New fuction.
2248 (bfd_check_compression_header): Likewise.
2249 (bfd_get_compression_header_size): Likewise.
2250 (bfd_is_section_compressed_with_header): Likewise.
2251 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
2252 (bfd_compress_section_contents): Return the uncompressed size if
2253 the full section contents is compressed successfully. Support
2254 converting from/to .zdebug* sections.
2255 (bfd_get_full_section_contents): Call
2256 bfd_get_compression_header_size to get compression header size.
2257 (bfd_is_section_compressed): Renamed to ...
2258 (bfd_is_section_compressed_with_header): This. Add a pointer
2259 argument to return compression header size.
2260 (bfd_is_section_compressed): Use it.
2261 (bfd_init_section_decompress_status): Call
2262 bfd_get_compression_header_size to get compression header size.
2263 Return FALSE if uncompressed section size is 0.
2264 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
2265 from/to .zdebug* sections.
2266 * bfd-in2.h: Regenerated.
2268 2015-04-07 Alan Modra <amodra@gmail.com>
2270 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
2271 mapped to output .got section.
2273 2015-04-07 Alan Modra <amodra@gmail.com>
2275 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
2276 and has_addr16_lo. Make has_sda_refs a bitfield.
2277 (ppc_elf_check_relocs): Set new flags.
2278 (ppc_elf_link_hash_table_create): Update default_params.
2279 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
2280 where we won't be making .dynbss entries or editing code. Set
2281 params->pic_fixup when we'll edit code for protected var access.
2282 (allocate_dynrelocs): Allocate got entry for edited code and
2284 (struct ppc_elf_relax_info): Add picfixup_size.
2285 (ppc_elf_relax_section): Rename struct one_fixup to struct
2286 one_branch_fixup. Rename fixups to branch_fixups. Size space for
2288 (ppc_elf_relocate_section): Edit non-PIC accessing protected
2289 visibility variables to PIC. Don't emit dyn_relocs for code
2291 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
2293 2015-04-07 Nick Clifton <nickc@redhat.com>
2295 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
2296 local labels as local.
2298 2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
2300 * compress.c (get_uncompressed_size): Removed.
2301 (bfd_compress_section_contents): Use bfd_putb64 to write
2302 uncompressed section size.
2303 (bfd_init_section_decompress_status): Replace
2304 get_uncompressed_size with bfd_getb64.
2306 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2308 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
2309 SHF_COMPRESSED bit if not decompress.
2311 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2313 * compress.c (get_uncompressed_size): New. Extracted from ...
2314 (bfd_init_section_decompress_status): This. Use it.
2316 2015-04-02 Andrew Turner <andrew@freebsd.org>
2318 * config.bfd: Add aarch64-*-freebsd* target triple.
2320 2015-04-02 H.J. Lu <hongjiu.lu@intel.com>
2322 * configure: Regenerated.
2324 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
2325 Marcus Shawcroft <marcus.shawcroft@arm.com>
2326 Jiong Wang <jiong.wang@arm.com>
2328 * bfd-in.h (bfd_elf64_aarch64_set_options)
2329 (bfd_elf32_aarch64_set_options): Add parameter.
2330 * bfd-in2.h: Regenerated.
2331 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
2332 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
2333 (_bfd_aarch64_erratum_843419_stub_name)
2334 (_bfd_aarch64_erratum_843419_fixup)
2335 (_bfd_aarch64_erratum_843419_scan)
2336 (_bfd_aarch64_erratum_843419_branch_to_stub)
2337 (_bfd_aarch64_erratum_843419_p): Define.
2338 (enum elf_aarch64_stub_type): Define
2339 aarch64_stub_erratum_843419_veneer.
2340 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
2341 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
2342 and fix_erratum_843419_adr.
2343 (stub_hash_newfunc): Initialize adrp_offset;
2344 (_bfd_aarch64_add_stub_entry_after): Define.
2345 (aarch64_map_one_stub, aarch64_build_one_stub)
2346 (aarch64_size_one_stub): Handle
2347 aarch64_stub_erratum_843419_veneer.
2348 (_bfd_aarch64_resize_stubs): Round stub section size.
2349 (elfNN_aarch64_size_stubs): Add scan for 843419.
2350 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
2351 fix_erratum_843419 and fix_erratum_843419_adr.
2352 (struct erratum_835769_branch_to_stub_data): Add info.
2353 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
2354 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
2355 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
2356 (_bfd_aarch64_sign_extend): Define.
2357 (reencode_adr_imm): Remove static. Rename to:
2358 (_bfd_aarch64_reencode_adr_imm): Define.
2359 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
2360 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
2361 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
2362 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
2365 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
2367 * configure: Regenerated.
2369 2015-03-31 Ed Schouten <ed@nuxi.nl>
2371 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
2372 for x86_64-*-cloudabi*.
2373 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
2374 * configure: Regenerated.
2375 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
2376 (TARGET_LITTLE_NAME): Likewise.
2377 (ELF_OSABI): Likewise.
2378 (elf64_bed): Likewise.
2379 * targets.c (x86_64_elf64_cloudabi_vec): New.
2380 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
2382 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
2384 * configure.ac: Revert the AM_ZLIB change.
2385 * Makefile.in: Regenerated.
2386 * aclocal.m4: Likewise.
2387 * configure: Likewise.
2388 * doc/Makefile.in: Likewise.
2390 2015-03-30 H.J. Lu <hongjiu.lu@intel.com>
2393 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
2394 (_bfd_elf_get_reloc_section): New.
2395 * elf.c (_bfd_elf_get_reloc_section): Likewise.
2396 (assign_section_numbers): Call get_reloc_section to look up the
2397 section the relocs apply.
2398 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
2399 (elfNN_bed): Initialize get_reloc_section with
2400 elf_backend_get_reloc_section.
2402 2015-03-29 H.J. Lu <hongjiu.lu@intel.com>
2404 * Makefile.am (ZLIB): New.
2405 (ZLIBINC): Likewise.
2406 (AM_CFLAGS): Add $(ZLIBINC).
2407 (libbfd_la_LIBADD): Add $(ZLIB).
2408 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
2409 (decompress_contents): Don't check HAVE_ZLIB_H.
2410 (bfd_compress_section_contents): Likewise.
2411 (bfd_get_full_section_contents): Likewise.
2412 (bfd_init_section_decompress_status): Likewise.
2413 (bfd_init_section_compress_status): Likewise.
2414 * configure.ac (AM_ZLIB): Removed.
2415 (zlibdir): New. AC_SUBST.
2416 (zlibinc): Likewise.
2417 Add --with-system-zlib.
2418 * Makefile.in: Regenerated.
2419 * acinclude.m4: Likewise.
2420 * config.in: Likewise.
2421 * configure: Likewise.
2422 * doc/Makefile.in: Likewise.
2424 2015-03-27 Alan Modra <amodra@gmail.com>
2428 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
2429 protected_def when symbol section is read-only. Adjust all calls.
2430 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
2432 2015-03-26 Tejas Belagod <tejas.belagod@arm.com>
2434 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
2435 _bfd_final_link_relocate with aarch64_relocate.
2437 2015-03-26 H.J. Lu <hongjiu.lu@intel.com>
2440 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
2441 (bfd_elf_gc_sections): Likewise.
2443 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2445 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
2446 size for initial branch.
2447 (elfNN_aarch64_build_stubs): Write initial branch.
2448 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
2449 mapping symbol on initial branch.
2451 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2453 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
2454 Update erratum count.
2456 2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2458 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
2459 first matching debug section.
2461 2015-03-24 H.J. Lu <hongjiu.lu@intel.com>
2464 * compress.c (bfd_compress_section_contents): Don't write the
2465 zlib header and set contents as well as compress_status if
2466 compression didn't make the section smaller.
2467 (bfd_init_section_compress_status): Don't check compression
2470 2015-03-24 Nick Clifton <nickc@redhat.com>
2473 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
2474 range auxillary sections.
2476 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2478 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
2480 (_bfd_aarch64_get_stub_for_link_section): Define.
2482 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2484 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
2485 update of section_group[].stub_sec.
2487 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2489 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
2490 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
2491 Delete fixes, fix_table_size and associated code. Call
2492 _bfd_aarch64_add_stub_entry_in_group. Rename to...
2493 (bfd_aarch64_erratum_835769_scan): Define.
2494 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
2495 erratum_835769_fix_table_size, i and associated code. Relocate
2496 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
2497 correction. Delete construction of stub entry from
2498 erratum_835769_fixes array.
2500 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2502 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
2503 _bfd_aarch64_add_stub_entry_in_group.
2505 2015-03-24 Alan Modra <amodra@gmail.com>
2507 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
2508 stubs, even those for undefined weak symbols. Otherwise, don't
2509 report relocation overflow on branches to undefined strong
2510 symbols. Fix memory leak.
2511 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
2512 overflow on branches to undefined strong symbols.
2514 2015-03-23 Keith Seitz <keiths@redhat.com>
2516 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
2519 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2521 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
2522 construction into...
2523 (_bfd_aarch64_erratum_835769_stub_name): Define.
2525 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2527 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
2528 stub resize code into...
2529 (bfd_aarch64_resize_stubs): Define.
2531 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2533 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
2534 creation code into...
2535 (bfd_aarch64_create_stub_section): Define.
2537 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2539 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
2540 from elf_aarch64_create_or_find_stub_sec.
2541 (_bfd_aarch64_add_stub_entry_in_group): Rename from
2542 elfNN_aarch64_add_stub. Call
2543 _bfd_aarch64_create_or_find_stub_sec.
2544 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
2545 _bfd_aarch64_add_stub_entry_in_group.
2547 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2549 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
2550 sense of boolean return.
2551 (elfNN_aarch64_size_stubs): Adjust for above.
2553 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2555 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
2556 Remove unused parameter.
2557 (elfNN_aarch64_size_stubs): Adjust for above.
2559 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2561 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
2563 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2565 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
2566 (num_aarch64_erratum_835769_fixes): Remove.
2567 (elfNN_aarch64_size_stubs): Remove assignments to above.
2569 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2571 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
2573 (aarch64_erratum_seqeunce): Rename rtn to rt2.
2575 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2577 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
2579 2015-03-19 Nick Clifton <nickc@redhat.com>
2581 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
2582 the RL78 core based upon the flags.
2583 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
2585 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
2586 (elf32_rl78_machine): Always return bfd_mach_rl78.
2588 2015-03-19 Nick Clifton <nickc@redhat.com>
2591 * compress.c (bfd_compress_section_contents): Do not define this
2592 function if it is not used.
2594 2015-03-18 H.J. Lu <hongjiu.lu@intel.com>
2596 * compress.c (bfd_compress_section_contents): Make it static.
2597 * bfd/bfd-in2.h: Regenerated.
2599 2015-03-18 Eric Youngdale <eyoungdale@ptc.com>
2602 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
2603 suitable for the AMD64.
2605 2015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
2606 Nick Clifton <nickc@redhat.com>
2609 * coffgen.c (make_a_section_from_file): Only prepend a z to a
2610 debug section's name if the section was actually compressed.
2611 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
2612 * compress.c (bfd_init_section_compress_status): Do not compress
2613 the section if doing so would make it bigger. In such cases leave
2614 the section alone and return COMPRESS_SECTION_NONE.
2616 2015-03-17 Alan Modra <amodra@gmail.com>
2618 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
2619 on nothing to do, before malloc of returned symbol array.
2621 2015-03-16 Nick Clifton <nickc@redhat.com>
2623 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
2624 stored in the elf_section_data structure then load them as
2627 2015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2629 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
2630 relocs against code sections.
2631 * elf32-s390.c: Define elf_backend_sort_relocs_p.
2632 * elf64-s390.c: Likewise.
2634 2015-03-11 Alan Modra <amodra@gmail.com>
2636 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
2637 reverse order. Account for larger size of __tls_get_addr_opt stub.
2639 2015-03-10 Yuri Gribov <y.gribov@samsung.arm>
2642 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
2644 (elf32_arm_print_private_bfd_data): Likewise.
2646 2015-03-06 Nick Clifton <nickc@redhat.com>
2649 * elflink.c (put_value): Like previous delta, but for the 32-bit
2652 2015-03-05 Nick Clifton <nickc@redhat.com>
2655 * elflink.c (put_value): Avoid using an undefined shift
2658 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
2662 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2663 * elf32-i386.c (elf_backend_extern_protected_data): New.
2665 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2666 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2667 copy relocs against protected symbols if extern_protected_data
2669 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2670 non-function symbols if extern_protected_data is true.
2671 * elfxx-target.h (elf_backend_extern_protected_data): New.
2673 (elfNN_bed): Initialize extern_protected_data with
2674 elf_backend_extern_protected_data.
2676 2015-03-05 Nick Clifton <nickc@redhat.com>
2679 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
2680 lookup fails, check for an address bias in the dwarf info, and if
2681 one exists, retry the lookup with the biased value.
2682 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
2683 Determines if a bias exists bewteen the addresses of functions
2684 based on DWARF information vs symbol table information.
2685 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
2686 * libbfd.h: Regenerate.
2688 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2690 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
2691 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
2692 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
2694 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2696 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
2697 (aarch64_size_one_stub): Likewise.
2698 (aarch64_map_one_stub): Likewise.
2700 2015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
2702 * cpu-s390.c (N): New macro.
2703 (bfd_s390_31_arch): New. Define only if default target word size
2704 is 64 bits. Otherwise define...
2705 (bfd_390_64_arch): ...this. Make static.
2706 (bfd_s390_arch): Define according to the default target word size.
2707 Let the 'next' field point to the alternate arch.
2709 2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
2712 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
2713 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
2714 to be used with MOVK rather than MOVZ.
2716 2015-03-03 DJ Delorie <dj@redhat.com>
2718 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
2721 2015-02-28 Alan Modra <amodra@gmail.com>
2723 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
2726 2015-02-27 H.J. Lu <hongjiu.lu@intel.com>
2728 * elf32-i386.c (need_convert_mov_to_lea): New.
2729 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
2730 (elf_i386_convert_mov_to_lea): Return TRUE if
2731 need_convert_mov_to_lea is unset.
2732 * elf64-x86-64.c (need_convert_mov_to_lea): New.
2733 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
2734 (elf_x86_64_convert_mov_to_lea): Return TRUE if
2735 need_convert_mov_to_lea is unset.
2737 2015-02-27 Nick Clifton <nickc@redhat.com>
2740 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
2741 string length overflow when the string table length is actually
2744 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
2746 * bfd/bfd-in2.h: Regenerate.
2747 * bfd/libbfd.h: Regenerate.
2749 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2751 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
2752 TLSDESC_LD_PREL19 field width and masks.
2753 (aarch64_tls_transition_without_check)
2754 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2755 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2756 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2757 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
2758 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2759 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2761 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2763 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
2765 (aarch64_tls_transition_without_check)
2766 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2767 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2768 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2769 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
2770 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2771 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2772 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2774 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2776 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
2777 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
2778 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2779 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2780 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2781 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
2782 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2783 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2784 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2786 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2788 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
2789 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
2790 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
2791 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
2792 (elfNN_aarch64_check_relocs): Handle
2793 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
2795 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2796 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2798 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2800 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
2802 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2804 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
2805 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
2806 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
2809 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2811 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
2814 2015-02-26 Nick Clifton <nickc@redhat.com>
2817 * coffcode.h (coff_compute_section_file_positions): Report
2818 negative page sizes.
2819 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
2820 (assign_file_positions_for_non_load_sections): Replace assertion
2821 with an error message.
2822 (rewrite_elf_program_header): Handle excessive segment
2824 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
2825 (bfd_mach_o_read_section_64): Likewise.
2826 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
2827 print a bfd name, not %A.
2829 2015-02-26 Alan Modra <amodra@gmail.com>
2831 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
2832 thread-safe stubs for iplt.
2833 (build_tls_get_addr_stub): Restore r2 immediately after call.
2835 2015-02-26 Terry Guo <terry.guo@arm.com>
2837 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
2838 merge Tag_ABI_HardFP_use.
2840 2015-02-26 Alan Modra <amodra@gmail.com>
2842 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
2843 Use text relocs rather than giving an error on trying to use
2844 .dynbss for protected shared lib vars.
2845 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
2847 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2849 * elf32-avr.c (struct elf_avr_section_data): New structure.
2850 (struct avr_relax_info): New structure.
2851 (elf_avr_new_section_hook): New function.
2852 (struct elf_avr_section_data): Add relax_info.
2853 (get_avr_relax_info): New function.
2854 (init_avr_relax_info): New function.
2855 (elf32_avr_relax_delete_bytes): Find next property record before
2856 deleting bytes. When deleting don't move bytes beyond the next
2858 (avr_elf32_assign_records_to_section): New function.
2859 (avr_property_record_compare): New function.
2860 (avr_load_all_property_sections): New function.
2861 (elf32_avr_relax_section): Load property data. After relaxing the
2862 section, move any .align directives that have enough deleted bytes
2864 (bfd_elf32_new_section_hook): Define.
2866 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2868 * elf32-avr.h (struct avr_property_header): New strucure.
2869 (avr_elf32_load_property_records): Declare.
2870 (avr_elf32_property_record_name): Declare.
2871 * elf32-avr.c: Add bfd_stdint.h include.
2872 (retrieve_local_syms): New function.
2873 (get_elf_r_symndx_section): New function.
2874 (get_elf_r_symndx_offset): New function.
2875 (internal_reloc_compare): New function.
2876 (struct avr_find_section_data): New structure.
2877 (avr_is_section_for_address): New function.
2878 (avr_find_section_for_address): New function.
2879 (avr_elf32_load_records_from_section): New function.
2880 (avr_elf32_load_property_records): New function.
2881 (avr_elf32_property_record_name): New function.
2883 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2885 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
2886 (AVR_PROPERTY_RECORDS_VERSION): Define.
2887 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
2888 (struct avr_property_record): New structure.
2890 2015-02-24 Nick Clifton <nickc@redhat.com>
2892 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
2894 (v850_elf_make_note_section): New function. Creates a note
2896 (v850_elf_create_sections): New function. Create a note section
2897 if one is not already present.
2898 (v850_elf_set_note): New function. Adds a note to a bfd.
2899 (v850_elf_copy_private_bfd_data): New function. Copies V850
2901 (v850_elf_merge_notes): New function. Merges V850 notes.
2902 (print_v850_note): New function. Displays a V850 note.
2903 (v850_elf_print_notes): New function. Displays all notes attached
2905 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
2906 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
2907 (v850_elf_fake_sections): Set the type of the V850 note section.
2908 * bfd-in.h (v850_elf_create_sections): Add prototype.
2909 (v850_elf_set_note): Add prototype.
2910 * bfd-in2.h: Regenerate.
2912 2015-02-24 Nick Clifton <nickc@redhat.com>
2914 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
2915 * configure: Regenerate.
2916 * config.in: Regenerate.
2917 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
2918 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
2919 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
2922 2015-02-24 Nick Clifton <nickc@redhat.com>
2924 * pdp11.c (set_section_contents): Pad the .text and .data sections
2925 to their aligned sizes.
2927 2015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
2929 * config.bfd: Add h8300-*-linux.
2930 * configure.ac: Add h8300_elf32_linux_vec.
2931 * configure: Regenerate.
2932 * elf32-h8300.c: Likewise.
2933 * targets.c(_bfd_target_vector): Likewise.
2935 2015-02-23 Nick Clifton <nickc@redhat.com>
2938 * cpu-w65.c: Correct typos in license notice.
2941 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
2942 symbols at end of sections. Adjust function sizes.
2944 2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
2946 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
2947 (elfcore_write_s390_vxrs_high): Likewise.
2948 * elf.c (elfcore_grok_s390_vxrs_low): New function.
2949 (elfcore_grok_s390_vxrs_high): New function.
2950 (elfcore_grok_note): Call them.
2951 (elfcore_write_s390_vxrs_low): New function.
2952 (elfcore_write_s390_vxrs_high): New function.
2953 (elfcore_write_register_note): Call them.
2955 2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
2958 * verilog.c (verilog_write_record): Correct buffer size.
2960 2015-02-19 Alan Modra <amodra@gmail.com>
2962 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
2964 2015-02-19 Alan Modra <amodra@gmail.com>
2967 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
2968 (elf_link_output_extsym): Drop local and global undefined syms.
2969 Tidy. Expand comment.
2971 2015-02-17 Alan Modra <amodra@gmail.com>
2974 * elflink.c (struct elf_outext_info): Remove need_second_pass
2976 (elf_link_output_extsym): Delete code handling second forced
2977 local pass. Move code emitting NULL STT_FILE symbol later, so
2978 that it can be omitted if forced local is stripped. Don't
2979 emit the NULL STT_FILE if no file symbols have been output.
2980 (bfd_elf_final_link): Remove second forced local pass.
2981 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
2982 (ppc_elf_size_dynamic_sections): Likewise.
2983 * elf64-ppc.c (ppc_build_one_stub): Likewise.
2984 (build_global_entry_stubs): Likewise.
2985 (ppc64_elf_build_stubs): Likewise.
2987 2015-02-16 H.J. Lu <hongjiu.lu@intel.com>
2990 * elflink.c (elf_link_output_extsym): Only check filesym_count
2991 when outputting a NULL FILE symbol. Set second_pass_sym to
2992 h->forced_local && !h->root.linker_def.
2994 2015-02-15 H.J. Lu <hongjiu.lu@intel.com>
2996 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
2997 on _TLS_MODULE_BASE_.
2998 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
3000 2015-02-15 Alan Modra <amodra@gmail.com>
3002 * dwarf2.c (read_rangelist): Correct buffer overflow check
3003 Whitespace throughout file.
3005 2015-02-14 Alan Modra <amodra@gmail.com>
3008 * bfd.c (struct bfd): Add lto_output.
3009 * linker.c (_bfd_handle_already_linked): Explicitly test for
3010 objects added by the lto plugin.
3011 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
3012 no_export flags from archive.
3013 * archive.c (open_nested_file): New function, setting lto_output
3014 and no_export, extracted from..
3015 (find_nested_archive): ..here. Flip params. Rename from
3016 _bfd_find_nested_archive.
3017 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
3018 (_bfd_look_for_bfd_in_cache): Copy no_export.
3019 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
3020 my_archive->no_export test.
3021 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
3022 Don't use the file name when adding lto_output STT_FILE sym.
3023 * bfd-in2.h: Regenerate.
3025 2015-02-13 Alan Modra <amodra@gmail.com>
3028 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
3029 now redundant assert.
3031 2015-02-12 Nick Clifton <nickc@redhat.com>
3034 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
3035 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
3036 (read_indirect_string, read_alt_indirect_string)
3037 (read_alt_indirect_ref, read_address, read_abbrevs)
3038 (read_attribute_value, read_attribute, decode_line_info)
3039 (find_abstract_instance_name, read_rangelist)
3040 (scan_unit_for_symbols, parse_comp_unit)
3041 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
3042 end pointers to reading functions and check for offsets taking
3043 pointers out of range. Replace calls to read_*_leb128 with calls
3044 to safe_read_leb128.
3046 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
3048 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
3049 computed file_name address being before the start of the string
3052 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
3055 * bfd.c (bfd_plugin_format): New.
3056 (bfd): Add plugin_format and plugin_dummy_bfd.
3057 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
3058 argument to return TRUE if any plugin is found. Set plugin_format.
3060 (bfd_plugin_target_p): New.
3061 (bfd_plugin_specified_p): Likewise.
3062 (bfd_plugin_target_p): Likewise.
3063 (register_ld_plugin_object_p): Likewise.
3064 (bfd_plugin_set_plugin): Set has_plugin.
3065 (load_plugin): Cache try_load_plugin result.
3066 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
3068 * plugin.h (bfd_plugin_target_p): New.
3069 (bfd_plugin_specified_p): Likewise.
3070 (register_ld_plugin_object_p): Likewise.
3071 * bfd-in2.h: Regenerated.
3073 2015-02-11 Pedro Alves <palves@redhat.com>
3075 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
3076 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
3077 * libbfd.h: Regenerate.
3078 * libcoff.h: Regenerate.
3080 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
3081 * mach-o.h [__cplusplus]: Wrap in extern "C".
3082 * som.h [__cplusplus]: Wrap in extern "C".
3084 2015-02-10 Nick Clifton <nickc@redhat.com>
3087 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
3089 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
3090 size and number of relocs.
3091 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
3093 * versados.c (process_otr): Check the esdid value before using it
3094 to access the EDATA.
3096 2015-02-09 Ed Maste <emaste@freebsd.org>
3098 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
3099 uninitialized and unused variable.
3100 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3102 2015-02-09 Alan Modra <amodra@gmail.com>
3104 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
3106 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3107 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
3109 2015-02-09 Alan Modra <amodra@gmail.com>
3111 * elflink.c: Whitespace, formatting fixes.
3112 (elf_link_input_bfd): Clarify comment.
3113 (elf_link_output_extsym): Exclude symbols in linker created
3114 sections when testing for plugin symbols.
3116 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
3119 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
3120 warning for relocation in readonly section for -z text.
3121 (elf_i386_size_dynamic_sections): Likewise.
3122 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
3123 (elf_x86_64_size_dynamic_sections): Likewise.
3125 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
3129 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
3130 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
3131 referenced from a non-IR file.
3133 2015-02-06 Nick Clifton <nickc@redhat.com>
3136 * peXXigen.c (rsrc_print_resource_entries): Add range check for
3137 addresses that wrap around the address space.
3138 (rsrc_parse_entry): Likewise.
3140 2015-02-03 H.J. Lu <hongjiu.lu@intel.com>
3144 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
3145 undefined if it is referenced from a non-IR file.
3147 2015-02-03 Nick Clifton <nickc@redhat.com>
3150 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
3151 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
3152 index or an out of range fdr index.
3153 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
3154 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
3155 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
3156 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
3157 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
3158 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
3159 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3160 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
3161 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
3162 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
3163 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
3164 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
3165 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3166 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
3167 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
3168 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
3169 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
3170 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
3171 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
3172 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
3173 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
3174 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3175 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
3176 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
3177 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3178 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
3179 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
3180 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
3181 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
3182 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
3183 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3184 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3185 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
3186 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
3187 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3188 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3189 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
3190 * elf32-vax.c (rtype_to_howto): Likewise.
3191 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
3192 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
3193 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
3194 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3195 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
3196 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
3197 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
3198 of range symbol indicies.
3199 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
3200 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
3201 (bfd_mach_o_build_dysymtab): Likewise.
3202 (bfd_mach_o_write_symtab_content): Set the string table size to
3204 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
3206 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
3208 * tekhex.c (first_phase): Check for src pointer reaching end of
3211 2015-02-03 Will Newton <will.newton@linaro.org>
3213 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
3214 Set st_value to zero for undefined symbols if the reference
3215 is weak or pointer_equality_needed is FALSE.
3217 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
3218 comment discussing why we clear st_value for some symbols.
3220 2015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3222 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
3223 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
3225 2015-01-29 Alan Modra <amodra@gmail.com>
3227 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
3228 optimization. Tidy mask for GOT_TLSGD optimization.
3229 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
3230 location of nop zapping high insn too.
3232 2015-01-28 Alan Modra <amodra@gmail.com>
3234 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
3235 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
3236 in .toc indicate xlc compiled code that might require a rw .toc.
3238 2015-01-28 James Bowman <james.bowman@ftdichip.com>
3240 * Makefile.am: Add FT32 files.
3241 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
3242 (bfd_mach_ft32): Define.
3243 (bfd_ft32_arch): Declare.
3244 (bfd_archures_list): Add bfd_ft32_arch.
3245 * config.bfd: Handle FT32.
3246 * configure.ac: Likewise.
3247 * cpu-ft32.c: New file.
3248 * elf32-ft32.c: New file.
3249 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
3250 BFD_RELOC_FT32_18): Define.
3251 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
3252 * bfd-in2.h: Regenerate.
3253 * libbfd.h: Regenerate.
3254 * Makefile.in: Regenerate.
3255 * configure: Regenerate.
3256 * po/SRC-POTFILES.in: Regenerate.
3258 2015-01-27 Nick Clifton <nickc@redhat.com>
3261 * pdp11.c (aout_get_external_symbols): Return false if there are
3264 * dwarf2.c (concat_filename): Check for an empty directory table.
3265 (scan_unit_for_symbols): Check for reading off the end of the
3267 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
3269 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
3272 2015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3274 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
3276 2015-01-22 DJ Delorie <dj@redhat.com>
3278 * elf32-m32c.c (m32c_apply_reloc_24): New.
3279 (m32c_elf_howto_table): Use it for R_M32C_24.
3280 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
3282 2015-01-22 Nick Clifton <nickc@redhat.com>
3285 * coffcode.h (handle_COMDAT): When searching for the section
3286 symbol, make sure that there is space left in the symbol table.
3287 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
3289 2015-01-21 Nick Clifton <nickc@redhat.com>
3292 * coffcode.h (coff_set_arch_mach_hook): Check return value from
3294 (coff_slurp_line_table): Return FALSE if the line number
3295 information was corrupt.
3296 (coff_slurp_symbol_table): Return FALSE if the symbol information
3298 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
3299 initialise the fields of the dyld_info structure.
3300 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
3301 error message and a return value.
3302 (bfd_mach_o_layout_commands): Change the function to boolean.
3303 Return FALSE if the function fails.
3304 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
3306 (bfd_mach_o_read_command): Fail if an unrecognised command is
3308 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
3310 (slurp_symtab): Check the return from bfd_malloc.
3311 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
3312 encountered an error.
3313 (_bfd_XXi_final_link_postscript): Fail if a section could not be
3315 * peicode.h (pe_bfd_object_p): Fail if the header could not be
3317 * tekhex.c (first_phase): Fail if the section is too big.
3318 * versados.c (struct esdid): Add content_size field.
3319 (process_otr): Use and check the new field.
3320 (versados_get_section_contents): Check that the section exists and
3321 that the requested data is available.
3323 2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
3325 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
3327 2015-01-20 Alan Modra <amodra@gmail.com>
3330 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
3331 ELF_COMMON_DEF syms.
3333 2015-01-19 Alan Modra <amodra@gmail.com>
3336 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
3337 linker script assignments too.
3338 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
3339 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
3341 2015-01-19 Alan Modra <amodra@gmail.com>
3343 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
3344 to allow return of first howto.
3345 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
3346 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
3347 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
3348 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
3349 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
3350 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
3351 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
3352 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
3353 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
3354 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
3355 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
3356 (spu_elf_reloc_type_lookup): Adjust to suit.
3358 2015-01-19 Alan Modra <amodra@gmail.com>
3360 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
3361 (bfd_get_section_limit): ..here.
3362 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
3363 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
3364 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
3365 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
3366 bfd_reloc_outofrange check.
3367 * bfd-in2.h: Regenerate.
3369 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
3370 on zero size relocs.
3371 * ecoff.c (ecoff_reloc_link_order): Likewise.
3372 * elf32-nds32.c (nds32_relocate_contents): Likewise.
3373 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3375 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
3376 (_bfd_clear_contents): Likewise.
3377 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
3378 (mips_elf_perform_relocation): Likewise.
3380 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
3381 from malloc on zero size alloc.
3382 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3383 * elflink.c (elf_reloc_link_order): Likewise.
3384 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3385 * pdp11.c (aout_link_reloc_link_order): Likewise.
3386 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3388 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
3389 bitsize 0, and complain_overflow_dont.
3390 * coff-sparc.c (coff_sparc_howto_table): Likewise.
3391 * elf-hppa.h (elf_hppa_howto_table): Likewise.
3392 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
3393 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
3394 * elf32-arc.c (elf_arc_howto_table): Likewise.
3395 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
3396 * elf32-avr.c (elf_avr_howto_table): Likewise.
3397 * elf32-bfin.c (bfin_howto_table): Likewise.
3398 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
3399 * elf32-cris.c (cris_elf_howto_table): Likewise.
3400 * elf32-crx.c (crx_elf_howto_table): Likewise.
3401 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
3402 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
3403 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
3404 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
3405 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
3406 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3407 * elf32-h8300.c (h8_elf_howto_table): Likewise.
3408 * elf32-i370.c (i370_elf_howto_raw): Likewise.
3409 * elf32-i386.c (elf_howto_table): Likewise.
3410 * elf32-i860.c (elf32_i860_howto_table): Likewise.
3411 * elf32-i960.c (elf32_i960_relocate): Likewise.
3412 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
3413 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
3414 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
3415 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
3416 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
3417 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
3418 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
3419 * elf32-m68k.c (howto_table): Likewise.
3420 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
3421 * elf32-mep.c (mep_elf_howto_table): Likewise.
3422 * elf32-metag.c (elf_metag_howto_table): Likewise.
3423 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
3424 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
3425 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
3426 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
3427 * elf32-mt.c (mt_elf_howto_table): Likewise.
3428 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
3429 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
3430 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
3431 * elf32-pj.c (pj_elf_howto_table): Likewise.
3432 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
3433 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
3434 * elf32-rx.c (rx_elf_howto_table): Likewise.
3435 * elf32-s390.c (elf_howto_table): Likewise.
3436 * elf32-score.c (elf32_score_howto_table): Likewise.
3437 * elf32-score7.c (elf32_score_howto_table): Likewise.
3438 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
3439 * elf32-spu.c (elf_howto_table): Likewise.
3440 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
3441 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
3442 * elf32-v850.c (v850_elf_howto_table): Likewise.
3443 * elf32-vax.c (howto_table): Likewise.
3444 * elf32-visium.c (visium_elf_howto_table): Likewise.
3445 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
3446 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
3447 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
3448 * elf32-xtensa.c (elf_howto_table): Likewise.
3449 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
3450 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
3451 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
3452 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
3453 * elf64-s390.c (elf_howto_table): Likewise.
3454 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
3455 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
3456 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
3457 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
3458 (elfNN_aarch64_howto_none): Likewise.
3459 * elfxx-ia64.c (ia64_howto_table): Likewise.
3460 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
3461 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
3462 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
3464 2015-01-15 H.J. Lu <hongjiu.lu@intel.com>
3467 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
3468 about -fPIC if the symbol is undefined when building executable.
3470 2015-01-15 Nick Clifton <nickc@redhat.com>
3473 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
3474 error message. Never return an invalid howto pointer.
3475 * elf32-cr16.c (cr16_info_to_howto): Likewise.
3476 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3477 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3478 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3479 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3480 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
3481 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3482 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3483 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3484 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
3485 * elf32-vax.c (rtype_to_howto): Likewise.
3486 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3487 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
3488 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
3489 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3490 (sh_elf_reloc): Check that the reloc is in range.
3491 * reloc.c (bfd_perform_relocation): Check that the section is big
3492 enough for the entire reloc.
3493 (bfd_generic_get_relocated_section_contents): Report unexpected
3494 return values from perform_reloc.
3496 2015-01-15 Nick Clifton <nickc@redhat.com>
3498 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
3499 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
3502 2015-01-15 Alan Modra <amodra@gmail.com>
3504 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
3505 any output section matching a linker created dynobj section.
3507 2015-01-15 Alan Modra <amodra@gmail.com>
3510 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
3511 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
3512 Don't assign symtab file position unless symbols will be output.
3513 Merge blocks with condition in common. Don't call
3514 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
3515 unless other symbols are output. Move assignment of symtab_shndx
3516 file position. Localize variable.
3518 2015-01-14 Jiong Wang <jiong.wang@arm.com>
3520 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
3521 trying to defer them to runtime.
3523 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3525 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
3526 to check if a symbol should be bound symbolically.
3528 2015-01-13 Jiong Wang <jiong.wang@arm.com>
3530 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
3531 for TLSLE_MOVW_TPREL_G2.
3533 2015-01-13 Jiong Wang <jiong.wang@arm.com>
3536 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
3537 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
3538 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
3541 2015-01-12 Terry Guo <terry.guo@arm.com>
3543 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
3545 (_bfd_elf_gc_mark_extra_sections): Use it.
3547 2015-01-11 H.J. Lu <hongjiu.lu@intel.com>
3550 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
3551 only discard space for pc-relative relocs symbols which turn
3552 out to need copy relocs.
3554 2015-01-09 Nick Clifton <nickc@redhat.com>
3556 * tekhex.c (getvalue): Fix thinko in test for correct extraction
3558 (getsym): Return false if there was not enough data to extract the
3561 2015-01-09 Anthony Green <green@moxielogic.com>
3563 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
3565 2015-01-08 Nick Clifton <nickc@redhat.com>
3567 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
3568 16-bit absolute BR instructions to 10-bit pc-relative JMP
3571 2015-01-08 Nick Clifton <nickc@redhat.com>
3574 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
3575 to load the line table.
3576 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
3578 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
3579 the Data Directory Size is too large.
3581 2015-01-06 H.J. Lu <hongjiu.lu@intel.com>
3584 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
3585 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3587 2015-01-06 Nick Clifton <nickc@redhat.com>
3590 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
3593 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
3594 (bfd_perform_relocation): Include the size of the reloc in the
3595 test for an out of range relocation.
3596 (bfd_generic_get_relocated_section_contents): Remove reloc range
3599 * coff-i860.c (CALC_ADDEND): Always set an addend value.
3600 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
3601 avoid reading off the end of the buffer.
3603 (first_phase): Likewise.
3604 (pass_over): Pass an end pointer to the invoked function.
3606 2015-01-05 H.J. Lu <hongjiu.lu@intel.com>
3609 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
3611 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3613 2015-01-05 Nick Clifton <nickc@redhat.com>
3616 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
3617 is at least big enough for the header to be read.
3618 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
3619 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
3620 (bfd_mach_o_read_command): Prevetn duplicate error messages about
3621 unrecognized commands.
3622 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
3623 when indexing into the string table.
3625 2015-01-01 Alan Modra <amodra@gmail.com>
3627 Update year range in copyright notice of all files.
3629 For older changes see ChangeLog-2014
3631 Copyright (C) 2015 Free Software Foundation, Inc.
3633 Copying and distribution of this file, with or without modification,
3634 are permitted in any medium without royalty provided the copyright
3635 notice and this notice are preserved.
3641 version-control: never