1 2014-11-04 Nick Clifton <nickc@redhat.com>
4 * compress.c (bfd_get_full_section_contents): Improve test for
5 linker created objects.
8 * archive.c (_bfd_slurp_extended_name_table): Handle archives with
9 corrupt extended name tables.
11 2014-11-04 Alan Modra <amodra@gmail.com>
13 * elf32-spu.c (ovl_mgr_stat): New function.
14 (spu_elf_open_builtin_lib): Pass to bfd_openr_iovec.
16 2014-11-03 Andrew Burgess <andrew.burgess@embecosm.com>
18 * elf32-avr.c (elf32_avr_relax_delete_bytes): During linker
19 relaxation, reduce the size of symbols that span the deleted
22 2014-11-03 Andrew Burgess <andrew.burgess@embecosm.com>
24 * elf32-avr.c (elf32_avr_relax_delete_bytes): Modify symbols
25 located at the very end of the section.
27 2014-11-03 Nick Clifton <nickc@redhat.com>
30 * aoutx.h (slurp_symbol_table): Check that computed table size is
31 not bigger than the file from which is it being read.
32 (slurp_reloc_table): Likewise.
33 * coffcode.h (coff_slurp_line_table): Remove unneeded local
34 'warned'. Do not try to print the details of a symbol with an
36 * coffgen.c (make_a_sectiobn_from_file): Check computed string
37 index against length of string table.
38 (bfd_coff_internal_syment_name): Check read in string offset
39 against length of string table.
40 (build_debug_section): Return a pointer to the section used.
41 (_bfd_coff_read_string_table): Store the length of the string
42 table in the coff_tdata structure.
43 (bfd_coff_free_symbols): Set the length of the string table to
44 zero when it is freed.
45 (coff_get_normalized_symtab): Check offsets against string table
46 or data table lengths as appropriate.
47 * cofflink.c (_bfd_coff_link_input_bfd): Check offset against
48 length of string table.
49 * compress.c (bfd_get_full_section_contents): Check computed size
50 against the size of the file.
51 * libcoff-in.h (obj_coff_strings_len): Define.
52 (struct coff_tdata): Add strings_len field.
53 * libcoff.h: Regenerate.
54 * peXXigen.c (pe_print_debugdata): Do not attempt to print the
55 data if the debug section is too small.
56 * xcofflink.c (xcoff_link_input_bfd): Check offset against
57 length of string table.
59 2014-11-03 Nick Clifton <nickc@redhat.com>
61 * po/fi.po: Updated Finnish translation.
63 2014-10-31 Andrew Pinski <apinski@cavium.com>
64 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
66 * archures.c: Add octeon3 for mips target.
67 * bfd-in2.h: Regenerate.
68 * bfd/cpu-mips.c: Define I_mipsocteon3.
69 nfo_struct): Add octeon3 support.
70 * bfd/elfxx-mips.c: (_bfd_elf_mips_mach): Add support for
72 (mips_set_isa_flags): Add support for octeon3.
73 (bfd_mips_isa_ext): Add bfd_mach_mips_octeon3.
74 (mips_mach_extensions): Make bfd_mach_mips_octeon3 an
75 extension of bfd_mach_mips_octeon2.
76 (print_mips_isa_ext): Print the value of Octeon3.
78 2014-10-31 Nick Clifton <nickc@redhat.com>
81 * coffgen.c (_bfd_coff_get_external_symbols): Do not try to load a
82 symbol table bigger than the file.
83 * elf.c (bfd_elf_get_str_section): Do not try to load a string
84 table bigger than the file.
85 * tekhex.c (first_phase): Check that the section range is sane.
87 2014-10-30 Nick Clifton <nickc@redhat.com>
90 * ihex.c (ihex_scan): Fix typo in invocation of ihex_bad_byte.
91 * coffgen.c (coff_get_normalized_symtab): Prevent buffer overrun.
93 2014-10-29 Nick Clifton <nickc@redhat.com>
95 * elf.c (bfd_section_from_shdr): Fix heap use after free memory
98 2014-10-29 Dennis Brueni <dbrueni@slickedit.com>
100 * elf.c (elfcore_write_lwpstatus): Fix typo in call to memcpy.
102 2014-10-28 Nick Clifton <nickc@redhat.com>
105 * elf.c (bfd_section_from_shdr): Allocate and free the recursion
106 detection table on a per-bfd basis.
107 * peXXigen.c (pe_print_edata): Handle binaries with a truncated
110 2014-10-28 Andreas Schwab <schwab@suse.de>
111 Nick Clifton <nickc@redhat.com>
114 * srec.c (srec_bad_byte): Increase size of buf to allow for
116 (srec_scan): Use an unsigned char buffer to hold header bytes.
118 2014-10-27 Nick Clifton <nickc@redhat.com>
121 * elf.c (bfd_section_from_shdr): Detect and warn about ELF
122 binaries with a group of sections linked by the string table
124 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries
125 with an invalid value for NumberOfRvaAndSizes.
126 (pe_print_edata): Detect out of range rvas and entry counts for
127 the Export Address table, Name Pointer table and Ordinal table.
130 * elf.c (setup_group): Improve handling of corrupt group
133 2014-10-24 Tejas Belagod <tejas.belagod@arm.com>
135 * bfd-in.h (bfd_elf64_aarch64_set_options): Add a parameter.
136 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
137 * elfnn-aarch64.c (aarch64_erratum_835769_stub): New.
138 (elf_aarch64_stub_type): Add new type
139 aarch64_stub_erratum_835769_veneer.
140 (elf_aarch64_stub_hash_entry): New fields for erratum 835769.
141 (aarch64_erratum_835769_fix): New data struct to record erratum
143 (elf_aarch64_link_hash_table: Global flags for 835769.
144 (aarch64_build_one_stub): Add case for 835769.
145 (aarch64_size_one_stub): Likewise.
146 (aarch64_mem_op_p, aarch64_mlxl_p,
147 aarch64_erratum_sequence,erratum_835769_scan):
148 New. Decode and scan functions for erratum 835769.
149 (elf_aarch64_create_or_find_stub_sec): New.
150 (elfNN_aarch64_size_stubs): Look for erratum 835769 and record
152 (bfd_elfNN_aarch64_set_options: Set global flag for 835769.
153 (erratum_835769_branch_to_stub_data,
154 make_branch_to_erratum_835769_stub):New. Connect up all the
155 erratum stubs to occurances by branches.
156 (elfNN_aarch64_write_section): New hook.
157 (aarch64_map_one_stub): Output erratum stub symbol.
158 (elfNN_aarch64_size_dynamic_sections): Init mapping symbol
159 information for erratum 835769.
160 (elf_backend_write_section): Define.
162 2014-10-23 Victor Kamensky <victor.kamensky@linaro.org>
164 * elf32-arm.c (read_code32): New function to read 32 bit
166 (read_code16): New function to read 16 bit thumb instrution.
167 (elf32_arm_plt0_size, elf32_arm_plt_size): Use read_code32
168 and read_code16 to read instructions.
170 2014-10-22 Matthew Fortune <matthew.fortune@imgtec.com>
172 * elfxx-mips.c (print_mips_ases): Print unknown ASEs.
173 (print_mips_isa_ext): Print the value of an unknown extension.
175 2014-10-21 Alan Modra <amodra@gmail.com>
177 * elf64-ppc.c (ppc64_elf_tls_optimize): Ignore relocs against toc
178 entries that aren't a multiple of 8 rather than failing assertion.
180 2014-10-21 Alan Modra <amodra@gmail.com>
182 * elf64-ppc.c (ppc64_elf_size_stubs): Add gcc-4.9 libgomp functions
185 2014-10-18 Alan Modra <amodra@gmail.com>
187 * elf64-ppc.c (ppc64_elf_add_symbol_hook): If function code
188 section for function symbols defined in .opd is discarded, let
189 the symbol appear to be undefined.
190 (opd_entry_value): Ensure the result section is that for the
191 function code section in the same object as the OPD entry.
193 2014-10-16 Alan Modra <amodra@gmail.com>
196 * elf32-arm.c (elf32_arm_add_symbol_hook): Only set has_gnu_symbols
198 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
199 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
200 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
201 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
202 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
203 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
204 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
205 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
206 * elf-s390-common.c (elf_s390_add_symbol_hook): Likewise. Handle
209 2014-10-16 Alan Modra <amodra@gmail.com>
211 * elf64-ppc.c (ppc64_elf_before_check_relocs): Do .opd processing
212 even when output is not ppc64 ELF. Remove redundant tests on
215 2014-10-15 Alan Modra <amodra@gmail.com>
218 * aoutx.h (NAME (aout, find_nearest_line)): Add "discriminator_ptr"
219 param, group "section" and "offset" params. Zero discriminator.
220 * bfd.c (bfd_find_nearest_line): Implement with new
221 _bfd_find_nearest_line.
222 (bfd_find_nearest_line_discriminator): Likewise.
223 * coff-i386.c (_bfd_generic_find_nearest_line_discriminator): Don't
225 * coff-rs6000.c (xcoff_find_nearest_line,
226 xcoff_find_nearest_line_discriminator): Delete.
227 (_bfd_xcoff_find_nearest_line): Don't define.
228 (_bfd_xcoff_find_nearest_line): Define as coff_find_nearest_line.
229 * coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator): Don't
231 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Adjust.
232 * coffgen.c (coff_find_nearest_line_with_names): Reorder params,
233 adjust _bfd_dwarf2_find_nearest_line call.
234 (coff_find_nearest_line): Add "discriminator_ptr" param, reorder
235 others. Set discriminator. Adjust call.
236 (coff_find_nearest_line_discriminator): Delete.
237 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Reorder params.
238 * dwarf2.c (find_line): Rename to..
239 (_bfd_dwarf2_find_nearest_line): ..this, reordering params.
240 Simplify setting of do_line. Delete old function.
241 (_bfd_dwarf2_find_line): Delete.
242 * ecoff.c (_bfd_ecoff_find_nearest_line): Reorder params, add
243 discriminator_ptr and set it.
244 * elf-bfd.h (_bfd_elf_find_nearest_line): Update prototype.
245 (_bfd_elf_find_nearest_line_discriminator): Delete.
246 (_bfd_elf_find_line_discriminator): Delete.
247 (_bfd_generic_find_nearest_line_discriminator): Don't define.
248 * elf.c (elf_find_function): Reorder params.
249 (_bfd_elf_find_nearest_line): Reorder params, add discriminator_ptr.
251 (_bfd_elf_find_nearest_line_discriminator): Delete.
252 (_bfd_elf_find_line): Adjust call.
253 * elf32-arm.c (arm_elf_find_function): Reorder params.
254 (elf32_arm_find_nearest_line): Reorder params, add discriminator_ptr.
256 * elf64-alpha.c (elf64_alpha_find_nearest_line): Similarly.
257 * elfnn-aarch64.c (aarch64_elf_find_function): Reorder params.
258 (elfNN_aarch64_find_nearest_line): Reorder params, add
259 discriminator_ptr. Adjust calls.
260 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly.
261 * elfxx-mips.h (_bfd_mips_elf_find_nearest_line): Update prototype.
262 * libaout.h (NAME (aout, find_nearest_line)): Update prototype.
263 * libbfd-in.h (_bfd_nosymbols_find_nearest_line): Update.
264 (_bfd_dwarf1_find_nearest_line): Likewise.
265 (_bfd_dwarf2_find_nearest_line): Likewise.
266 (_bfd_dwarf2_find_line): Delete.
267 (_bfd_generic_find_nearest_line_discriminator): Delete.
268 * libbfd.c (_bfd_generic_find_nearest_line_discriminator): Delete.
269 * libcoff-in.h (coff_find_nearest_line): Update prototype.
270 (coff_find_nearest_line_discriminator): Delete.
271 (coff_find_nearest_line_with_names): Update prototype.
272 * libecoff.h (_bfd_ecoff_find_nearest_line): Update prototype.
273 * mach-o.c (bfd_mach_o_find_nearest_line): Reorder params, add
274 discriminator_ptr. Adjust calls.
275 * mach-o.h (bfd_mach_o_find_nearest_line): Update prototype.
276 * pdp11.c (NAME (aout, find_nearest_line)): Reorder params, add
277 discriminator_ptr and set.
278 * som.c (som_find_nearest_line): Similarly.
279 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Delete entry for
280 _bfd_find_nearest_line_discriminator.
281 (struct bfd_target <_bfd_find_nearest_line>): Adjust prototype.
282 (struct bfd_target <_bfd_find_nearest_line_discriminator>): Delete.
283 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Rename to..
284 (_bfd_vms_find_nearest_line): ..this. Reorder params, add
285 "discriminator" and set.
286 (_bfd_vms_find_nearest_line_discriminator): Delete.
287 (_bfd_generic_find_nearest_line_discriminator): Don't define.
288 (alpha_vms_find_nearest_line): Update define.
289 * bfd-in2.h: Regenerate.
290 * libbfd.h: Regenerate.
291 * libcoff.h: Regenerate.
293 2014-10-15 Alan Modra <amodra@gmail.com>
295 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Use NAME##_find_line.
296 * aout-adobe.c (aout_32_find_line): Define.
297 (aout_32_bfd_make_debug_symbol, aout_32_bfd_reloc_type_lookup,
298 aout_32_bfd_reloc_name_lookup): Define using _bfd_nosymbols define.
299 * aout-target.h (MY_find_line): Define.
300 * aout-tic30.c (MY_find_line): Define.
301 * binary.c (binary_find_line): Define.
302 * bout.c (aout_32_find_line): Define.
303 * coff-rs6000.c (_bfd_xcoff_find_line): Define.
304 * coff64-rs6000.c (rs6000_xcoff64_vec): Use coff_find_line.
305 (rs6000_xcoff64_aix_vec): Likewise.
306 * elf-bfd.h (_bfd_generic_find_line): Don't define.
307 * elfxx-target.h (bfd_elfNN_find_line): Define.
308 * i386msdos.c (msdos_find_line): Define.
309 * i386os9k.c (aout_32_find_line): Define.
310 * ieee.c (ieee_find_nearest_line, ieee_find_inliner_info): Delete func.
311 (ieee_find_nearest_line, ieee_find_line,
312 ieee_find_inliner_info): Define.
313 * ihex.c (ihex_find_line): Define.
314 * libbfd-in.h (_bfd_nosymbols_find_line): Define.
315 (_bfd_generic_find_line): Don't define.
316 * libbfd.c (_bfd_generic_find_line): Delete.
317 * libcoff-in.h (coff_find_line): Define.
318 * libecoff.h (_bfd_ecoff_find_line): Define.
319 * mach-o.h (bfd_mach_o_find_line): Define.
320 * mmo.c (mmo_find_line): Define.
321 * nlm-target.h (nlm_find_line): Define.
322 * oasys.c (oasys_find_nearest_line, oasys_find_inliner_info): Delete.
323 (oasys_find_nearest_line, oasys_find_line,
324 oasys_find_inliner_info): Define.
325 * pef.c (bfd_pef_find_line): Define.
326 * plugin.c (bfd_plugin_find_line): Define.
327 * ppcboot.c (ppcboot_find_line): Define.
328 * som.c (som_find_line): Define.
329 * srec.c (srec_find_line): Define.
330 * tekhex.c (tekhex_find_line): Define.
331 * versados.c (versados_find_line): Define.
332 * vms-alpha.c (alpha_vms_find_line): Define.
333 * xsym.c (bfd_sym_find_line): Define.
334 * bfd-in2.h: Regenerate.
335 * libbfd.h: Regenerate.
336 * libcoff.h: Regenerate.
338 2014-10-15 Tristan Gingold <gingold@adacore.com>
340 * version.m4: Bump version to 2.25.51
341 * configure: Regenerate.
343 2014-10-14 H.J. Lu <hongjiu.lu@intel.com>
345 * elf32-i386.c (elf_i386_convert_mov_to_lea): Skip if relocation
346 offset is less than 2.
347 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
349 2014-10-14 Alan Modra <amodra@gmail.com>
352 * libbfd.c (COERCE16, COERCE32, COERCE64): Use unsigned types.
353 (EIGHT_GAZILLION): Delete.
355 2014-10-13 Alan Modra <amodra@gmail.com>
358 * elf-eh-frame.c (ENSURE_NO_RELOCS): Don't stop at first NONE reloc.
359 (_bfd_elf_parse_eh_frame): When relocatable output, don't set
360 flags enabling conversion of CIEs and FDEs to use relative encoding.
361 (find_merged_cie): Similarly.
362 (_bfd_elf_write_section_eh_frame): Don't edit FDEs when
363 relocatable, except for CIE pointer.
364 * elflink.c (bfd_elf_reloc_symbol_deleted_p): Return true for
365 relocs against symbols in dropped comdat group sections.
366 (bfd_elf_discard_info): Do some eh_frame optimisation when
369 2014-10-09 Jose E. Marchesi <jose.marchesi@oracle.com>
371 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Handle
372 the hwcaps2 object attribute.
374 2014-10-04 Alan Modra <amodra@gmail.com>
377 * elf-bfd.h (struct eh_cie_fde): Comment re NULL u.fde.cie_inf.
378 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Mark zero address
379 range FDEs for discarding.
380 (vma_compare): Sort on range after address.
381 (_bfd_elf_gc_mark_fdes): Test for NULL u.fde.cie_inf.
382 (_bfd_elf_discard_section_eh_frame): Likewise. Write "FDE" in
383 error message rather than "fde".
384 (_bfd_elf_write_section_eh_frame_hdr): Write "PC" and "FDE" in
387 2014-09-29 H.J. Lu <hongjiu.lu@intel.com>
390 * elf32-i386.c (elf_i386_fbsd_post_process_headers): Fix build
391 for OLD_FREEBSD_ABI_LABEL.
393 2014-09-24 Markus Trippelsdorf <markus@trippelsdorf.de>
396 * plugin.c (try_claim): New function. Moved from
398 (try_load_plugin): Pass through bfd. Add test.
399 (load_plugin): Pass through bfd.
400 (bfd_plugin_object_p): Move logic to try_claim.
402 2014-09-23 Sterling Augustine <augustine.sterling@gmail.com>
404 * elf32-xtensa.c (is_resolvable_asm_expansion): for cross-section
405 call relaxation use furthermost addresses where call source and
406 destination can be to check whether it's in the range of a direct
409 2014-09-22 Alan Modra <amodra@gmail.com>
411 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Don't return
412 false for overflow or overlapping FDEs. Give more detail in
415 2014-09-22 Andrew Bennett <andrew.bennett@imgtec.com>
417 * elfxx-mips.c (mips_elf_calculate_relocation): Don't sign extend
418 the addend if relocations are RELA.
420 2014-09-22 Kuan-Lin Chen <kuanlinchentw@gmail.com>
422 * elf32-nds32.c (nds32_elf_ex9_build_hash_table,
423 nds32_elf_ex9_relocation_check): Synchronize the argument type.
425 2014-09-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
427 * elf32-s390.c: Don't replace R_390_TLS_LE32 with R_390_TLS_TPOFF
429 * elf64-s390.c: Don't replace R_390_TLS_LE64 with R_390_TLS_TPOFF
432 2014-09-18 Jan Kratochvil <jan.kratochvil@redhat.com>
435 * elfcode.h (bfd_from_remote_memory): Use SIZE for HIGH_OFFSET.
437 2014-09-16 Terry Guo <terry.guo@arm.com>
439 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Return false if
442 2014-09-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
444 * bfd-in2.h: Regenerate.
445 * elf32-nds32.c (nds32_elf_mkobject): Hook bfd_elf32_mkobject.
446 (nds32_elf_relax_section): Code refactoring.
447 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2,
448 nds32_elf_relax_longcall3, nds32_elf_relax_longcall4,
449 nds32_elf_relax_longcall5, nds32_elf_relax_longcall6): Relax call
450 pattern. The first three is moved from nds32_elf_relax_section,
451 and the last three is new function.
452 (nds32_elf_relax_longjump1, nds32_elf_relax_longjump2,
453 nds32_elf_relax_longjump3, nds32_elf_relax_longjump4,
454 nds32_elf_relax_longjump5, nds32_elf_relax_longjump6,
455 nds32_elf_relax_longjump7): Relax condition branch pattern. The first
456 three is moved from nds32_elf_relax_section, and the last four
458 (nds32_elf_relax_loadstore, nds32_elf_relax_lo12): Relax load-store
459 pattern and address setting pattern.
460 (nds32_elf_relax_piclo12, nds32_elf_relax_ptr,
461 nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff,
462 nds32_elf_relax_gotoff_suff): Relax pic pattern.
463 (nds32_elf_relax_letlslo12, nds32_elf_relax_letlsadd,
464 nds32_elf_relax_letlsls): Relax TLS pattern.
465 (nds32_relax_adjust_label): Adjust alignment and nop.
466 (nds32_elf_pick_relax): Choose relaxation optimization.
467 (nds32_elf_get_relocated_section_contents): New hook.
468 (nds32_elf_order_insn_times, nds32_elf_ex9_build_itable): Release ex9
470 * elf32-nds32.h: Declare.
471 * libbfd.h: Regenerate.
472 * reloc.c: Add nds32 new relocations.
474 2014-09-15 Chen Gang <gang.chen.5i5j@gmail.com>
476 * dwarf2.c (find_abstract_instance_name): Use 'form' instead of
477 'name' for the typo issue, which related with commit
478 60d77146a249ae9b51d7ce98930cdbedb2cfa352.
480 2014-09-15 Andrew Bennett <andrew.bennett@imgtec.com>
481 Matthew Fortune <matthew.fortune@imgtec.com>
483 * aoutx.h (NAME (aout, machine_type)): Add mips32r6 and mips64r6.
484 * archures.c (bfd_architecture): Likewise.
485 * bfd-in2.h (bfd_architecture): Likewise.
486 (bfd_reloc_code_real): Add relocs BFD_RELOC_MIPS_21_PCREL_S2,
487 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3 and
488 BFD_RELOC_MIPS_19_PCREL_S2.
489 * cpu-mips.c (arch_info_struct): Add mips32r6 and mips64r6.
490 * elf32-mips.c: Define relocs R_MIPS_PC21_S2, R_MIPS_PC26_S2
491 R_MIPS_PC18_S3, R_MIPS_PC19_S2, R_MIPS_PCHI16 and R_MIPS_PCLO16.
492 (mips_reloc_map): Add entries for BFD_RELOC_MIPS_21_PCREL_S2,
493 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3,
494 BFD_RELOC_MIPS_19_PCREL_S2, BFD_RELOC_HI16_S_PCREL and
495 BFD_RELOC_LO16_PCREL.
496 * elf64-mips.c: Define REL, and RELA relocations R_MIPS_PC21_S2,
497 R_MIPS_PC26_S2, R_MIPS_PC18_S3, R_MIPS_PC19_S2, R_MIPS_PCHI16
499 (mips_reloc_map): Add entries for BFD_RELOC_MIPS_21_PCREL_S2,
500 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3,
501 BFD_RELOC_MIPS_19_PCREL_S2, BFD_RELOC_HI16_S_PCREL and
502 BFD_RELOC_LO16_PCREL.
503 * elfn32-mips.c: Likewise.
504 * elfxx-mips.c (MIPSR6_P): New define.
505 (mipsr6_exec_plt_entry): New array.
506 (hi16_reloc_p): Add support for R_MIPS_PCHI16.
507 (lo16_reloc_p): Add support for R_MIPS_PCLO16.
508 (aligned_pcrel_reloc_p): New function.
509 (mips_elf_relocation_needs_la25_stub): Add support for relocs:
510 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
511 (mips_elf_calculate_relocation): Add support for relocs:
512 R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3, R_MIPS_PC19_S2,
513 R_MIPS_PCHI16 and R_MIPS_PCLO16.
514 (_bfd_elf_mips_mach): Add support for mips32r6 and mips64r6.
515 (mips_elf_add_lo16_rel_addend): Add support for R_MIPS_PCHI16.
516 (_bfd_mips_elf_check_relocs): Add support for relocs:
517 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
518 (_bfd_mips_elf_relocate_section): Add a check for unaligned
520 (_bfd_mips_elf_finish_dynamic_symbol): Add support for MIPS r6
522 (mips_set_isa_flags): Add support for mips32r6 and mips64r6.
523 (_bfd_mips_elf_print_private_bfd_data): Likewise.
524 (mips_32bit_flags_p): Add support for mips32r6.
525 * libbfd.h (bfd_reloc_code_real_names): Add entries for
526 BFD_RELOC_MIPS_21_PCREL_S2, BFD_RELOC_MIPS_26_PCREL_S2,
527 BFD_RELOC_MIPS_18_PCREL_S3 and BFD_RELOC_MIPS_19_PCREL_S2.
528 * reloc.c: Document relocs BFD_RELOC_MIPS_21_PCREL_S2,
529 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3 and
530 BFD_RELOC_MIPS_19_PCREL_S2.
531 * config.bfd: Add mips*-img-elf* target triple.
533 2014-09-12 Andrew Bennett <andrew.bennett@imgtec.com>
535 * config.bfd: Add mips*-img-elf* target triple.
537 2014-09-12 Alan Modra <amodra@gmail.com>
539 * elf-bfd.h (struct eh_frame_array_ent): Add "range".
540 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Stash address
541 range of FDEs to hdr_info->array.
542 (_bfd_elf_write_section_eh_frame_hdr): Report overflow in
543 .eh_frame_hdr entries, and overlapping FDEs.
545 2014-09-10 Alan Modra <amodra@gmail.com>
547 * elf.c (assign_file_positions_except_relocs): Move section header
549 (_bfd_elf_assign_file_positions_for_relocs): ..here. Make static.
550 * elf-bfd.h (_bfd_elf_assign_file_positions_for_relocs): Delete.
551 * elflink.c (bfd_elf_final_link): Don't call above function.
553 2014-08-30 Alan Modra <amodra@gmail.com>
555 * elf32-ppc.c (ppc_elf_relax_section): Fix off by one error.
557 2014-08-29 Alan Modra <amodra@gmail.com>
559 * elf64-ppc.c (ppc64_elf_relocate_section): Report a different
560 error for calls via a toc adjusting stub without a nop.
562 2014-08-29 Alan Modra <amodra@gmail.com>
564 * vms-alpha.c (alpha_vma_object_p): Don't return file_truncated
565 error. Remove redundant bfd_set_error.
567 2014-08-29 Alan Modra <amodra@gmail.com>
569 * srec.c (srec_scan): Revert last change. Report an error for
570 S-records with less than the miniumum byte count.
572 2014-08-28 H.J. Lu <hongjiu.lu@intel.com>
574 * srec.c (srec_scan): Return error for 0 size.
576 2014-08-27 H.J. Lu <hongjiu.lu@intel.com>
579 * elf32-i386.c (elf_i386_convert_mov_to_lea): Use bfd_is_abs_section
580 to check discarded input section.
581 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
583 2014-08-27 H.J. Lu <hongjiu.lu@intel.com>
586 * elflink.c (elf_link_add_object_symbols): Don't attach dynamic
587 sections to input from ld --just-symbols.
589 2014-08-26 DJ Delorie <dj@redhat.com>
591 * elf32-rl78.c (rl78_elf_relax_section): Disambiguate test for
594 2014-08-26 Jiong Wang <jiong.wang@arm.com>
596 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Initialize non_got_ref
597 properly for MOVW_G0/1/2_NC and MOVW_G3. Reject them when linking
599 (elfNN_aarch64_gc_sweep_hook): Add check on these relocs.
601 2014-08-26 Nick Clifton <nickc@redhat.com>
603 * config.bfd: Fix typo in or1knd selection.
605 2014-08-22 Kai Tietz <ktietz@redhat.com>
608 * coffcode.h (coff_compute_section_file_positions): Keep
609 FileAlignment valid as set.
611 2014-08-22 Alan Modra <amodra@gmail.com>
613 * elf-eh-frame.c (struct cie): Delete "output_sec" field.
614 (cie_eq, cie_compute_hash): Use output_section from cie_inf instead.
616 2014-08-22 Alan Modra <amodra@gmail.com>
618 * elf-bfd.h (struct eh_frame_hdr_info): Delete merge_cies and
620 (_bfd_elf_begin_eh_frame_parsing): Delete.
621 (_bfd_elf_end_eh_frame_parsing): Delete.
622 * elf-eh-frame.c (_bfd_elf_begin_eh_frame_parsing): Delete.
623 (_bfd_elf_end_eh_frame_parsing): Delete.
624 (_bfd_elf_parse_eh_frame): Don't test parsed_eh_frame. Test
625 !info->relocatable in place of merge_cies.
626 * elflink.c (bfd_elf_gc_sections, bfd_elf_discard_info): Adjust.
627 * elf64-ppc.c (glink_eh_frame_cie): Pad to multiple of 8.
628 (ppc64_elf_size_stubs): Likewise pad stub FDE.
629 (ppc64_elf_build_stubs): Move code setting glink .eh_frame to..
630 (ppc64_elf_size_stubs): ..here and..
631 (ppc64_elf_finish_dynamic_sections): ..here.
633 2014-08-21 Maciej W. Rozycki <macro@codesourcery.com>
635 * elf64-ppc.h (ppc64_elf_set_toc): Fix indentation.
637 2014-08-21 Tony Wang <tony.wang@arm.com>
639 * elf32-arm.c (elf32_arm_final_link_relocate): Implement
640 the veneer routine for R_ARM_THM_JUMP19.
641 (arm_type_of_stub): Add conditional clause for R_ARM_THM_JUMP19
642 (elf32_arm_size_stub): Ditto.
644 2014-08-20 Roland McGrath <mcgrathr@google.com>
647 * elf32-arm.c (elf32_arm_check_relocs): Increment P->pc_count for
648 all reloc types with pc_relative set in the howto, not just for
649 R_ARM_REL32 and R_ARM_REL32_NOI.
650 (allocate_dynrelocs_for_symbol): Update comment.
651 (elf32_arm_gc_sweep_hook): For all reloc types with pc_relative
652 set in the howto, set call_reloc_p and may_need_local_target_p but
653 not may_become_dynamic_p; not only for R_ARM_REL32 and R_ARM_REL32_NOI.
654 (elf32_arm_check_relocs): Likewise.
656 2014-08-20 Will Newton <will.newton@linaro.org>
658 * config.bfd: Default armeb-*-eabi* to big endian.
660 2014-08-19 Alan Modra <amodra@gmail.com>
662 * configure: Regenerate.
664 2014-08-18 Alan Modra <amodra@gmail.com>
666 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't attempt to
667 use dynrelocs for ifunc.
668 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Similarly.
670 2014-08-18 Alan Modra <amodra@gmail.com>
673 * elflink.c (on_needed_list): Only consider libraries that have
676 2014-08-18 Alan Modra <amodra@gmail.com>
678 * elflink.c (bfd_elf_discard_info): Return int error status.
679 * stabs.c (_bfd_discard_section_stabs): Comment typo fix.
680 * bfd-in.h (bfd_elf_discard_info): Updata prototype.
681 * bfd-in2.h: Regenerate.
683 2014-08-14 Alan Modra <amodra@gmail.com>
685 * peXXigen.c (pe_print_reloc): Protect against access past end
688 2014-08-14 Alan Modra <amodra@gmail.com>
691 * elflink.c (bfd_elf_discard_info): Process .eh_frame and .stab
692 in the order they are mapped to output sections.
694 2014-08-14 Alan Modra <amodra@gmail.com>
696 * configure.ac: Delete redundant plugin related checks.
697 * configure: Regenerate.
699 2014-08-13 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
701 * elf32-or1k.c (or1k_elf_relocate_section, or1k_elf_check_relocs,
702 allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL
705 2014-08-12 Alan Modra <amodra@gmail.com>
707 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Only call "notice"
708 here when not calling the generic add_symbol function. Formatting.
709 Correct handling of indirect symbols. Update notice call.
710 * elflink.c (_bfd_elf_notice_as_needed): Update notice call.
711 * linker.c (_bfd_generic_link_add_one_symbol): Create indirect
712 symbols early. Update notice call. Add comments regarding weak
713 symbols vs. indirect.
715 2014-08-12 Alan Modra <amodra@gmail.com>
718 * linker.c (_bfd_generic_link_add_one_symbol <WARN>): Handle
721 2014-08-07 Chen Gang <gang.chen.5i5j@gmail.com>
723 * coff-ppc.c (coff_ppc_relocate_section): Ensure local symbols are
726 2014-08-07 H.J. Lu <hongjiu.lu@intel.com>
727 Alan Modra <amodra@gmail.com>
730 * linker.c (_bfd_generic_link_add_one_symbol): Don't issue a
731 warning for references in LTO IR to warning symbols.
733 2014-08-07 Alan Modra <amodra@gmail.com>
735 * linker.c (WARN, CWARN): Collapse these states to WARN.
736 (_bfd_generic_link_add_one_symbol): Use old CWARN case for
739 2014-08-05 Doug Evans <dje@google.com>
741 * bfd-in2.h: Regenerate.
742 * libcoff.h: Regenerate.
744 2014-08-05 Maciej W. Rozycki <macro@codesourcery.com>
746 * elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's
747 rawsize if changing size.
749 2014-08-05 Alan Modra <amodra@gmail.com>
752 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Typo fix.
754 2014-08-05 Alan Modra <amodra@gmail.com>
756 * linker.c (generic_link_check_archive_element): Move handling
757 of command link -u symbols with a common symbol def to the
758 code handling non-common symbols so that archive element symbols
759 are loaded. Use generic_link_add_object_symbols.
761 2014-08-05 Alan Modra <amodra@gmail.com>
764 * linker.c (struct archive_list, struct archive_hash_entry,
765 struct archive_hash_table, archive_hash_newfunc,
766 archive_hash_table_init, archive_hash_lookup, archive_hash_allocate,
767 archive_hash_table_free): Delete.
768 (_bfd_generic_link_add_archive_symbols): Add h and name params to
769 checkfn. Rewrite using a straight-forward scan over archive map.
770 (generic_link_check_archive_element_no_collect,
771 generic_link_check_archive_element_collect,
772 generic_link_check_archive_element): Add h and name params.
773 * aoutx.h (aout_link_check_archive_element): Likewise.
774 * pdp11.c (aout_link_check_archive_element): Likewise.
775 * xcofflink.c (xcoff_link_check_archive_element): Likewise.
776 * cofflink.c (coff_link_check_archive_element): Likewise. Don't
777 scan symbols, simply add archive element whenever h is undefined.
778 (coff_link_check_ar_symbols): Delete.
779 * ecoff.c (read_ext_syms_and_strs): Delete.
780 (reread_ext_syms_and_strs): Delete.
781 (ecoff_link_check_archive_element): Add h and name param. Don't
782 scan symbols, simply add based on h. Use ecoff_link_add_object_symbols.
783 * elflink.c (elf_link_is_defined_archive_symbol): Don't test
785 (elf_link_add_archive_symbols): Delete "defined" array, merge
786 functionality into "included". Make "included" a char array. Don't
787 set or test archive_pass.
788 * libbfd-in.h (_bfd_generic_link_add_archive_symbols): Update.
789 * libbfd.h: Regenerate.
791 2014-08-01 Takashi Yoshii <yoshii.takashi@renesas.com>
794 * elf32-sh.c (sh_elf_relax_section): Add jmp to bra relaxing.
796 2014-07-29 Matthew Fortune <matthew.fortune@imgtec.com>
798 * elfxx-mips.c (ABI_O32_P, MIPS_ELF_ABIFLAGS_SECTION_NAME_P): New macro.
799 (mips_elf_obj_tdata): Add abiflags and abiflags_valid fields.
800 (bfd_mips_elf_swap_abiflags_v0_in): New function.
801 (bfd_mips_elf_swap_abiflags_v0_out): Likewise.
802 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_ABIFLAGS.
803 (_bfd_mips_elf_fake_sections): Likewise.
804 (_bfd_mips_elf_always_size_sections): Handle .MIPS.abiflags.
805 (_bfd_mips_elf_additional_program_headers): Account for new
806 PT_MIPS_ABIFLAGS program header.
807 (_bfd_mips_elf_modify_segment_map): Create PT_MIPS_ABIFLAGS segment and
808 associate with .MIPS.abiflags.
809 (_bfd_mips_elf_gc_mark_extra_sections): New function.
810 (bfd_mips_isa_ext, update_mips_abiflags_isa): New static function.
811 (infer_mips_abiflags): Likewise.
812 (_bfd_mips_elf_final_link): Handle .MIPS.abiflags.
813 (mips_32bit_flags_p): Moved higher.
814 (mips_elf_merge_obj_attributes, _bfd_mips_fp_abi_string): Error
815 checking for FP ABIs.
816 (_bfd_mips_elf_merge_private_bfd_data): Restructure and add abiflags
817 checks. Check EF_MIPS_FP64 flag consistency.
818 (print_mips_ases, print_mips_isa_ext): New static function.
819 (print_mips_fp_abi_value, get_mips_reg_size): Likewise.
820 (_bfd_mips_elf_print_private_bfd_data): Display abiflags data.
821 (_bfd_mips_post_process_headers): Set EI_ABIVERSION = 3 for
822 Val_GNU_MIPS_ABI_FP_64 or Val_GNU_MIPS_ABI_FP_64A.
823 * elfxx-mips.h (_bfd_mips_elf_gc_mark_extra_sections): New prototype.
824 * elf32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
825 * elfn32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
826 * elf64-mips.c (elf_backend_gc_mark_extra_sections): Implement.
828 2014-07-28 Alan Modra <amodra@gmail.com>
831 * archive.c (_bfd_compute_and_write_armap): Warn on adding
832 __gnu_lto_slim to armap.
833 * linker.c (_bfd_generic_link_add_one_symbol): Warn on adding
834 __gnu_lto_slim to linker hash table.
836 2014-07-27 Anthony Green <green@moxielogic.org>
838 * config.bfd: Add moxie-*-moxiebox*.
840 2014-07-21 Joel Sherrill <joel.sherrill@oarcorp.com>
842 Add or reactivate or1k-*-rtems*
843 * config.bfd (or1k-*-rtems*): Reactivate.
845 2014-07-16 H.J. Lu <hongjiu.lu@intel.com>
847 * elf32-i386.c (elf_i386_plt_sym_val): Match PLT entry only for
849 * elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
850 (elf_x86_64_plt_sym_val_offset_plt_bnd): Likewise.
852 2014-07-16 H.J. Lu <hongjiu.lu@intel.com>
855 * elf32-i386.c (elf_i386_plt_sym_val): Only match R_*_JUMP_SLOT
856 and R_*_IRELATIVE relocation offset with PLT entry.
857 * elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
858 (elf_x86_64_plt_sym_val_offset_plt_bnd): New.
859 (elf_x86_64_get_synthetic_symtab): Use it.
861 2014-07-15 H.J. Lu <hongjiu.lu@intel.com>
864 * elf32-i386.c (elf_i386_compute_jump_table_size): Replace
865 next_tls_desc_index with elf.srelplt->reloc_count.
867 2014-07-15 Alan Modra <amodra@gmail.com>
869 * cache.c (cache_bread_1): Don't return -1 when fread returns
872 2014-07-15 Alan Modra <amodra@gmail.com>
874 * elflink.c (elf_merge_st_other): Update comments. Simplify
875 visibility handling. Make isym const. Move code modifying
876 isym->st_other for --exclude-libs to..
877 (elf_link_add_object_symbols): ..here.
879 2014-07-11 Maks Naumov <maksqwe1@ukr.net>
882 * elf.c (_bfd_elf_strtab_add): Check strtab name for failure.
884 2014-07-08 Nick Clifton <nickc@redhat.com>
887 * elf32-sh.c (sh_elf_osec_to_segment): Do not look for output
888 segments in input bfds.
890 2014-07-08 Will Newton <will.newton@linaro.org>
892 * elf32-arm.c (ELF_MAXPAGESIZE): Increase the default
893 value to 64kB and remove custom setting for NaCl.
895 2014-07-08 Alan Modra <amodra@gmail.com>
897 * elflink.c (_bfd_elf_copy_link_hash_symbol_type): Copy st_other
898 bits from source to dest.
899 * linker.c (_bfd_generic_copy_link_hash_symbol_type): Update comment.
900 * targets.c (struct bfd_target <_bfd_copy_link_hash_symbol_type>):
902 * bfd-in2.h: Regenerate.
904 2014-07-08 Jiong Wang <jiong.wang@arm.com>
906 * elfnn-aarch64.c (elf_backend_rela_normal): Set to 1.
907 (elfNN_aarch64_relocate_section): Remove duplicated addend adjustment
908 when info->relocatable be true.
910 2014-07-07 Barney Stratford <barney_stratford@fastmail.fm>
912 * elf32-avr.c: Handle R_AVR_PORT5 and R_AVR_PORT6.
913 * reloc.c: Add BFD_RELOC_AVR_PORT5 and BFD_RELOC_AVR_PORT6.
914 * bfd-in2.h: Regenerate.
915 * libbfd.h: Regenerate.
917 2014-07-04 Alan Modra <amodra@gmail.com>
919 * Makefile.am: Update "configure.in" comments.
922 * configure.host: Likewise.
923 * doc/bfdint.texi: Likewise.
924 * targets.c: Likewise.
925 * warning.m4: Likewise.
926 * Makefile.in: Regenerate.
928 2014-07-04 Alan Modra <amodra@gmail.com>
930 * configure.ac: Rename from configure.in.
931 * Makefile.in: Regenerate.
932 * config.in: Regenerate.
933 * doc/Makefile.in: Regenerate.
935 2014-07-04 Alan Modra <amodra@gmail.com>
937 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove configure.in.
938 * Makefile.in: Regenerate.
940 2014-07-04 Alan Modra <amodra@gmail.com>
942 * version.m4: New file.
943 * configure.in: Include version.m4.
945 * Makefile.am (RELEASE): Delete.
946 (bfdver.h): Depend on development.sh, use instead of RELEASE.
947 * Makefile.in: Regenerate.
948 * doc/Makefile.in: Regenerate.
950 2014-07-02 Alan Modra <amodra@gmail.com>
952 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Clear
953 pointer_equality_needed when !readonly_dynrelocs.
954 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
956 2014-07-02 Alan Modra <amodra@gmail.com>
958 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_STATIC_TLS for PIEs too.
959 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
961 2014-07-01 Alan Modra <amodra@gmail.com>
963 * bfd.c (struct bfd): Reorganise for better packing. Delete
964 "ifd" field. Make "format", "direction" and "flags" bitfields.
965 (HAS_LOAD_PAGE): Delete, renumber following flags.
966 * bfd-in2.h: Regenerate.
967 * coff-tic4x.c: Remove HAS_LOAD_PAGE from extra flags in target vecs.
969 2014-07-01 Alan Modra <amodra@gmail.com>
971 * elf64-ppc.c (ppc_stub_type): Add ppc_stub_global_entry.
972 (struct ppc_link_hash_table): Increase size of stub_count array.
973 (build_global_entry_stubs): Emit symbol on global entry stub.
974 (ppc64_elf_build_stubs): NULL check htab->brlt. Add global entry
977 2014-07-01 Alan Modra <amodra@gmail.com>
979 * elf64-ppc.c (abiversion, set_abiversion): Move earlier.
980 (ppc64_elf_branch_reloc): Adjust addend for ELFv2 local offset.
981 (ppc64_elf_set_toc): Set ".TOC." symbol value when using
983 (ppc64_elf_relocate_section): Disable ELFv2 function entry
984 optimisation when --traditional-format.
986 2014-07-01 Barney Stratford <barney_stratford@fastmail.fm>
987 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
988 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
989 Soundararajan <Sounderarajan.D@atmel.com>
991 * archures.c: Add avrtiny architecture for avr target.
992 * cpu-avr.c (arch_info_struct): Add avrtiny arch info.
993 * elf32-avr.c (elf_avr_howto_table): New relocation R_AVR_LDS_STS_16
994 added for 16 bit LDS/STS instruction of avrtiny arch.
995 (avr_reloc_map): Reloc R_AVR_LDS_STS_16 is mapped to
996 BFD_RELOC_AVR_LDS_STS_16.
997 (bfd_elf_avr_final_write_processing): Select machine number
999 (elf32_avr_object_p): Set machine number for avrtiny arch.
1000 * reloc.c: Add documentation for BFD_RELOC_AVR_LDS_STS_16 reloc.
1001 * bfd-in2.h: Regenerate.
1002 * libbfd.h: Regenerate.
1004 2014-06-26 Nick Clifton <nickc@redhat.com>
1007 * dwarf2.c (is_str_attr): New function.
1008 (find_abstract_instance_name): Use it to determine when an
1009 attribute has a string value.
1011 2014-06-24 Alan Modra <amodra@gmail.com>
1013 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Arrange to keep
1014 .sdata/.sdata2 when _SDA_BASE_/_SDA2_BASE_ should be output
1017 2014-06-21 Philippe De Muyter <phdm@macqel.be>
1019 * targets.c (_bfd_target_vector): Add missing #ifdef BFD64 for
1020 a number of targets.
1022 2014-06-20 Kyle McMartin <kyle@redhat.com>
1024 * elf32-arm.c (elf32_arm_check_relocs): Set DF_STATIC_TLS when
1025 emitting initial-exec relocs when not linking an executable.
1027 2014-06-16 Will Newton <will.newton@linaro.org>
1029 * elf32-arm.c (elf32_arm_allocate_plt_entry): Increment
1030 htab->next_tls_desc_index in the non-IPLT case.
1031 Calculate GOT offset correctly for the non-IPLT case.
1032 (allocate_dynrelocs_for_symbol): Don't increment
1033 htab->next_tls_desc_index here.
1035 2014-06-16 Alan Modra <amodra@gmail.com>
1037 * elf32-vax.c (elf_vax_size_dynamic_sections): Clear linker
1040 2014-06-13 Omair Javaid <omair.javaid@linaro.org>
1042 * elfxx-aarch64.c (stdarg.h): Include.
1043 (string.h): Include.
1044 (_bfd_aarch64_elf_grok_prstatus): Updated.
1045 (_bfd_aarch64_elf_grok_psinfo): New function.
1046 (_bfd_aarch64_elf_write_core_note): New function.
1047 * elfxx-aarch64.h (elf_backend_grok_psinfo): Define.
1048 (elf_backend_write_core_note): Define.
1050 2014-06-13 Alan Modra <amodra@gmail.com>
1052 * archive.c: Include bfdlink.h.
1053 (_bfd_archive_close_and_cleanup): Call linker hash_table_free.
1054 * bfd.c (struct bfd): Add is_linker_output field.
1055 * elf-bfd.h (_bfd_elf_link_hash_table_free): Update prototype.
1056 * linker.c (_bfd_link_hash_table_init): Set up hash_table_free,
1057 link.hash and is_linker_output.
1058 (_bfd_generic_link_hash_table_free): Replace bfd_link_hash_table*
1059 param with bfd*. Assert is_linker_output and link.hash, and
1060 clear them before exit.
1061 * elf-m10300.c (elf32_mn10300_link_hash_table_free): Replace
1062 bfd_link_hash_table* param with bfd*. Hack is_linker_output
1063 and link.hash so we can free two linker hash tables.
1064 (elf32_mn10300_link_hash_table_create): Create static_hash_table
1065 first. Clean up on errors. Set hash_table_free pointer.
1066 * elf32-arm.c (elf32_arm_link_hash_table_free): Replace
1067 bfd_link_hash_table* param with bfd*.
1068 (elf32_arm_link_hash_table_create): Clean up on errors. Set
1069 hash_table_free pointer.
1070 * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc1x.c,
1071 * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf32-xgate.c,
1072 * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c, * elflink.c,
1073 * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c,
1074 * xcofflink.c: Similarly.
1075 * simple.c (bfd_simple_get_relocated_section_contents): Save and
1076 clear link.next before creating linker hash table. Clean up on
1077 errors, and restore link.next on exit.
1078 * elf32-m68hc1x.h (m68hc11_elf_bfd_link_hash_table_free): Delete.
1079 * elf32-xgate.h (xgate_elf_bfd_link_hash_table_free): Delete.
1080 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table_free): Delete.
1081 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Delete.
1082 * hash.c (bfd_hash_table_init_n): Free table on error.
1083 * libbfd-in.h (_bfd_generic_link_hash_table_free): Update proto.
1084 * bfd-in2.h: Regenerate.
1085 * libbfd.h: Regenerate.
1086 * libcoff.h: Regenerate.
1088 2014-06-13 Alan Modra <amodra@gmail.com>
1091 * targets.c (BFD_JUMP_TABLE): Delete NAME##_bfd_link_hash_table_free.
1092 (struct bfd_target <_bfd_link_hash_table_free>): Delete.
1093 * bfd.c (bfd_link_hash_table_free): Don't define.
1094 * aout-adobe.c, * aout-target.h, * aout-tic30.c, * binary.c, * bout.c,
1095 * coff64-rs6000.c, * coffcode.h, * elf-m10300.c, * elf32-arm.c,
1096 * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc11.c,
1097 * elf32-m68hc12.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
1098 * elf32-sparc.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c,
1099 * elf64-sparc.c, * elf64-x86-64.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1100 * elfxx-target.h, * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c,
1101 * libbfd-in.h, * libecoff.h, * mach-o-target.c, * mmo.c,
1102 * nlm-target.h, * oasys.c, * pef.c, * plugin.c, * ppcboot.c, * som.c,
1103 * srec.c, * tekhex.c, * verilog.c, * versados.c, * vms-alpha.c,
1104 * xsym.c: Don't define various link_hash_table_free defines, and
1105 remove from bfd_target vars. Temporarily reference some of the
1106 target link_hash_table_free functions to avoid warnings.
1107 * bfd-in2.h: Regenerate.
1108 * libbfd.h: Regenerate.
1110 2014-06-13 Alan Modra <amodra@gmail.com>
1112 * elf-m10300.c, * elf32-arm.c, * elf32-avr.c, * elf32-hppa.c,
1113 * elf32-i386.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-metag.c,
1114 * elf32-nios2.c, * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c,
1115 * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c, * xcofflink.c:
1116 Move link_hash_table_free functions before their corresponding
1117 link_hash_table_create functions.
1119 2014-06-13 Alan Modra <amodra@gmail.com>
1121 * bfd.c (struct bfd): Replace link_next with a union.
1122 * aoutx.h, * bfd.c, * coff-ppc.c, * coff-rs6000.c, * cofflink.c,
1123 * ecoff.c, * elf-m10300.c, * elf32-arm.c, * elf32-avr.c,
1124 * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c,
1125 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-metag.c,
1126 * elf32-microblaze.c, * elf32-nds32.c, * elf32-nios2.c,
1127 * elf32-or1k.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c,
1128 * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c,
1129 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-xstormy16.c,
1130 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1131 * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-x86-64.c,
1132 * elflink.c, * elfnn-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
1133 * elfxx-tilegx.c, * linker.c, * pdp11.c, * peXXigen.c, * simple.c,
1134 * sunos.c, * vms-alpha.c, * xcofflink.c: Update for above.
1135 * bfd-in2.h: Regenerate.
1137 2014-06-11 Alan Modra <amodra@gmail.com>
1139 * linker.c (unwrap_hash_lookup): Add missing parens.
1141 2014-06-11 Kai Tietz <ktietz@redhat.com>
1143 * libcoff-in.h (coff_tdata): Make relocbase member unsigned.
1144 * libcoff.h: Regenerated.
1146 2014-06-10 Alan Modra <amodra@gmail.com>
1149 * linker.c (unwrap_hash_lookup): New function.
1150 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Call unwrap_hash_lookup.
1151 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1152 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1153 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1154 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1155 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1156 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1157 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1159 2014-06-07 Alan Modra <amodra@gmail.com>
1161 * elf32-ppc.c (ppc_elf_relocate_section): Treat field of cmpli
1162 insn as a bitfield; Use complain_overflow_bitfield.
1163 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1165 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1167 * development.sh: New file.
1168 * warning.m4 (AM_BINUTILS_WARNINGS): Source bfd/development.sh.
1169 Make -Werror the default with GCC only if DEVELOPMENT is true.
1170 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add
1171 $(srcdir)/development.sh.
1172 * Makefile.in, configure: Regenerate.
1174 2014-06-04 Will Newton <will.newton@linaro.org>
1176 * elfnn-aarch64.c (tpoff_base): Make test of tls_sec
1177 being non-NULL into an assert.
1178 (elfNN_aarch64_tls_relax): Remove unused code.
1180 2014-06-03 DJ Delorie <dj@redhat.com>
1182 * elf32-rx.c (rx_table_map): Use BFD_VMA_FMT for portability.
1184 2014-06-03 Nick Clifton <nickc@redhat.com>
1187 * peXXigen.c (rsrc_process_section): Page align the new contents
1188 befgore writing out.
1190 2014-06-03 Alan Modra <amodra@gmail.com>
1192 * elf64-ppc.c (ADDIS_R12_R2): Define.
1193 (build_plt_stub): Support fusion on ELFv2 stub.
1194 (ppc_build_one_stub): Likewise for plt branch stubs.
1196 2014-05-28 Alan Modra <amodra@gmail.com>
1198 * elf32-rx.c (rx_table_map): Delete set but not used variables.
1200 2014-05-28 Tristan Gingold <gingold@adacore.com>
1202 * dwarf2.c (lookup_address_in_function_table): Add best_fit_len
1203 to keep the length of the best fit range.
1204 (lookup_symbol_in_function_table, info_hash_lookup_funcinfo):
1207 2014-05-27 DJ Delorie <dj@redhat.com>
1209 * elf32-rx.c (get_symbol_value_maybe): New.
1210 (rx_elf_relocate_section): If we find a reloc against
1211 $tableentry$default$<name>, redirect it to the appropriate
1213 (RX_Table_Info): New.
1214 (rx_table_find): New. Check all tables and SEC_KEEP all sections
1215 with table parts in them.
1216 (rx_check_directives): New.
1217 (rx_table_map_2): New.
1218 (rx_table_map): New.
1219 (rx_additional_link_map_text): New. Called to dump tables to the
1223 2014-05-20 DJ Delorie <dj@redhat.com>
1225 * elf32-msp430.c (msp430_elf_relax_adjust_locals): Avoid overflow.
1227 2014-05-20 Alan Modra <amodra@gmail.com>
1230 * elf32-ppc.c (ppc_elf_create_linker_section): Move earlier.
1231 Remove redundant setting of htab->elf.dynobj. Don't align.
1232 Define .sdata symbols using _bfd_elf_define_linkage_sym.
1233 (ppc_elf_create_glink): Call ppc_elf_create_linker_section.
1234 (create_sdata_sym): Delete.
1235 (elf_allocate_pointer_linker_section): Rename from
1236 elf_create_pointer_linker_section. Align section.
1237 (ppc_elf_check_relocs): Don't call ppc_elf_creat_linker_section
1238 directly here, or create_sdata_sym. Set ref_regular on _SDA_BASE_
1240 (ppc_elf_size_dynamic_sections): Remove ATTRIBUTE_UNUSED on param.
1241 Remove unnecessary tests on _SDA_BASE_ sym.
1242 (maybe_strip_sdasym, ppc_elf_maybe_strip_sdata_syms): New functions.
1243 (ppc_elf_relocate_section): Tighten SDA reloc symbol section checks.
1244 * elf32-ppc.h (ppc_elf_set_sdata_syms): Delete.
1245 (ppc_elf_maybe_strip_sdata_syms): Declare.
1247 2014-05-16 Ryan Mansfield <rmansfield@qnx.com>
1249 * config.bfd: Move QNX target_cflags from arm-*-netbsd* to arm-*-nto*.
1251 2014-05-16 Jon Turney <jon.turney@dronecode.org.uk>
1253 * peXXigen.c (pe_print_debugdata): Don't interpret debug directory
1254 in a section with no contents.
1255 (is_vma_in_section, find_section_by_vma): New functions.
1256 (_bfd_XX_bfd_copy_private_bfd_data_common): Recalculate file
1257 offsets in the debug directory.
1258 (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
1259 Byte-swap GUID from little-endian to big-endian order for
1260 consistent and conventional display.
1262 2014-05-16 Kaushik Phata <Kaushik.Phatak@kpit.com>
1264 * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if
1265 64-bit doubles objects mix with 32-bit doubles objects.
1266 (rl78_elf_print_private_bfd_data): Describe 64-bit doubles flag.
1268 2014-05-08 Hans-Peter Nilsson <hp@bitrange.com>
1270 * mmo.c: Update URLs in documentation comments.
1272 2014-05-02 Volodymyr Arbatov <arbatov@cadence.com>
1273 David Weatherford <weath@cadence.com>
1274 Max Filippov <jcmvbkbc@gmail.com>
1276 * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as
1279 2014-05-07 Andreas Tobler <andreast@fgznet.ch>
1281 * config.bfd: Add proper arm config for *-*-freebsd*.
1283 2014-05-07 Andrew Bennett <andrew.bennett@imgtec.com>
1285 * aoutx.h (NAME (aout, machine_type)): Add mips32r3, mips64r3,
1286 mips32r5 and mips64r5.
1287 * archures.c (bfd_architecture): Likewise.
1288 * bfd-in2.h (bfd_architecture): Likewise.
1289 * cpu-mips.c (arch_info_struct): Likewise.
1290 * elfxx-mips.c (mips_set_isa_flags): Likewise.
1292 2014-05-06 Richard Sandiford <rdsandiford@googlemail.com>
1294 * elfxx-mips.h (elfxx-mips.h): Declare.
1295 * elfxx-mips.c (mips_elf_merge_obj_attributes): Use it to report
1296 Tag_GNU_MIPS_ABI_FP mismatches.
1297 (_bfd_mips_fp_abi_string): New function.
1299 2014-05-02 Alan Modra <amodra@gmail.com>
1301 * targets.c: Sort bfd_target vectors somewhat alphabetically.
1302 * configure.in: Likewise.
1303 * configure: Regenerate.
1305 2014-05-02 Alan Modra <amodra@gmail.com>
1307 * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-ns32k.c,
1308 * aout-sparcle.c, * aout0.c, * aoutx.h, * armnetbsd.c, * bout.c,
1309 * cf-i386lynx.c, * cf-sparclynx.c, * cisco-core.c, * coff-alpha.c,
1310 * coff-apollo.c, * coff-arm.c, * coff-aux.c, * coff-go32.c,
1311 * coff-h8300.c, * coff-h8500.c, * coff-i386.c, * coff-i860.c,
1312 * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mips.c,
1313 * coff-rs6000.c, * coff-sh.c, * coff-sparc.c, * coff-stgo32.c,
1314 * coff-svm68k.c, * coff-tic80.c, * coff-u68k.c, * coff-w65.c,
1315 * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
1316 * coff64-rs6000.c, * config.bfd, * configure.com, * configure.in,
1317 * demo64.c, * elf-m10200.c, * elf-m10300.c, * elf32-am33lin.c,
1318 * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
1319 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
1320 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1321 * elf32-fr30.c, * elf32-frv.c, * elf32-gen.c, * elf32-h8300.c,
1322 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c,
1323 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
1324 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1325 * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c,
1326 * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
1327 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c,
1328 * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c,
1329 * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-sh-symbian.c,
1330 * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c,
1331 * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c,
1332 * elf32-vax.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
1333 * elf32-xtensa.c, * elf64-alpha.c, * elf64-gen.c, * elf64-hppa.c,
1334 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c,
1335 * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c,
1336 * elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1337 * epoc-pe-arm.c, * epoc-pei-arm.c, * hp300bsd.c, * hp300hpux.c,
1338 * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386bsd.c,
1339 * i386dynix.c, * i386freebsd.c, * i386linux.c, * i386lynx.c,
1340 * i386mach3.c, * i386msdos.c, * i386netbsd.c, * i386os9k.c,
1341 * irix-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c,
1342 * m88kmach3.c, * m88kopenbsd.c, * mach-o-i386.c, * mach-o-x86-64.c,
1343 * makefile.vms, * mipsbsd.c, * mmo.c, * netbsd-core.c, * newsos3.c,
1344 * nlm32-alpha.c, * nlm32-i386.c, * nlm32-ppc.c, * nlm32-sparc.c,
1345 * ns32knetbsd.c, * osf-core.c, * pc532-mach.c, * pe-arm-wince.c,
1346 * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-ppc.c,
1347 * pe-sh.c, * pe-x86_64.c, * pei-arm-wince.c, * pei-arm.c,
1348 * pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-mips.c, * pei-ppc.c,
1349 * pei-sh.c, * pei-x86_64.c, * ppcboot.c, * ptrace-core.c, * riscix.c,
1350 * sco5-core.c, * som.c, * sparclinux.c, * sparclynx.c,
1351 * sparcnetbsd.c, * sunos.c, * targets.c, * trad-core.c,
1352 * vax1knetbsd.c, * vaxbsd.c, * vaxnetbsd.c, * versados.c,
1353 * vms-alpha.c, * vms-lib.c: Rename bfd targets to
1354 <cpu>_<format>_<other>_<endian>_vec. Adjust associated MY macros
1356 * configure: Regenerate.
1358 2014-05-01 Hans-Peter Nilsson <hp@bitrange.com>
1360 * mmo.c (mmo File layout documentation): Add note about low bits
1362 (mmo_write_chunk): When handling data remainder, assert that
1363 previous remaining data is flushed.
1364 (mmo_write_loc_chunk): Only look for trailing and leading zeros
1365 when dealing with an aligned VMA and for aligned lengths. Don't skip
1366 the last 32-bit-word of zeros.
1367 (mmo_write_loc_chunk): Emit an error if the VMA is not aligned.
1368 (mmo_scan) <case LOP_QUOTE>: Move re-alignment of vma before
1369 emitting data, not after updating it.
1370 <case LOP_LOC>: Call mmo_decide_section with aligned vma.
1372 2014-04-30 Nick Clifton <nickc@redhat.com>
1374 * compress.c (bfd_is_section_compressed): When checking the
1375 .debug_str section, also check the fifth byte in the section is
1376 not part of a string.
1378 2014-04-30 Alan Modra <amodra@gmail.com>
1380 * elf-eh-frame.c (struct cie.personality): Replace val with sym.
1381 (find_merged_cie): Identify personality functions by (bfd_id,index)
1382 pair when a local sym is used.
1384 2014-04-29 Christian Svensson <blue@cmd.nu>
1386 * elf32-or1k.c: Fix a bug where non-TLS relocations would be forced
1387 into .rela.got if it contained TLS relocations as well.
1389 2014-04-28 Nick Clifton <nickc@redhat.com>
1392 * peXXigen.c (_bfd_XXi_swap_sym_out): Rework fix to avoid compile
1395 2014-04-26 Alan Modra <amodra@gmail.com>
1397 * po/SRC-POTFILES.in: Regenerate.
1398 * configure: Regenerate.
1400 2014-04-25 Nick Clifton <nickc@redhat.com>
1403 * peXXigen.c (_bfd_XXi_swap_sym_out): Another fix for building on
1404 a 342-bit host. This time for older versions of gcc.
1406 2014-04-24 Nick Clifton <nickc@redhat.com>
1408 * peXXigen.c (rsrc_print_section): Fix compile time warning for
1411 2014-04-24 Alan Modra <amodra@gmail.com>
1414 * dwarf2.c: Formatting.
1415 (struct dwarf2_debug): Make adjusted_section_count signed.
1416 (unset_sections): Make i signed.
1417 (set_debug_vma): New function.
1418 (place_sections): Handle separate debug object file. Set VMA
1419 on debug sections, even if they have an output section. Also
1420 set VMA on zero size sections, and non-load but alloc sections.
1421 Set adjusted_section_count to -1 when no section adjustment.
1422 Malloc adjusted_sections. Don't double last_vma. Transfer
1423 alloc section VMAs to separate debug file.
1424 (_bfd_dwarf2_cleanup_debug_info): Free adjusted_sections.
1425 (_bfd_dwarf2_slurp_debug_info): Add do_place parameter. Drop
1426 test on symbols being the same before using old stash. Read
1427 and use separate debug file symbols. Call place_sections.
1428 (find_line): Don't call place_sections here.
1429 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Update proto.
1430 * libbfd.h: Regenerate.
1431 * mach-o.c (bfd_mach_o_find_nearest_line): Adjust
1432 _bfd_dwarf2_slurp_debug_info call.
1433 * simple.c (simple_save_output_info): Clarify comment.
1435 2014-04-24 Nick Clifton <nickc@redhat.com>
1438 * peXXigen.c (struct rsrc_regions): New structure.
1439 (rsrc_print_resource_directory): Use new structure. Include
1440 offset of directory in listing.
1441 (rsrc_print_resource_entry): Likewise.
1442 (rsrc_print_section): Likewise.
1443 (rsrc_count_entries): Do not increment sizeof_strings or
1445 (rsrc_count_directory): Do not increment sizeof_tables.
1446 (rsrc_compute_region_sizes): New function.
1447 (rsrc_write_leaf): Maintain 8-byte alignment for resource data.
1448 (rsrc_process_section): Compute size of regions after merging
1451 2014-04-23 Alan Modra <amodra@gmail.com>
1454 * dwarf2.c (struct dwarf2_debug): Add sec_vma field.
1455 (place_sections): Do not modify VMA of sections when called from
1456 linker after sections have been placed in output sections. Short
1457 circuit single section case.
1458 (save_section_vma, section_vma_same): New functions.
1459 (_bfd_dwarf2_slurp_debug_info): Throw away stash if section VMAs
1461 * reloc.c (bfd_perform_relocation): Do not modify reloc addend
1462 when non-relocatable.
1464 2014-04-22 Nick Clifton <nickc@redhat.com>
1467 * peXXigen.c (_bfd_XXi_swap_sym_out): Fix for 32-bit hosts.
1469 2014-04-22 Christian Svensson <blue@cmd.nu>
1471 * Makefile.am: Remove openrisc and or32 support. Add support for or1k.
1472 * archures.c: Likewise.
1473 * coffcode.h: Likewise.
1474 * config.bfd: Likewise.
1475 * configure.in: Likewise.
1476 * reloc.c: Likewise.
1477 * targets.c: Likewise.
1478 * cpu-or1k.c: New file.
1479 * elf32-or1k.c: New file.
1480 * coff-or32.c: Delete.
1481 * cpu-openrisc.c: Delete.
1482 * cpu-or32.c: Delete.
1483 * elf32-openrisc.c: Delete.
1484 * elf32-or32.c: Delete.
1485 * Makefile.in: Regenerate.
1486 * bfd-in2.h: Regenerate.
1487 * configure: Regenerate.
1488 * libbfd.h: Regenerate.
1490 2014-04-22 Yuanhui Zhang <asmwarrior@gmail.com>
1493 * peXXigen.c (abs_finder): Fix for 32-bit host builds.
1495 2014-04-22 Will Newton <will.newton@linaro.org>
1497 * elfnn-aarch64.c (elfNN_aarch64_section_flags): Remove
1498 function. (elf_backend_section_flags): Remove define.
1500 2014-04-21 Richard Henderson <rth@redhat.com>
1502 * elf64-alpha.c (elf64_alpha_size_got_sections): New may_merge
1503 parameter; honor it and disable got merging when false.
1504 (elf64_alpha_relax_got_load): Do not relax to GPREL relocs during
1505 the first pass of relaxation.
1506 (elf64_alpha_relax_with_lituse): Likewise. Move relaxed relocs to
1507 the end of the LITERAL+LITUSE chain.
1508 (elf64_alpha_relax_section): Only process LITERAL relocs during the
1509 second pass of relaxation.
1511 * configure.ac (use_secureplt): Enable by default.
1512 * configure: Rebuild.
1514 2014-04-18 Tristan Gingold <gingold@adacore.com>
1516 * mach-o.h (bfd_mach_o_dyld_info_command): Add rebase_content,
1517 bind_content, weak_bind_content, lazy_bind_content,
1519 (bfd_mach_o_load_command): Add comments, add next field.
1520 (mach_o_data_struct): Replace commands field by first_command
1522 * mach-o.c (bfd_mach_o_append_command): New function.
1523 (bfd_mach_o_bfd_copy_private_symbol_data): Add blank lines.
1524 (bfd_mach_o_bfd_copy_private_section_data): Check flavour,
1526 (bfd_mach_o_bfd_copy_private_header_data): Copy load commands.
1527 (bfd_mach_o_pad4, bfd_mach_o_pad_command): New functions.
1528 (bfd_mach_o_write_thread): Use macro instead of literal.
1529 (bfd_mach_o_write_dylinker, bfd_mach_o_write_dylib)
1530 (bfd_mach_o_write_main, bfd_mach_o_write_dyld_info): New
1532 (bfd_mach_o_write_symtab_content): New function (extracted
1533 from bfd_mach_o_write_symtab).
1534 (bfd_mach_o_write_symtab): Split.
1535 (bfd_mach_o_count_indirect_symbols): Move
1536 (bfd_mach_o_build_dysymtab): Remove layout code.
1537 (bfd_mach_o_write_contents): Rewritten to build commands in order.
1538 (bfd_mach_o_count_sections_for_seg): Remove.
1539 (bfd_mach_o_build_obj_seg_command): New function (extracted from
1540 bfd_mach_o_build_seg_command).
1541 (bfd_mach_o_build_exec_seg_command): New function.
1542 (bfd_mach_o_build_dysymtab_command): Remove.
1543 (bfd_mach_o_layout_commands): New function.
1544 (bfd_mach_o_init_segment): New function.
1545 (bfd_mach_o_build_commands): Major rework to handle non-object
1547 (bfd_mach_o_alloc_and_read, bfd_mach_o_read_dyld_content): New
1549 (bfd_mach_o_read_dyld_info): Clear content fields.
1550 (bfd_mach_o_read_segment): Adjust call.
1551 (bfd_mach_o_flatten_sections): Adjust as now load commands are
1553 (bfd_mach_o_scan_start_address, bfd_mach_o_scan)
1554 (bfd_mach_o_mkobject_init, bfd_mach_o_get_base_address)
1555 (bfd_mach_o_lookup_command, bfd_mach_o_core_fetch_environment):
1558 2014-04-18 Tristan Gingold <gingold@adacore.com>
1560 * mach-o-target.c (bfd_mach_o_bfd_copy_private_header_data):
1561 Define instead of bfd_mach_o_bfd_copy_private_bfd_data.
1562 * mach-o.c (bfd_mach_o_bfd_copy_private_bfd_data): Rename.
1563 * mach-o.h (bfd_mach_o_bfd_copy_private_bfd_data): Likewise.
1565 2014-04-18 Tristan Gingold <gingold@adacore.com>
1567 * mach-o.h (bfd_mach_o_dylinker_command)
1568 (bfd_mach_o_dylib_command, bfd_mach_o_fvmlib_command): Remove
1570 * mach-o.c (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
1571 (bfd_mach_o_read_fvmlib): Adjust after name_len removal.
1573 2014-04-18 Tristan Gingold <gingold@adacore.com>
1575 * mach-o.h (bfd_mach_o_backend_data): Add page_size field.
1576 * mach-o-target.c: Check TARGET_PAGESIZE is defined.
1577 (TARGET_NAME_BACKEND): Add TARGET_PAGESIZE.
1578 * mach-o.c (TARGET_PAGESIZE): Define and undefined for
1579 each targets declared.
1580 * mach-o-x86-64.c (TARGET_PAGESIZE): Define.
1581 * mach-o-i386.c (TARGET_PAGESIZE): Define.
1583 2014-04-18 Tristan Gingold <gingold@adacore.com>
1585 * mach-o.c (bfd_mach_o_write_thread)
1586 (bfd_mach_o_write_section_32, bfd_mach_o_write_section_64)
1587 (bfd_mach_o_write_segment_32, bfd_mach_o_write_segment_64)
1588 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
1589 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_prebind_cksum)
1590 (bfd_mach_o_read_twolevel_hints, bfd_mach_o_read_fvmlib)
1591 (bfd_mach_o_read_thread, bfd_mach_o_read_dysymtab)
1592 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
1593 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
1594 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_segment)
1595 (bfd_mach_o_read_segment_32, bfd_mach_o_read_segment_64)
1596 (bfd_mach_o_read_command): Now return a boolean status.
1597 Adjust return statements.
1598 (bfd_mach_o_write_contents, bfd_mach_o_scan): Adjust tests.
1599 (bfd_mach_o_core_file_failing_command): Remove useless initialization.
1601 2014-04-17 Kwok Cheung Yeung <kcy@codesourcery.com>
1603 * elfxx-mips.c (struct mips_got_info): Delete assigned_gotno
1604 field. Add assigned_low_gotno and assigned_high_gotno fields.
1605 (mips_elf_create_local_got_entry): Update out-of-space condition.
1606 Set index of new GOT entry to assigned_low_gotno if required by
1607 the current relocation, else set it to assigned_high_gotno.
1608 (mips_elf_set_global_gotidx): Replace uses of assigned_gotno
1609 with assigned_low_gotno.
1610 (mips_elf_multi_got): Initialize assigned_low_gotno and
1611 assigned_high_gotno in secondary GOTs. Use assigned_low_gotno
1612 in place of assigned_gotno when handling global GOT entries.
1613 (mips_elf_lay_out_got): Initialize assigned_low_gotno and
1614 assigned_high_gotno.
1615 (_bfd_mips_elf_finish_dynamic_sections): Account for a possible
1616 gap in the middle of local GOT space.
1618 2014-04-17 Alan Modra <amodra@gmail.com>
1621 * elflink.c (_bfd_elf_merge_symbol): Ignore TLS mismatch when
1622 current bfd is a plugin. Don't always set type_change_ok
1623 when old bfd is a plugin.
1625 2014-04-16 Tristan Gingold <gingold@adacore.com>
1627 * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Adjust cpusubtype
1630 2014-04-16 Alan Modra <amodra@gmail.com>
1632 * elf32-ppc.c (ppc_elf_relocate_section): Fill 476 fixup area
1633 with "ba 0" rather than zeros.
1635 2014-04-15 Marcus Shawcroft <marcus.shawcroft@arm.com>
1637 * (elfNN_aarch64_tls_relax): Fix instruction mask.
1639 2014-04-14 Alan Modra <amodra@gmail.com>
1641 * elf32-ppc.c (BA): Define
1642 (ppc_elf_link_hash_table_create): Correct default_params.
1643 (write_glink_stub): Pad small plt call stub with "ba 0" rather
1644 than "nop" for ppc476_workaround.
1645 (ppc_elf_finish_dynamic_sections): Likewise for branch table
1646 and __glink_PLTresolve. Ensure plt call stub at end of page
1647 doesn't allow fall-thru prefetch.
1649 2014-04-11 Nick Clifton <nickc@redhat.com>
1652 * peXXigen.c (abs_finder): New function.
1653 (_bfd_XXi_swap_sym_out): For absolute symbols with values larger
1654 than 1^32 try to convert them into section relative values
1657 2014-04-11 Nick Clifton <nickc@redhat.com>
1659 * bfd-in2.h: Regenerate.
1660 * libbfd.h: Regenerate.
1662 2014-04-10 Cesar Philippidis <cesar@codesourcery.com>
1664 * elf32-nios2.c (nios2_elf32_build_stubs): Ignore dynobjs
1665 when building function stubs.
1667 2014-04-10 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1669 * elf32-avr.c: Add DIFF relocations for AVR.
1670 (avr_final_link_relocate): Handle the DIFF relocs.
1671 (bfd_elf_avr_diff_reloc): New.
1672 (elf32_avr_is_diff_reloc): New.
1673 (elf32_avr_adjust_diff_reloc_value): Reduce difference value.
1674 (elf32_avr_relax_delete_bytes): Recompute difference after deleting
1677 * reloc.c: Add BFD_RELOC_AVR_DIFF8/16/32 relocations
1679 2014-04-09 Alan Modra <amodra@gmail.com>
1681 * libcoff.h: Regenerate.
1683 2014-04-09 Alan Modra <amodra@gmail.com>
1685 * elf32-ppc.c (ppc_elf_relocate_section): Remove bctr from list
1686 of safe ppc476 insns at end of page. Also remove non-branch insns.
1689 2014-04-08 Jon Turney <jon.turney@dronecode.org.uk>
1691 * peXXigen.c (pe_print_debugdata): New function: Displays the
1692 contents of the debug directory and decodes codeview entries.
1693 (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
1694 (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
1695 Add functions for reading and writing debugdir and codeview
1697 * libpei.h (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
1698 (_bfd_XXi_write_codeview_record): Add prototypes and macros.
1699 * libcoff-in.h (pe_tdata): Add build-id data.
1700 * libcoff.h: Regenerate.
1701 * coffcode.h (coff_write_object_contents): Run build_id
1702 after_write_object_contents hook.
1704 2014-04-05 Alan Modra <amodra@gmail.com>
1706 * elflink.c (_bfd_elf_add_default_symbol): Pass poldbfd when
1707 merging non-default sym.
1709 2014-04-04 Tristan Gingold <gingold@adacore.com>
1711 * mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not
1714 2014-04-04 Tristan Gingold <gingold@adacore.com>
1716 * mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix
1717 thinko on names length.
1719 2014-04-04 Tristan Gingold <gingold@adacore.com>
1721 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index
1723 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Ditto.
1725 2014-04-04 Tristan Gingold <gingold@adacore.com>
1727 * bfd.c (bfd_get_arch_size): Default is taken from arch.
1729 2014-04-03 Jon Turney <jon.turney@dronecode.org.uk>
1731 * peXXigen.c (pe_print_edata): Verify edt.name lies inside
1732 section before dereferencing.
1733 (pe_print_idata, pe_print_edata, pe_print_reloc)
1734 (rsrc_print_section): Don't bother interpreting the contents
1735 of sections which have no contents.
1737 2014-04-03 Maria Guseva <m.guseva@samsung.com>
1740 * elf.c (_bfd_elf_set_section_contents): Use correct type to hold
1743 2014-04-03 Tristan Gingold <gingold@adacore.com>
1745 * mach-o.c (bfd_mach_o_mangle_symbols): Use index from
1747 (bfd_mach_o_build_seg_command): Add comment. Realign segment.
1749 (bfd_mach_o_build_commands, bfd_mach_o_read_thread): Fix style.
1751 2014-04-03 Alan Modra <amodra@gmail.com>
1753 * elf-bfd.h (struct elf_backend_data
1754 <elf_backend_bfd_from_remote_memory>): Replace "size_t size"
1755 with "bfd_size_type size".
1756 (_bfd_elf32_bfd_from_remote_memory): Likewise.
1757 (_bfd_elf64_bfd_from_remote_memory): Likewise.
1758 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
1759 * elfcode.h (bfd_from_remote_memory): Likewise.
1760 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Likewise.
1761 * bfd-in2.h: Regenerate.
1763 2014-04-02 Tristan Gingold <gingold@adacore.com>
1765 * mach-o.h (bfd_mach_o_twolevel_hints_command)
1766 (bfd_mach_o_prebind_cksum_command): New types.
1767 (bfd_mach_o_prebound_dylib_command): Rewrite.
1768 (bfd_mach_o_load_command): Add prebind_cksum and twolevel_hints
1770 * mach-o.c (bfd_mach_o_read_prebound_dylib): Read and decode the
1772 (bfd_mach_o_read_prebind_cksum): New function.
1773 (bfd_mach_o_read_twolevel_hints): Ditto.
1774 (bfd_mach_o_read_command): Handle prebind cksum and twolevel hints
1777 2014-04-02 Alan Modra <amodra@gmail.com>
1779 * elfcode.h (bfd_from_remote_memory): Add "size" parameter.
1780 Consolidate code handling possible section headers past end of
1781 segment. Don't use p_align for page size guess, instead use
1782 minpagesize. Take note of ld.so clearing section headers when
1783 p_memsz > p_filesz. Handle file header specifying no section
1784 headers. Handle zero p_align throughout. Default loadbase to
1785 zero. Add comments. Rename contents_size to high_offset, and
1786 make it a bfd_vma. Delete unnecessary bfd_set_error calls.
1787 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Update prototpe.
1788 * elf-bfd.h (struct elf_backend_data <elf_backend_from_remote_memory>):
1790 (_bfd_elf32_bfd_from_remote_memory): Likewise.
1791 (_bfd_elf64_bfd_from_remote_memory): Likewise.
1792 * elf.c (bfd_elf_bfd_from_remote_memory): Adjust.
1793 * bfd-in2.h: Regnerate.
1795 2014-04-01 Tristan Gingold <gingold@adacore.com>
1797 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Avoid to crash
1800 2014-03-27 Yury Gribov <y.gribov@samsung.com>
1801 Pavel Fedin <p.fedin@samsung.com>
1803 * elf32-arm.c: Add support for limited pretty-printing of PLT
1804 entries on eabi and nacl targets.
1805 (elf32_arm_get_synthetic_symtab): Add new callback.
1806 (elf32_arm_nacl_plt_sym_val): Likewise.
1807 (elf32_arm_plt0_size): Add helper function.
1808 (elf32_arm_plt_size): Likewise.
1810 2014-03-27 Tristan Gingold <gingold@adacore.com>
1812 * mach-o.c (bfd_mach_o_read_dylinker): Remove assert.
1813 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_DYLD_ENVIRONMENT.
1815 2014-03-27 Tristan Gingold <gingold@adacore.com>
1817 * mach-o.h (bfd_mach_o_get_base_address): New prototype.
1818 * mach-o.c (bfd_mach_o_write_symtab)
1819 (bfd_mach_o_write_contents)
1820 (bfd_mach_o_set_section_flags_from_bfd)
1821 (bfd_mach_o_build_seg_command): Fix indentation.
1822 (bfd_mach_o_get_base_address): New function.
1824 2014-03-26 Nick Clifton <nickc@redhat.com>
1826 * cofflink.c (_bfd_coff_generic_relocate_section): Skip
1827 relocations in discarded sections.
1829 2014-03-26 Tristan Gingold <gingold@adacore.com>
1831 * mach-o.c (bfd_mach_o_convert_architecture): Add
1832 BFD_MACH_O_CPU_TYPE_ARM64.
1834 2014-03-26 Alan Modra <amodra@gmail.com>
1836 * elf64-ppc.c (ppc64_elf_check_relocs): Account for possibly
1837 needed plt entries when taking the address of functions for
1838 abiversion == 0 (ie. unknown) as well as abiversion == 2.
1839 Move opd setup and abiversion checks to..
1840 (ppc64_elf_before_check_relocs): ..here. Renamed from
1841 ppc64_elf_process_dot_syms. Set output abiversion from input and
1842 input abiversion from output, if either is not set.
1843 (ppc64_elf_merge_private_bfd_data): Don't merge flags here.
1844 (elf_backend_check_directives): Update.
1846 2014-03-25 Will Newton <will.newton@linaro.org>
1848 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections):
1849 Set value of DT_PLTRELSZ and DT_RELASZ based on the size
1850 of input sections rather than output sections.
1852 2014-03-20 Will Newton <will.newton@linaro.org>
1855 * elf32-arm.c (elf32_arm_check_relocs): Set
1856 pointer_equality_needed for absolute references within
1858 (elf32_arm_finish_dynamic_symbol): Set st_value to zero
1859 unless pointer_equality_needed is set.
1861 2014-03-19 Nick Clifton <nickc@redhat.com>
1863 * peXXigen.c (rsrc_process_section): Add code to scan input
1864 sections and record their lengths. Use these lengths to find the
1865 start of each merged .rsrc section.
1867 2014-03-17 Tristan Gingold <gingold@adacore.com>
1869 * mach-o.c (bfd_mach_o_read_dylib): Handle lazy load dylib.
1870 (bfd_mach_o_read_command): Ditto.
1872 2014-03-14 Meador Inge <meadori@codesourcery.com>
1874 * configure.in: Add strnlen to AC_CHECK_DECLS.
1875 * config.in: Regenerate.
1876 * configure: Regenerate.
1877 * sysdep.h (strnlen): Add prototype.
1879 2014-03-14 Alan Modra <amodra@gmail.com>
1881 * elf32-ppc.c (ppc_elf_relocate_section): Correct overflow
1882 handling for VLE_SDA21 relocs.
1884 2014-03-13 Tristan Gingold <gingold@adacore.com>
1886 * peicode.h (pe_ILF_object_p): Adjust, as the version number
1888 (pe_bfd_object_p): Also read version number to detect ILF.
1889 * pe-x86_64.c (COFF_WITH_PE_BIGOBJ): Define.
1890 (x86_64pe_bigobj_vec): Define
1891 * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_max_nscns field.
1892 (bfd_coff_max_nscns): New macro.
1893 (coff_compute_section_file_positions): Use unsigned int for
1894 target_index. Compare with bfd_coff_max_nscns.
1895 (bfd_coff_std_swap_table, ticoff0_swap_table, ticoff1_swap_table):
1896 Set a value for _bfd_coff_max_nscns.
1897 (header_bigobj_classid): New constant.
1898 (coff_bigobj_swap_filehdr_in, coff_bigobj_swap_filehdr_out)
1899 (coff_bigobj_swap_sym_in, coff_bigobj_swap_sym_out)
1900 (coff_bigobj_swap_aux_in, coff_bigobj_swap_aux_out): New
1902 (bigobj_swap_table): New table.
1903 * libcoff.h: Regenerate.
1904 * coff-sh.c (bfd_coff_small_swap_table): Likewise.
1905 * coff-alpha.c (alpha_ecoff_backend_data): Add value for
1906 _bfd_coff_max_nscns.
1907 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1908 * coff-rs6000.c (bfd_xcoff_backend_data)
1909 (bfd_pmac_xcoff_backend_data): Likewise.
1910 * coff64-rs6000.c (bfd_xcoff_backend_data)
1911 (bfd_xcoff_aix5_backend_data): Likewise.
1912 * targets.c (x86_64pe_bigobj_vec): Declare.
1913 * configure.in (x86_64pe_bigobj_vec): New vector.
1914 * configure: Regenerate.
1915 * config.bfd: Add bigobj object format for Windows targets.
1917 2014-03-12 Nick Clifton <nickc@redhat.com>
1920 * elf32-arm.c (elf32_arm_add_symbol_hook): Check for ARM format
1921 before testing for vxworks.
1923 2014-03-12 Alan Modra <amodra@gmail.com>
1925 * Makefile.in: Regenerate.
1927 2014-03-12 Alan Modra <amodra@gmail.com>
1930 * elf.c (copy_elf_program_header): Ignore first section lma if
1933 2014-03-11 Alan Modra <amodra@gmail.com>
1936 * coff-rs6000.c: Include stdint.h.
1937 * coff64-rs6000.c: Likewise.
1939 2014-03-10 Tristan Gingold <gingold@adacore.com>
1941 * ticoff.h: Removed.
1943 2014-03-08 Alan Modra <amodra@gmail.com>
1945 * elf32-ppc.c (ppc_elf_howto_raw): Correct overflow check for
1946 many relocations. Correct bitsize and rightshift too for a number
1947 of VLE relocs. Describe R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO.
1948 Correct dst_mask on R_PPC_VLE_SDA21_LO.
1949 (ppc_elf_vle_split16): Tidy, delete unnecessary prototype.
1950 (ppc_elf_relocate_section): Modify overflow test for 16-bit
1951 fields in instructions to signed/unsigned according to whether
1952 the field takes a signed or unsigned value. Tidy vle split16 code.
1953 Correct R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO handling.
1955 2014-03-08 Alan Modra <amodra@gmail.com>
1957 * elf64-ppc.c (ppc64_elf_howto_raw): Use complain_overflow_signed
1958 for R_PPC64_ADDR14, R_PPC64_ADDR14_BRTAKEN, R_PPC64_ADDR14_BRNTAKEN,
1959 R_PPC64_SECTOFF, R_PPC64_ADDR16_DS, R_PPC64_SECTOFF_DS,
1960 R_PPC64_REL16 entries. Use complain_overflow_dont for R_PPC64_TOC.
1961 (ppc64_elf_relocate_section): Modify overflow test for 16-bit
1962 fields in instructions to signed/unsigned according to whether
1963 the field takes a signed or unsigned value.
1965 2014-03-07 Pedro Alves <palves@redhat.com>
1968 * rs6000-core.c (rs6000coff_core_p): Cast pointers to bfd_vma
1969 through ptr_to_uint instead of through long.
1971 2014-03-06 Nick Clifton <nickc@redhat.com>
1974 * elf-attrs.c (_bfd_elf_parse_attributes): Add checks for corrupt
1975 attribute section names.
1977 2014-03-05 Alan Modra <amodra@gmail.com>
1979 Update copyright years.
1981 2014-03-05 Alan Modra <amodra@gmail.com>
1983 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_ADDR64_LOCAL entry.
1984 (ppc64_elf_reloc_type_lookup): Support R_PPC64_ADDR64_LOCAL.
1985 (ppc64_elf_check_relocs): Likewise.
1986 (ppc64_elf_relocate_section): Likewise.
1987 * Add BFD_RELOC_PPC64_ADDR64_LOCAL.
1988 * bfd-in2.h: Regenerate.
1989 * libbfd.h: Regenerate.
1991 2014-03-04 Heiher <r@hev.cc>
1993 * elfxx-mips.c (mips_set_isa_flags): Use E_MIPS_ARCH_64R2 for
1995 (mips_mach_extensions): Make bfd_mach_mips_loongson_3a an
1996 extension of bfd_mach_mipsisa64r2.
1998 2014-03-04 Nick Clifton <nickc@redhat.com>
2001 * elf32-arm.c (elf32_thumb2_plt0_entry): New array.
2002 (elf32_thumb2_plt_entry): New array.
2003 (elf32_arm_create_dynamic_sections): Set PLT entry sizes when
2004 using thumb2 based PLT.
2005 (elf32_arm_populate_plt_entry): Handle generating Thumb2 based PLT
2007 (elf32_arm_final_link_relocate): Do not bias jumps to Thumb based
2009 (elf32_arm_finish_dynamic_sections): Handle creation of Thumb2
2011 (elf32_arm_output_plt_map_1): Handle creation of local symbols for
2012 Thumb2 based PLT 0-entry.
2013 (elf32_arm_output_arch_local_syms): Handle creation of local
2014 symbols for Thumb2 based PLT entries.
2016 2014-02-28 Alan Modra <amodra@gmail.com>
2019 * elflink.c (elf_gc_sweep): Call gc_sweep_hook for exactly
2020 the same conditions we called check_relocs.
2022 2014-02-27 Yuri Gribov <y.gribov@samsung.com>
2024 * bfd-in.h: Add export of bfd_elf32_arm_use_long_plt.
2025 * bfd-in2.h: Regenerate.
2026 * elf32-arm.c (elf32_arm_plt_entry_long): New array.
2027 (elf32_arm_link_hash_table_create): Set plt_entry_size to 16 if
2028 using long PLT entries.
2029 (bfd_elf32_arm_use_long_plt): New function.
2030 (elf32_arm_populate_plt_entry): Add support for long PLT entries.
2032 2014-02-27 Alan Modra <amodra@gmail.com>
2034 * elf32-ppc.c (ppc_elf_link_hash_table_create): Provide default
2035 params for targets that don't use ppc32elf.em.
2037 2014-02-20 Chung-Lin Tang <cltang@codesourcery.com>
2039 * elf32-nios2.c (nios2_elf32_relocate_section): Fix calculation
2040 of GOTOFF relocations.
2042 2014-02-19 Igor Zamyatin <igor.zamyatin@intel.com>
2043 H.J. Lu <hongjiu.lu@intel.com>
2045 * elf64-x86-64.c (elf_x86_64_bnd_plt0_entry): New.
2046 (elf_x86_64_legacy_plt_entry): Likewise.
2047 (elf_x86_64_bnd_plt_entry): Likewise.
2048 (elf_x86_64_legacy_plt2_entry): Likewise.
2049 (elf_x86_64_bnd_plt2_entry): Likewise.
2050 (elf_x86_64_bnd_arch_bed): Likewise.
2051 (elf_x86_64_link_hash_entry): Add has_bnd_reloc and plt_bnd.
2052 (elf_x86_64_link_hash_table): Add plt_bnd.
2053 (elf_x86_64_link_hash_newfunc): Initialize has_bnd_reloc and
2055 (elf_x86_64_copy_indirect_symbol): Also copy has_bnd_reloc.
2056 (elf_x86_64_check_relocs): Create the second PLT for Intel MPX
2058 (elf_x86_64_allocate_dynrelocs): Handle the second PLT for IFUNC
2059 symbols. Resolve call to the second PLT if it is created.
2060 (elf_x86_64_size_dynamic_sections): Keep the second PLT section.
2061 (elf_x86_64_relocate_section): Resolve PLT references to the
2062 second PLT if it is created.
2063 (elf_x86_64_finish_dynamic_symbol): Use BND PLT0 and fill the
2064 second PLT entry for BND relocation.
2065 (elf_x86_64_finish_dynamic_sections): Use MPX backend data if
2066 the second PLT is created.
2067 (elf_x86_64_get_synthetic_symtab): New.
2068 (bfd_elf64_get_synthetic_symtab): Likewise. Undefine for NaCl.
2070 2014-02-19 Alan Modra <amodra@gmail.com>
2072 * elf64-ppc.h (struct ppc64_elf_params): Add save_restore_funcs.
2073 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Use it to control
2074 provision of out-of-line register save/restore routines.
2076 2014-02-18 Jack Carter <jack.carter@imgtec.com>
2078 * elfxx-mips.c(_bfd_mips_elf_modify_segment_map): Deleted hard coding of
2079 PT_DYNAMIC segment flags.
2081 2014-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2084 * simple.c (struct saved_offsets): New.
2085 (simple_save_output_info): Use it for ptr.
2086 (simple_restore_output_info): Use it for ptr. Check section_count.
2087 (bfd_simple_get_relocated_section_contents): Use it for saved_offsets.
2089 2014-02-17 Alan Modra <amodra@gmail.com>
2091 * elf64-ppc.h (struct ppc64_elf_params): Define.
2092 (ppc64_elf_init_stub_bfd, ppc64_elf_edit_opd, ppc64_elf_tls_setup,
2093 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
2094 ppc64_elf_build_stubs): Update prototype.
2095 * elf64-ppp.c (struct ppc_link_hash_table): Add params, delete other
2096 fields now in params. Adjust code throughout file.
2097 (ppc64_elf_init_stub_bfd): Delete "abfd" parameter, add "params".
2098 Save params pointer in htab.
2099 (ppc64_elf_edit_opd, ppc64_elf_tls_setup,
2100 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
2101 ppc64_elf_build_stubs): Remove parameters now in "params".
2103 2014-02-17 Alan Modra <amodra@gmail.com>
2105 * elf32-ppc.c (ppc_elf_relocate_section): Move relocs on insns
2106 patched for ppc476 workaround. Reapply branch taken/not taken
2109 2014-02-12 Alan Modra <amodra@gmail.com>
2111 * elf32-ppc.c (ppc_elf_relax_section): Don't build long-branch
2112 stubs for calls to __tls_get_addr that we know will later be
2115 2014-02-12 Alan Modra <amodra@gmail.com>
2117 * elf32-ppc.c (ppc_elf_relax_section): Enable ppc476 workaround
2118 for ld -r, when code sections are sufficiently aligned.
2119 * elf32-ppc.h (struct ppc_elf_params): Delete pagesize. Add
2122 2014-02-12 Alan Modra <amodra@gmail.com>
2125 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2126 --export-dynamic and --dynamic-list marking of symbols.
2127 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Reorder
2130 2014-02-10 H.J. Lu <hongjiu.lu@intel.com>
2133 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark symbol in
2134 executables if it matches dynamic_list.
2136 2014-02-10 Alan Modra <amodra@gmail.com>
2138 * po/SRC-POTFILES.in: Regenerate.
2139 * po/bfd.pot: Regenerate.
2141 2014-02-09 Alan Modra <amodra@gmail.com>
2143 * elf-bfd.h (struct elf_backend_data): Add caches_rawsize.
2144 * elfxx-target.h (elf_backend_caches_rawsize): Define.
2145 (elfNN_bed): Init new field.
2146 * elflink.c (elf_link_input_bfd): Handle caches_rawsize.
2147 * elf32-ppc.c (shared_stub_entry): Zero addi offset.
2148 (ppc_elf_relax_section): Don't reallocate section here, write
2149 stubs, or write out relocs for ld -r here..
2150 (ppc_elf_relocate_section): ..instead write stubs here, and use
2151 existing code to write out relocs for ld -r. Fix offset
2152 adjustment on reloc for little-endian.
2153 (elf_backend_caches_rawsize): Define.
2155 2014-02-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2158 * cache.c (bfd_cache_max_open): Cast RLIM_INFINITY to rlim_t.
2160 2014-02-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2162 * coff-rs6000.c (xcoff_write_archive_contents_big): Free OFFSETS in
2163 return paths. Three times.
2164 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Free HTAB in all
2166 (ppc64_elf_tls_optimize): Free TOC_REF in return path.
2167 (ppc64_elf_edit_toc): Free USED in return path.
2169 2014-02-03 Sandra Loosemore <sandra@codesourcery.com>
2171 * reloc.c (BFD_RELOC_NIOS2_GOT_LO, BFD_RELOC_NIOS2_GOT_HA): New.
2172 (BFD_RELOC_NIOS2_CALL_LO, BFD_RELOC_NIOS2_CALL_HA): New.
2173 * libbfd.h: Regenerated.
2174 * bfd-in2.h: Regenerated.
2175 * elf32-nios2.c (elf_nios2_howto_table_rel): Add new relocations.
2176 (nios2_reloc_map): Likewise.
2177 (GOT_USED, CALL_USED): Renamed from GOT16_USED and CALL16_USED.
2178 Fixed all references.
2179 (nios2_elf32_relocate_section): Add new relocations.
2180 (nios2_elf32_check_relocs): Likewise.
2181 (nios2_elf32_gc_sweep_hook): Likewise.
2183 2014-02-03 Alan Modra <amodra@gmail.com>
2185 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add params.
2186 Delete emit_stub_syms, no_tls_get_addr_opt. Update all uses.
2187 (ppc_elf_link_params): New function.
2188 (ppc_elf_create_glink): Align .glink to 64 bytes for ppc476
2190 (ppc_elf_select_plt_layout): Remove plt_style and emit_stub_syms
2191 parameters. Use htab->params instead.
2192 (ppc_elf_tls_setup): Remove no_tls_get_addr_opt parameter.
2193 (ppc_elf_size_dynamic_sections): Align __glink_PLTresolve to
2194 64 bytes for ppc476 workaround.
2195 (struct ppc_elf_relax_info): New.
2196 (ppc_elf_relax_section): Exclude linker created sections and
2197 those too small to hold one instruction. Don't add another
2198 branch around trampolines on later relax passes. Don't
2199 generate trampolines for undefined symbols when !relocatable,
2200 nor for plugin symbols. Allocate space for ppc476 workaround
2201 patch area. Free fixups on error return path.
2202 (ppc_elf_relocate_section): Handle ppc476 workaround patching.
2203 * elf32-ppc.h (struct ppc_elf_params): New.
2204 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Update prototype.
2205 (ppc_elf_link_params): Declare.
2206 * section.c (SEC_INFO_TYPE_TARGET): Define.
2207 * bfd-in2.h: Regenerate.
2209 2014-02-02 Sandra Loosemore <sandra@codesourcery.com>
2211 * elf32-nios2.c (struct elf32_nios2_link_hash_table): Add
2213 (nios2_elf32_relocate_section): Use got_base to adjust
2214 GOT-pointer-relative relocations relative to _gp_got.
2215 (create_got_section): Create _gp_got symbol.
2216 (nios2_elf32_finish_dynamic_symbol): Make _gp_got absolute.
2217 (nios2_elf32_size_dynamic_sections): Set _gp_got offset.
2219 2014-01-30 Sandra Loosemore <sandra@codesourcery.com>
2221 * bfd-in2.h: Update from reloc.c.
2222 * elf32-nios2.c: Include elf32-nios2.h.
2223 (elf_nios2_howto_table_rel): Add entry for R_NIOS2_CALL26_NOAT.
2224 (nios2_reloc_map): Likewise.
2225 (enum elf32_nios2_stub_type): Declare.
2226 (struct elf32_nios2_stub_hash_entry): Declare.
2227 (nios2_stub_hash_entry, nios2_stub_hash_lookup): New macros.
2228 (struct elf32_nios2_link_hash_entry): Add hsh_cache field.
2229 (struct elf32_nios2_link_hash_table): Add new fields bstab,
2230 stub_bfd, add_stub_section, layout_sections_again, stub_group,
2231 bfd_count, top_index, input_list, all_local_syms.
2232 (nios2_call26_stub_entry): New.
2233 (nios2_elf32_install_imm16): Move up in file.
2234 (nios2_elf32_install_data): Move up in file.
2235 (hiadj): Move up in file.
2236 (stub_hash_newfunc): New.
2237 (link_hash_newfunc): Initialize hsh_cache field.
2239 (nios2_stub_name): New.
2240 (nios2_get_stub_entry): New.
2241 (nios2_add_stub): New.
2242 (nios2_elf32_setup_section_lists): New.
2243 (nios2_elf32_next_input_section): New.
2244 (CALL26_SEGMENT): New.
2245 (MAX_STUB_SECTION_SIZE): New.
2246 (group_sections): New.
2247 (nios2_type_of_stub): New.
2248 (nios2_build_one_stub): New.
2249 (nios2_size_one_stub): New.
2250 (get_local_syms): New.
2251 (nios2_elf32_size_stubs): New.
2252 (nios2_elf32_build_stubs): New.
2253 (nios2_elf32_do_call26_relocate): Correct CALL26 overflow test.
2254 (nios2_elf32_relocate_section): Handle R_NIOS2_CALL26_NOAT. Add
2255 trampolines for R_NIOS2_CALL26 stubs.
2256 (nios2_elf32_check_relocs): Handle R_NIOS2_CALL26_NOAT.
2257 (nios2_elf32_gc_sweep_hook): Likewise.
2258 (nios2_elf32_link_hash_table_create): Initialize the stub hash table.
2259 (nios2_elf32_link_hash_table_free): New.
2260 (bfd_elf32_bfd_link_hash_table_free): Define.
2261 * elf32-nios2.h: New file.
2262 * libbfd.h: Update from reloc.c.
2263 * reloc.c (BFD_RELOC_NIOS2_CALL26_NOAT): New.
2265 2014-01-29 Nick Clifton <nickc@redhat.com>
2268 * elf32-metag.c (elf_metag_post_process_headers): Call
2269 _bfd_elf_post_process_headers.
2270 * elf32-sh64.c (sh64_elf_copy_private_data): Call
2271 _bfd_elf_copy_private_data.
2272 * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
2274 2014-01-29 Nick Clifton <nickc@redhat.com>
2276 * bfd-in.h (bfd_set_section_vma): Delete.
2277 (bfd_set_section_alignment): Delete.
2278 (bfd_set_section_userdata): Delete.
2279 (bfd_set_cacheable): Delete.
2280 * bfd.c (bfd_set_cacheable): New static inline function.
2281 * section.c (bfd_set_section_userdata): Likewise.
2282 (bfd_set_section_vma): Likewise.
2283 (bfd_set_section_alignment): Likewise.
2284 * bfd-in2.h: Regenerate.
2286 2014-01-28 Nick Clifton <nickc@redhat.com>
2288 * dwarf2.c (find_abstract_instance_name): For DW_FORM_ref_addr
2289 attributes select the CU containing the abbreviation, which may not
2292 2014-01-24 Alan Modra <amodra@gmail.com>
2294 * elf64-ppc.c (ppc_build_one_stub): Correct reloc count passed
2295 to get_relocs for ELFv2.
2297 2014-01-23 H.J. Lu <hongjiu.lu@intel.com>
2300 * elf.c (_bfd_elf_map_sections_to_segments): Issue a linker error
2301 if TLS sections are not adjacent.
2303 2014-01-22 Alan Modra <amodra@gmail.com>
2305 * elflink.c (elf_link_add_object_symbols): Call minfo for --as-needed.
2307 2014-01-22 Alan Modra <amodra@gmail.com>
2309 * elf64-ppc.c (STK_LINKER): Comment typo fix.
2311 2014-01-21 H.J. Lu <hongjiu.lu@intel.com>
2314 * elflink.c (_bfd_elf_merge_symbol): When types of the existing
2315 regular default symbol definition and the versioned dynamic
2316 symbol definition mismatch, skip the default symbol definition
2317 if one of them is IFUNC.
2319 2014-01-21 H.J. Lu <hongjiu.lu@intel.com>
2322 * elflink.c (_bfd_elf_merge_symbol): Don't check info->shared,
2323 info->export_dynamic nor h->ref_dynamic for type mismatch when
2324 adding the default version.
2326 2014-01-16 Alan Modra <amodra@gmail.com>
2328 * elfxx-mips.c (mips_elf_record_got_page_entry): Pass in a
2329 mips_elf_traverse_got_arg* rather than mips_got_info*.
2330 Adjust caller. Alloc on output_bfd rather than symbol section
2333 2014-01-15 H.J. Lu <hongjiu.lu@intel.com>
2335 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
2337 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2339 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2342 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't discard relocs
2343 against __ehdr_start.
2344 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2346 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2348 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
2350 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2352 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2355 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't update reloc
2356 count if there are any non pc-relative relocs.
2357 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2359 2014-01-14 Michael Hudson-Doyle <michael.hudson@linaro.org>
2360 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2362 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use correct
2363 offset while calculating relocation address.
2364 (elfNN_aarch64_create_small_pltn_entry): Likewise.
2365 (elfNN_aarch64_init_small_plt0_entry): Likewise.
2367 2014-01-13 Ma Jiang <ma.jiang@zte.com.cn>
2370 * elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for
2371 R_ARM_ABS8 and R_ARM_ABS16.
2373 2014-01-13 Alan Modra <amodra@gmail.com>
2375 * elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc,
2376 error when shared and force a plt call otherwise.
2377 (ppc_elf_size_dynamic_sections): Don't emit DT_PPC_GOT unless
2378 plt_type == PLT_NEW.
2379 (ppc_elf_relocate_section): Add missing test to resolve ifuncs to
2380 the appropriate call stub.
2382 2014-01-10 Alan Modra <amodra@gmail.com>
2387 * elf.c (assign_file_positions_for_load_sections): Revert last change.
2388 (assign_file_positions_for_non_load_sections): When setting up
2389 PT_GNU_RELRO header, don't require a corresponding PT_LOAD
2390 header that completely covers the relro region.
2392 2014-01-09 Tristan Gingold <gingold@adacore.com>
2394 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): use jump
2395 table macros and add macros to initializa the structure.
2397 2014-01-08 H.J. Lu <hongjiu.lu@intel.com>
2402 * elf.c (_bfd_elf_map_sections_to_segments): Don't check section
2403 size for PT_GNU_RELRO segment.
2404 (assign_file_positions_for_load_sections): If PT_LOAD segment
2405 doesn't fit PT_GNU_RELRO segment, adjust its p_filesz and p_memsz.
2407 2014-01-07 Tom Tromey <tromey@redhat.com>
2409 * elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility
2412 2014-01-03 Nick Clifton <nickc@redhat.com>
2415 * elf.c (vma_page_aligned_bias): Handle a maxpagesize value of
2418 2014-01-02 Yuanhui Zhang <asmwarrior@gmail.com>
2421 * pef.c (bfd_pef_xlib_read_header): Increase buffer size to 80.
2423 2014-01-02 Nick Clifton <nickc@redhat.com>
2426 * archive.c (_bfd_get_elt_at_filepos): Store a copy of the
2427 filename in the bfd's filename field.
2428 * elfcode.h (bfd_from_remote_memory): Likewise.
2429 * ieee.c (ieee_object_p): Likewise.
2430 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
2431 * oasys.c (oasys_openr_next_archived_file): Likewise.
2432 * vms-lib.c (_bfd_vms_lib_get_module): Likewise.
2433 * opncls.c (bfd_fopen): Likewise.
2434 (bfd_openstreamr): Likewise.
2435 (bfd_openr_iovec): Likewise.
2436 (bfd_openw): Likewise.
2437 (bfd_create): Likewise.
2438 (_bfd_delete_bfd): Free filename.
2440 For older changes see ChangeLog-2013
2442 Copyright (C) 2014 Free Software Foundation, Inc.
2444 Copying and distribution of this file, with or without modification,
2445 are permitted in any medium without royalty provided the copyright
2446 notice and this notice are preserved.
2452 version-control: never