1 2015-08-10 H.J. Lu <hongjiu.lu@intel.com>
3 * elf-bfd.h (elf_symbol_version): New enum.
4 (elf_link_hash_entry): Replace hidden with versioned.
5 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
6 version if the symbol is unversioned. Initialize versioned.
7 (_bfd_elf_add_default_symbol): Don't look for symbol version
8 if the symbol is unversioned or hidden. Initialize versioned.
9 (elf_collect_hash_codes): Don't look for symbol version if the
10 symbol is unversioned.
11 (elf_collect_gnu_hash_codes): Likewise.
12 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
13 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
15 (elf_link_output_extsym): Likewise.
17 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
20 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
21 sh_link and sh_info fields in stripped section headers, we also
22 check if the sh_type, sh_flags, /sh_addralign and sh_entsize
23 fields of the output section match the output. Since
24 --only-keep-debug turns all non-debug sections into SHT_NOBITS
25 sections, the output SHT_NOBITS type matches any input type.
27 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
30 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
31 if the new symbol matches the existing one. The new hidden
32 versioned symbol matches the existing symbol if they have the
33 same symbol version. Update the existing symbol only if they
35 (_bfd_elf_add_default_symbol): Update call to
36 _bfd_elf_merge_symbol.
37 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
39 (elf_link_add_object_symbols): Override a definition only if the
40 new symbol matches the existing one.
41 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
42 the hidden versioned symbol.
43 (elf_link_output_extsym): Bind a symbol locally when linking
44 executable if it is locally defined, hidden versioned, not
45 referenced by shared library and not exported. Turn on
46 VERSYM_HIDDEN only if the hidden versioned symbol is defined
49 2015-08-05 Nick Clifton <nickc@redhat.com>
51 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
52 sh_info fields of sections whose type has been changed to
55 2015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
56 Tyler Hicks <tyhicks@canonical.com>
59 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
60 and stack overflow when char is signed and \200-\376 was in place of hex
61 digit; also fixes \377 was handled as EOF instead of "incorrect character".
62 (ihex_read_section): Changed for consistency.
63 (ihex_bad_byte): Prevent (now impossible to trigger) stack
64 overflow and incorrect escape sequence handling.
65 * srec.c (srec_bad_byte): Likewise.
67 2015-08-03 Hans-Peter Nilsson <hp@axis.com>
69 * elf32-cris.c (cris_elf_relocate_section)
70 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
71 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
72 just link_info->symbolic, to check if a symbol should be bound
75 2015-07-30 H.J. Lu <hongjiu.lu@intel.com>
78 * elflink.c (_bfd_elf_add_default_symbol): Add the default
79 symbol if not performing a relocatable link.
80 (elf_link_add_object_symbols): Adjust the default symbol if
81 not performing a relocatable link.
83 2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
85 * elflink.c (elf_link_add_object_symbols): Remove
86 !info->relocatable check for info->executable. Add
87 !info->relocatable check for !info->executable.
88 (elf_link_output_extsym): Remove
89 !info->relocatable check for info->executable.
91 2015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
93 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
94 assignment loop for bfd plugin objects.
96 2015-07-28 Alan Modra <amodra@gmail.com>
98 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
99 segment for loaded sections after nonloaded sections if the
100 sections are on the same page.
102 2015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
104 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
105 * config.in, configure: Regenerate.
107 2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
109 * configure: Regenerated.
111 2015-07-27 Nick Clifton <nickc@redhat.com>
113 * elf32-msp430.c (uses_large_model): New function.
114 (msp430_elf_eh_frame_address_size): New function.
115 (elf_backend_eh_frame_address_size): Define.
117 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
120 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
122 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
125 * elf32-arm.c (elf_backend_extern_protected_data): Define.
127 2015-07-25 H.J. Lu <hongjiu.lu@intel.com>
130 * elflink.c (elf_link_output_extsym): Check symbol version
131 section check only if not linking executable, the symbol is
132 referenced by shared library or not locally defined.
134 2015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
136 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
137 check if a symbol should be bound symbolically.
138 * elf32-hppa.c (elf32_hppa_check_relocs,
139 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
140 elf32_hppa_finish_dynamic_symbol): Likewise.
141 * elf32-m68k.c (elf_m68k_check_relocs,
142 elf_m68k_relocate_section): Likewise.
143 * elf32-nios2.c (nios2_elf32_relocate_section,
144 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
145 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
146 elf32_tic6x_relocate_section): Likewise.
148 2015-07-24 Alan Modra <amodra@gmail.com>
150 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
151 prefix for reloc section corresponding to rela section associated
152 with renamed debug section.
154 2015-07-24 Alan Modra <amodra@gmail.com>
156 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
159 2015-07-23 Joseph Myers <joseph@codesourcery.com>
161 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
162 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
163 difference, not to host pointer.
165 2015-07-22 Alan Modra <amodra@gmail.com>
167 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
168 return -1 if symbol referenced is not defined. Tidy.
170 2015-07-20 Alan Modra <amodra@gmail.com>
172 * po/SRC-POTFILES.in: Regenerate.
174 2015-07-17 Jiong Wang <jiong.wang@arm.com>
176 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
177 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
179 2015-07-16 Jiong Wang <jiong.wang@arm.com>
181 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
182 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
183 (aarch64_reloc_got_type): Ditto.
184 (elfNN_aarch64_final_link_relocate): Ditto.
185 (elfNN_aarch64_relocate_section): Ditto.
186 (elfNN_aarch64_gc_sweep_hook): Ditto.
187 (elfNN_aarch64_check_relocs): Ditto.
188 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
189 (_bfd_aarch64_elf_resolve_relocation): Ditto.
191 2015-07-16 Jiong Wang <jiong.wang@arm.com>
193 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
194 * bfd-in2.h: Regenerate.
195 * libbfd.h: Regenerate.
196 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
197 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
199 2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
202 * bfd.c (bfd_convert_section_size): New function.
203 (bfd_convert_section_contents): Likewise.
204 * bfd-in2.h: Regenerated.
206 2015-07-09 Catherine Moore <clm@codesourcery.com>
208 * elflink.c (bfd_elf_size_dynamic_sections): Call to
209 _bfd_elf_maybe_strip_eh_frame_hdr should be before
210 bed->elf_backend_size_dynamic_sections.
212 2015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
214 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
216 2015-07-05 Richard Sandiford <richard.sandiford@arm.com>
218 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
219 plus addend rather than the original st_value when looking up
220 entries in opd->adjust.
222 2015-07-03 Kai Tietz <ktietz@redhat.com>
223 Nick Clifton <nickc@redhat.com>
226 * coffcode.h (coff_bfd_gc_sections): Define default
227 to bfd_coff_gc_sections function.
228 (coff_gc_mark_hook_fn): New type.
229 * coffgen.c (init_reloc_cookie): Copy and adjust coff
230 related code about gc-sections from elflink.c to here.
231 (fini_reloc_cookie): Likewise.
232 (init_reloc_cookie_rels): Likewise.
233 (fini_reloc_cookie_rels): Likewise.
234 (init_reloc_cookie_for_section): Likewise.
235 (fini_reloc_cookie_for_section): Likewise.
236 (_bfd_coff_gc_mark_hook): Likewise.
237 (_bfd_coff_gc_mark_rsec): Likewise.
238 (_bfd_coff_gc_mark_reloc): Likewise.
239 (_bfd_coff_gc_mark): Likewise.
240 (_bfd_coff_gc_mark_extra_sections): Likewise.
241 (coff_gc_sweep_symbol_info): Likewise.
242 (coff_gc_sweep_symbol): Likewise.
243 (gc_sweep_hook_fn): Likewise.
244 (coff_gc_sweep): Likewise.
245 (bfd_coff_gc_sections): Likewise.
246 (_bfd_coff_gc_keep): Likewise.
247 * libcoff-in.h (coff_reloc_cookie): New struct.
248 (bfd_coff_gc_sections): New prototype.
249 * libcoff.h: Regenerate.
251 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
252 Cesar Philippidis <cesar@codesourcery.com>
254 * bfd-in2.h: Regenerated.
255 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
256 (elf_nios2_r1_howto_table_rel): This.
257 (elf_nios2_r2_howto_table_rel): New.
259 (lookup_howto): Add ABFD parameter. Adjust to look up in either
260 the R1 or R2 relocation table, as determined by ABFD.
261 (nios2_reloc_map): Add R2 relocations.
262 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
263 Pass it the ABFD parameter.
264 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
265 return an R1 or R2 relocation.
266 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
267 Pass it the ABFD parameter.
268 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
270 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
271 * libbfd.h: Regenerated.
272 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
273 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
274 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
275 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
276 (BFD_RELOC_NIOS2_R2_T2I4): New.
277 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
278 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
279 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
280 (BFD_RELOC_NIOS2_R2_X2L5): New.
281 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
282 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
283 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
284 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
286 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
287 Cesar Philippidis <cesar@codesourcery.com>
289 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
290 * bfd-in2.h: Regenerated.
291 * cpu-nios2.c (nios2_compatible): New.
292 (N): Use nios2_compatible instead of bfd_default_compatible.
293 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
294 (arch_info_struct): New.
295 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
296 * elf32-nios2.c (is_nios2_elf): New.
297 (nios2_elf32_merge_private_bfd_data): New.
298 (nios2_elf32_object_p): New.
299 (bfd_elf32_bfd_merge_private_bfd_data): Define.
300 (elf_backend_object_p): Define.
302 2015-07-01 H.J. Lu <hongjiu.lu@intel.com>
304 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
306 2015-06-30 Nick Clifton <nickc@redhat.com>
309 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
310 (write_obj_attribute): Likewise.
311 (elf_new_obj_attr): Likewise.
312 (bfd_elf_get_obj_attr_int): Likewise.
313 (bfd_elf_add_obj_attr_int): Likewise.
314 (bfd_elf_add_obj_attr_string): Likewise.
315 (bfd_elf_add_obj_attr_int_string): Likewise.
316 (gnu_obj_attrs_arg_type): Likewise.
317 (_bfd_elf_obj_attrs_arg_type): Likewise.
318 (_bfd_elf_parse_attributes): Likewise.
319 (_bfd_elf_merge_unknown_attribute_list): Likewise.
320 * elf-bfd.h (struct obj_attribute_list): Likewise.
323 2015-06-28 H.J. Lu <hongjiu.lu@intel.com>
325 * bfd-in.h (compressed_debug_section_type): Remove
327 * bfd-in2.h : Regenerated.
329 2015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
331 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
332 instead of !shared to indicate an application vs shared library.
333 (_bfd_mips_elf_size_dynamic_sections): Likewise.
334 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
335 (_bfd_mips_elf_get_target_dtag): Likewise.
337 2015-06-25 DJ Delorie <dj@redhat.com>
339 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
340 REL loads to match RELA stores.
342 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
344 * elf.c (_bfd_elf_compute_section_file_positions): Don't
345 initialize sh_size for .shstrtab here.
347 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
350 * elf-bfd.h (elf_sym_strtab): New.
351 (elf_link_hash_table): Add strtabcount, strtabsize and
353 (_bfd_elf_stringtab_init): Removed.
354 * elf.c (_bfd_elf_stringtab_init): Removed.
355 (_bfd_elf_compute_section_file_positions): Replace
356 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
357 _bfd_stringtab_size with
358 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
359 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
360 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
362 (swap_out_syms): Likewise.
363 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
364 with elf_strtab_hash. Remove symbuf, symbuf_count,
365 symbuf_size and shndxbuf_size.
366 (elf_link_flush_output_syms): Removed.
367 (elf_link_output_sym): Renamed to ...
368 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
369 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
371 (elf_link_swap_symbols_out): New.
372 (elf_link_output_extsym): Replace elf_link_output_sym with
373 elf_link_output_symstrtab.
374 (elf_link_input_bfd): Likewise.
375 (elf_final_link_free): Replace _bfd_stringtab_free with
376 _bfd_elf_strtab_free. Remove symbuf.
377 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
378 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
379 symbuf_size nor shndxbuf_size. Initialize strtabsize and
380 strtab. Initialize symshndxbuf to -1 when number of sections
381 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
382 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
383 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
384 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
385 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
386 _bfd_elf_strtab_emit.
388 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
390 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
393 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
395 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
396 space for the first .plt entry.
397 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
398 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
399 there are PLT relocations.
400 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
401 allocate space for the first .plt entry.
402 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
403 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
404 there are PLT relocations.
406 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
409 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
410 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
413 2015-06-23 Jiong Wang <jiong.wang@arm.com>
415 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
416 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
417 relocations against read-only sections.
419 2015-06-18 Nick Clifton <nickc@redhat.com>
422 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
424 2015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
426 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
427 * bfd-in2.h : Regenerate.
429 2015-06-16 Alan Modra <amodra@gmail.com>
431 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
434 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
436 * elf-bfd.h : Remove struct elf_build_id.
437 * bfd.c : Add struct bfd_build_id.
438 * bfd-in2.h: Regenerate.
439 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
440 * libpei.h: Add protoype and macros for
441 bfd_XXi_slurp_codeview_record.
442 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
443 * peicode.h (pe_bfd_read_buildid): Add.
444 (pe_bfd_object_p): Use pe_bfd_read_buildid().
446 2015-06-15 Renlin Li <renlin.li@arm.com>
448 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
449 * bfd-in2.h: Regenerate.
450 * libbfd.h: Regenerate.
451 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
452 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
454 2015-06-15 Alan Modra <amodra@gmail.com>
456 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
457 2014-03-26 change. Call _bfd_clear_contents for relocs against
458 local and global symbols defined in discarded input sections.
460 2015-06-05 Nick Clifton <nickc@redhat.com>
462 * elf32-msp430.c (rl78_sym_diff_handler): New function.
463 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
464 (msp430x_howto_table): Likewise.
466 2015-06-05 Alan Modra <amodra@gmail.com>
468 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
469 relocs with insns moved by --ppc476-workaround. Correct
470 output of REL16 relocs.
472 2015-06-01 Jiong Wang <jiong.wang@arm.com>
474 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
475 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
476 (elfNN_aarch64_final_link_relocate): Ditto.
477 (elfNN_aarch64_gc_swap_hook): Ditto.
478 (elfNN_aarch64_check_relocs): Ditto.
479 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
481 2015-06-01 Jiong Wang <jiong.wang@arm.com>
483 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
484 * bfd-in2.h: Regenerate.
485 * libbfd.h: Regenerate.
486 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
487 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
489 2015-06-01 Jiong Wang <jiong.wang@arm.com>
491 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
492 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
493 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
494 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
496 2015-06-01 Jiong Wang <jiong.wang@arm.com>
498 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
499 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
500 (elfNN_aarch64_final_link_relocate): Ditto.
501 (elfNN_aarch64_gc_swap_hook): Ditto.
502 (elfNN_aarch64_check_relocs): Ditto.
503 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
505 2015-06-01 Jiong Wang <jiong.wang@arm.com>
507 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
508 * bfd-in2.h: Regenerate.
509 * libbfd.h: Regenerate.
510 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
511 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
513 2015-05-28 Catherine Moore <clm@codesourcery.com>
514 Bernd Schmidt <bernds@codesourcery.com>
515 Paul Brook <paul@codesourcery.com>
518 * bfd-in2.h: Regenerated.
519 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
520 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
521 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
523 (compact_eh_frame_hdr_info): Declare.
524 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
525 fields and compact-eh fields.
526 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
527 (bfd_elf_section_data): Add eh_frame_entry_field.
528 (elf_section_eh_frame_entry): Define.
529 (bfd_elf_parse_eh_frame_entries): Declare.
530 (_bfd_elf_parse_eh_frame_entry): Declare.
531 (_bfd_elf_end_eh_frame_parsing): Declare.
532 (_bfd_elf_write_section_eh_frame_entry): Declare.
533 (_bfd_elf_eh_frame_entry_present): Declare.
534 (_bfd_elf_section_for_symbol): Declare.
535 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
536 (bfd_elf_record_eh_frame_entry): New function.
537 (_bfd_elf_parse_eh_frame_entry): New function.
538 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
539 (cmp_eh_frame_hdr): New function.
540 (add_eh_frame_hdr_terminator): New function.
541 (_bfd_elf_end_eh_frame_parsing): New function.
542 (find_merged_cie): Update hdr_info field references.
543 (_bfd_elf_discard_section_eh_frame): Likewise.
544 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
545 (_bfd_elf_eh_frame_entry_present): New function.
546 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
547 (_bfd_elf_write_section_eh_frame_entry): New function.
548 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
549 (_bfd_elf_fixup_eh_frame_hdr): New function.
550 (write_compact_eh_frame_hdr): New function.
551 (write_dwarf_eh_frame_hdr): New function.
552 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
553 * elflink.c (_bfd_elf_section_for_symbol): New function.
554 (elf_section_ignore_discarded_relocs): Add Compact EH support.
555 (elf_link_input_bfd): Likewise.
556 (bfd_elf_final_link): Likewise.
557 (_bfd_elf_gc_mark): Likewise.
558 (bfd_elf_parse_eh_frame_entries): New function.
559 (bfd_elf_gc_sections): Add Compact EH support.
560 (bfd_elf_discard_info): Likewise.
561 * elfxx-mips.c: Include dwarf2.h.
562 (_bfd_mips_elf_compact_eh_encoding): New function.
563 (_bfd_mips_elf_cant_unwind_opcode): New function.
564 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
565 (_bfd_mips_elf_cant_unwind_opcode): Declare.
566 (elf_backend_compact_eh_encoding): Define.
567 (elf_backend_cant_unwind_opcode): Define.
568 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
569 (elf_backend_cant_unwind_opcode): Provide default.
570 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
571 elf_backend_cant_unwind_opcode.
572 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
574 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
577 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
578 for now binding only if pointer equality isn't needed.
579 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
580 binding only if pointer equality isn't needed.
581 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
582 section for now binding only if pointer equality isn't needed.
583 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
584 binding only if pointer equality isn't needed.
586 2015-05-26 H.J. Lu <hongjiu.lu@intel.com>
589 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
590 in .rel.plt/.rela.plt.
591 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
593 2015-05-19 Jiong Wang <jiong.wang@arm.com>
595 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
596 relocation case labels alphabetically.
597 (elfNN_aarch64_final_link_relocate): Ditto.
598 (elfNN_aarch64_tls_relax): Ditto.
599 (elfNN_aarch64_relocate_section): Ditto.
600 (elfNN_aarch64_gc_sweep_hook): Ditto.
601 (elfNN_aarch64_check_relocs): Ditto.
602 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
603 (_bfd_aarch64_elf_resolve_relocation): Ditto.
605 2015-05-18 Jiong Wang <jiong.wang@arm.com>
607 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
610 2015-05-16 H.J. Lu <hongjiu.lu@intel.com>
612 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
614 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
616 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
617 section for now binding.
618 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
621 2015-05-14 H.J. Lu <hongjiu.lu@intel.com>
623 * bfd.c (bfd_update_compression_header): Also write the zlib
624 header if the SHF_COMPRESSED bit cleared..
625 (bfd_check_compression_header): Return the uncompressed size.
626 * compress.c (decompress_contents): Don't skip the zlib header.
627 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
628 which doesn't have the zlib header.
629 (bfd_init_section_decompress_status): Likewise.
630 (bfd_get_full_section_contents): Updated.
631 (bfd_is_section_compressed): Likewise.
632 (bfd_is_section_compressed_with_header): Return the uncompressed
634 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
635 * bfd-in2.h: Regenerated.
637 2015-05-14 Jiong Wang <jiong.wang@arm.com>
639 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
642 2015-05-14 Max Filippov <jcmvbkbc@gmail.com>
644 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
645 as GOT reference when plt.refcount is not positive.
647 2015-05-12 H.J. Lu <hongjiu.lu@intel.com>
649 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
650 for the first .plt entry only if needed.
651 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
653 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
655 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
656 (ALL_MACHINES_CFILES): Likewise.
657 * archures.c (bfd_mach_iamcu): New.
658 (bfd_mach_i386_iamcu): Likewise.
659 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
660 (bfd_iamcu_arch): Likewise.
661 (bfd_archures_list): Add &bfd_iamcu_arch.
662 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
664 (targ_archs): Add bfd_iamcu_arch if needed.
665 * configure.ac: Support iamcu_elf32_vec.
666 * cpu-iamcu.c: New file.
667 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
668 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
669 * targets.c (iamcu_elf32_vec): New.
670 (_bfd_target_vector): Add iamcu_elf32_vec.
671 * Makefile.in: Regenerated.
672 * bfd-in2.h: Likewise.
673 * configure: Likewise.
675 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
677 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
679 2015-05-10 H.J. Lu <hongjiu.lu@intel.com>
681 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
682 and output_bfd with abfd.
683 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
685 2015-05-06 Toni Spets <toni.spets@iki.fi>
688 * peXXigen.c (rsrc_process_section): Skip discarded resource
691 2015-05-01 H.J. Lu <hongjiu.lu@intel.com>
693 * config.bfd: Support i[3-7]86-*-elf*.
695 2015-04-30 H.J. Lu <hongjiu.lu@intel.com>
697 * elf32-i386.c (elf_backend_post_process_headers): Undef for
700 2015-04-30 Nick Clifton <nickc@redhat.com>
703 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
705 (mep_reloc): Delete unused function.
707 2015-04-29 Nick Clifton <nickc@redhat.com>
710 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
713 2015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
715 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
716 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
717 elf_s390_merge_obj_attributes.
718 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
720 2015-04-24 Jiong Wang <jiong.wang@arm.com>
723 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
724 GOT_NORMAL for both sgot/srelgot section.
725 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
726 and generate necessary runtime relocation for GOT entry.
728 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
731 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
733 2015-04-24 Jiong Wang <jiong.wang@arm.com>
735 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
736 PC-relative relocation for external symbol.
738 2015-04-24 Nick Clifton <nickc@redhat.com>
741 * compress.c (decompress_contents): Zero initialse the z_stream
744 2015-04-24 Nick Clifton <nickc@redhat.com>
746 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
747 local labels to include local labels with a numeric suffix and
750 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
753 * section.c (SEC_MEP_VLIW): New.
754 * bfd-in2.h: Regenerated.
756 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
759 * compress.c (bfd_compress_section_contents): Remove the
760 write_compress argument.
761 (bfd_init_section_compress_status): Updated.
762 (bfd_compress_section): Likewise.
763 * elf.c (_bfd_elf_set_reloc_sh_name): New.
764 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
765 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
766 _bfd_elf_set_reloc_sh_name.
767 (elf_fake_sections): Don't rename DWARF debug section for
768 linker output if it will be compressed. Instead, set
769 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
770 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
771 sh_name != (unsigned int) -1. Don't finalize nor assign
772 shstrtab section here. Delay setting output section names to
773 _bfd_elf_write_object_contents.
774 (_bfd_elf_compute_section_file_positions): Update comments on
775 sh_offset for shstrtab section.
776 (assign_file_positions_for_non_load_sections): Set sh_offset to
777 -1 for shstrtab section.
778 (assign_file_positions_except_relocs): Likewise.
779 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
780 when compressing DWARF debug sections. Place shstrtab section
781 after DWARF debug sections have been compressed.
782 (_bfd_elf_write_object_contents): Setting sh_name for output
785 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
788 * bfd.c (bfd): Add is_linker_input.
789 * elf.c (convert_debug_to_zdebug): New.
790 (convert_zdebug_to_debug): Likewise.
791 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
792 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
793 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
794 instead of a pointer to section.
795 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
797 * section.c (SEC_ELF_RENAME): New.
798 * bfd-in2.h: Regenerated.
800 2015-04-23 Alan Modra <amodra@gmail.com>
802 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
803 (ppc64_elf_next_toc_section): Align multi-got toc base.
804 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
806 2015-04-22 H.J. Lu <hongjiu.lu@intel.com>
809 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
810 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
811 (elf_i386_create_dynamic_sections): Always allow copy relocs for
812 building executables.
813 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
814 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
815 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
816 PIE and R_386_GOTOFF.
817 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
819 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
821 * elf.c (assign_section_numbers): Always set up sh_name.
823 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
825 * elf.c (assign_file_positions_for_non_load_sections): Iterate
827 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
829 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
831 * bfd-in.h (compressed_debug_section_type): New.
832 * compress.c (bfd_compress_section_contents): Add an argument
833 for linker write compression and always generate .zdebug_*
834 section when linking.
835 (bfd_init_section_compress_status): Pass FALSE to
836 bfd_compress_section_contents.
837 (bfd_compress_section): New function.
838 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
839 on DWARF debug sections if COMPRESS_DEBUG is set and rename
840 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
841 (assign_file_positions_for_non_load_sections): Set sh_offset
842 to -1 if SEC_ELF_COMPRESS is set.
843 (assign_file_positions_except_relocs): Likwise.
844 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
845 (_bfd_elf_assign_file_positions_for_non_load): This. Change
846 return time to bfd_boolean. Compress the section if
847 SEC_ELF_COMPRESS is set.
848 (_bfd_elf_write_object_contents): Updated.
849 (_bfd_elf_set_section_contents): Write section contents to
850 the buffer if SEC_ELF_COMPRESS is set.
851 * merge.c: Include "elf-bfd.h".
852 (sec_merge_emit): Add arguments for contents and offset. Write
853 to contents with offset if contents isn't NULL.
854 (_bfd_write_merged_section): Write section contents to the
855 buffer if SEC_ELF_COMPRESS is set. Pass contents and
856 output_offset to sec_merge_emit.
857 * elflink.c (bfd_elf_final_link): Allocate the buffer for
858 output section contents if SEC_ELF_COMPRESS is set.
859 * section.c (SEC_ELF_COMPRESS): New.
860 * bfd-in2.h: Regenerated.
862 2015-04-15 Alan Modra <amodra@gmail.com>
864 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
866 2015-04-14 Nick Clifton <nickc@redhat.com>
868 * elf32-rl78.c (RL78_OP_REL): New macro.
869 (rl78_elf_howto_table): Use it for complex relocs.
870 (get_symbol_value): Handle the cases when the info or status
872 (get_romstart): Cache the status returned by get_symbol_value.
873 (get_ramstart): Likewise.
874 (RL78_STACK_PUSH): Generate an error message if the stack
876 (RL78_STACK_POP): Likewise for underflows.
877 (rl78_compute_complex_reloc): New function. Contains the basic
878 processing code for all RL78 complex relocs.
879 (rl78_special_reloc): New function. Provides special reloc
880 handling for complex relocs.
881 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
882 (rl78_offset_for_reloc): Likewise.
884 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
887 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
888 info->extern_protected_data when warning copy relocs against
890 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
891 when checking protected non-function symbols.
893 2015-04-13 John Baldwin <jhb@FreeBSD.org>
895 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
897 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
899 2015-04-13 H.J. Lu <hongjiu.lu@intel.com>
902 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
903 if the object has been claimed by plugin.
905 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
907 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
908 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
909 protected data symbol when building shared library.
910 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
911 R_X86_64_GOTOFF64 against undefined symbol and replace
912 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
913 R_X86_64_GOTOFF64 against protected data symbol when building
916 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
919 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
920 against protected data symbol when building shared library.
921 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
922 R_X86_64_GOTOFF64 against protected data symbol when building
925 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
929 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
930 * elf32-i386.c (elf_backend_extern_protected_data): New.
932 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
933 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
934 copy relocs against protected symbols if extern_protected_data
936 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
937 non-function symbols if extern_protected_data is true.
938 * elfxx-target.h (elf_backend_extern_protected_data): New.
940 (elfNN_bed): Initialize extern_protected_data with
941 elf_backend_extern_protected_data.
943 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
945 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
946 and free with bfd_alloc and bfd_release on compressed buffer.
947 Release buffer if compressed section isn't smaller.
949 2015-04-10 Alan Modra <amodra@gmail.com>
952 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
953 on adding a protected visibility variable to .dynbss.
955 2015-04-10 Alan Modra <amodra@gmail.com>
957 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
960 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
961 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
962 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
963 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
964 extern_protected_data test.
965 (_bfd_elf_symbol_refs_local_p): Likewise.
966 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
967 (elfNN_bed): Delete elf_backend_extern_protected_data init.
969 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
971 * compress.c (bfd_compress_section_contents): Update comments.
972 (bfd_init_section_decompress_status): Likewise.
973 (bfd_init_section_compress_status): Likewise.
975 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
977 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
979 (TARGET_LITTLE_SYM): Likewise.
981 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
983 * elf32-xtensa.c (splay-tree.h): include header.
984 (text_action_struct): drop next pointer.
985 (text_action_list_struct): drop head pointer, add count and
987 (find_fill_action): instead of linear search in text_action_list
989 (text_action_compare, action_first, action_next): new functions.
990 (text_action_add, text_action_add_literal): instead of linear
991 search and insertion insert new node into the tree.
992 (removed_by_actions): pass additional parameter: action_list,
993 use it to traverse the tree.
994 (offset_with_removed_text): pass additional action_list parameter
995 to removed_by_actions.
996 (map_action_fn_context): new typedef.
997 (map_action_fn_context_struct): new structure.
998 (map_action_fn): new function.
999 (map_removal_by_action): use splay_tree_foreach to build map.
1000 (find_insn_action): replace linear search in text_action_list
1001 with series of splay_tree_lookups.
1002 (print_action, print_action_list_fn): new functions.
1003 (print_action_list): use splay_tree_foreach.
1004 (init_xtensa_relax_info): drop action_list.head initialization.
1005 Initialize the tree.
1006 (compute_text_actions): use non-zero action_list_count instead of
1007 non-NULL action list.
1008 (xlate_map_context): new typedef.
1009 (xlate_map_context_struct): new structure.
1010 (xlate_map_fn): new function.
1011 (build_xlate_map): use splay_tree_foreach to build map.
1012 (action_remove_bytes_fn): new function.
1013 (relax_section): use zero action_list_count instead of NULL
1014 action list. Use splay_tree_foreach to count final section size.
1015 Drop unused variable 'removed'.
1017 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1019 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
1020 (removed_literal_map_entry_struct): new structure.
1021 (removed_literal_list_struct): add new fields: n_map and map.
1022 (map_removed_literal, removed_literal_compare): new functions.
1023 (find_removed_literal): build index array for literals ordered
1024 by VMA, use binary search to find removed literal.
1026 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1028 * elf32-xtensa.c (removal_by_action_entry_struct,
1029 removal_by_action_map_struct): new structures.
1030 (removal_by_action_entry, removal_by_action_map): new typedefs.
1031 (text_action_list_struct): add new field: map.
1032 (map_removal_by_action, removed_by_actions_map,
1033 offset_with_removed_text_map): new functions.
1034 (relax_section): replace offset_with_removed_text with
1035 offset_with_removed_text_map.
1036 (translate_reloc, relax_property_section, relax_section_symbols):
1037 replace removed_by_actions with removed_by_actions_map.
1039 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1041 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
1042 reloc_range): new typedef.
1043 (reloc_range_list_struct, reloc_range_list_entry_struct,
1044 reloc_range_struct): new structures.
1045 (reloc_range_compare, build_reloc_ranges,
1046 reloc_range_list_append, reloc_range_list_remove,
1047 reloc_range_list_update_range, free_reloc_range_list): new
1049 (compute_text_actions): precompute relocation opcodes before the
1050 loop. Add relevant_relocs variable, initialize it before the
1051 loop, pass it to the check_section_ebb_pcrels_fit.
1052 (check_section_ebb_pcrels_fit): add new parameter:
1053 relevant_relocs. Update address range in the relevant_relocs if
1054 it's non-NULL and iterate only over relevant relocations.
1056 2015-04-09 Nick Clifton <nickc@redhat.com>
1058 * elf32-rx.c (describe_flags): Report the settings of the string
1060 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
1063 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1065 * compress.c (bfd_compress_section_contents): Work around a GCC
1066 uninitialized warning bug fixed in GCC 4.7.
1068 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1070 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
1072 * bfd.c (bfd::flags): Increase size to 18 bits.
1073 (BFD_COMPRESS_GABI): New.
1074 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
1075 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1076 (bfd_update_compression_header): New fuction.
1077 (bfd_check_compression_header): Likewise.
1078 (bfd_get_compression_header_size): Likewise.
1079 (bfd_is_section_compressed_with_header): Likewise.
1080 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
1081 (bfd_compress_section_contents): Return the uncompressed size if
1082 the full section contents is compressed successfully. Support
1083 converting from/to .zdebug* sections.
1084 (bfd_get_full_section_contents): Call
1085 bfd_get_compression_header_size to get compression header size.
1086 (bfd_is_section_compressed): Renamed to ...
1087 (bfd_is_section_compressed_with_header): This. Add a pointer
1088 argument to return compression header size.
1089 (bfd_is_section_compressed): Use it.
1090 (bfd_init_section_decompress_status): Call
1091 bfd_get_compression_header_size to get compression header size.
1092 Return FALSE if uncompressed section size is 0.
1093 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
1094 from/to .zdebug* sections.
1095 * bfd-in2.h: Regenerated.
1097 2015-04-07 Alan Modra <amodra@gmail.com>
1099 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
1100 mapped to output .got section.
1102 2015-04-07 Alan Modra <amodra@gmail.com>
1104 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
1105 and has_addr16_lo. Make has_sda_refs a bitfield.
1106 (ppc_elf_check_relocs): Set new flags.
1107 (ppc_elf_link_hash_table_create): Update default_params.
1108 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
1109 where we won't be making .dynbss entries or editing code. Set
1110 params->pic_fixup when we'll edit code for protected var access.
1111 (allocate_dynrelocs): Allocate got entry for edited code and
1113 (struct ppc_elf_relax_info): Add picfixup_size.
1114 (ppc_elf_relax_section): Rename struct one_fixup to struct
1115 one_branch_fixup. Rename fixups to branch_fixups. Size space for
1117 (ppc_elf_relocate_section): Edit non-PIC accessing protected
1118 visibility variables to PIC. Don't emit dyn_relocs for code
1120 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
1122 2015-04-07 Nick Clifton <nickc@redhat.com>
1124 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
1125 local labels as local.
1127 2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
1129 * compress.c (get_uncompressed_size): Removed.
1130 (bfd_compress_section_contents): Use bfd_putb64 to write
1131 uncompressed section size.
1132 (bfd_init_section_decompress_status): Replace
1133 get_uncompressed_size with bfd_getb64.
1135 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
1137 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
1138 SHF_COMPRESSED bit if not decompress.
1140 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
1142 * compress.c (get_uncompressed_size): New. Extracted from ...
1143 (bfd_init_section_decompress_status): This. Use it.
1145 2015-04-02 Andrew Turner <andrew@freebsd.org>
1147 * config.bfd: Add aarch64-*-freebsd* target triple.
1149 2015-04-02 H.J. Lu <hongjiu.lu@intel.com>
1151 * configure: Regenerated.
1153 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
1154 Marcus Shawcroft <marcus.shawcroft@arm.com>
1155 Jiong Wang <jiong.wang@arm.com>
1157 * bfd-in.h (bfd_elf64_aarch64_set_options)
1158 (bfd_elf32_aarch64_set_options): Add parameter.
1159 * bfd-in2.h: Regenerated.
1160 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
1161 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
1162 (_bfd_aarch64_erratum_843419_stub_name)
1163 (_bfd_aarch64_erratum_843419_fixup)
1164 (_bfd_aarch64_erratum_843419_scan)
1165 (_bfd_aarch64_erratum_843419_branch_to_stub)
1166 (_bfd_aarch64_erratum_843419_p): Define.
1167 (enum elf_aarch64_stub_type): Define
1168 aarch64_stub_erratum_843419_veneer.
1169 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
1170 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
1171 and fix_erratum_843419_adr.
1172 (stub_hash_newfunc): Initialize adrp_offset;
1173 (_bfd_aarch64_add_stub_entry_after): Define.
1174 (aarch64_map_one_stub, aarch64_build_one_stub)
1175 (aarch64_size_one_stub): Handle
1176 aarch64_stub_erratum_843419_veneer.
1177 (_bfd_aarch64_resize_stubs): Round stub section size.
1178 (elfNN_aarch64_size_stubs): Add scan for 843419.
1179 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
1180 fix_erratum_843419 and fix_erratum_843419_adr.
1181 (struct erratum_835769_branch_to_stub_data): Add info.
1182 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
1183 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
1184 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
1185 (_bfd_aarch64_sign_extend): Define.
1186 (reencode_adr_imm): Remove static. Rename to:
1187 (_bfd_aarch64_reencode_adr_imm): Define.
1188 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
1189 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
1190 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
1191 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
1194 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
1196 * configure: Regenerated.
1198 2015-03-31 Ed Schouten <ed@nuxi.nl>
1200 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
1201 for x86_64-*-cloudabi*.
1202 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
1203 * configure: Regenerated.
1204 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
1205 (TARGET_LITTLE_NAME): Likewise.
1206 (ELF_OSABI): Likewise.
1207 (elf64_bed): Likewise.
1208 * targets.c (x86_64_elf64_cloudabi_vec): New.
1209 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
1211 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
1213 * configure.ac: Revert the AM_ZLIB change.
1214 * Makefile.in: Regenerated.
1215 * aclocal.m4: Likewise.
1216 * configure: Likewise.
1217 * doc/Makefile.in: Likewise.
1219 2015-03-30 H.J. Lu <hongjiu.lu@intel.com>
1222 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
1223 (_bfd_elf_get_reloc_section): New.
1224 * elf.c (_bfd_elf_get_reloc_section): Likewise.
1225 (assign_section_numbers): Call get_reloc_section to look up the
1226 section the relocs apply.
1227 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
1228 (elfNN_bed): Initialize get_reloc_section with
1229 elf_backend_get_reloc_section.
1231 2015-03-29 H.J. Lu <hongjiu.lu@intel.com>
1233 * Makefile.am (ZLIB): New.
1234 (ZLIBINC): Likewise.
1235 (AM_CFLAGS): Add $(ZLIBINC).
1236 (libbfd_la_LIBADD): Add $(ZLIB).
1237 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
1238 (decompress_contents): Don't check HAVE_ZLIB_H.
1239 (bfd_compress_section_contents): Likewise.
1240 (bfd_get_full_section_contents): Likewise.
1241 (bfd_init_section_decompress_status): Likewise.
1242 (bfd_init_section_compress_status): Likewise.
1243 * configure.ac (AM_ZLIB): Removed.
1244 (zlibdir): New. AC_SUBST.
1245 (zlibinc): Likewise.
1246 Add --with-system-zlib.
1247 * Makefile.in: Regenerated.
1248 * acinclude.m4: Likewise.
1249 * config.in: Likewise.
1250 * configure: Likewise.
1251 * doc/Makefile.in: Likewise.
1253 2015-03-27 Alan Modra <amodra@gmail.com>
1257 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
1258 protected_def when symbol section is read-only. Adjust all calls.
1259 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
1261 2015-03-26 Tejas Belagod <tejas.belagod@arm.com>
1263 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
1264 _bfd_final_link_relocate with aarch64_relocate.
1266 2015-03-26 H.J. Lu <hongjiu.lu@intel.com>
1269 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
1270 (bfd_elf_gc_sections): Likewise.
1272 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
1274 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
1275 size for initial branch.
1276 (elfNN_aarch64_build_stubs): Write initial branch.
1277 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
1278 mapping symbol on initial branch.
1280 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
1282 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
1283 Update erratum count.
1285 2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1287 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
1288 first matching debug section.
1290 2015-03-24 H.J. Lu <hongjiu.lu@intel.com>
1293 * compress.c (bfd_compress_section_contents): Don't write the
1294 zlib header and set contents as well as compress_status if
1295 compression didn't make the section smaller.
1296 (bfd_init_section_compress_status): Don't check compression
1299 2015-03-24 Nick Clifton <nickc@redhat.com>
1302 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
1303 range auxillary sections.
1305 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1307 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
1309 (_bfd_aarch64_get_stub_for_link_section): Define.
1311 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1313 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
1314 update of section_group[].stub_sec.
1316 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1318 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
1319 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
1320 Delete fixes, fix_table_size and associated code. Call
1321 _bfd_aarch64_add_stub_entry_in_group. Rename to...
1322 (bfd_aarch64_erratum_835769_scan): Define.
1323 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
1324 erratum_835769_fix_table_size, i and associated code. Relocate
1325 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
1326 correction. Delete construction of stub entry from
1327 erratum_835769_fixes array.
1329 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1331 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
1332 _bfd_aarch64_add_stub_entry_in_group.
1334 2015-03-24 Alan Modra <amodra@gmail.com>
1336 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
1337 stubs, even those for undefined weak symbols. Otherwise, don't
1338 report relocation overflow on branches to undefined strong
1339 symbols. Fix memory leak.
1340 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
1341 overflow on branches to undefined strong symbols.
1343 2015-03-23 Keith Seitz <keiths@redhat.com>
1345 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
1348 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1350 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
1351 construction into...
1352 (_bfd_aarch64_erratum_835769_stub_name): Define.
1354 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1356 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
1357 stub resize code into...
1358 (bfd_aarch64_resize_stubs): Define.
1360 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1362 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
1363 creation code into...
1364 (bfd_aarch64_create_stub_section): Define.
1366 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1368 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
1369 from elf_aarch64_create_or_find_stub_sec.
1370 (_bfd_aarch64_add_stub_entry_in_group): Rename from
1371 elfNN_aarch64_add_stub. Call
1372 _bfd_aarch64_create_or_find_stub_sec.
1373 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
1374 _bfd_aarch64_add_stub_entry_in_group.
1376 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1378 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
1379 sense of boolean return.
1380 (elfNN_aarch64_size_stubs): Adjust for above.
1382 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1384 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
1385 Remove unused parameter.
1386 (elfNN_aarch64_size_stubs): Adjust for above.
1388 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1390 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
1392 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1394 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
1395 (num_aarch64_erratum_835769_fixes): Remove.
1396 (elfNN_aarch64_size_stubs): Remove assignments to above.
1398 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1400 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
1402 (aarch64_erratum_seqeunce): Rename rtn to rt2.
1404 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1406 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
1408 2015-03-19 Nick Clifton <nickc@redhat.com>
1410 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
1411 the RL78 core based upon the flags.
1412 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
1414 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
1415 (elf32_rl78_machine): Always return bfd_mach_rl78.
1417 2015-03-19 Nick Clifton <nickc@redhat.com>
1420 * compress.c (bfd_compress_section_contents): Do not define this
1421 function if it is not used.
1423 2015-03-18 H.J. Lu <hongjiu.lu@intel.com>
1425 * compress.c (bfd_compress_section_contents): Make it static.
1426 * bfd/bfd-in2.h: Regenerated.
1428 2015-03-18 Eric Youngdale <eyoungdale@ptc.com>
1431 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
1432 suitable for the AMD64.
1434 2015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
1435 Nick Clifton <nickc@redhat.com>
1438 * coffgen.c (make_a_section_from_file): Only prepend a z to a
1439 debug section's name if the section was actually compressed.
1440 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1441 * compress.c (bfd_init_section_compress_status): Do not compress
1442 the section if doing so would make it bigger. In such cases leave
1443 the section alone and return COMPRESS_SECTION_NONE.
1445 2015-03-17 Alan Modra <amodra@gmail.com>
1447 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
1448 on nothing to do, before malloc of returned symbol array.
1450 2015-03-16 Nick Clifton <nickc@redhat.com>
1452 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
1453 stored in the elf_section_data structure then load them as
1456 2015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1458 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
1459 relocs against code sections.
1460 * elf32-s390.c: Define elf_backend_sort_relocs_p.
1461 * elf64-s390.c: Likewise.
1463 2015-03-11 Alan Modra <amodra@gmail.com>
1465 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
1466 reverse order. Account for larger size of __tls_get_addr_opt stub.
1468 2015-03-10 Yuri Gribov <y.gribov@samsung.arm>
1471 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
1473 (elf32_arm_print_private_bfd_data): Likewise.
1475 2015-03-06 Nick Clifton <nickc@redhat.com>
1478 * elflink.c (put_value): Like previous delta, but for the 32-bit
1481 2015-03-05 Nick Clifton <nickc@redhat.com>
1484 * elflink.c (put_value): Avoid using an undefined shift
1487 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
1491 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
1492 * elf32-i386.c (elf_backend_extern_protected_data): New.
1494 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1495 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1496 copy relocs against protected symbols if extern_protected_data
1498 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
1499 non-function symbols if extern_protected_data is true.
1500 * elfxx-target.h (elf_backend_extern_protected_data): New.
1502 (elfNN_bed): Initialize extern_protected_data with
1503 elf_backend_extern_protected_data.
1505 2015-03-05 Nick Clifton <nickc@redhat.com>
1508 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
1509 lookup fails, check for an address bias in the dwarf info, and if
1510 one exists, retry the lookup with the biased value.
1511 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
1512 Determines if a bias exists bewteen the addresses of functions
1513 based on DWARF information vs symbol table information.
1514 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
1515 * libbfd.h: Regenerate.
1517 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1519 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
1520 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
1521 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
1523 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1525 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
1526 (aarch64_size_one_stub): Likewise.
1527 (aarch64_map_one_stub): Likewise.
1529 2015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
1531 * cpu-s390.c (N): New macro.
1532 (bfd_s390_31_arch): New. Define only if default target word size
1533 is 64 bits. Otherwise define...
1534 (bfd_390_64_arch): ...this. Make static.
1535 (bfd_s390_arch): Define according to the default target word size.
1536 Let the 'next' field point to the alternate arch.
1538 2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
1541 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
1542 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
1543 to be used with MOVK rather than MOVZ.
1545 2015-03-03 DJ Delorie <dj@redhat.com>
1547 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
1550 2015-02-28 Alan Modra <amodra@gmail.com>
1552 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
1555 2015-02-27 H.J. Lu <hongjiu.lu@intel.com>
1557 * elf32-i386.c (need_convert_mov_to_lea): New.
1558 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
1559 (elf_i386_convert_mov_to_lea): Return TRUE if
1560 need_convert_mov_to_lea is unset.
1561 * elf64-x86-64.c (need_convert_mov_to_lea): New.
1562 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
1563 (elf_x86_64_convert_mov_to_lea): Return TRUE if
1564 need_convert_mov_to_lea is unset.
1566 2015-02-27 Nick Clifton <nickc@redhat.com>
1569 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
1570 string length overflow when the string table length is actually
1573 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
1575 * bfd/bfd-in2.h: Regenerate.
1576 * bfd/libbfd.h: Regenerate.
1578 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1580 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
1581 TLSDESC_LD_PREL19 field width and masks.
1582 (aarch64_tls_transition_without_check)
1583 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1584 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1585 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1586 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
1587 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1588 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1590 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1592 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
1594 (aarch64_tls_transition_without_check)
1595 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1596 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1597 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1598 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
1599 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1600 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1601 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
1603 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1605 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
1606 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
1607 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1608 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1609 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1610 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
1611 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1612 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1613 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
1615 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1617 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
1618 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
1619 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
1620 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
1621 (elfNN_aarch64_check_relocs): Handle
1622 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
1624 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1625 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1627 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1629 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
1631 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1633 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
1634 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
1635 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
1638 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1640 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
1643 2015-02-26 Nick Clifton <nickc@redhat.com>
1646 * coffcode.h (coff_compute_section_file_positions): Report
1647 negative page sizes.
1648 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
1649 (assign_file_positions_for_non_load_sections): Replace assertion
1650 with an error message.
1651 (rewrite_elf_program_header): Handle excessive segment
1653 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
1654 (bfd_mach_o_read_section_64): Likewise.
1655 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
1656 print a bfd name, not %A.
1658 2015-02-26 Alan Modra <amodra@gmail.com>
1660 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
1661 thread-safe stubs for iplt.
1662 (build_tls_get_addr_stub): Restore r2 immediately after call.
1664 2015-02-26 Terry Guo <terry.guo@arm.com>
1666 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
1667 merge Tag_ABI_HardFP_use.
1669 2015-02-26 Alan Modra <amodra@gmail.com>
1671 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
1672 Use text relocs rather than giving an error on trying to use
1673 .dynbss for protected shared lib vars.
1674 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1676 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1678 * elf32-avr.c (struct elf_avr_section_data): New structure.
1679 (struct avr_relax_info): New structure.
1680 (elf_avr_new_section_hook): New function.
1681 (struct elf_avr_section_data): Add relax_info.
1682 (get_avr_relax_info): New function.
1683 (init_avr_relax_info): New function.
1684 (elf32_avr_relax_delete_bytes): Find next property record before
1685 deleting bytes. When deleting don't move bytes beyond the next
1687 (avr_elf32_assign_records_to_section): New function.
1688 (avr_property_record_compare): New function.
1689 (avr_load_all_property_sections): New function.
1690 (elf32_avr_relax_section): Load property data. After relaxing the
1691 section, move any .align directives that have enough deleted bytes
1693 (bfd_elf32_new_section_hook): Define.
1695 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1697 * elf32-avr.h (struct avr_property_header): New strucure.
1698 (avr_elf32_load_property_records): Declare.
1699 (avr_elf32_property_record_name): Declare.
1700 * elf32-avr.c: Add bfd_stdint.h include.
1701 (retrieve_local_syms): New function.
1702 (get_elf_r_symndx_section): New function.
1703 (get_elf_r_symndx_offset): New function.
1704 (internal_reloc_compare): New function.
1705 (struct avr_find_section_data): New structure.
1706 (avr_is_section_for_address): New function.
1707 (avr_find_section_for_address): New function.
1708 (avr_elf32_load_records_from_section): New function.
1709 (avr_elf32_load_property_records): New function.
1710 (avr_elf32_property_record_name): New function.
1712 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1714 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
1715 (AVR_PROPERTY_RECORDS_VERSION): Define.
1716 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
1717 (struct avr_property_record): New structure.
1719 2015-02-24 Nick Clifton <nickc@redhat.com>
1721 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
1723 (v850_elf_make_note_section): New function. Creates a note
1725 (v850_elf_create_sections): New function. Create a note section
1726 if one is not already present.
1727 (v850_elf_set_note): New function. Adds a note to a bfd.
1728 (v850_elf_copy_private_bfd_data): New function. Copies V850
1730 (v850_elf_merge_notes): New function. Merges V850 notes.
1731 (print_v850_note): New function. Displays a V850 note.
1732 (v850_elf_print_notes): New function. Displays all notes attached
1734 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
1735 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
1736 (v850_elf_fake_sections): Set the type of the V850 note section.
1737 * bfd-in.h (v850_elf_create_sections): Add prototype.
1738 (v850_elf_set_note): Add prototype.
1739 * bfd-in2.h: Regenerate.
1741 2015-02-24 Nick Clifton <nickc@redhat.com>
1743 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
1744 * configure: Regenerate.
1745 * config.in: Regenerate.
1746 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
1747 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
1748 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
1751 2015-02-24 Nick Clifton <nickc@redhat.com>
1753 * pdp11.c (set_section_contents): Pad the .text and .data sections
1754 to their aligned sizes.
1756 2015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
1758 * config.bfd: Add h8300-*-linux.
1759 * configure.ac: Add h8300_elf32_linux_vec.
1760 * configure: Regenerate.
1761 * elf32-h8300.c: Likewise.
1762 * targets.c(_bfd_target_vector): Likewise.
1764 2015-02-23 Nick Clifton <nickc@redhat.com>
1767 * cpu-w65.c: Correct typos in license notice.
1770 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
1771 symbols at end of sections. Adjust function sizes.
1773 2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
1775 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
1776 (elfcore_write_s390_vxrs_high): Likewise.
1777 * elf.c (elfcore_grok_s390_vxrs_low): New function.
1778 (elfcore_grok_s390_vxrs_high): New function.
1779 (elfcore_grok_note): Call them.
1780 (elfcore_write_s390_vxrs_low): New function.
1781 (elfcore_write_s390_vxrs_high): New function.
1782 (elfcore_write_register_note): Call them.
1784 2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
1787 * verilog.c (verilog_write_record): Correct buffer size.
1789 2015-02-19 Alan Modra <amodra@gmail.com>
1791 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
1793 2015-02-19 Alan Modra <amodra@gmail.com>
1796 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
1797 (elf_link_output_extsym): Drop local and global undefined syms.
1798 Tidy. Expand comment.
1800 2015-02-17 Alan Modra <amodra@gmail.com>
1803 * elflink.c (struct elf_outext_info): Remove need_second_pass
1805 (elf_link_output_extsym): Delete code handling second forced
1806 local pass. Move code emitting NULL STT_FILE symbol later, so
1807 that it can be omitted if forced local is stripped. Don't
1808 emit the NULL STT_FILE if no file symbols have been output.
1809 (bfd_elf_final_link): Remove second forced local pass.
1810 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
1811 (ppc_elf_size_dynamic_sections): Likewise.
1812 * elf64-ppc.c (ppc_build_one_stub): Likewise.
1813 (build_global_entry_stubs): Likewise.
1814 (ppc64_elf_build_stubs): Likewise.
1816 2015-02-16 H.J. Lu <hongjiu.lu@intel.com>
1819 * elflink.c (elf_link_output_extsym): Only check filesym_count
1820 when outputting a NULL FILE symbol. Set second_pass_sym to
1821 h->forced_local && !h->root.linker_def.
1823 2015-02-15 H.J. Lu <hongjiu.lu@intel.com>
1825 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
1826 on _TLS_MODULE_BASE_.
1827 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
1829 2015-02-15 Alan Modra <amodra@gmail.com>
1831 * dwarf2.c (read_rangelist): Correct buffer overflow check
1832 Whitespace throughout file.
1834 2015-02-14 Alan Modra <amodra@gmail.com>
1837 * bfd.c (struct bfd): Add lto_output.
1838 * linker.c (_bfd_handle_already_linked): Explicitly test for
1839 objects added by the lto plugin.
1840 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
1841 no_export flags from archive.
1842 * archive.c (open_nested_file): New function, setting lto_output
1843 and no_export, extracted from..
1844 (find_nested_archive): ..here. Flip params. Rename from
1845 _bfd_find_nested_archive.
1846 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
1847 (_bfd_look_for_bfd_in_cache): Copy no_export.
1848 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
1849 my_archive->no_export test.
1850 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
1851 Don't use the file name when adding lto_output STT_FILE sym.
1852 * bfd-in2.h: Regenerate.
1854 2015-02-13 Alan Modra <amodra@gmail.com>
1857 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
1858 now redundant assert.
1860 2015-02-12 Nick Clifton <nickc@redhat.com>
1863 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
1864 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
1865 (read_indirect_string, read_alt_indirect_string)
1866 (read_alt_indirect_ref, read_address, read_abbrevs)
1867 (read_attribute_value, read_attribute, decode_line_info)
1868 (find_abstract_instance_name, read_rangelist)
1869 (scan_unit_for_symbols, parse_comp_unit)
1870 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
1871 end pointers to reading functions and check for offsets taking
1872 pointers out of range. Replace calls to read_*_leb128 with calls
1873 to safe_read_leb128.
1875 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
1877 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
1878 computed file_name address being before the start of the string
1881 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
1884 * bfd.c (bfd_plugin_format): New.
1885 (bfd): Add plugin_format and plugin_dummy_bfd.
1886 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
1887 argument to return TRUE if any plugin is found. Set plugin_format.
1889 (bfd_plugin_target_p): New.
1890 (bfd_plugin_specified_p): Likewise.
1891 (bfd_plugin_target_p): Likewise.
1892 (register_ld_plugin_object_p): Likewise.
1893 (bfd_plugin_set_plugin): Set has_plugin.
1894 (load_plugin): Cache try_load_plugin result.
1895 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
1897 * plugin.h (bfd_plugin_target_p): New.
1898 (bfd_plugin_specified_p): Likewise.
1899 (register_ld_plugin_object_p): Likewise.
1900 * bfd-in2.h: Regenerated.
1902 2015-02-11 Pedro Alves <palves@redhat.com>
1904 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
1905 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
1906 * libbfd.h: Regenerate.
1907 * libcoff.h: Regenerate.
1909 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
1910 * mach-o.h [__cplusplus]: Wrap in extern "C".
1911 * som.h [__cplusplus]: Wrap in extern "C".
1913 2015-02-10 Nick Clifton <nickc@redhat.com>
1916 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
1918 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
1919 size and number of relocs.
1920 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
1922 * versados.c (process_otr): Check the esdid value before using it
1923 to access the EDATA.
1925 2015-02-09 Ed Maste <emaste@freebsd.org>
1927 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
1928 uninitialized and unused variable.
1929 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1931 2015-02-09 Alan Modra <amodra@gmail.com>
1933 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
1935 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1936 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
1938 2015-02-09 Alan Modra <amodra@gmail.com>
1940 * elflink.c: Whitespace, formatting fixes.
1941 (elf_link_input_bfd): Clarify comment.
1942 (elf_link_output_extsym): Exclude symbols in linker created
1943 sections when testing for plugin symbols.
1945 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
1948 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
1949 warning for relocation in readonly section for -z text.
1950 (elf_i386_size_dynamic_sections): Likewise.
1951 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1952 (elf_x86_64_size_dynamic_sections): Likewise.
1954 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
1958 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
1959 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
1960 referenced from a non-IR file.
1962 2015-02-06 Nick Clifton <nickc@redhat.com>
1965 * peXXigen.c (rsrc_print_resource_entries): Add range check for
1966 addresses that wrap around the address space.
1967 (rsrc_parse_entry): Likewise.
1969 2015-02-03 H.J. Lu <hongjiu.lu@intel.com>
1973 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
1974 undefined if it is referenced from a non-IR file.
1976 2015-02-03 Nick Clifton <nickc@redhat.com>
1979 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
1980 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
1981 index or an out of range fdr index.
1982 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
1983 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1984 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1985 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1986 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
1987 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
1988 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1989 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1990 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
1991 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1992 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1993 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
1994 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1995 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1996 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1997 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1998 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1999 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2000 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
2001 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2002 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2003 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2004 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2005 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2006 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2007 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2008 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2009 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2010 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
2011 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2012 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2013 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2014 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2015 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2016 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2017 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2018 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
2019 * elf32-vax.c (rtype_to_howto): Likewise.
2020 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2021 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2022 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2023 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2024 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2025 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
2026 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
2027 of range symbol indicies.
2028 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
2029 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
2030 (bfd_mach_o_build_dysymtab): Likewise.
2031 (bfd_mach_o_write_symtab_content): Set the string table size to
2033 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
2035 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
2037 * tekhex.c (first_phase): Check for src pointer reaching end of
2040 2015-02-03 Will Newton <will.newton@linaro.org>
2042 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
2043 Set st_value to zero for undefined symbols if the reference
2044 is weak or pointer_equality_needed is FALSE.
2046 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
2047 comment discussing why we clear st_value for some symbols.
2049 2015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2051 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
2052 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
2054 2015-01-29 Alan Modra <amodra@gmail.com>
2056 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
2057 optimization. Tidy mask for GOT_TLSGD optimization.
2058 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
2059 location of nop zapping high insn too.
2061 2015-01-28 Alan Modra <amodra@gmail.com>
2063 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
2064 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
2065 in .toc indicate xlc compiled code that might require a rw .toc.
2067 2015-01-28 James Bowman <james.bowman@ftdichip.com>
2069 * Makefile.am: Add FT32 files.
2070 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
2071 (bfd_mach_ft32): Define.
2072 (bfd_ft32_arch): Declare.
2073 (bfd_archures_list): Add bfd_ft32_arch.
2074 * config.bfd: Handle FT32.
2075 * configure.ac: Likewise.
2076 * cpu-ft32.c: New file.
2077 * elf32-ft32.c: New file.
2078 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
2079 BFD_RELOC_FT32_18): Define.
2080 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
2081 * bfd-in2.h: Regenerate.
2082 * libbfd.h: Regenerate.
2083 * Makefile.in: Regenerate.
2084 * configure: Regenerate.
2085 * po/SRC-POTFILES.in: Regenerate.
2087 2015-01-27 Nick Clifton <nickc@redhat.com>
2090 * pdp11.c (aout_get_external_symbols): Return false if there are
2093 * dwarf2.c (concat_filename): Check for an empty directory table.
2094 (scan_unit_for_symbols): Check for reading off the end of the
2096 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
2098 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
2101 2015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2103 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
2105 2015-01-22 DJ Delorie <dj@redhat.com>
2107 * elf32-m32c.c (m32c_apply_reloc_24): New.
2108 (m32c_elf_howto_table): Use it for R_M32C_24.
2109 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
2111 2015-01-22 Nick Clifton <nickc@redhat.com>
2114 * coffcode.h (handle_COMDAT): When searching for the section
2115 symbol, make sure that there is space left in the symbol table.
2116 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
2118 2015-01-21 Nick Clifton <nickc@redhat.com>
2121 * coffcode.h (coff_set_arch_mach_hook): Check return value from
2123 (coff_slurp_line_table): Return FALSE if the line number
2124 information was corrupt.
2125 (coff_slurp_symbol_table): Return FALSE if the symbol information
2127 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
2128 initialise the fields of the dyld_info structure.
2129 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
2130 error message and a return value.
2131 (bfd_mach_o_layout_commands): Change the function to boolean.
2132 Return FALSE if the function fails.
2133 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
2135 (bfd_mach_o_read_command): Fail if an unrecognised command is
2137 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
2139 (slurp_symtab): Check the return from bfd_malloc.
2140 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
2141 encountered an error.
2142 (_bfd_XXi_final_link_postscript): Fail if a section could not be
2144 * peicode.h (pe_bfd_object_p): Fail if the header could not be
2146 * tekhex.c (first_phase): Fail if the section is too big.
2147 * versados.c (struct esdid): Add content_size field.
2148 (process_otr): Use and check the new field.
2149 (versados_get_section_contents): Check that the section exists and
2150 that the requested data is available.
2152 2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
2154 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
2156 2015-01-20 Alan Modra <amodra@gmail.com>
2159 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
2160 ELF_COMMON_DEF syms.
2162 2015-01-19 Alan Modra <amodra@gmail.com>
2165 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
2166 linker script assignments too.
2167 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
2168 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
2170 2015-01-19 Alan Modra <amodra@gmail.com>
2172 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
2173 to allow return of first howto.
2174 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
2175 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
2176 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
2177 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
2178 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
2179 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
2180 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
2181 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
2182 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2183 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
2184 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
2185 (spu_elf_reloc_type_lookup): Adjust to suit.
2187 2015-01-19 Alan Modra <amodra@gmail.com>
2189 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
2190 (bfd_get_section_limit): ..here.
2191 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
2192 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
2193 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
2194 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
2195 bfd_reloc_outofrange check.
2196 * bfd-in2.h: Regenerate.
2198 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
2199 on zero size relocs.
2200 * ecoff.c (ecoff_reloc_link_order): Likewise.
2201 * elf32-nds32.c (nds32_relocate_contents): Likewise.
2202 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2204 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
2205 (_bfd_clear_contents): Likewise.
2206 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
2207 (mips_elf_perform_relocation): Likewise.
2209 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
2210 from malloc on zero size alloc.
2211 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2212 * elflink.c (elf_reloc_link_order): Likewise.
2213 * linker.c (_bfd_generic_reloc_link_order): Likewise.
2214 * pdp11.c (aout_link_reloc_link_order): Likewise.
2215 * xcofflink.c (xcoff_reloc_link_order): Likewise.
2217 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
2218 bitsize 0, and complain_overflow_dont.
2219 * coff-sparc.c (coff_sparc_howto_table): Likewise.
2220 * elf-hppa.h (elf_hppa_howto_table): Likewise.
2221 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
2222 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
2223 * elf32-arc.c (elf_arc_howto_table): Likewise.
2224 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
2225 * elf32-avr.c (elf_avr_howto_table): Likewise.
2226 * elf32-bfin.c (bfin_howto_table): Likewise.
2227 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
2228 * elf32-cris.c (cris_elf_howto_table): Likewise.
2229 * elf32-crx.c (crx_elf_howto_table): Likewise.
2230 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
2231 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
2232 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
2233 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
2234 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
2235 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2236 * elf32-h8300.c (h8_elf_howto_table): Likewise.
2237 * elf32-i370.c (i370_elf_howto_raw): Likewise.
2238 * elf32-i386.c (elf_howto_table): Likewise.
2239 * elf32-i860.c (elf32_i860_howto_table): Likewise.
2240 * elf32-i960.c (elf32_i960_relocate): Likewise.
2241 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
2242 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
2243 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
2244 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
2245 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
2246 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
2247 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
2248 * elf32-m68k.c (howto_table): Likewise.
2249 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
2250 * elf32-mep.c (mep_elf_howto_table): Likewise.
2251 * elf32-metag.c (elf_metag_howto_table): Likewise.
2252 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
2253 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
2254 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
2255 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
2256 * elf32-mt.c (mt_elf_howto_table): Likewise.
2257 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
2258 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
2259 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
2260 * elf32-pj.c (pj_elf_howto_table): Likewise.
2261 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
2262 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
2263 * elf32-rx.c (rx_elf_howto_table): Likewise.
2264 * elf32-s390.c (elf_howto_table): Likewise.
2265 * elf32-score.c (elf32_score_howto_table): Likewise.
2266 * elf32-score7.c (elf32_score_howto_table): Likewise.
2267 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
2268 * elf32-spu.c (elf_howto_table): Likewise.
2269 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
2270 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
2271 * elf32-v850.c (v850_elf_howto_table): Likewise.
2272 * elf32-vax.c (howto_table): Likewise.
2273 * elf32-visium.c (visium_elf_howto_table): Likewise.
2274 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
2275 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
2276 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
2277 * elf32-xtensa.c (elf_howto_table): Likewise.
2278 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
2279 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
2280 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
2281 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
2282 * elf64-s390.c (elf_howto_table): Likewise.
2283 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
2284 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
2285 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
2286 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
2287 (elfNN_aarch64_howto_none): Likewise.
2288 * elfxx-ia64.c (ia64_howto_table): Likewise.
2289 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
2290 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
2291 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
2293 2015-01-15 H.J. Lu <hongjiu.lu@intel.com>
2296 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
2297 about -fPIC if the symbol is undefined when building executable.
2299 2015-01-15 Nick Clifton <nickc@redhat.com>
2302 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
2303 error message. Never return an invalid howto pointer.
2304 * elf32-cr16.c (cr16_info_to_howto): Likewise.
2305 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2306 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2307 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2308 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2309 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
2310 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2311 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2312 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2313 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
2314 * elf32-vax.c (rtype_to_howto): Likewise.
2315 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2316 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2317 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
2318 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2319 (sh_elf_reloc): Check that the reloc is in range.
2320 * reloc.c (bfd_perform_relocation): Check that the section is big
2321 enough for the entire reloc.
2322 (bfd_generic_get_relocated_section_contents): Report unexpected
2323 return values from perform_reloc.
2325 2015-01-15 Nick Clifton <nickc@redhat.com>
2327 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
2328 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
2331 2015-01-15 Alan Modra <amodra@gmail.com>
2333 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
2334 any output section matching a linker created dynobj section.
2336 2015-01-15 Alan Modra <amodra@gmail.com>
2339 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
2340 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
2341 Don't assign symtab file position unless symbols will be output.
2342 Merge blocks with condition in common. Don't call
2343 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
2344 unless other symbols are output. Move assignment of symtab_shndx
2345 file position. Localize variable.
2347 2015-01-14 Jiong Wang <jiong.wang@arm.com>
2349 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
2350 trying to defer them to runtime.
2352 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2354 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
2355 to check if a symbol should be bound symbolically.
2357 2015-01-13 Jiong Wang <jiong.wang@arm.com>
2359 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
2360 for TLSLE_MOVW_TPREL_G2.
2362 2015-01-13 Jiong Wang <jiong.wang@arm.com>
2365 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
2366 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
2367 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
2370 2015-01-12 Terry Guo <terry.guo@arm.com>
2372 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
2374 (_bfd_elf_gc_mark_extra_sections): Use it.
2376 2015-01-11 H.J. Lu <hongjiu.lu@intel.com>
2379 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
2380 only discard space for pc-relative relocs symbols which turn
2381 out to need copy relocs.
2383 2015-01-09 Nick Clifton <nickc@redhat.com>
2385 * tekhex.c (getvalue): Fix thinko in test for correct extraction
2387 (getsym): Return false if there was not enough data to extract the
2390 2015-01-09 Anthony Green <green@moxielogic.com>
2392 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
2394 2015-01-08 Nick Clifton <nickc@redhat.com>
2396 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
2397 16-bit absolute BR instructions to 10-bit pc-relative JMP
2400 2015-01-08 Nick Clifton <nickc@redhat.com>
2403 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
2404 to load the line table.
2405 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
2407 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
2408 the Data Directory Size is too large.
2410 2015-01-06 H.J. Lu <hongjiu.lu@intel.com>
2413 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
2414 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2416 2015-01-06 Nick Clifton <nickc@redhat.com>
2419 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
2422 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
2423 (bfd_perform_relocation): Include the size of the reloc in the
2424 test for an out of range relocation.
2425 (bfd_generic_get_relocated_section_contents): Remove reloc range
2428 * coff-i860.c (CALC_ADDEND): Always set an addend value.
2429 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
2430 avoid reading off the end of the buffer.
2432 (first_phase): Likewise.
2433 (pass_over): Pass an end pointer to the invoked function.
2435 2015-01-05 H.J. Lu <hongjiu.lu@intel.com>
2438 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
2440 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2442 2015-01-05 Nick Clifton <nickc@redhat.com>
2445 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
2446 is at least big enough for the header to be read.
2447 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
2448 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
2449 (bfd_mach_o_read_command): Prevetn duplicate error messages about
2450 unrecognized commands.
2451 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
2452 when indexing into the string table.
2454 2015-01-01 Alan Modra <amodra@gmail.com>
2456 Update year range in copyright notice of all files.
2458 For older changes see ChangeLog-2014
2460 Copyright (C) 2015 Free Software Foundation, Inc.
2462 Copying and distribution of this file, with or without modification,
2463 are permitted in any medium without royalty provided the copyright
2464 notice and this notice are preserved.
2470 version-control: never