1 2015-10-02 Renlin Li <renlin.li@arm.com>
3 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Add
4 TLSIE_MOVW_GOTTPREL_G1.
5 (aarch64_tls_transition_without_check): Add
6 TLSIE_MOVW_GOTTPREL_G1 to TLSLE_MOVW_TPREL_G2
7 transition for local symbol.
8 (elfNN_aarch64_tls_relax): Add a argument to pass tp offset.
9 Add TLSIE_MOVW_GOTTPREL_G1 relaxation.
10 (elfNN_aarch64_relocate_section): Call elfNN_aarch64_tls_relax
13 2015-10-02 Renlin Li <renlin.li@arm.com>
15 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Add
16 relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC,
18 (aarch64_tls_transition_without_check): Add relaxation support.
19 (aarch64_reloc_got_type): Add support.
20 (elfNN_aarch64_final_link_relocate): Likewise.
21 (elfNN_aarch64_tls_relax): Likewise.
22 (elfNN_aarch64_relocate_section): Likewise.
23 (elfNN_aarch64_gc_sweep_hook): Likewise.
24 (elfNN_aarch64_check_relocs): Likewise.
25 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
26 (_bfd_aarch64_elf_resolve_relocation): Likewise.
28 2015-10-02 Renlin Li <renlin.li@arm.com>
30 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for
31 BFD_RELOC_AARCH64_TLSDESC_OFF_G1.
33 2015-10-02 Renlin Li <renlin.li@arm.com>
35 * elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC):
36 Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1.
37 (aarch64_tls_transition_without_check): Likewise
38 (elfNN_aarch64_tls_relax): Likwise.
40 2015-10-02 Renlin Li <renlin.li@arm.com>
42 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
43 for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.
45 2015-10-02 Renlin Li <renlin.li@arm.com>
47 * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
48 AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
49 * libbfd.h: Regenerate.
50 * bfd-in2.h: Likewise.
51 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
52 TLSIE_MOVW_GOTTPREL_G1 check overflow.
53 (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
54 and TLSIE_MOVW_GOTTPREL_G0_NC.
55 (elfNN_aarch64_final_link_relocate): Likewise.
56 (elfNN_aarch64_relocate_section): Likewise.
57 (elfNN_aarch64_gc_sweep_hook): Likewise.
58 (elfNN_aarch64_check_relocs): Likewise.
59 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
60 (_bfd_aarch64_elf_resolve_relocation): Likewise.
62 2015-10-02 Renlin Li <renlin.li@arm.com>
64 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
65 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
66 (elfNN_aarch64_final_link_relocate): Likewise.
67 (elfNN_aarch64_relocate_section): Likewise.
68 (elfNN_aarch64_gc_sweep_hook): Likewise.
69 (elfNN_aarch64_check_relocs): Likewise.
70 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
71 (_bfd_aarch64_elf_resolve_relocation): Likewise.
73 2015-10-02 Renlin Li <renlin.li@arm.com>
75 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
76 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
77 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
78 * libbfd.h: Regenerate.
81 2015-10-02 Renlin Li <renlin.li@arm.com>
83 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
84 BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
85 (elfNN_aarch64_final_link_relocate): Likewise.
86 (elfNN_aarch64_relocate_section): Likewise.
87 (elfNN_aarch64_gc_sweep_hook): Likewise.
88 (elfNN_aarch64_check_relocs): Likewise.
89 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
90 (_bfd_aarch64_elf_resolve_relocation): Likewise.
92 2015-10-02 Renlin Li <renlin.li@arm.com>
94 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry.
95 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
96 BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
97 * bfd-in2.h: Regenerate.
100 2015-10-02 Renlin Li <renlin.li@arm.com>
102 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
103 BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support.
104 (elfNN_aarch64_final_link_relocate): Likewise.
105 (elfNN_aarch64_gc_sweep_hook): Likewise.
106 (elfNN_aarch64_check_relocs): Likewise.
107 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
108 (_bfd_aarch64_elf_resolve_relocation): Likewise.
110 2015-10-02 Renlin Li <renlin.li@arm.com>
112 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
113 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
115 * libbfd.h: Regnerate.
116 * bfd-in2.h: Regenerate.
118 2015-10-02 Renlin Li <renlin.li@arm.com>
120 * elfnn-aarch64.c (aarch64_reloc_got_type): Add support
121 for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
122 (elfNN_aarch64_gc_sweep_hook): Likewise.
123 (elfNN_aarch64_check_relocs): Likewise
124 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
125 (_bfd_aarch64_elf_resolve_relocation): Likewise
126 (elfNN_aarch64_final_link_relocate): Likewise
128 2015-010-02 Renlin Li <renlin.li@arm.com>
130 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New.
131 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
133 * libbfd.h: Regenerate.
134 * bfd-in2.h: Regenerate.
136 2015-10-02 Renlin Li <renlin.li@arm.com>
138 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
139 BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
140 (elfNN_aarch64_gc_sweep_hook): Likewise.
141 (elfNN_aarch64_check_relocs): Likewise
142 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
143 (_bfd_aarch64_elf_resolve_relocation): Likewise
144 (elfNN_aarch64_final_link_relocate): Calculate offset within GOT.
146 2015-10-02 Renlin Li <renlin.li@arm.com>
148 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to
151 2015-10-01 H.J. Lu <hongjiu.lu@intel.com>
154 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
155 pointer_equality_needed for R_X86_64_PC32 reloc in non-code
158 2015-10-01 Renlin Li <renlin.li@arm.com>
160 * elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
161 (elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.
163 2015-10-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
165 * config.bfd (targ_selvecs): Remove sh_elf32_vec and
166 sh_elf32_le_vec from sh*-*-linux cases.
168 2015-10-01 Alan Modra <amodra@gmail.com>
171 * elflink.c (_bfd_elf_merge_sections): Revert last change.
173 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
176 * elf32-i386.c (elf_i386_check_relocs): Set
177 pointer_equality_needed for R_386_PC32 reloc in non-code
180 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
183 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds
184 that have the compatible ELF machine code with the output bfd.
186 2015-09-30 Alan Modra <amodra@gmail.com>
189 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that
190 will be handled by elf_link_input_bfd. Rename abfd param to obfd.
192 2015-09-30 Rich Felker <dalias@libc.org>
194 * config.bfd (targ_selvecs): Add fdpic and misc targets
197 2015-09-29 Andrew Stubbs <ams@codesourcery.com>
198 H.J. Lu <hongjiu.lu@intel.com>
201 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
202 * bfd-in2.h: Regenerated.
204 2015-08-11 Peter Zotov <whitequark@whitequark.org>
207 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
208 (R_OR1K_16_PCREL): Likewise.
209 (R_OR1K_8_PCREL): Likewise.
211 2015-09-23 Nick Clifton <nickc@redhat.com>
213 * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
214 order to avoid problems with left shifting negative values.
215 (abs32code): Likewise.
216 * mach-o.c (FILE_ALIGN): Likewise.
217 * coff-rs6000.c (xcoff_debug_sections): Delete unused static
219 * elf32-visium.c (visium_reloc_map): Likewise.
220 * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless
221 calls to abs function.
222 * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise.
223 * elf32-score.c (score_elf_final_link_relocate): Likewise.
224 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
225 * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead
226 of shifting to create a negative mask.
227 * elf32-msp430.c (elf_backend_special_sections): Define.
228 * elfxx-mips.c (got_ofst_reloc_p): Delete unused function.
229 (got_hi16_reloc_p): Delete unused function.
230 * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of
233 2015-09-23 Nick Clifton <nickc@redhat.com>
236 * elf-bfd.h (struct elf_section_list): New structure.
237 (struct elf_obj_tdata): Replace symtab_shndx_hdr with
238 symtab_shndx_list. Delete symtab_shndx_section.
239 (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list.
240 * elf.c (bfd_elf_get_syms): If symtab index sections are present,
241 scan them for the section that matches the provided symbol table.
242 (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections.
243 (assign_section_numbers): Use the first symtab index table in the
245 (_bfd_elf_compute_section_file_positions): Replace use of
246 symtab_shndx_hdr with use of symtab_shndx_list.
247 (find_section_in_list): New function.
248 (assign_file_postions_except_relocs): Use new function.
249 (_bfd_elf_copy_private_symbol_data): Likewise.
250 (swap_out_syms): Handle multiple symbol table index sections.
251 * elf32-m32c.c (m32c_elf_relax_section): Replace use of
252 symtab_shndx_hdr with use of symtab_shndx_list.
253 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
254 * elf32-rx.c (rx_relax_section): Likewise.
255 * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise.
256 * elflink.c (bfd_elf_final_link): Likewise.
258 2015-09-21 H.J. Lu <hongjiu.lu@intel.com>
260 * bfd.c (bfd_update_compression_header): Use bfd_put_32 on
262 (bfd_check_compression_header): Use bfd_get_32 on ch_type.
263 (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
266 2015-09-20 Rich Felker <dalias@libc.org>
268 * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
269 .interp when info->nointerp.
270 (bfd_elf_size_dynamic_sections): Adjust assert.
271 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp
273 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
274 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
275 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
276 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
277 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
278 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
279 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
280 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
281 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
282 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
283 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
284 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
285 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
286 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
287 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
288 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
289 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
290 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
291 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
292 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.
293 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
294 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
295 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
296 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
297 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
298 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
299 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
300 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
301 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
302 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
303 * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
304 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
305 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
306 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
308 2015-09-18 Doug Evans <xdje42@gmail.com>
310 * targets.c (enum bfd_flavour): Add comment.
311 (bfd_flavour_name): New function.
312 * bfd-in2.h: Regenerate.
314 2015-09-18 Alan Modra <amodra@gmail.com>
316 * elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename
317 from no_tls_get_addr_opt.
318 * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt.
319 (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at
322 2015-09-17 Alan Modra <amodra@gmail.com>
325 * elflink.c (elf_link_adjust_relocs): Correct start of insertion
328 2015-09-16 Alan Modra <amodra@gmail.com>
331 * elflink.c (elf_link_adjust_relocs): Modify insertion sort to
332 insert a run. Return status in case of malloc failure.
335 2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
337 * elf32-xtensa.c (elf_xtensa_be_plt_entry)
338 (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for
340 (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix
341 up instructions according to ABI.
343 2015-09-14 Rich Felker <dalias@libc.org>
345 * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
346 instead of clearing it on cross-section relocations.
347 (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
349 2015-09-12 Helge Deller <deller@gmx.de>
352 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
355 2015-09-09 Jiong Wang <jiong.wang@arm.com>
357 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
359 2015-09-09 Jiong Wang <jiong.wang@arm.com>
361 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three
362 TLS local dynamic traditional relocations types.
363 (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to
364 local executable relaxation.
366 2015-09-03 H.J. Lu <hongjiu.lu@intel.com>
368 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove
371 2015-09-02 H.J. Lu <hongjiu.lu@intel.com>
373 * elf32-i386.c (R_386_irelative): Renamed to ...
375 (R_386_vt_offset): Updated.
376 (elf_i386_rtype_to_howto): Likewise.
377 (elf_i386_relocate_section): Likewise.
379 2015-09-01 H.J. Lu <hongjiu.lu@intel.com>
382 * elf32-i386.c (elf_i386_link_hash_entry): Add
383 func_pointer_refcount.
384 (elf_i386_link_hash_newfunc): Clear func_pointer_refcount.
385 (elf_i386_get_local_sym_hash): Likewise.
386 (elf_i386_copy_indirect_symbol): Also copy
387 func_pointer_refcount.
388 (elf_i386_check_relocs): Increment func_pointer_refcount.
389 (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount.
390 (elf_i386_allocate_dynrelocs): Don't create the PLT entry if
391 there are only function pointer relocations which can be
392 resolved at run-time. Keep dynanamic relocations for run-time
393 function pointer initialization.
394 (elf_i386_relocate_section): Copy dynamic function pointer
396 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
397 func_pointer_refcount.
398 (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount.
399 (elf_x86_64_get_local_sym_hash): Likewise.
400 (elf_x86_64_copy_indirect_symbol): Also copy
401 func_pointer_refcount.
402 (elf_x86_64_check_relocs): Increment func_pointer_refcount.
403 (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount.
404 (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if
405 there are only function pointer relocations which can be
406 resolved at run-time. Keep dynanamic relocations for run-time
407 function pointer initialization.
408 (elf_x86_64_relocate_section): Copy dynamic function pointer
411 2015-09-01 Alan Modra <amodra@gmail.com>
413 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value
414 if .opd section has been edited.
416 2015-09-01 Alan Modra <amodra@gmail.com>
419 * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout.
420 (enum ppc_stub_type): Add ppc_stub_save_res.
421 (struct map_stub): Add "next" and "needs_save_res".
422 (struct ppc_link_hash_entry): Add "save_res" flag.
423 (struct ppc_link_hash_table): Add "group".
424 (sfpr_define): Add stub_sec param. Define symbol in stub_sec if
425 stub_sec is non-null. Set "save_res".
426 (save_res_funcs): Make file scope, rename from funcs. Adjust uses.
427 (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms.
428 (ppc_build_one_stub): Handle ppc_stub_save_res.
429 (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding
430 stub for linker defined save_res sym.
431 (group_sections): Init new fields of struct map_stub.
432 (ppc64_elf_size_stubs): Reserve space for save/restore func copy.
433 (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit
435 (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res.
437 2015-08-31 Alan Modra <amodra@gmail.com>
439 * elf64-ppc.c (get_r2off): Return -1 on error.
440 (ppc_build_one_stub): Adjust for get_r2off change. Don't emit
441 addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
442 (ppc_size_one_stub): Corresponding size changes for r2off stubs.
443 Add condition in test for -R objects.
445 2015-08-31 Alan Modra <amodra@gmail.com>
447 * section.c (section_id): Make file scope.
448 (bfd_get_next_section_id): New function.
449 * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl.
450 (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add
451 group. Update all uses.
452 (struct ppc_link_hash_table): Delete top_id, top_index, and
453 input_list. Add sec_info_arr_size. Rename stub_group to
454 sec_info, and make group info indirect. Update stub_group refs
456 (ppc_add_stub): Don't look for stub_sec on link_sec stub_group
458 (ppc_build_one_stub): Delete FIXME.
459 (ppc64_elf_setup_section_lists): Size htab->sec_info for all
460 sections, not just input sections. Don't create htab->input_list.
461 (ppc64_elf_next_input_section): Update to use sec_info union as
464 (group_sections): Pass "info" param rather than "htab". Iterate
465 over output sections rather than input_list. Use sec_info union
466 as list pointers. Alloc atruct map_stub, and return fail status.
467 * bfd-in2.h: Regenerate.
469 2015-08-31 Alan Modra <amodra@gmail.com>
471 * elflink.c (elf_sort_symbol): Use correctly sized type for
472 calculating signed section->id difference.
473 (elf_link_add_object_symbols): Likewise.
474 * pef.c (bfd_pef_scan_start_address): Warning fix.
475 * vms-alpha.c (vms_new_section_hook): Likewise.
477 2015-08-31 Alan Modra <amodra@gmail.com>
479 * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
480 (find_relocs_at_address_addr): Make "reloc_type" an enum.
481 (nds32_elf_relax_delete_blanks): Warning fix.
482 (nds32_elf_relax_loadstore): Correct loop bound.
484 2015-08-31 Alan Modra <amodra@gmail.com>
486 * section.c (struct bfd_section): Make "id" and "index" unsigned.
487 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
488 * elf.c (elf_map_symbols): Likewise.
489 * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
490 (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
491 (ppc64_elf_setup_section_lists): Ditto for local vars.
492 * elf32-arm.c: Similarly to elf64-ppc.c.
493 * elf32-avr.c: Likewise.
494 * elf32-hppa.c: Likewise.
495 * elf32-m68hc1x.c: Likewise.
496 * elf32-metag.c: Likewise.
497 * elf32-nios2.c: Likewise.
498 * elfnn-aarch64.c: Likewise.
499 * simple.c (struct saved_offsets): Make "section_count" unsigned.
500 * bfd-in2.h: Regenerate.
502 2015-08-27 Alan Modra <amodra@gmail.com>
505 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
506 (elf_backend_sort_relocs_p): Define.
508 2015-08-26 Alan Modra <amodra@gmail.com>
511 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
512 (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
513 (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
515 (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
517 2015-08-26 Matthew Fortune <matthew.fortune@imgtec.com>
520 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
521 ISA value to a bfd machine number.
522 (bfd_mips_isa_ext): Update the ISA level and revision if
523 necessary. Use mips_mach_extends_p to decide if the ISA extension
525 (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
526 be inferred from the ABI setting. Set the ISA level from the
527 maximum of the incoming and outgoing ISA levels.
529 2015-08-25 Nick Clifton <nickc@redhat.com>
532 * elf.c (bfd_section_from_shdr): Replace assertions with warnings
533 about multiple symbol tables.
535 2015-08-25 Renlin Li <renlin.li@arm.com>
537 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
539 * bfd-in2.h: Regenerate.
541 2015-08-22 Alan Modra <amodra@gmail.com>
543 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
544 Don't copy fields not set by _bfd_elf_swap_verdef_in.
546 2015-08-19 Jiong Wang <jiong.wang@arm.com>
548 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
549 types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
550 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
551 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
552 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
553 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
554 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
555 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
556 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
557 (elfNN_aarch64_final_link_relocate): Likewise.
558 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
559 (_bfd_aarch64_elf_resolve_relocation): Likewise.
561 2015-08-19 Jiong Wang <jiong.wang@arm.com>
563 * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
564 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
565 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
566 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
567 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
568 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
569 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
570 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
571 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
572 * bfd-in2.h: Regenerate.
573 * libbfd.h: Regenerate.
575 2015-08-19 Jiong Wang <jiong.wang@arm.com>
578 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
579 types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
580 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
581 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
582 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
583 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
584 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
585 (elfNN_aarch64_final_link_relocate): Likewise.
586 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
587 (_bfd_aarch64_elf_resolve_relocation): Likewise.
589 2015-08-19 Jiong Wang <jiong.wang@arm.com>
591 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
592 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
593 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
594 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
595 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
596 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
597 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
598 * bfd-in2.h: Regenerate.
599 * libbfd.h: Regenerate.
601 2015-08-19 Jiong Wang <jiong.wang@arm.com>
603 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
604 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
605 (aarch64_reloc_got_type): Likewise.
606 (elfNN_aarch64_final_link_relocate): Likewise.
607 (elfNN_aarch64_relocate_section): Likewise.
608 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
609 (_bfd_aarch64_elf_resolve_relocation): Likewise.
611 2015-08-19 Jiong Wang <jiong.wang@arm.com>
613 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
614 * bfd-in2.h: Regenerate.
615 * libbfd.h: Regenerate.
616 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
617 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
619 2015-08-19 Alan Modra <amodra@gmail.com>
621 * elf-s390-common.c: Simplify expressions using
622 bfd_linke_executable, bfd_link_pie and bfd_link_pic.
623 * elf32-arm.c: Likewise.
624 * elf32-bfin.c: Likewise.
625 * elf32-frv.c: Likewise.
626 * elf32-m68k.c: Likewise.
627 * elf32-nios2.c: Likewise.
628 * elf32-ppc.c: Likewise.
629 * elf32-s390.c: Likewise.
630 * elf32-sh.c: Likewise.
631 * elf64-alpha.c: Likewise.
632 * elf64-ppc.c: Likewise.
633 * elf64-s390.c: Likewise.
634 * elflink.c: Likewise.
636 2015-08-18 Jiong Wang <jiong.wang@arm.com>
638 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
639 (elfNN_aarch64_relocate_section): Likewise.
640 (elfNN_aarch64_gc_sweep_hook): Likewise.
641 (elfNN_aarch64_check_relocs): Likewise.
643 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
646 * elf-bfd.h (elf_link_hash_table): Add dynsym.
647 * elf32-i386.c (elf_i386_reloc_type_class): Return
648 reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
649 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
650 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
651 (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
652 (elf_final_link_info): Remove dynsym_sec.
653 (elf_link_output_extsym): Replace dynsym_sec with dynsym.
654 (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
655 dynsym_sec with dynsym.
657 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
659 * bfd/aoutx.h: Replace shared, executable, relocatable and pie
660 fields with bfd_link_executable, bfd_link_dll,
661 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
662 * bfd/bout.c: Likewise.
663 * bfd/coff-alpha.c: Likewise.
664 * bfd/coff-arm.c: Likewise.
665 * bfd/coff-i386.c: Likewise.
666 * bfd/coff-i960.c: Likewise.
667 * bfd/coff-m68k.c: Likewise.
668 * bfd/coff-mcore.c: Likewise.
669 * bfd/coff-mips.c: Likewise.
670 * bfd/coff-ppc.c: Likewise.
671 * bfd/coff-rs6000.c: Likewise.
672 * bfd/coff-sh.c: Likewise.
673 * bfd/coff-tic80.c: Likewise.
674 * bfd/coff-x86_64.c: Likewise.
675 * bfd/coff64-rs6000.c: Likewise.
676 * bfd/coffgen.c: Likewise.
677 * bfd/cofflink.c: Likewise.
678 * bfd/ecoff.c: Likewise.
679 * bfd/ecofflink.c: Likewise.
680 * bfd/elf-bfd.h: Likewise.
681 * bfd/elf-eh-frame.c: Likewise.
682 * bfd/elf-ifunc.c: Likewise.
683 * bfd/elf-m10200.c: Likewise.
684 * bfd/elf-m10300.c: Likewise.
685 * bfd/elf-s390-common.c: Likewise.
686 * bfd/elf-vxworks.c: Likewise.
687 * bfd/elf.c: Likewise.
688 * bfd/elf32-arm.c: Likewise.
689 * bfd/elf32-avr.c: Likewise.
690 * bfd/elf32-bfin.c: Likewise.
691 * bfd/elf32-cr16.c: Likewise.
692 * bfd/elf32-cr16c.c: Likewise.
693 * bfd/elf32-cris.c: Likewise.
694 * bfd/elf32-crx.c: Likewise.
695 * bfd/elf32-d10v.c: Likewise.
696 * bfd/elf32-dlx.c: Likewise.
697 * bfd/elf32-epiphany.c: Likewise.
698 * bfd/elf32-fr30.c: Likewise.
699 * bfd/elf32-frv.c: Likewise.
700 * bfd/elf32-ft32.c: Likewise.
701 * bfd/elf32-h8300.c: Likewise.
702 * bfd/elf32-hppa.c: Likewise.
703 * bfd/elf32-i370.c: Likewise.
704 * bfd/elf32-i386.c: Likewise.
705 * bfd/elf32-i860.c: Likewise.
706 * bfd/elf32-ip2k.c: Likewise.
707 * bfd/elf32-iq2000.c: Likewise.
708 * bfd/elf32-lm32.c: Likewise.
709 * bfd/elf32-m32c.c: Likewise.
710 * bfd/elf32-m32r.c: Likewise.
711 * bfd/elf32-m68hc11.c: Likewise.
712 * bfd/elf32-m68hc1x.c: Likewise.
713 * bfd/elf32-m68k.c: Likewise.
714 * bfd/elf32-mcore.c: Likewise.
715 * bfd/elf32-mep.c: Likewise.
716 * bfd/elf32-metag.c: Likewise.
717 * bfd/elf32-microblaze.c: Likewise.
718 * bfd/elf32-moxie.c: Likewise.
719 * bfd/elf32-msp430.c: Likewise.
720 * bfd/elf32-mt.c: Likewise.
721 * bfd/elf32-nds32.c: Likewise.
722 * bfd/elf32-nios2.c: Likewise.
723 * bfd/elf32-or1k.c: Likewise.
724 * bfd/elf32-ppc.c: Likewise.
725 * bfd/elf32-rl78.c: Likewise.
726 * bfd/elf32-rx.c: Likewise.
727 * bfd/elf32-s390.c: Likewise.
728 * bfd/elf32-score.c: Likewise.
729 * bfd/elf32-score7.c: Likewise.
730 * bfd/elf32-sh-symbian.c: Likewise.
731 * bfd/elf32-sh.c: Likewise.
732 * bfd/elf32-sh64.c: Likewise.
733 * bfd/elf32-spu.c: Likewise.
734 * bfd/elf32-tic6x.c: Likewise.
735 * bfd/elf32-tilepro.c: Likewise.
736 * bfd/elf32-v850.c: Likewise.
737 * bfd/elf32-vax.c: Likewise.
738 * bfd/elf32-visium.c: Likewise.
739 * bfd/elf32-xc16x.c: Likewise.
740 * bfd/elf32-xstormy16.c: Likewise.
741 * bfd/elf32-xtensa.c: Likewise.
742 * bfd/elf64-alpha.c: Likewise.
743 * bfd/elf64-hppa.c: Likewise.
744 * bfd/elf64-ia64-vms.c: Likewise.
745 * bfd/elf64-mmix.c: Likewise.
746 * bfd/elf64-ppc.c: Likewise.
747 * bfd/elf64-s390.c: Likewise.
748 * bfd/elf64-sh64.c: Likewise.
749 * bfd/elf64-x86-64.c: Likewise.
750 * bfd/elflink.c: Likewise.
751 * bfd/elfnn-aarch64.c: Likewise.
752 * bfd/elfnn-ia64.c: Likewise.
753 * bfd/elfxx-mips.c: Likewise.
754 * bfd/elfxx-sparc.c: Likewise.
755 * bfd/elfxx-tilegx.c: Likewise.
756 * bfd/i386linux.c: Likewise.
757 * bfd/linker.c: Likewise.
758 * bfd/m68klinux.c: Likewise.
759 * bfd/pdp11.c: Likewise.
760 * bfd/pe-mips.c: Likewise.
761 * bfd/peXXigen.c: Likewise.
762 * bfd/reloc.c: Likewise.
763 * bfd/reloc16.c: Likewise.
764 * bfd/sparclinux.c: Likewise.
765 * bfd/sunos.c: Likewise.
766 * bfd/vms-alpha.c: Likewise.
767 * bfd/xcofflink.c: Likewise.
769 2015-08-18 Alan Modra <amodra@gmail.com>
772 * Makefile.am: Use $(SED) in place of sed throughout.
773 * Makefile.in: Regenerate.
775 2015-08-18 Alan Modra <amodra@gmail.com>
777 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
778 if already defined, and set linker_def.
779 (ppc64_elf_set_toc): Use .TOC. value if defined other than by
782 2015-08-14 Alan Modra <amodra@gmail.com>
785 * elf32-or1k.c: Revert 2015-08-11 change.
787 2015-08-13 H.J. Lu <hongjiu.lu@intel.com>
790 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
791 for read-only segment with dynamic IFUNC relocations.
792 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
794 2015-08-12 Simon Dardis <simon.dardis@imgtec.com>
796 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
797 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
798 mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
799 Update to use 'or' instead of 'addu/daddu'.
800 (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
801 (move_insns_32): Reorder table.
803 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
805 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
806 relocations in debug sections.
807 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
809 2015-08-11 Jiong Wang <jiong.wang@arm.com>
811 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
812 message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
814 2015-08-11 Jiong Wang <jiong.wang@arm.com>
816 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
817 (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
819 2015-08-11 Jiong Wang <jiong.wang@arm.com>
821 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
822 Loose the check for symbol from ABS section.
823 (elfNN_aarch64_size_stubs): Pass sym_sec.
825 2015-08-11 Jiong Wang <jiong.wang@arm.com>
828 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
829 calls go through plt stub.
830 (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
831 JUMP26 relocation to support inserting veneer for call to plt stub.
833 2015-08-11 Jiong Wang <jiong.wang@arm.com>
835 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
836 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
837 (aarch64_reloc_got_type): Likewise.
838 (elfNN_aarch64_final_link_relocate): Likewise.
839 (elfNN_aarch64_relocate_section): Likewise.
840 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
841 (_bfd_aarch64_elf_resolve_relocation): Likewise.
843 2015-08-11 Jiong Wang <jiong.wang@arm.com>
845 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
846 * bfd-in2.h: Regenerate.
847 * libbfd.h: Regenerate.
848 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
849 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
851 2015-08-11 Jiong Wang <jiong.wang@arm.com>
853 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
854 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
855 (aarch64_reloc_got_type): Likewise.
856 (elfNN_aarch64_final_link_relocate): Likewise.
857 (elfNN_aarch64_relocate_section): Likewise.
858 (elfNN_aarch64_gc_sweep_hook): Likewise.
859 (elfNN_aarch64_check_relocs): Likewise.
860 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
861 (_bfd_aarch64_elf_resolve_relocation): Likewise.
863 2015-08-11 Jiong Wang <jiong.wang@arm.com>
865 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
866 * bfd-in2.h: Regenerate.
867 * libbfd.h: Regenerate.
868 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
869 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
871 2015-08-11 Jiong Wang <jiong.wang@arm.com>
873 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
874 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
875 (aarch64_reloc_got_type): Likewise.
876 (elfNN_aarch64_final_link_relocate): Likewise.
877 (elfNN_aarch64_relocate_section): Likewise.
878 (elfNN_aarch64_gc_sweep_hook): Likewise.
879 (elfNN_aarch64_check_relocs): Likewise.
880 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
881 (_bfd_aarch64_elf_resolve_relocation): Likewise.
883 2015-08-11 Jiong Wang <jiong.wang@arm.com>
885 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
886 * bfd-in2.h: Regenerate.
887 * libbfd.h: Regenerate.
888 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
889 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
891 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
894 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
895 relocations in debug sections.
896 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
898 2015-08-11 Peter Zotov <whitequark@whitequark.org>
901 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
902 (R_OR1K_16_PCREL): Likewise.
903 (R_OR1K_8_PCREL): Likewise.
905 2015-08-11 Nick Clifton <nickc@redhat.com>
908 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
912 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
914 * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
916 (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
918 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
920 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
922 2015-08-10 H.J. Lu <hongjiu.lu@intel.com>
924 * elf-bfd.h (elf_symbol_version): New enum.
925 (elf_link_hash_entry): Replace hidden with versioned.
926 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
927 version if the symbol is unversioned. Initialize versioned.
928 (_bfd_elf_add_default_symbol): Don't look for symbol version
929 if the symbol is unversioned or hidden. Initialize versioned.
930 (elf_collect_hash_codes): Don't look for symbol version if the
931 symbol is unversioned.
932 (elf_collect_gnu_hash_codes): Likewise.
933 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
934 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
936 (elf_link_output_extsym): Likewise.
938 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
941 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
942 sh_link and sh_info fields in stripped section headers, we also
943 check if the sh_type, sh_flags, sh_addralign and sh_entsize
944 fields of the output section match the output. Since
945 --only-keep-debug turns all non-debug sections into SHT_NOBITS
946 sections, the output SHT_NOBITS type matches any input type.
948 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
951 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
952 if the new symbol matches the existing one. The new hidden
953 versioned symbol matches the existing symbol if they have the
954 same symbol version. Update the existing symbol only if they
956 (_bfd_elf_add_default_symbol): Update call to
957 _bfd_elf_merge_symbol.
958 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
960 (elf_link_add_object_symbols): Override a definition only if the
961 new symbol matches the existing one.
962 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
963 the hidden versioned symbol.
964 (elf_link_output_extsym): Bind a symbol locally when linking
965 executable if it is locally defined, hidden versioned, not
966 referenced by shared library and not exported. Turn on
967 VERSYM_HIDDEN only if the hidden versioned symbol is defined
970 2015-08-05 Nick Clifton <nickc@redhat.com>
972 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
973 sh_info fields of sections whose type has been changed to
976 2015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
977 Tyler Hicks <tyhicks@canonical.com>
980 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
981 and stack overflow when char is signed and \200-\376 was in place of hex
982 digit; also fixes \377 was handled as EOF instead of "incorrect character".
983 (ihex_read_section): Changed for consistency.
984 (ihex_bad_byte): Prevent (now impossible to trigger) stack
985 overflow and incorrect escape sequence handling.
986 * srec.c (srec_bad_byte): Likewise.
988 2015-08-03 Hans-Peter Nilsson <hp@axis.com>
990 * elf32-cris.c (cris_elf_relocate_section)
991 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
992 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
993 just link_info->symbolic, to check if a symbol should be bound
996 2015-07-30 H.J. Lu <hongjiu.lu@intel.com>
999 * elflink.c (_bfd_elf_add_default_symbol): Add the default
1000 symbol if not performing a relocatable link.
1001 (elf_link_add_object_symbols): Adjust the default symbol if
1002 not performing a relocatable link.
1004 2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
1006 * elflink.c (elf_link_add_object_symbols): Remove
1007 !info->relocatable check for info->executable. Add
1008 !info->relocatable check for !info->executable.
1009 (elf_link_output_extsym): Remove
1010 !info->relocatable check for info->executable.
1012 2015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
1014 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
1015 assignment loop for bfd plugin objects.
1017 2015-07-28 Alan Modra <amodra@gmail.com>
1019 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
1020 segment for loaded sections after nonloaded sections if the
1021 sections are on the same page.
1023 2015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
1025 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
1026 * config.in, configure: Regenerate.
1028 2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
1030 * configure: Regenerated.
1032 2015-07-27 Nick Clifton <nickc@redhat.com>
1034 * elf32-msp430.c (uses_large_model): New function.
1035 (msp430_elf_eh_frame_address_size): New function.
1036 (elf_backend_eh_frame_address_size): Define.
1038 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1041 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
1043 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1046 * elf32-arm.c (elf_backend_extern_protected_data): Define.
1048 2015-07-25 H.J. Lu <hongjiu.lu@intel.com>
1051 * elflink.c (elf_link_output_extsym): Check symbol version
1052 section check only if not linking executable, the symbol is
1053 referenced by shared library or not locally defined.
1055 2015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
1057 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
1058 check if a symbol should be bound symbolically.
1059 * elf32-hppa.c (elf32_hppa_check_relocs,
1060 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
1061 elf32_hppa_finish_dynamic_symbol): Likewise.
1062 * elf32-m68k.c (elf_m68k_check_relocs,
1063 elf_m68k_relocate_section): Likewise.
1064 * elf32-nios2.c (nios2_elf32_relocate_section,
1065 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
1066 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
1067 elf32_tic6x_relocate_section): Likewise.
1069 2015-07-24 Alan Modra <amodra@gmail.com>
1071 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
1072 prefix for reloc section corresponding to rela section associated
1073 with renamed debug section.
1075 2015-07-24 Alan Modra <amodra@gmail.com>
1077 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
1080 2015-07-23 Joseph Myers <joseph@codesourcery.com>
1082 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
1083 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
1084 difference, not to host pointer.
1086 2015-07-22 Alan Modra <amodra@gmail.com>
1088 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
1089 return -1 if symbol referenced is not defined. Tidy.
1091 2015-07-20 Alan Modra <amodra@gmail.com>
1093 * po/SRC-POTFILES.in: Regenerate.
1095 2015-07-17 Jiong Wang <jiong.wang@arm.com>
1097 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
1098 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
1100 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1102 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1103 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1104 (aarch64_reloc_got_type): Ditto.
1105 (elfNN_aarch64_final_link_relocate): Ditto.
1106 (elfNN_aarch64_relocate_section): Ditto.
1107 (elfNN_aarch64_gc_sweep_hook): Ditto.
1108 (elfNN_aarch64_check_relocs): Ditto.
1109 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1110 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1112 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1114 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
1115 * bfd-in2.h: Regenerate.
1116 * libbfd.h: Regenerate.
1117 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1118 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1120 2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
1123 * bfd.c (bfd_convert_section_size): New function.
1124 (bfd_convert_section_contents): Likewise.
1125 * bfd-in2.h: Regenerated.
1127 2015-07-09 Catherine Moore <clm@codesourcery.com>
1129 * elflink.c (bfd_elf_size_dynamic_sections): Call to
1130 _bfd_elf_maybe_strip_eh_frame_hdr should be before
1131 bed->elf_backend_size_dynamic_sections.
1133 2015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
1135 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
1137 2015-07-05 Richard Sandiford <richard.sandiford@arm.com>
1139 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
1140 plus addend rather than the original st_value when looking up
1141 entries in opd->adjust.
1143 2015-07-03 Kai Tietz <ktietz@redhat.com>
1144 Nick Clifton <nickc@redhat.com>
1147 * coffcode.h (coff_bfd_gc_sections): Define default
1148 to bfd_coff_gc_sections function.
1149 (coff_gc_mark_hook_fn): New type.
1150 * coffgen.c (init_reloc_cookie): Copy and adjust coff
1151 related code about gc-sections from elflink.c to here.
1152 (fini_reloc_cookie): Likewise.
1153 (init_reloc_cookie_rels): Likewise.
1154 (fini_reloc_cookie_rels): Likewise.
1155 (init_reloc_cookie_for_section): Likewise.
1156 (fini_reloc_cookie_for_section): Likewise.
1157 (_bfd_coff_gc_mark_hook): Likewise.
1158 (_bfd_coff_gc_mark_rsec): Likewise.
1159 (_bfd_coff_gc_mark_reloc): Likewise.
1160 (_bfd_coff_gc_mark): Likewise.
1161 (_bfd_coff_gc_mark_extra_sections): Likewise.
1162 (coff_gc_sweep_symbol_info): Likewise.
1163 (coff_gc_sweep_symbol): Likewise.
1164 (gc_sweep_hook_fn): Likewise.
1165 (coff_gc_sweep): Likewise.
1166 (bfd_coff_gc_sections): Likewise.
1167 (_bfd_coff_gc_keep): Likewise.
1168 * libcoff-in.h (coff_reloc_cookie): New struct.
1169 (bfd_coff_gc_sections): New prototype.
1170 * libcoff.h: Regenerate.
1172 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1173 Cesar Philippidis <cesar@codesourcery.com>
1175 * bfd-in2.h: Regenerated.
1176 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
1177 (elf_nios2_r1_howto_table_rel): This.
1178 (elf_nios2_r2_howto_table_rel): New.
1180 (lookup_howto): Add ABFD parameter. Adjust to look up in either
1181 the R1 or R2 relocation table, as determined by ABFD.
1182 (nios2_reloc_map): Add R2 relocations.
1183 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
1184 Pass it the ABFD parameter.
1185 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
1186 return an R1 or R2 relocation.
1187 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
1188 Pass it the ABFD parameter.
1189 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
1191 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
1192 * libbfd.h: Regenerated.
1193 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
1194 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
1195 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
1196 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
1197 (BFD_RELOC_NIOS2_R2_T2I4): New.
1198 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
1199 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
1200 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
1201 (BFD_RELOC_NIOS2_R2_X2L5): New.
1202 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
1203 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
1204 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
1205 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
1207 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1208 Cesar Philippidis <cesar@codesourcery.com>
1210 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
1211 * bfd-in2.h: Regenerated.
1212 * cpu-nios2.c (nios2_compatible): New.
1213 (N): Use nios2_compatible instead of bfd_default_compatible.
1214 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
1215 (arch_info_struct): New.
1216 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
1217 * elf32-nios2.c (is_nios2_elf): New.
1218 (nios2_elf32_merge_private_bfd_data): New.
1219 (nios2_elf32_object_p): New.
1220 (bfd_elf32_bfd_merge_private_bfd_data): Define.
1221 (elf_backend_object_p): Define.
1223 2015-07-01 H.J. Lu <hongjiu.lu@intel.com>
1225 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
1227 2015-06-30 Nick Clifton <nickc@redhat.com>
1230 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
1231 (write_obj_attribute): Likewise.
1232 (elf_new_obj_attr): Likewise.
1233 (bfd_elf_get_obj_attr_int): Likewise.
1234 (bfd_elf_add_obj_attr_int): Likewise.
1235 (bfd_elf_add_obj_attr_string): Likewise.
1236 (bfd_elf_add_obj_attr_int_string): Likewise.
1237 (gnu_obj_attrs_arg_type): Likewise.
1238 (_bfd_elf_obj_attrs_arg_type): Likewise.
1239 (_bfd_elf_parse_attributes): Likewise.
1240 (_bfd_elf_merge_unknown_attribute_list): Likewise.
1241 * elf-bfd.h (struct obj_attribute_list): Likewise.
1244 2015-06-28 H.J. Lu <hongjiu.lu@intel.com>
1246 * bfd-in.h (compressed_debug_section_type): Remove
1247 COMPRESS_DEBUG_ZLIB.
1248 * bfd-in2.h : Regenerated.
1250 2015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
1252 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
1253 instead of !shared to indicate an application vs shared library.
1254 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1255 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
1256 (_bfd_mips_elf_get_target_dtag): Likewise.
1258 2015-06-25 DJ Delorie <dj@redhat.com>
1260 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
1261 REL loads to match RELA stores.
1263 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1265 * elf.c (_bfd_elf_compute_section_file_positions): Don't
1266 initialize sh_size for .shstrtab here.
1268 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1271 * elf-bfd.h (elf_sym_strtab): New.
1272 (elf_link_hash_table): Add strtabcount, strtabsize and
1274 (_bfd_elf_stringtab_init): Removed.
1275 * elf.c (_bfd_elf_stringtab_init): Removed.
1276 (_bfd_elf_compute_section_file_positions): Replace
1277 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
1278 _bfd_stringtab_size with
1279 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
1280 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
1281 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
1283 (swap_out_syms): Likewise.
1284 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
1285 with elf_strtab_hash. Remove symbuf, symbuf_count,
1286 symbuf_size and shndxbuf_size.
1287 (elf_link_flush_output_syms): Removed.
1288 (elf_link_output_sym): Renamed to ...
1289 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
1290 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
1292 (elf_link_swap_symbols_out): New.
1293 (elf_link_output_extsym): Replace elf_link_output_sym with
1294 elf_link_output_symstrtab.
1295 (elf_link_input_bfd): Likewise.
1296 (elf_final_link_free): Replace _bfd_stringtab_free with
1297 _bfd_elf_strtab_free. Remove symbuf.
1298 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
1299 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
1300 symbuf_size nor shndxbuf_size. Initialize strtabsize and
1301 strtab. Initialize symshndxbuf to -1 when number of sections
1302 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
1303 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
1304 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
1305 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
1306 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
1307 _bfd_elf_strtab_emit.
1309 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1311 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
1314 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1316 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
1317 space for the first .plt entry.
1318 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
1319 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1320 there are PLT relocations.
1321 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
1322 allocate space for the first .plt entry.
1323 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
1324 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1325 there are PLT relocations.
1327 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1330 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
1331 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
1334 2015-06-23 Jiong Wang <jiong.wang@arm.com>
1336 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
1337 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
1338 relocations against read-only sections.
1340 2015-06-18 Nick Clifton <nickc@redhat.com>
1343 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
1345 2015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
1347 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
1348 * bfd-in2.h : Regenerate.
1350 2015-06-16 Alan Modra <amodra@gmail.com>
1352 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
1355 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
1357 * elf-bfd.h : Remove struct elf_build_id.
1358 * bfd.c : Add struct bfd_build_id.
1359 * bfd-in2.h: Regenerate.
1360 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
1361 * libpei.h: Add protoype and macros for
1362 bfd_XXi_slurp_codeview_record.
1363 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
1364 * peicode.h (pe_bfd_read_buildid): Add.
1365 (pe_bfd_object_p): Use pe_bfd_read_buildid().
1367 2015-06-15 Renlin Li <renlin.li@arm.com>
1369 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
1370 * bfd-in2.h: Regenerate.
1371 * libbfd.h: Regenerate.
1372 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1373 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
1375 2015-06-15 Alan Modra <amodra@gmail.com>
1377 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
1378 2014-03-26 change. Call _bfd_clear_contents for relocs against
1379 local and global symbols defined in discarded input sections.
1381 2015-06-05 Nick Clifton <nickc@redhat.com>
1383 * elf32-msp430.c (rl78_sym_diff_handler): New function.
1384 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
1385 (msp430x_howto_table): Likewise.
1387 2015-06-05 Alan Modra <amodra@gmail.com>
1389 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
1390 relocs with insns moved by --ppc476-workaround. Correct
1391 output of REL16 relocs.
1393 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1395 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1396 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1397 (elfNN_aarch64_final_link_relocate): Ditto.
1398 (elfNN_aarch64_gc_swap_hook): Ditto.
1399 (elfNN_aarch64_check_relocs): Ditto.
1400 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1402 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1404 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
1405 * bfd-in2.h: Regenerate.
1406 * libbfd.h: Regenerate.
1407 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1408 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1410 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1412 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
1413 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1414 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
1415 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1417 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1419 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1420 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1421 (elfNN_aarch64_final_link_relocate): Ditto.
1422 (elfNN_aarch64_gc_swap_hook): Ditto.
1423 (elfNN_aarch64_check_relocs): Ditto.
1424 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1426 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1428 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
1429 * bfd-in2.h: Regenerate.
1430 * libbfd.h: Regenerate.
1431 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1432 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1434 2015-05-28 Catherine Moore <clm@codesourcery.com>
1435 Bernd Schmidt <bernds@codesourcery.com>
1436 Paul Brook <paul@codesourcery.com>
1439 * bfd-in2.h: Regenerated.
1440 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
1441 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
1442 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
1444 (compact_eh_frame_hdr_info): Declare.
1445 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
1446 fields and compact-eh fields.
1447 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
1448 (bfd_elf_section_data): Add eh_frame_entry_field.
1449 (elf_section_eh_frame_entry): Define.
1450 (bfd_elf_parse_eh_frame_entries): Declare.
1451 (_bfd_elf_parse_eh_frame_entry): Declare.
1452 (_bfd_elf_end_eh_frame_parsing): Declare.
1453 (_bfd_elf_write_section_eh_frame_entry): Declare.
1454 (_bfd_elf_eh_frame_entry_present): Declare.
1455 (_bfd_elf_section_for_symbol): Declare.
1456 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
1457 (bfd_elf_record_eh_frame_entry): New function.
1458 (_bfd_elf_parse_eh_frame_entry): New function.
1459 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
1460 (cmp_eh_frame_hdr): New function.
1461 (add_eh_frame_hdr_terminator): New function.
1462 (_bfd_elf_end_eh_frame_parsing): New function.
1463 (find_merged_cie): Update hdr_info field references.
1464 (_bfd_elf_discard_section_eh_frame): Likewise.
1465 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
1466 (_bfd_elf_eh_frame_entry_present): New function.
1467 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
1468 (_bfd_elf_write_section_eh_frame_entry): New function.
1469 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
1470 (_bfd_elf_fixup_eh_frame_hdr): New function.
1471 (write_compact_eh_frame_hdr): New function.
1472 (write_dwarf_eh_frame_hdr): New function.
1473 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
1474 * elflink.c (_bfd_elf_section_for_symbol): New function.
1475 (elf_section_ignore_discarded_relocs): Add Compact EH support.
1476 (elf_link_input_bfd): Likewise.
1477 (bfd_elf_final_link): Likewise.
1478 (_bfd_elf_gc_mark): Likewise.
1479 (bfd_elf_parse_eh_frame_entries): New function.
1480 (bfd_elf_gc_sections): Add Compact EH support.
1481 (bfd_elf_discard_info): Likewise.
1482 * elfxx-mips.c: Include dwarf2.h.
1483 (_bfd_mips_elf_compact_eh_encoding): New function.
1484 (_bfd_mips_elf_cant_unwind_opcode): New function.
1485 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
1486 (_bfd_mips_elf_cant_unwind_opcode): Declare.
1487 (elf_backend_compact_eh_encoding): Define.
1488 (elf_backend_cant_unwind_opcode): Define.
1489 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
1490 (elf_backend_cant_unwind_opcode): Provide default.
1491 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
1492 elf_backend_cant_unwind_opcode.
1493 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
1495 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
1498 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1499 for now binding only if pointer equality isn't needed.
1500 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1501 binding only if pointer equality isn't needed.
1502 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1503 section for now binding only if pointer equality isn't needed.
1504 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1505 binding only if pointer equality isn't needed.
1507 2015-05-26 H.J. Lu <hongjiu.lu@intel.com>
1510 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
1511 in .rel.plt/.rela.plt.
1512 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1514 2015-05-19 Jiong Wang <jiong.wang@arm.com>
1516 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
1517 relocation case labels alphabetically.
1518 (elfNN_aarch64_final_link_relocate): Ditto.
1519 (elfNN_aarch64_tls_relax): Ditto.
1520 (elfNN_aarch64_relocate_section): Ditto.
1521 (elfNN_aarch64_gc_sweep_hook): Ditto.
1522 (elfNN_aarch64_check_relocs): Ditto.
1523 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1524 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1526 2015-05-18 Jiong Wang <jiong.wang@arm.com>
1528 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
1531 2015-05-16 H.J. Lu <hongjiu.lu@intel.com>
1533 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1535 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1537 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1538 section for now binding.
1539 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1542 2015-05-14 H.J. Lu <hongjiu.lu@intel.com>
1544 * bfd.c (bfd_update_compression_header): Also write the zlib
1545 header if the SHF_COMPRESSED bit cleared..
1546 (bfd_check_compression_header): Return the uncompressed size.
1547 * compress.c (decompress_contents): Don't skip the zlib header.
1548 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
1549 which doesn't have the zlib header.
1550 (bfd_init_section_decompress_status): Likewise.
1551 (bfd_get_full_section_contents): Updated.
1552 (bfd_is_section_compressed): Likewise.
1553 (bfd_is_section_compressed_with_header): Return the uncompressed
1555 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
1556 * bfd-in2.h: Regenerated.
1558 2015-05-14 Jiong Wang <jiong.wang@arm.com>
1560 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
1563 2015-05-14 Max Filippov <jcmvbkbc@gmail.com>
1565 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
1566 as GOT reference when plt.refcount is not positive.
1568 2015-05-12 H.J. Lu <hongjiu.lu@intel.com>
1570 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
1571 for the first .plt entry only if needed.
1572 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1574 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1576 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
1577 (ALL_MACHINES_CFILES): Likewise.
1578 * archures.c (bfd_mach_iamcu): New.
1579 (bfd_mach_i386_iamcu): Likewise.
1580 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
1581 (bfd_iamcu_arch): Likewise.
1582 (bfd_archures_list): Add &bfd_iamcu_arch.
1583 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
1585 (targ_archs): Add bfd_iamcu_arch if needed.
1586 * configure.ac: Support iamcu_elf32_vec.
1587 * cpu-iamcu.c: New file.
1588 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
1589 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
1590 * targets.c (iamcu_elf32_vec): New.
1591 (_bfd_target_vector): Add iamcu_elf32_vec.
1592 * Makefile.in: Regenerated.
1593 * bfd-in2.h: Likewise.
1594 * configure: Likewise.
1596 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1598 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
1600 2015-05-10 H.J. Lu <hongjiu.lu@intel.com>
1602 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
1603 and output_bfd with abfd.
1604 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
1606 2015-05-06 Toni Spets <toni.spets@iki.fi>
1609 * peXXigen.c (rsrc_process_section): Skip discarded resource
1612 2015-05-01 H.J. Lu <hongjiu.lu@intel.com>
1614 * config.bfd: Support i[3-7]86-*-elf*.
1616 2015-04-30 H.J. Lu <hongjiu.lu@intel.com>
1618 * elf32-i386.c (elf_backend_post_process_headers): Undef for
1621 2015-04-30 Nick Clifton <nickc@redhat.com>
1624 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
1626 (mep_reloc): Delete unused function.
1628 2015-04-29 Nick Clifton <nickc@redhat.com>
1631 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
1634 2015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1636 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
1637 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
1638 elf_s390_merge_obj_attributes.
1639 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
1641 2015-04-24 Jiong Wang <jiong.wang@arm.com>
1644 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
1645 GOT_NORMAL for both sgot/srelgot section.
1646 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
1647 and generate necessary runtime relocation for GOT entry.
1649 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1652 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
1654 2015-04-24 Jiong Wang <jiong.wang@arm.com>
1656 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
1657 PC-relative relocation for external symbol.
1659 2015-04-24 Nick Clifton <nickc@redhat.com>
1662 * compress.c (decompress_contents): Zero initialse the z_stream
1665 2015-04-24 Nick Clifton <nickc@redhat.com>
1667 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
1668 local labels to include local labels with a numeric suffix and
1671 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1674 * section.c (SEC_MEP_VLIW): New.
1675 * bfd-in2.h: Regenerated.
1677 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1680 * compress.c (bfd_compress_section_contents): Remove the
1681 write_compress argument.
1682 (bfd_init_section_compress_status): Updated.
1683 (bfd_compress_section): Likewise.
1684 * elf.c (_bfd_elf_set_reloc_sh_name): New.
1685 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
1686 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
1687 _bfd_elf_set_reloc_sh_name.
1688 (elf_fake_sections): Don't rename DWARF debug section for
1689 linker output if it will be compressed. Instead, set
1690 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
1691 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
1692 sh_name != (unsigned int) -1. Don't finalize nor assign
1693 shstrtab section here. Delay setting output section names to
1694 _bfd_elf_write_object_contents.
1695 (_bfd_elf_compute_section_file_positions): Update comments on
1696 sh_offset for shstrtab section.
1697 (assign_file_positions_for_non_load_sections): Set sh_offset to
1698 -1 for shstrtab section.
1699 (assign_file_positions_except_relocs): Likewise.
1700 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
1701 when compressing DWARF debug sections. Place shstrtab section
1702 after DWARF debug sections have been compressed.
1703 (_bfd_elf_write_object_contents): Setting sh_name for output
1706 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1709 * bfd.c (bfd): Add is_linker_input.
1710 * elf.c (convert_debug_to_zdebug): New.
1711 (convert_zdebug_to_debug): Likewise.
1712 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
1713 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
1714 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
1715 instead of a pointer to section.
1716 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
1718 * section.c (SEC_ELF_RENAME): New.
1719 * bfd-in2.h: Regenerated.
1721 2015-04-23 Alan Modra <amodra@gmail.com>
1723 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
1724 (ppc64_elf_next_toc_section): Align multi-got toc base.
1725 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
1727 2015-04-22 H.J. Lu <hongjiu.lu@intel.com>
1730 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
1731 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
1732 (elf_i386_create_dynamic_sections): Always allow copy relocs for
1733 building executables.
1734 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
1735 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
1736 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
1737 PIE and R_386_GOTOFF.
1738 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
1740 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1742 * elf.c (assign_section_numbers): Always set up sh_name.
1744 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1746 * elf.c (assign_file_positions_for_non_load_sections): Iterate
1747 sections by pointer.
1748 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
1750 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
1752 * bfd-in.h (compressed_debug_section_type): New.
1753 * compress.c (bfd_compress_section_contents): Add an argument
1754 for linker write compression and always generate .zdebug_*
1755 section when linking.
1756 (bfd_init_section_compress_status): Pass FALSE to
1757 bfd_compress_section_contents.
1758 (bfd_compress_section): New function.
1759 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
1760 on DWARF debug sections if COMPRESS_DEBUG is set and rename
1761 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
1762 (assign_file_positions_for_non_load_sections): Set sh_offset
1763 to -1 if SEC_ELF_COMPRESS is set.
1764 (assign_file_positions_except_relocs): Likwise.
1765 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
1766 (_bfd_elf_assign_file_positions_for_non_load): This. Change
1767 return time to bfd_boolean. Compress the section if
1768 SEC_ELF_COMPRESS is set.
1769 (_bfd_elf_write_object_contents): Updated.
1770 (_bfd_elf_set_section_contents): Write section contents to
1771 the buffer if SEC_ELF_COMPRESS is set.
1772 * merge.c: Include "elf-bfd.h".
1773 (sec_merge_emit): Add arguments for contents and offset. Write
1774 to contents with offset if contents isn't NULL.
1775 (_bfd_write_merged_section): Write section contents to the
1776 buffer if SEC_ELF_COMPRESS is set. Pass contents and
1777 output_offset to sec_merge_emit.
1778 * elflink.c (bfd_elf_final_link): Allocate the buffer for
1779 output section contents if SEC_ELF_COMPRESS is set.
1780 * section.c (SEC_ELF_COMPRESS): New.
1781 * bfd-in2.h: Regenerated.
1783 2015-04-15 Alan Modra <amodra@gmail.com>
1785 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
1787 2015-04-14 Nick Clifton <nickc@redhat.com>
1789 * elf32-rl78.c (RL78_OP_REL): New macro.
1790 (rl78_elf_howto_table): Use it for complex relocs.
1791 (get_symbol_value): Handle the cases when the info or status
1793 (get_romstart): Cache the status returned by get_symbol_value.
1794 (get_ramstart): Likewise.
1795 (RL78_STACK_PUSH): Generate an error message if the stack
1797 (RL78_STACK_POP): Likewise for underflows.
1798 (rl78_compute_complex_reloc): New function. Contains the basic
1799 processing code for all RL78 complex relocs.
1800 (rl78_special_reloc): New function. Provides special reloc
1801 handling for complex relocs.
1802 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
1803 (rl78_offset_for_reloc): Likewise.
1805 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
1808 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
1809 info->extern_protected_data when warning copy relocs against
1811 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
1812 when checking protected non-function symbols.
1814 2015-04-13 John Baldwin <jhb@FreeBSD.org>
1816 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
1818 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
1820 2015-04-13 H.J. Lu <hongjiu.lu@intel.com>
1823 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
1824 if the object has been claimed by plugin.
1826 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
1828 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
1829 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
1830 protected data symbol when building shared library.
1831 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
1832 R_X86_64_GOTOFF64 against undefined symbol and replace
1833 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
1834 R_X86_64_GOTOFF64 against protected data symbol when building
1837 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1840 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
1841 against protected data symbol when building shared library.
1842 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
1843 R_X86_64_GOTOFF64 against protected data symbol when building
1846 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1850 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
1851 * elf32-i386.c (elf_backend_extern_protected_data): New.
1853 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1854 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1855 copy relocs against protected symbols if extern_protected_data
1857 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
1858 non-function symbols if extern_protected_data is true.
1859 * elfxx-target.h (elf_backend_extern_protected_data): New.
1861 (elfNN_bed): Initialize extern_protected_data with
1862 elf_backend_extern_protected_data.
1864 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1866 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
1867 and free with bfd_alloc and bfd_release on compressed buffer.
1868 Release buffer if compressed section isn't smaller.
1870 2015-04-10 Alan Modra <amodra@gmail.com>
1873 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
1874 on adding a protected visibility variable to .dynbss.
1876 2015-04-10 Alan Modra <amodra@gmail.com>
1878 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
1881 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
1882 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
1883 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1884 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
1885 extern_protected_data test.
1886 (_bfd_elf_symbol_refs_local_p): Likewise.
1887 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
1888 (elfNN_bed): Delete elf_backend_extern_protected_data init.
1890 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
1892 * compress.c (bfd_compress_section_contents): Update comments.
1893 (bfd_init_section_decompress_status): Likewise.
1894 (bfd_init_section_compress_status): Likewise.
1896 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
1898 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
1900 (TARGET_LITTLE_SYM): Likewise.
1902 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1904 * elf32-xtensa.c (splay-tree.h): include header.
1905 (text_action_struct): drop next pointer.
1906 (text_action_list_struct): drop head pointer, add count and
1908 (find_fill_action): instead of linear search in text_action_list
1910 (text_action_compare, action_first, action_next): new functions.
1911 (text_action_add, text_action_add_literal): instead of linear
1912 search and insertion insert new node into the tree.
1913 (removed_by_actions): pass additional parameter: action_list,
1914 use it to traverse the tree.
1915 (offset_with_removed_text): pass additional action_list parameter
1916 to removed_by_actions.
1917 (map_action_fn_context): new typedef.
1918 (map_action_fn_context_struct): new structure.
1919 (map_action_fn): new function.
1920 (map_removal_by_action): use splay_tree_foreach to build map.
1921 (find_insn_action): replace linear search in text_action_list
1922 with series of splay_tree_lookups.
1923 (print_action, print_action_list_fn): new functions.
1924 (print_action_list): use splay_tree_foreach.
1925 (init_xtensa_relax_info): drop action_list.head initialization.
1926 Initialize the tree.
1927 (compute_text_actions): use non-zero action_list_count instead of
1928 non-NULL action list.
1929 (xlate_map_context): new typedef.
1930 (xlate_map_context_struct): new structure.
1931 (xlate_map_fn): new function.
1932 (build_xlate_map): use splay_tree_foreach to build map.
1933 (action_remove_bytes_fn): new function.
1934 (relax_section): use zero action_list_count instead of NULL
1935 action list. Use splay_tree_foreach to count final section size.
1936 Drop unused variable 'removed'.
1938 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1940 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
1941 (removed_literal_map_entry_struct): new structure.
1942 (removed_literal_list_struct): add new fields: n_map and map.
1943 (map_removed_literal, removed_literal_compare): new functions.
1944 (find_removed_literal): build index array for literals ordered
1945 by VMA, use binary search to find removed literal.
1947 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1949 * elf32-xtensa.c (removal_by_action_entry_struct,
1950 removal_by_action_map_struct): new structures.
1951 (removal_by_action_entry, removal_by_action_map): new typedefs.
1952 (text_action_list_struct): add new field: map.
1953 (map_removal_by_action, removed_by_actions_map,
1954 offset_with_removed_text_map): new functions.
1955 (relax_section): replace offset_with_removed_text with
1956 offset_with_removed_text_map.
1957 (translate_reloc, relax_property_section, relax_section_symbols):
1958 replace removed_by_actions with removed_by_actions_map.
1960 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1962 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
1963 reloc_range): new typedef.
1964 (reloc_range_list_struct, reloc_range_list_entry_struct,
1965 reloc_range_struct): new structures.
1966 (reloc_range_compare, build_reloc_ranges,
1967 reloc_range_list_append, reloc_range_list_remove,
1968 reloc_range_list_update_range, free_reloc_range_list): new
1970 (compute_text_actions): precompute relocation opcodes before the
1971 loop. Add relevant_relocs variable, initialize it before the
1972 loop, pass it to the check_section_ebb_pcrels_fit.
1973 (check_section_ebb_pcrels_fit): add new parameter:
1974 relevant_relocs. Update address range in the relevant_relocs if
1975 it's non-NULL and iterate only over relevant relocations.
1977 2015-04-09 Nick Clifton <nickc@redhat.com>
1979 * elf32-rx.c (describe_flags): Report the settings of the string
1981 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
1984 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1986 * compress.c (bfd_compress_section_contents): Work around a GCC
1987 uninitialized warning bug fixed in GCC 4.7.
1989 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1991 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
1993 * bfd.c (bfd::flags): Increase size to 18 bits.
1994 (BFD_COMPRESS_GABI): New.
1995 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
1996 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1997 (bfd_update_compression_header): New fuction.
1998 (bfd_check_compression_header): Likewise.
1999 (bfd_get_compression_header_size): Likewise.
2000 (bfd_is_section_compressed_with_header): Likewise.
2001 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
2002 (bfd_compress_section_contents): Return the uncompressed size if
2003 the full section contents is compressed successfully. Support
2004 converting from/to .zdebug* sections.
2005 (bfd_get_full_section_contents): Call
2006 bfd_get_compression_header_size to get compression header size.
2007 (bfd_is_section_compressed): Renamed to ...
2008 (bfd_is_section_compressed_with_header): This. Add a pointer
2009 argument to return compression header size.
2010 (bfd_is_section_compressed): Use it.
2011 (bfd_init_section_decompress_status): Call
2012 bfd_get_compression_header_size to get compression header size.
2013 Return FALSE if uncompressed section size is 0.
2014 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
2015 from/to .zdebug* sections.
2016 * bfd-in2.h: Regenerated.
2018 2015-04-07 Alan Modra <amodra@gmail.com>
2020 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
2021 mapped to output .got section.
2023 2015-04-07 Alan Modra <amodra@gmail.com>
2025 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
2026 and has_addr16_lo. Make has_sda_refs a bitfield.
2027 (ppc_elf_check_relocs): Set new flags.
2028 (ppc_elf_link_hash_table_create): Update default_params.
2029 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
2030 where we won't be making .dynbss entries or editing code. Set
2031 params->pic_fixup when we'll edit code for protected var access.
2032 (allocate_dynrelocs): Allocate got entry for edited code and
2034 (struct ppc_elf_relax_info): Add picfixup_size.
2035 (ppc_elf_relax_section): Rename struct one_fixup to struct
2036 one_branch_fixup. Rename fixups to branch_fixups. Size space for
2038 (ppc_elf_relocate_section): Edit non-PIC accessing protected
2039 visibility variables to PIC. Don't emit dyn_relocs for code
2041 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
2043 2015-04-07 Nick Clifton <nickc@redhat.com>
2045 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
2046 local labels as local.
2048 2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
2050 * compress.c (get_uncompressed_size): Removed.
2051 (bfd_compress_section_contents): Use bfd_putb64 to write
2052 uncompressed section size.
2053 (bfd_init_section_decompress_status): Replace
2054 get_uncompressed_size with bfd_getb64.
2056 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2058 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
2059 SHF_COMPRESSED bit if not decompress.
2061 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2063 * compress.c (get_uncompressed_size): New. Extracted from ...
2064 (bfd_init_section_decompress_status): This. Use it.
2066 2015-04-02 Andrew Turner <andrew@freebsd.org>
2068 * config.bfd: Add aarch64-*-freebsd* target triple.
2070 2015-04-02 H.J. Lu <hongjiu.lu@intel.com>
2072 * configure: Regenerated.
2074 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
2075 Marcus Shawcroft <marcus.shawcroft@arm.com>
2076 Jiong Wang <jiong.wang@arm.com>
2078 * bfd-in.h (bfd_elf64_aarch64_set_options)
2079 (bfd_elf32_aarch64_set_options): Add parameter.
2080 * bfd-in2.h: Regenerated.
2081 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
2082 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
2083 (_bfd_aarch64_erratum_843419_stub_name)
2084 (_bfd_aarch64_erratum_843419_fixup)
2085 (_bfd_aarch64_erratum_843419_scan)
2086 (_bfd_aarch64_erratum_843419_branch_to_stub)
2087 (_bfd_aarch64_erratum_843419_p): Define.
2088 (enum elf_aarch64_stub_type): Define
2089 aarch64_stub_erratum_843419_veneer.
2090 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
2091 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
2092 and fix_erratum_843419_adr.
2093 (stub_hash_newfunc): Initialize adrp_offset;
2094 (_bfd_aarch64_add_stub_entry_after): Define.
2095 (aarch64_map_one_stub, aarch64_build_one_stub)
2096 (aarch64_size_one_stub): Handle
2097 aarch64_stub_erratum_843419_veneer.
2098 (_bfd_aarch64_resize_stubs): Round stub section size.
2099 (elfNN_aarch64_size_stubs): Add scan for 843419.
2100 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
2101 fix_erratum_843419 and fix_erratum_843419_adr.
2102 (struct erratum_835769_branch_to_stub_data): Add info.
2103 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
2104 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
2105 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
2106 (_bfd_aarch64_sign_extend): Define.
2107 (reencode_adr_imm): Remove static. Rename to:
2108 (_bfd_aarch64_reencode_adr_imm): Define.
2109 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
2110 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
2111 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
2112 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
2115 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
2117 * configure: Regenerated.
2119 2015-03-31 Ed Schouten <ed@nuxi.nl>
2121 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
2122 for x86_64-*-cloudabi*.
2123 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
2124 * configure: Regenerated.
2125 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
2126 (TARGET_LITTLE_NAME): Likewise.
2127 (ELF_OSABI): Likewise.
2128 (elf64_bed): Likewise.
2129 * targets.c (x86_64_elf64_cloudabi_vec): New.
2130 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
2132 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
2134 * configure.ac: Revert the AM_ZLIB change.
2135 * Makefile.in: Regenerated.
2136 * aclocal.m4: Likewise.
2137 * configure: Likewise.
2138 * doc/Makefile.in: Likewise.
2140 2015-03-30 H.J. Lu <hongjiu.lu@intel.com>
2143 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
2144 (_bfd_elf_get_reloc_section): New.
2145 * elf.c (_bfd_elf_get_reloc_section): Likewise.
2146 (assign_section_numbers): Call get_reloc_section to look up the
2147 section the relocs apply.
2148 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
2149 (elfNN_bed): Initialize get_reloc_section with
2150 elf_backend_get_reloc_section.
2152 2015-03-29 H.J. Lu <hongjiu.lu@intel.com>
2154 * Makefile.am (ZLIB): New.
2155 (ZLIBINC): Likewise.
2156 (AM_CFLAGS): Add $(ZLIBINC).
2157 (libbfd_la_LIBADD): Add $(ZLIB).
2158 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
2159 (decompress_contents): Don't check HAVE_ZLIB_H.
2160 (bfd_compress_section_contents): Likewise.
2161 (bfd_get_full_section_contents): Likewise.
2162 (bfd_init_section_decompress_status): Likewise.
2163 (bfd_init_section_compress_status): Likewise.
2164 * configure.ac (AM_ZLIB): Removed.
2165 (zlibdir): New. AC_SUBST.
2166 (zlibinc): Likewise.
2167 Add --with-system-zlib.
2168 * Makefile.in: Regenerated.
2169 * acinclude.m4: Likewise.
2170 * config.in: Likewise.
2171 * configure: Likewise.
2172 * doc/Makefile.in: Likewise.
2174 2015-03-27 Alan Modra <amodra@gmail.com>
2178 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
2179 protected_def when symbol section is read-only. Adjust all calls.
2180 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
2182 2015-03-26 Tejas Belagod <tejas.belagod@arm.com>
2184 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
2185 _bfd_final_link_relocate with aarch64_relocate.
2187 2015-03-26 H.J. Lu <hongjiu.lu@intel.com>
2190 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
2191 (bfd_elf_gc_sections): Likewise.
2193 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2195 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
2196 size for initial branch.
2197 (elfNN_aarch64_build_stubs): Write initial branch.
2198 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
2199 mapping symbol on initial branch.
2201 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2203 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
2204 Update erratum count.
2206 2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2208 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
2209 first matching debug section.
2211 2015-03-24 H.J. Lu <hongjiu.lu@intel.com>
2214 * compress.c (bfd_compress_section_contents): Don't write the
2215 zlib header and set contents as well as compress_status if
2216 compression didn't make the section smaller.
2217 (bfd_init_section_compress_status): Don't check compression
2220 2015-03-24 Nick Clifton <nickc@redhat.com>
2223 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
2224 range auxillary sections.
2226 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2228 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
2230 (_bfd_aarch64_get_stub_for_link_section): Define.
2232 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2234 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
2235 update of section_group[].stub_sec.
2237 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2239 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
2240 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
2241 Delete fixes, fix_table_size and associated code. Call
2242 _bfd_aarch64_add_stub_entry_in_group. Rename to...
2243 (bfd_aarch64_erratum_835769_scan): Define.
2244 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
2245 erratum_835769_fix_table_size, i and associated code. Relocate
2246 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
2247 correction. Delete construction of stub entry from
2248 erratum_835769_fixes array.
2250 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2252 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
2253 _bfd_aarch64_add_stub_entry_in_group.
2255 2015-03-24 Alan Modra <amodra@gmail.com>
2257 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
2258 stubs, even those for undefined weak symbols. Otherwise, don't
2259 report relocation overflow on branches to undefined strong
2260 symbols. Fix memory leak.
2261 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
2262 overflow on branches to undefined strong symbols.
2264 2015-03-23 Keith Seitz <keiths@redhat.com>
2266 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
2269 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2271 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
2272 construction into...
2273 (_bfd_aarch64_erratum_835769_stub_name): Define.
2275 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2277 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
2278 stub resize code into...
2279 (bfd_aarch64_resize_stubs): Define.
2281 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2283 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
2284 creation code into...
2285 (bfd_aarch64_create_stub_section): Define.
2287 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2289 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
2290 from elf_aarch64_create_or_find_stub_sec.
2291 (_bfd_aarch64_add_stub_entry_in_group): Rename from
2292 elfNN_aarch64_add_stub. Call
2293 _bfd_aarch64_create_or_find_stub_sec.
2294 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
2295 _bfd_aarch64_add_stub_entry_in_group.
2297 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2299 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
2300 sense of boolean return.
2301 (elfNN_aarch64_size_stubs): Adjust for above.
2303 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2305 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
2306 Remove unused parameter.
2307 (elfNN_aarch64_size_stubs): Adjust for above.
2309 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2311 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
2313 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2315 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
2316 (num_aarch64_erratum_835769_fixes): Remove.
2317 (elfNN_aarch64_size_stubs): Remove assignments to above.
2319 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2321 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
2323 (aarch64_erratum_seqeunce): Rename rtn to rt2.
2325 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2327 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
2329 2015-03-19 Nick Clifton <nickc@redhat.com>
2331 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
2332 the RL78 core based upon the flags.
2333 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
2335 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
2336 (elf32_rl78_machine): Always return bfd_mach_rl78.
2338 2015-03-19 Nick Clifton <nickc@redhat.com>
2341 * compress.c (bfd_compress_section_contents): Do not define this
2342 function if it is not used.
2344 2015-03-18 H.J. Lu <hongjiu.lu@intel.com>
2346 * compress.c (bfd_compress_section_contents): Make it static.
2347 * bfd/bfd-in2.h: Regenerated.
2349 2015-03-18 Eric Youngdale <eyoungdale@ptc.com>
2352 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
2353 suitable for the AMD64.
2355 2015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
2356 Nick Clifton <nickc@redhat.com>
2359 * coffgen.c (make_a_section_from_file): Only prepend a z to a
2360 debug section's name if the section was actually compressed.
2361 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
2362 * compress.c (bfd_init_section_compress_status): Do not compress
2363 the section if doing so would make it bigger. In such cases leave
2364 the section alone and return COMPRESS_SECTION_NONE.
2366 2015-03-17 Alan Modra <amodra@gmail.com>
2368 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
2369 on nothing to do, before malloc of returned symbol array.
2371 2015-03-16 Nick Clifton <nickc@redhat.com>
2373 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
2374 stored in the elf_section_data structure then load them as
2377 2015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2379 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
2380 relocs against code sections.
2381 * elf32-s390.c: Define elf_backend_sort_relocs_p.
2382 * elf64-s390.c: Likewise.
2384 2015-03-11 Alan Modra <amodra@gmail.com>
2386 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
2387 reverse order. Account for larger size of __tls_get_addr_opt stub.
2389 2015-03-10 Yuri Gribov <y.gribov@samsung.arm>
2392 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
2394 (elf32_arm_print_private_bfd_data): Likewise.
2396 2015-03-06 Nick Clifton <nickc@redhat.com>
2399 * elflink.c (put_value): Like previous delta, but for the 32-bit
2402 2015-03-05 Nick Clifton <nickc@redhat.com>
2405 * elflink.c (put_value): Avoid using an undefined shift
2408 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
2412 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2413 * elf32-i386.c (elf_backend_extern_protected_data): New.
2415 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2416 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2417 copy relocs against protected symbols if extern_protected_data
2419 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2420 non-function symbols if extern_protected_data is true.
2421 * elfxx-target.h (elf_backend_extern_protected_data): New.
2423 (elfNN_bed): Initialize extern_protected_data with
2424 elf_backend_extern_protected_data.
2426 2015-03-05 Nick Clifton <nickc@redhat.com>
2429 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
2430 lookup fails, check for an address bias in the dwarf info, and if
2431 one exists, retry the lookup with the biased value.
2432 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
2433 Determines if a bias exists bewteen the addresses of functions
2434 based on DWARF information vs symbol table information.
2435 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
2436 * libbfd.h: Regenerate.
2438 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2440 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
2441 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
2442 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
2444 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2446 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
2447 (aarch64_size_one_stub): Likewise.
2448 (aarch64_map_one_stub): Likewise.
2450 2015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
2452 * cpu-s390.c (N): New macro.
2453 (bfd_s390_31_arch): New. Define only if default target word size
2454 is 64 bits. Otherwise define...
2455 (bfd_390_64_arch): ...this. Make static.
2456 (bfd_s390_arch): Define according to the default target word size.
2457 Let the 'next' field point to the alternate arch.
2459 2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
2462 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
2463 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
2464 to be used with MOVK rather than MOVZ.
2466 2015-03-03 DJ Delorie <dj@redhat.com>
2468 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
2471 2015-02-28 Alan Modra <amodra@gmail.com>
2473 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
2476 2015-02-27 H.J. Lu <hongjiu.lu@intel.com>
2478 * elf32-i386.c (need_convert_mov_to_lea): New.
2479 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
2480 (elf_i386_convert_mov_to_lea): Return TRUE if
2481 need_convert_mov_to_lea is unset.
2482 * elf64-x86-64.c (need_convert_mov_to_lea): New.
2483 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
2484 (elf_x86_64_convert_mov_to_lea): Return TRUE if
2485 need_convert_mov_to_lea is unset.
2487 2015-02-27 Nick Clifton <nickc@redhat.com>
2490 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
2491 string length overflow when the string table length is actually
2494 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
2496 * bfd/bfd-in2.h: Regenerate.
2497 * bfd/libbfd.h: Regenerate.
2499 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2501 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
2502 TLSDESC_LD_PREL19 field width and masks.
2503 (aarch64_tls_transition_without_check)
2504 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2505 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2506 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2507 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
2508 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2509 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2511 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2513 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
2515 (aarch64_tls_transition_without_check)
2516 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2517 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2518 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2519 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
2520 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2521 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2522 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2524 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2526 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
2527 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
2528 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2529 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2530 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2531 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
2532 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2533 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2534 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2536 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2538 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
2539 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
2540 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
2541 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
2542 (elfNN_aarch64_check_relocs): Handle
2543 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
2545 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2546 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2548 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2550 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
2552 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2554 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
2555 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
2556 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
2559 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2561 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
2564 2015-02-26 Nick Clifton <nickc@redhat.com>
2567 * coffcode.h (coff_compute_section_file_positions): Report
2568 negative page sizes.
2569 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
2570 (assign_file_positions_for_non_load_sections): Replace assertion
2571 with an error message.
2572 (rewrite_elf_program_header): Handle excessive segment
2574 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
2575 (bfd_mach_o_read_section_64): Likewise.
2576 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
2577 print a bfd name, not %A.
2579 2015-02-26 Alan Modra <amodra@gmail.com>
2581 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
2582 thread-safe stubs for iplt.
2583 (build_tls_get_addr_stub): Restore r2 immediately after call.
2585 2015-02-26 Terry Guo <terry.guo@arm.com>
2587 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
2588 merge Tag_ABI_HardFP_use.
2590 2015-02-26 Alan Modra <amodra@gmail.com>
2592 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
2593 Use text relocs rather than giving an error on trying to use
2594 .dynbss for protected shared lib vars.
2595 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
2597 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2599 * elf32-avr.c (struct elf_avr_section_data): New structure.
2600 (struct avr_relax_info): New structure.
2601 (elf_avr_new_section_hook): New function.
2602 (struct elf_avr_section_data): Add relax_info.
2603 (get_avr_relax_info): New function.
2604 (init_avr_relax_info): New function.
2605 (elf32_avr_relax_delete_bytes): Find next property record before
2606 deleting bytes. When deleting don't move bytes beyond the next
2608 (avr_elf32_assign_records_to_section): New function.
2609 (avr_property_record_compare): New function.
2610 (avr_load_all_property_sections): New function.
2611 (elf32_avr_relax_section): Load property data. After relaxing the
2612 section, move any .align directives that have enough deleted bytes
2614 (bfd_elf32_new_section_hook): Define.
2616 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2618 * elf32-avr.h (struct avr_property_header): New strucure.
2619 (avr_elf32_load_property_records): Declare.
2620 (avr_elf32_property_record_name): Declare.
2621 * elf32-avr.c: Add bfd_stdint.h include.
2622 (retrieve_local_syms): New function.
2623 (get_elf_r_symndx_section): New function.
2624 (get_elf_r_symndx_offset): New function.
2625 (internal_reloc_compare): New function.
2626 (struct avr_find_section_data): New structure.
2627 (avr_is_section_for_address): New function.
2628 (avr_find_section_for_address): New function.
2629 (avr_elf32_load_records_from_section): New function.
2630 (avr_elf32_load_property_records): New function.
2631 (avr_elf32_property_record_name): New function.
2633 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2635 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
2636 (AVR_PROPERTY_RECORDS_VERSION): Define.
2637 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
2638 (struct avr_property_record): New structure.
2640 2015-02-24 Nick Clifton <nickc@redhat.com>
2642 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
2644 (v850_elf_make_note_section): New function. Creates a note
2646 (v850_elf_create_sections): New function. Create a note section
2647 if one is not already present.
2648 (v850_elf_set_note): New function. Adds a note to a bfd.
2649 (v850_elf_copy_private_bfd_data): New function. Copies V850
2651 (v850_elf_merge_notes): New function. Merges V850 notes.
2652 (print_v850_note): New function. Displays a V850 note.
2653 (v850_elf_print_notes): New function. Displays all notes attached
2655 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
2656 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
2657 (v850_elf_fake_sections): Set the type of the V850 note section.
2658 * bfd-in.h (v850_elf_create_sections): Add prototype.
2659 (v850_elf_set_note): Add prototype.
2660 * bfd-in2.h: Regenerate.
2662 2015-02-24 Nick Clifton <nickc@redhat.com>
2664 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
2665 * configure: Regenerate.
2666 * config.in: Regenerate.
2667 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
2668 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
2669 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
2672 2015-02-24 Nick Clifton <nickc@redhat.com>
2674 * pdp11.c (set_section_contents): Pad the .text and .data sections
2675 to their aligned sizes.
2677 2015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
2679 * config.bfd: Add h8300-*-linux.
2680 * configure.ac: Add h8300_elf32_linux_vec.
2681 * configure: Regenerate.
2682 * elf32-h8300.c: Likewise.
2683 * targets.c(_bfd_target_vector): Likewise.
2685 2015-02-23 Nick Clifton <nickc@redhat.com>
2688 * cpu-w65.c: Correct typos in license notice.
2691 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
2692 symbols at end of sections. Adjust function sizes.
2694 2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
2696 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
2697 (elfcore_write_s390_vxrs_high): Likewise.
2698 * elf.c (elfcore_grok_s390_vxrs_low): New function.
2699 (elfcore_grok_s390_vxrs_high): New function.
2700 (elfcore_grok_note): Call them.
2701 (elfcore_write_s390_vxrs_low): New function.
2702 (elfcore_write_s390_vxrs_high): New function.
2703 (elfcore_write_register_note): Call them.
2705 2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
2708 * verilog.c (verilog_write_record): Correct buffer size.
2710 2015-02-19 Alan Modra <amodra@gmail.com>
2712 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
2714 2015-02-19 Alan Modra <amodra@gmail.com>
2717 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
2718 (elf_link_output_extsym): Drop local and global undefined syms.
2719 Tidy. Expand comment.
2721 2015-02-17 Alan Modra <amodra@gmail.com>
2724 * elflink.c (struct elf_outext_info): Remove need_second_pass
2726 (elf_link_output_extsym): Delete code handling second forced
2727 local pass. Move code emitting NULL STT_FILE symbol later, so
2728 that it can be omitted if forced local is stripped. Don't
2729 emit the NULL STT_FILE if no file symbols have been output.
2730 (bfd_elf_final_link): Remove second forced local pass.
2731 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
2732 (ppc_elf_size_dynamic_sections): Likewise.
2733 * elf64-ppc.c (ppc_build_one_stub): Likewise.
2734 (build_global_entry_stubs): Likewise.
2735 (ppc64_elf_build_stubs): Likewise.
2737 2015-02-16 H.J. Lu <hongjiu.lu@intel.com>
2740 * elflink.c (elf_link_output_extsym): Only check filesym_count
2741 when outputting a NULL FILE symbol. Set second_pass_sym to
2742 h->forced_local && !h->root.linker_def.
2744 2015-02-15 H.J. Lu <hongjiu.lu@intel.com>
2746 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
2747 on _TLS_MODULE_BASE_.
2748 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
2750 2015-02-15 Alan Modra <amodra@gmail.com>
2752 * dwarf2.c (read_rangelist): Correct buffer overflow check
2753 Whitespace throughout file.
2755 2015-02-14 Alan Modra <amodra@gmail.com>
2758 * bfd.c (struct bfd): Add lto_output.
2759 * linker.c (_bfd_handle_already_linked): Explicitly test for
2760 objects added by the lto plugin.
2761 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
2762 no_export flags from archive.
2763 * archive.c (open_nested_file): New function, setting lto_output
2764 and no_export, extracted from..
2765 (find_nested_archive): ..here. Flip params. Rename from
2766 _bfd_find_nested_archive.
2767 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
2768 (_bfd_look_for_bfd_in_cache): Copy no_export.
2769 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
2770 my_archive->no_export test.
2771 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
2772 Don't use the file name when adding lto_output STT_FILE sym.
2773 * bfd-in2.h: Regenerate.
2775 2015-02-13 Alan Modra <amodra@gmail.com>
2778 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
2779 now redundant assert.
2781 2015-02-12 Nick Clifton <nickc@redhat.com>
2784 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
2785 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
2786 (read_indirect_string, read_alt_indirect_string)
2787 (read_alt_indirect_ref, read_address, read_abbrevs)
2788 (read_attribute_value, read_attribute, decode_line_info)
2789 (find_abstract_instance_name, read_rangelist)
2790 (scan_unit_for_symbols, parse_comp_unit)
2791 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
2792 end pointers to reading functions and check for offsets taking
2793 pointers out of range. Replace calls to read_*_leb128 with calls
2794 to safe_read_leb128.
2796 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
2798 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
2799 computed file_name address being before the start of the string
2802 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
2805 * bfd.c (bfd_plugin_format): New.
2806 (bfd): Add plugin_format and plugin_dummy_bfd.
2807 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
2808 argument to return TRUE if any plugin is found. Set plugin_format.
2810 (bfd_plugin_target_p): New.
2811 (bfd_plugin_specified_p): Likewise.
2812 (bfd_plugin_target_p): Likewise.
2813 (register_ld_plugin_object_p): Likewise.
2814 (bfd_plugin_set_plugin): Set has_plugin.
2815 (load_plugin): Cache try_load_plugin result.
2816 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
2818 * plugin.h (bfd_plugin_target_p): New.
2819 (bfd_plugin_specified_p): Likewise.
2820 (register_ld_plugin_object_p): Likewise.
2821 * bfd-in2.h: Regenerated.
2823 2015-02-11 Pedro Alves <palves@redhat.com>
2825 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
2826 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
2827 * libbfd.h: Regenerate.
2828 * libcoff.h: Regenerate.
2830 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
2831 * mach-o.h [__cplusplus]: Wrap in extern "C".
2832 * som.h [__cplusplus]: Wrap in extern "C".
2834 2015-02-10 Nick Clifton <nickc@redhat.com>
2837 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
2839 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
2840 size and number of relocs.
2841 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
2843 * versados.c (process_otr): Check the esdid value before using it
2844 to access the EDATA.
2846 2015-02-09 Ed Maste <emaste@freebsd.org>
2848 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
2849 uninitialized and unused variable.
2850 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2852 2015-02-09 Alan Modra <amodra@gmail.com>
2854 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
2856 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2857 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
2859 2015-02-09 Alan Modra <amodra@gmail.com>
2861 * elflink.c: Whitespace, formatting fixes.
2862 (elf_link_input_bfd): Clarify comment.
2863 (elf_link_output_extsym): Exclude symbols in linker created
2864 sections when testing for plugin symbols.
2866 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
2869 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
2870 warning for relocation in readonly section for -z text.
2871 (elf_i386_size_dynamic_sections): Likewise.
2872 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
2873 (elf_x86_64_size_dynamic_sections): Likewise.
2875 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
2879 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
2880 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
2881 referenced from a non-IR file.
2883 2015-02-06 Nick Clifton <nickc@redhat.com>
2886 * peXXigen.c (rsrc_print_resource_entries): Add range check for
2887 addresses that wrap around the address space.
2888 (rsrc_parse_entry): Likewise.
2890 2015-02-03 H.J. Lu <hongjiu.lu@intel.com>
2894 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
2895 undefined if it is referenced from a non-IR file.
2897 2015-02-03 Nick Clifton <nickc@redhat.com>
2900 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
2901 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
2902 index or an out of range fdr index.
2903 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
2904 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2905 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2906 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2907 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
2908 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
2909 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2910 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2911 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
2912 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2913 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2914 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
2915 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2916 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2917 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2918 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2919 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2920 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2921 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
2922 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2923 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2924 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2925 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2926 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2927 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2928 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2929 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2930 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2931 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
2932 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2933 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2934 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2935 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2936 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2937 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2938 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2939 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
2940 * elf32-vax.c (rtype_to_howto): Likewise.
2941 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2942 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2943 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2944 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2945 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2946 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
2947 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
2948 of range symbol indicies.
2949 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
2950 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
2951 (bfd_mach_o_build_dysymtab): Likewise.
2952 (bfd_mach_o_write_symtab_content): Set the string table size to
2954 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
2956 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
2958 * tekhex.c (first_phase): Check for src pointer reaching end of
2961 2015-02-03 Will Newton <will.newton@linaro.org>
2963 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
2964 Set st_value to zero for undefined symbols if the reference
2965 is weak or pointer_equality_needed is FALSE.
2967 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
2968 comment discussing why we clear st_value for some symbols.
2970 2015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2972 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
2973 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
2975 2015-01-29 Alan Modra <amodra@gmail.com>
2977 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
2978 optimization. Tidy mask for GOT_TLSGD optimization.
2979 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
2980 location of nop zapping high insn too.
2982 2015-01-28 Alan Modra <amodra@gmail.com>
2984 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
2985 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
2986 in .toc indicate xlc compiled code that might require a rw .toc.
2988 2015-01-28 James Bowman <james.bowman@ftdichip.com>
2990 * Makefile.am: Add FT32 files.
2991 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
2992 (bfd_mach_ft32): Define.
2993 (bfd_ft32_arch): Declare.
2994 (bfd_archures_list): Add bfd_ft32_arch.
2995 * config.bfd: Handle FT32.
2996 * configure.ac: Likewise.
2997 * cpu-ft32.c: New file.
2998 * elf32-ft32.c: New file.
2999 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
3000 BFD_RELOC_FT32_18): Define.
3001 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
3002 * bfd-in2.h: Regenerate.
3003 * libbfd.h: Regenerate.
3004 * Makefile.in: Regenerate.
3005 * configure: Regenerate.
3006 * po/SRC-POTFILES.in: Regenerate.
3008 2015-01-27 Nick Clifton <nickc@redhat.com>
3011 * pdp11.c (aout_get_external_symbols): Return false if there are
3014 * dwarf2.c (concat_filename): Check for an empty directory table.
3015 (scan_unit_for_symbols): Check for reading off the end of the
3017 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
3019 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
3022 2015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3024 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
3026 2015-01-22 DJ Delorie <dj@redhat.com>
3028 * elf32-m32c.c (m32c_apply_reloc_24): New.
3029 (m32c_elf_howto_table): Use it for R_M32C_24.
3030 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
3032 2015-01-22 Nick Clifton <nickc@redhat.com>
3035 * coffcode.h (handle_COMDAT): When searching for the section
3036 symbol, make sure that there is space left in the symbol table.
3037 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
3039 2015-01-21 Nick Clifton <nickc@redhat.com>
3042 * coffcode.h (coff_set_arch_mach_hook): Check return value from
3044 (coff_slurp_line_table): Return FALSE if the line number
3045 information was corrupt.
3046 (coff_slurp_symbol_table): Return FALSE if the symbol information
3048 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
3049 initialise the fields of the dyld_info structure.
3050 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
3051 error message and a return value.
3052 (bfd_mach_o_layout_commands): Change the function to boolean.
3053 Return FALSE if the function fails.
3054 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
3056 (bfd_mach_o_read_command): Fail if an unrecognised command is
3058 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
3060 (slurp_symtab): Check the return from bfd_malloc.
3061 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
3062 encountered an error.
3063 (_bfd_XXi_final_link_postscript): Fail if a section could not be
3065 * peicode.h (pe_bfd_object_p): Fail if the header could not be
3067 * tekhex.c (first_phase): Fail if the section is too big.
3068 * versados.c (struct esdid): Add content_size field.
3069 (process_otr): Use and check the new field.
3070 (versados_get_section_contents): Check that the section exists and
3071 that the requested data is available.
3073 2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
3075 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
3077 2015-01-20 Alan Modra <amodra@gmail.com>
3080 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
3081 ELF_COMMON_DEF syms.
3083 2015-01-19 Alan Modra <amodra@gmail.com>
3086 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
3087 linker script assignments too.
3088 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
3089 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
3091 2015-01-19 Alan Modra <amodra@gmail.com>
3093 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
3094 to allow return of first howto.
3095 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
3096 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
3097 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
3098 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
3099 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
3100 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
3101 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
3102 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
3103 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
3104 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
3105 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
3106 (spu_elf_reloc_type_lookup): Adjust to suit.
3108 2015-01-19 Alan Modra <amodra@gmail.com>
3110 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
3111 (bfd_get_section_limit): ..here.
3112 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
3113 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
3114 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
3115 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
3116 bfd_reloc_outofrange check.
3117 * bfd-in2.h: Regenerate.
3119 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
3120 on zero size relocs.
3121 * ecoff.c (ecoff_reloc_link_order): Likewise.
3122 * elf32-nds32.c (nds32_relocate_contents): Likewise.
3123 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3125 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
3126 (_bfd_clear_contents): Likewise.
3127 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
3128 (mips_elf_perform_relocation): Likewise.
3130 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
3131 from malloc on zero size alloc.
3132 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3133 * elflink.c (elf_reloc_link_order): Likewise.
3134 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3135 * pdp11.c (aout_link_reloc_link_order): Likewise.
3136 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3138 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
3139 bitsize 0, and complain_overflow_dont.
3140 * coff-sparc.c (coff_sparc_howto_table): Likewise.
3141 * elf-hppa.h (elf_hppa_howto_table): Likewise.
3142 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
3143 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
3144 * elf32-arc.c (elf_arc_howto_table): Likewise.
3145 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
3146 * elf32-avr.c (elf_avr_howto_table): Likewise.
3147 * elf32-bfin.c (bfin_howto_table): Likewise.
3148 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
3149 * elf32-cris.c (cris_elf_howto_table): Likewise.
3150 * elf32-crx.c (crx_elf_howto_table): Likewise.
3151 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
3152 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
3153 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
3154 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
3155 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
3156 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3157 * elf32-h8300.c (h8_elf_howto_table): Likewise.
3158 * elf32-i370.c (i370_elf_howto_raw): Likewise.
3159 * elf32-i386.c (elf_howto_table): Likewise.
3160 * elf32-i860.c (elf32_i860_howto_table): Likewise.
3161 * elf32-i960.c (elf32_i960_relocate): Likewise.
3162 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
3163 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
3164 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
3165 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
3166 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
3167 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
3168 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
3169 * elf32-m68k.c (howto_table): Likewise.
3170 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
3171 * elf32-mep.c (mep_elf_howto_table): Likewise.
3172 * elf32-metag.c (elf_metag_howto_table): Likewise.
3173 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
3174 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
3175 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
3176 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
3177 * elf32-mt.c (mt_elf_howto_table): Likewise.
3178 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
3179 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
3180 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
3181 * elf32-pj.c (pj_elf_howto_table): Likewise.
3182 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
3183 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
3184 * elf32-rx.c (rx_elf_howto_table): Likewise.
3185 * elf32-s390.c (elf_howto_table): Likewise.
3186 * elf32-score.c (elf32_score_howto_table): Likewise.
3187 * elf32-score7.c (elf32_score_howto_table): Likewise.
3188 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
3189 * elf32-spu.c (elf_howto_table): Likewise.
3190 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
3191 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
3192 * elf32-v850.c (v850_elf_howto_table): Likewise.
3193 * elf32-vax.c (howto_table): Likewise.
3194 * elf32-visium.c (visium_elf_howto_table): Likewise.
3195 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
3196 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
3197 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
3198 * elf32-xtensa.c (elf_howto_table): Likewise.
3199 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
3200 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
3201 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
3202 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
3203 * elf64-s390.c (elf_howto_table): Likewise.
3204 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
3205 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
3206 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
3207 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
3208 (elfNN_aarch64_howto_none): Likewise.
3209 * elfxx-ia64.c (ia64_howto_table): Likewise.
3210 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
3211 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
3212 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
3214 2015-01-15 H.J. Lu <hongjiu.lu@intel.com>
3217 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
3218 about -fPIC if the symbol is undefined when building executable.
3220 2015-01-15 Nick Clifton <nickc@redhat.com>
3223 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
3224 error message. Never return an invalid howto pointer.
3225 * elf32-cr16.c (cr16_info_to_howto): Likewise.
3226 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3227 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3228 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3229 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3230 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
3231 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3232 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3233 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3234 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
3235 * elf32-vax.c (rtype_to_howto): Likewise.
3236 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3237 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
3238 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
3239 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3240 (sh_elf_reloc): Check that the reloc is in range.
3241 * reloc.c (bfd_perform_relocation): Check that the section is big
3242 enough for the entire reloc.
3243 (bfd_generic_get_relocated_section_contents): Report unexpected
3244 return values from perform_reloc.
3246 2015-01-15 Nick Clifton <nickc@redhat.com>
3248 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
3249 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
3252 2015-01-15 Alan Modra <amodra@gmail.com>
3254 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
3255 any output section matching a linker created dynobj section.
3257 2015-01-15 Alan Modra <amodra@gmail.com>
3260 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
3261 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
3262 Don't assign symtab file position unless symbols will be output.
3263 Merge blocks with condition in common. Don't call
3264 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
3265 unless other symbols are output. Move assignment of symtab_shndx
3266 file position. Localize variable.
3268 2015-01-14 Jiong Wang <jiong.wang@arm.com>
3270 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
3271 trying to defer them to runtime.
3273 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3275 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
3276 to check if a symbol should be bound symbolically.
3278 2015-01-13 Jiong Wang <jiong.wang@arm.com>
3280 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
3281 for TLSLE_MOVW_TPREL_G2.
3283 2015-01-13 Jiong Wang <jiong.wang@arm.com>
3286 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
3287 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
3288 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
3291 2015-01-12 Terry Guo <terry.guo@arm.com>
3293 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
3295 (_bfd_elf_gc_mark_extra_sections): Use it.
3297 2015-01-11 H.J. Lu <hongjiu.lu@intel.com>
3300 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
3301 only discard space for pc-relative relocs symbols which turn
3302 out to need copy relocs.
3304 2015-01-09 Nick Clifton <nickc@redhat.com>
3306 * tekhex.c (getvalue): Fix thinko in test for correct extraction
3308 (getsym): Return false if there was not enough data to extract the
3311 2015-01-09 Anthony Green <green@moxielogic.com>
3313 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
3315 2015-01-08 Nick Clifton <nickc@redhat.com>
3317 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
3318 16-bit absolute BR instructions to 10-bit pc-relative JMP
3321 2015-01-08 Nick Clifton <nickc@redhat.com>
3324 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
3325 to load the line table.
3326 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
3328 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
3329 the Data Directory Size is too large.
3331 2015-01-06 H.J. Lu <hongjiu.lu@intel.com>
3334 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
3335 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3337 2015-01-06 Nick Clifton <nickc@redhat.com>
3340 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
3343 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
3344 (bfd_perform_relocation): Include the size of the reloc in the
3345 test for an out of range relocation.
3346 (bfd_generic_get_relocated_section_contents): Remove reloc range
3349 * coff-i860.c (CALC_ADDEND): Always set an addend value.
3350 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
3351 avoid reading off the end of the buffer.
3353 (first_phase): Likewise.
3354 (pass_over): Pass an end pointer to the invoked function.
3356 2015-01-05 H.J. Lu <hongjiu.lu@intel.com>
3359 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
3361 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3363 2015-01-05 Nick Clifton <nickc@redhat.com>
3366 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
3367 is at least big enough for the header to be read.
3368 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
3369 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
3370 (bfd_mach_o_read_command): Prevetn duplicate error messages about
3371 unrecognized commands.
3372 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
3373 when indexing into the string table.
3375 2015-01-01 Alan Modra <amodra@gmail.com>
3377 Update year range in copyright notice of all files.
3379 For older changes see ChangeLog-2014
3381 Copyright (C) 2015 Free Software Foundation, Inc.
3383 Copying and distribution of this file, with or without modification,
3384 are permitted in any medium without royalty provided the copyright
3385 notice and this notice are preserved.
3391 version-control: never