1 2014-04-24 Nick Clifton <nickc@redhat.com>
4 * peXXigen.c (struct rsrc_regions): New structure.
5 (rsrc_print_resource_directory): Use new structure. Include
6 offset of directory in listing.
7 (rsrc_print_resource_entry): Likewise.
8 (rsrc_print_section): Likewise.
9 (rsrc_count_entries): Do not increment sizeof_strings or
11 (rsrc_count_directory): Do not increment sizeof_tables.
12 (rsrc_compute_region_sizes): New function.
13 (rsrc_write_leaf): Maintain 8-byte alignment for resource data.
14 (rsrc_process_section): Compute size of regions after merging
17 2014-04-23 Alan Modra <amodra@gmail.com>
20 * dwarf2.c (struct dwarf2_debug): Add sec_vma field.
21 (place_sections): Do not modify VMA of sections when called from
22 linker after sections have been placed in output sections. Short
23 circuit single section case.
24 (save_section_vma, section_vma_same): New functions.
25 (_bfd_dwarf2_slurp_debug_info): Throw away stash if section VMAs
27 * reloc.c (bfd_perform_relocation): Do not modify reloc addend
30 2014-04-22 Nick Clifton <nickc@redhat.com>
33 * peXXigen.c (_bfd_XXi_swap_sym_out): Fix for 32-bit hosts.
35 2014-04-22 Christian Svensson <blue@cmd.nu>
37 * Makefile.am: Remove openrisc and or32 support. Add support for or1k.
38 * archures.c: Likewise.
39 * coffcode.h: Likewise.
40 * config.bfd: Likewise.
41 * configure.in: Likewise.
43 * targets.c: Likewise.
44 * cpu-or1k.c: New file.
45 * elf32-or1k.c: New file.
46 * coff-or32.c: Delete.
47 * cpu-openrisc.c: Delete.
49 * elf32-openrisc.c: Delete.
50 * elf32-or32.c: Delete.
51 * Makefile.in: Regenerate.
52 * bfd-in2.h: Regenerate.
53 * configure: Regenerate.
54 * libbfd.h: Regenerate.
56 2014-04-22 Yuanhui Zhang <asmwarrior@gmail.com>
59 * peXXigen.c (abs_finder): Fix for 32-bit host builds.
61 2014-04-22 Will Newton <will.newton@linaro.org>
63 * elfnn-aarch64.c (elfNN_aarch64_section_flags): Remove
64 function. (elf_backend_section_flags): Remove define.
66 2014-04-21 Richard Henderson <rth@redhat.com>
68 * elf64-alpha.c (elf64_alpha_size_got_sections): New may_merge
69 parameter; honor it and disable got merging when false.
70 (elf64_alpha_relax_got_load): Do not relax to GPREL relocs during
71 the first pass of relaxation.
72 (elf64_alpha_relax_with_lituse): Likewise. Move relaxed relocs to
73 the end of the LITERAL+LITUSE chain.
74 (elf64_alpha_relax_section): Only process LITERAL relocs during the
75 second pass of relaxation.
77 * configure.ac (use_secureplt): Enable by default.
80 2014-04-18 Tristan Gingold <gingold@adacore.com>
82 * mach-o.h (bfd_mach_o_dyld_info_command): Add rebase_content,
83 bind_content, weak_bind_content, lazy_bind_content,
85 (bfd_mach_o_load_command): Add comments, add next field.
86 (mach_o_data_struct): Replace commands field by first_command
88 * mach-o.c (bfd_mach_o_append_command): New function.
89 (bfd_mach_o_bfd_copy_private_symbol_data): Add blank lines.
90 (bfd_mach_o_bfd_copy_private_section_data): Check flavour,
92 (bfd_mach_o_bfd_copy_private_header_data): Copy load commands.
93 (bfd_mach_o_pad4, bfd_mach_o_pad_command): New functions.
94 (bfd_mach_o_write_thread): Use macro instead of literal.
95 (bfd_mach_o_write_dylinker, bfd_mach_o_write_dylib)
96 (bfd_mach_o_write_main, bfd_mach_o_write_dyld_info): New
98 (bfd_mach_o_write_symtab_content): New function (extracted
99 from bfd_mach_o_write_symtab).
100 (bfd_mach_o_write_symtab): Split.
101 (bfd_mach_o_count_indirect_symbols): Move
102 (bfd_mach_o_build_dysymtab): Remove layout code.
103 (bfd_mach_o_write_contents): Rewritten to build commands in order.
104 (bfd_mach_o_count_sections_for_seg): Remove.
105 (bfd_mach_o_build_obj_seg_command): New function (extracted from
106 bfd_mach_o_build_seg_command).
107 (bfd_mach_o_build_exec_seg_command): New function.
108 (bfd_mach_o_build_dysymtab_command): Remove.
109 (bfd_mach_o_layout_commands): New function.
110 (bfd_mach_o_init_segment): New function.
111 (bfd_mach_o_build_commands): Major rework to handle non-object
113 (bfd_mach_o_alloc_and_read, bfd_mach_o_read_dyld_content): New
115 (bfd_mach_o_read_dyld_info): Clear content fields.
116 (bfd_mach_o_read_segment): Adjust call.
117 (bfd_mach_o_flatten_sections): Adjust as now load commands are
119 (bfd_mach_o_scan_start_address, bfd_mach_o_scan)
120 (bfd_mach_o_mkobject_init, bfd_mach_o_get_base_address)
121 (bfd_mach_o_lookup_command, bfd_mach_o_core_fetch_environment):
124 2014-04-18 Tristan Gingold <gingold@adacore.com>
126 * mach-o-target.c (bfd_mach_o_bfd_copy_private_header_data):
127 Define instead of bfd_mach_o_bfd_copy_private_bfd_data.
128 * mach-o.c (bfd_mach_o_bfd_copy_private_bfd_data): Rename.
129 * mach-o.h (bfd_mach_o_bfd_copy_private_bfd_data): Likewise.
131 2014-04-18 Tristan Gingold <gingold@adacore.com>
133 * mach-o.h (bfd_mach_o_dylinker_command)
134 (bfd_mach_o_dylib_command, bfd_mach_o_fvmlib_command): Remove
136 * mach-o.c (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
137 (bfd_mach_o_read_fvmlib): Adjust after name_len removal.
139 2014-04-18 Tristan Gingold <gingold@adacore.com>
141 * mach-o.h (bfd_mach_o_backend_data): Add page_size field.
142 * mach-o-target.c: Check TARGET_PAGESIZE is defined.
143 (TARGET_NAME_BACKEND): Add TARGET_PAGESIZE.
144 * mach-o.c (TARGET_PAGESIZE): Define and undefined for
145 each targets declared.
146 * mach-o-x86-64.c (TARGET_PAGESIZE): Define.
147 * mach-o-i386.c (TARGET_PAGESIZE): Define.
149 2014-04-18 Tristan Gingold <gingold@adacore.com>
151 * mach-o.c (bfd_mach_o_write_thread)
152 (bfd_mach_o_write_section_32, bfd_mach_o_write_section_64)
153 (bfd_mach_o_write_segment_32, bfd_mach_o_write_segment_64)
154 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
155 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_prebind_cksum)
156 (bfd_mach_o_read_twolevel_hints, bfd_mach_o_read_fvmlib)
157 (bfd_mach_o_read_thread, bfd_mach_o_read_dysymtab)
158 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
159 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
160 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_segment)
161 (bfd_mach_o_read_segment_32, bfd_mach_o_read_segment_64)
162 (bfd_mach_o_read_command): Now return a boolean status.
163 Adjust return statements.
164 (bfd_mach_o_write_contents, bfd_mach_o_scan): Adjust tests.
165 (bfd_mach_o_core_file_failing_command): Remove useless initialization.
167 2014-04-17 Kwok Cheung Yeung <kcy@codesourcery.com>
169 * elfxx-mips.c (struct mips_got_info): Delete assigned_gotno
170 field. Add assigned_low_gotno and assigned_high_gotno fields.
171 (mips_elf_create_local_got_entry): Update out-of-space condition.
172 Set index of new GOT entry to assigned_low_gotno if required by
173 the current relocation, else set it to assigned_high_gotno.
174 (mips_elf_set_global_gotidx): Replace uses of assigned_gotno
175 with assigned_low_gotno.
176 (mips_elf_multi_got): Initialize assigned_low_gotno and
177 assigned_high_gotno in secondary GOTs. Use assigned_low_gotno
178 in place of assigned_gotno when handling global GOT entries.
179 (mips_elf_lay_out_got): Initialize assigned_low_gotno and
181 (_bfd_mips_elf_finish_dynamic_sections): Account for a possible
182 gap in the middle of local GOT space.
184 2014-04-17 Alan Modra <amodra@gmail.com>
187 * elflink.c (_bfd_elf_merge_symbol): Ignore TLS mismatch when
188 current bfd is a plugin. Don't always set type_change_ok
189 when old bfd is a plugin.
191 2014-04-16 Tristan Gingold <gingold@adacore.com>
193 * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Adjust cpusubtype
196 2014-04-16 Alan Modra <amodra@gmail.com>
198 * elf32-ppc.c (ppc_elf_relocate_section): Fill 476 fixup area
199 with "ba 0" rather than zeros.
201 2014-04-15 Marcus Shawcroft <marcus.shawcroft@arm.com>
203 * (elfNN_aarch64_tls_relax): Fix instruction mask.
205 2014-04-14 Alan Modra <amodra@gmail.com>
207 * elf32-ppc.c (BA): Define
208 (ppc_elf_link_hash_table_create): Correct default_params.
209 (write_glink_stub): Pad small plt call stub with "ba 0" rather
210 than "nop" for ppc476_workaround.
211 (ppc_elf_finish_dynamic_sections): Likewise for branch table
212 and __glink_PLTresolve. Ensure plt call stub at end of page
213 doesn't allow fall-thru prefetch.
215 2014-04-11 Nick Clifton <nickc@redhat.com>
218 * peXXigen.c (abs_finder): New function.
219 (_bfd_XXi_swap_sym_out): For absolute symbols with values larger
220 than 1^32 try to convert them into section relative values
223 2014-04-11 Nick Clifton <nickc@redhat.com>
225 * bfd-in2.h: Regenerate.
226 * libbfd.h: Regenerate.
228 2014-04-10 Cesar Philippidis <cesar@codesourcery.com>
230 * elf32-nios2.c (nios2_elf32_build_stubs): Ignore dynobjs
231 when building function stubs.
233 2014-04-10 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
235 * elf32-avr.c: Add DIFF relocations for AVR.
236 (avr_final_link_relocate): Handle the DIFF relocs.
237 (bfd_elf_avr_diff_reloc): New.
238 (elf32_avr_is_diff_reloc): New.
239 (elf32_avr_adjust_diff_reloc_value): Reduce difference value.
240 (elf32_avr_relax_delete_bytes): Recompute difference after deleting
243 * reloc.c: Add BFD_RELOC_AVR_DIFF8/16/32 relocations
245 2014-04-09 Alan Modra <amodra@gmail.com>
247 * libcoff.h: Regenerate.
249 2014-04-09 Alan Modra <amodra@gmail.com>
251 * elf32-ppc.c (ppc_elf_relocate_section): Remove bctr from list
252 of safe ppc476 insns at end of page. Also remove non-branch insns.
255 2014-04-08 Jon TURNEY <jon.turney@dronecode.org.uk>
257 * peXXigen.c (pe_print_debugdata): New function: Displays the
258 contents of the debug directory and decodes codeview entries.
259 (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
260 (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
261 Add functions for reading and writing debugdir and codeview
263 * libpei.h (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
264 (_bfd_XXi_write_codeview_record): Add prototypes and macros.
265 * libcoff-in.h (pe_tdata): Add build-id data.
266 * libcoff.h: Regenerate.
267 * coffcode.h (coff_write_object_contents): Run build_id
268 after_write_object_contents hook.
270 2014-04-05 Alan Modra <amodra@gmail.com>
272 * elflink.c (_bfd_elf_add_default_symbol): Pass poldbfd when
273 merging non-default sym.
275 2014-04-04 Tristan Gingold <gingold@adacore.com>
277 * mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not
280 2014-04-04 Tristan Gingold <gingold@adacore.com>
282 * mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix
283 thinko on names length.
285 2014-04-04 Tristan Gingold <gingold@adacore.com>
287 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index
289 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Ditto.
291 2014-04-04 Tristan Gingold <gingold@adacore.com>
293 * bfd.c (bfd_get_arch_size): Default is taken from arch.
295 2014-04-03 Jon Turney <jon.turney@dronecode.org.uk>
297 * peXXigen.c (pe_print_edata): Verify edt.name lies inside
298 section before dereferencing.
299 (pe_print_idata, pe_print_edata, pe_print_reloc)
300 (rsrc_print_section): Don't bother interpreting the contents
301 of sections which have no contents.
303 2014-04-03 Maria Guseva <m.guseva@samsung.com>
306 * elf.c (_bfd_elf_set_section_contents): Use correct type to hold
309 2014-04-03 Tristan Gingold <gingold@adacore.com>
311 * mach-o.c (bfd_mach_o_mangle_symbols): Use index from
313 (bfd_mach_o_build_seg_command): Add comment. Realign segment.
315 (bfd_mach_o_build_commands, bfd_mach_o_read_thread): Fix style.
317 2014-04-03 Alan Modra <amodra@gmail.com>
319 * elf-bfd.h (struct elf_backend_data
320 <elf_backend_bfd_from_remote_memory>): Replace "size_t size"
321 with "bfd_size_type size".
322 (_bfd_elf32_bfd_from_remote_memory): Likewise.
323 (_bfd_elf64_bfd_from_remote_memory): Likewise.
324 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
325 * elfcode.h (bfd_from_remote_memory): Likewise.
326 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Likewise.
327 * bfd-in2.h: Regenerate.
329 2014-04-02 Tristan Gingold <gingold@adacore.com>
331 * mach-o.h (bfd_mach_o_twolevel_hints_command)
332 (bfd_mach_o_prebind_cksum_command): New types.
333 (bfd_mach_o_prebound_dylib_command): Rewrite.
334 (bfd_mach_o_load_command): Add prebind_cksum and twolevel_hints
336 * mach-o.c (bfd_mach_o_read_prebound_dylib): Read and decode the
338 (bfd_mach_o_read_prebind_cksum): New function.
339 (bfd_mach_o_read_twolevel_hints): Ditto.
340 (bfd_mach_o_read_command): Handle prebind cksum and twolevel hints
343 2014-04-02 Alan Modra <amodra@gmail.com>
345 * elfcode.h (bfd_from_remote_memory): Add "size" parameter.
346 Consolidate code handling possible section headers past end of
347 segment. Don't use p_align for page size guess, instead use
348 minpagesize. Take note of ld.so clearing section headers when
349 p_memsz > p_filesz. Handle file header specifying no section
350 headers. Handle zero p_align throughout. Default loadbase to
351 zero. Add comments. Rename contents_size to high_offset, and
352 make it a bfd_vma. Delete unnecessary bfd_set_error calls.
353 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Update prototpe.
354 * elf-bfd.h (struct elf_backend_data <elf_backend_from_remote_memory>):
356 (_bfd_elf32_bfd_from_remote_memory): Likewise.
357 (_bfd_elf64_bfd_from_remote_memory): Likewise.
358 * elf.c (bfd_elf_bfd_from_remote_memory): Adjust.
359 * bfd-in2.h: Regnerate.
361 2014-04-01 Tristan Gingold <gingold@adacore.com>
363 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Avoid to crash
366 2014-03-27 Yury Gribov <y.gribov@samsung.com>
367 Pavel Fedin <p.fedin@samsung.com>
369 * elf32-arm.c: Add support for limited pretty-printing of PLT
370 entries on eabi and nacl targets.
371 (elf32_arm_get_synthetic_symtab): Add new callback.
372 (elf32_arm_nacl_plt_sym_val): Likewise.
373 (elf32_arm_plt0_size): Add helper function.
374 (elf32_arm_plt_size): Likewise.
376 2014-03-27 Tristan Gingold <gingold@adacore.com>
378 * mach-o.c (bfd_mach_o_read_dylinker): Remove assert.
379 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_DYLD_ENVIRONMENT.
381 2014-03-27 Tristan Gingold <gingold@adacore.com>
383 * mach-o.h (bfd_mach_o_get_base_address): New prototype.
384 * mach-o.c (bfd_mach_o_write_symtab)
385 (bfd_mach_o_write_contents)
386 (bfd_mach_o_set_section_flags_from_bfd)
387 (bfd_mach_o_build_seg_command): Fix indentation.
388 (bfd_mach_o_get_base_address): New function.
390 2014-03-26 Nick Clifton <nickc@redhat.com>
392 * cofflink.c (_bfd_coff_generic_relocate_section): Skip
393 relocations in discarded sections.
395 2014-03-26 Tristan Gingold <gingold@adacore.com>
397 * mach-o.c (bfd_mach_o_convert_architecture): Add
398 BFD_MACH_O_CPU_TYPE_ARM64.
400 2014-03-26 Alan Modra <amodra@gmail.com>
402 * elf64-ppc.c (ppc64_elf_check_relocs): Account for possibly
403 needed plt entries when taking the address of functions for
404 abiversion == 0 (ie. unknown) as well as abiversion == 2.
405 Move opd setup and abiversion checks to..
406 (ppc64_elf_before_check_relocs): ..here. Renamed from
407 ppc64_elf_process_dot_syms. Set output abiversion from input and
408 input abiversion from output, if either is not set.
409 (ppc64_elf_merge_private_bfd_data): Don't merge flags here.
410 (elf_backend_check_directives): Update.
412 2014-03-25 Will Newton <will.newton@linaro.org>
414 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections):
415 Set value of DT_PLTRELSZ and DT_RELASZ based on the size
416 of input sections rather than output sections.
418 2014-03-20 Will Newton <will.newton@linaro.org>
421 * elf32-arm.c (elf32_arm_check_relocs): Set
422 pointer_equality_needed for absolute references within
424 (elf32_arm_finish_dynamic_symbol): Set st_value to zero
425 unless pointer_equality_needed is set.
427 2014-03-19 Nick Clifton <nickc@redhat.com>
429 * peXXigen.c (rsrc_process_section): Add code to scan input
430 sections and record their lengths. Use these lengths to find the
431 start of each merged .rsrc section.
433 2014-03-17 Tristan Gingold <gingold@adacore.com>
435 * mach-o.c (bfd_mach_o_read_dylib): Handle lazy load dylib.
436 (bfd_mach_o_read_command): Ditto.
438 2014-03-14 Meador Inge <meadori@codesourcery.com>
440 * configure.in: Add strnlen to AC_CHECK_DECLS.
441 * config.in: Regenerate.
442 * configure: Regenerate.
443 * sysdep.h (strnlen): Add prototype.
445 2014-03-14 Alan Modra <amodra@gmail.com>
447 * elf32-ppc.c (ppc_elf_relocate_section): Correct overflow
448 handling for VLE_SDA21 relocs.
450 2014-03-13 Tristan Gingold <gingold@adacore.com>
452 * peicode.h (pe_ILF_object_p): Adjust, as the version number
454 (pe_bfd_object_p): Also read version number to detect ILF.
455 * pe-x86_64.c (COFF_WITH_PE_BIGOBJ): Define.
456 (x86_64pe_bigobj_vec): Define
457 * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_max_nscns field.
458 (bfd_coff_max_nscns): New macro.
459 (coff_compute_section_file_positions): Use unsigned int for
460 target_index. Compare with bfd_coff_max_nscns.
461 (bfd_coff_std_swap_table, ticoff0_swap_table, ticoff1_swap_table):
462 Set a value for _bfd_coff_max_nscns.
463 (header_bigobj_classid): New constant.
464 (coff_bigobj_swap_filehdr_in, coff_bigobj_swap_filehdr_out)
465 (coff_bigobj_swap_sym_in, coff_bigobj_swap_sym_out)
466 (coff_bigobj_swap_aux_in, coff_bigobj_swap_aux_out): New
468 (bigobj_swap_table): New table.
469 * libcoff.h: Regenerate.
470 * coff-sh.c (bfd_coff_small_swap_table): Likewise.
471 * coff-alpha.c (alpha_ecoff_backend_data): Add value for
473 * coff-mips.c (mips_ecoff_backend_data): Likewise.
474 * coff-rs6000.c (bfd_xcoff_backend_data)
475 (bfd_pmac_xcoff_backend_data): Likewise.
476 * coff64-rs6000.c (bfd_xcoff_backend_data)
477 (bfd_xcoff_aix5_backend_data): Likewise.
478 * targets.c (x86_64pe_bigobj_vec): Declare.
479 * configure.in (x86_64pe_bigobj_vec): New vector.
480 * configure: Regenerate.
481 * config.bfd: Add bigobj object format for Windows targets.
483 2014-03-12 Nick Clifton <nickc@redhat.com>
486 * elf32-arm.c (elf32_arm_add_symbol_hook): Check for ARM format
487 before testing for vxworks.
489 2014-03-12 Alan Modra <amodra@gmail.com>
491 * Makefile.in: Regenerate.
493 2014-03-12 Alan Modra <amodra@gmail.com>
496 * elf.c (copy_elf_program_header): Ignore first section lma if
499 2014-03-11 Alan Modra <amodra@gmail.com>
502 * coff-rs6000.c: Include stdint.h.
503 * coff64-rs6000.c: Likewise.
505 2014-03-10 Tristan Gingold <gingold@adacore.com>
509 2014-03-08 Alan Modra <amodra@gmail.com>
511 * elf32-ppc.c (ppc_elf_howto_raw): Correct overflow check for
512 many relocations. Correct bitsize and rightshift too for a number
513 of VLE relocs. Describe R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO.
514 Correct dst_mask on R_PPC_VLE_SDA21_LO.
515 (ppc_elf_vle_split16): Tidy, delete unnecessary prototype.
516 (ppc_elf_relocate_section): Modify overflow test for 16-bit
517 fields in instructions to signed/unsigned according to whether
518 the field takes a signed or unsigned value. Tidy vle split16 code.
519 Correct R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO handling.
521 2014-03-08 Alan Modra <amodra@gmail.com>
523 * elf64-ppc.c (ppc64_elf_howto_raw): Use complain_overflow_signed
524 for R_PPC64_ADDR14, R_PPC64_ADDR14_BRTAKEN, R_PPC64_ADDR14_BRNTAKEN,
525 R_PPC64_SECTOFF, R_PPC64_ADDR16_DS, R_PPC64_SECTOFF_DS,
526 R_PPC64_REL16 entries. Use complain_overflow_dont for R_PPC64_TOC.
527 (ppc64_elf_relocate_section): Modify overflow test for 16-bit
528 fields in instructions to signed/unsigned according to whether
529 the field takes a signed or unsigned value.
531 2014-03-07 Pedro Alves <palves@redhat.com>
534 * rs6000-core.c (rs6000coff_core_p): Cast pointers to bfd_vma
535 through ptr_to_uint instead of through long.
537 2014-03-06 Nick Clifton <nickc@redhat.com>
540 * elf-attrs.c (_bfd_elf_parse_attributes): Add checks for corrupt
541 attribute section names.
543 2014-03-05 Alan Modra <amodra@gmail.com>
545 Update copyright years.
547 2014-03-05 Alan Modra <amodra@gmail.com>
549 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_ADDR64_LOCAL entry.
550 (ppc64_elf_reloc_type_lookup): Support R_PPC64_ADDR64_LOCAL.
551 (ppc64_elf_check_relocs): Likewise.
552 (ppc64_elf_relocate_section): Likewise.
553 * Add BFD_RELOC_PPC64_ADDR64_LOCAL.
554 * bfd-in2.h: Regenerate.
555 * libbfd.h: Regenerate.
557 2014-03-04 Heiher <r@hev.cc>
559 * elfxx-mips.c (mips_set_isa_flags): Use E_MIPS_ARCH_64R2 for
561 (mips_mach_extensions): Make bfd_mach_mips_loongson_3a an
562 extension of bfd_mach_mipsisa64r2.
564 2014-03-04 Nick Clifton <nickc@redhat.com>
567 * elf32-arm.c (elf32_thumb2_plt0_entry): New array.
568 (elf32_thumb2_plt_entry): New array.
569 (elf32_arm_create_dynamic_sections): Set PLT entry sizes when
570 using thumb2 based PLT.
571 (elf32_arm_populate_plt_entry): Handle generating Thumb2 based PLT
573 (elf32_arm_final_link_relocate): Do not bias jumps to Thumb based
575 (elf32_arm_finish_dynamic_sections): Handle creation of Thumb2
577 (elf32_arm_output_plt_map_1): Handle creation of local symbols for
578 Thumb2 based PLT 0-entry.
579 (elf32_arm_output_arch_local_syms): Handle creation of local
580 symbols for Thumb2 based PLT entries.
582 2014-02-28 Alan Modra <amodra@gmail.com>
585 * elflink.c (elf_gc_sweep): Call gc_sweep_hook for exactly
586 the same conditions we called check_relocs.
588 2014-02-27 Yuri Gribov <y.gribov@samsung.com>
590 * bfd-in.h: Add export of bfd_elf32_arm_use_long_plt.
591 * bfd-in2.h: Regenerate.
592 * elf32-arm.c (elf32_arm_plt_entry_long): New array.
593 (elf32_arm_link_hash_table_create): Set plt_entry_size to 16 if
594 using long PLT entries.
595 (bfd_elf32_arm_use_long_plt): New function.
596 (elf32_arm_populate_plt_entry): Add support for long PLT entries.
598 2014-02-27 Alan Modra <amodra@gmail.com>
600 * elf32-ppc.c (ppc_elf_link_hash_table_create): Provide default
601 params for targets that don't use ppc32elf.em.
603 2014-02-20 Chung-Lin Tang <cltang@codesourcery.com>
605 * elf32-nios2.c (nios2_elf32_relocate_section): Fix calculation
606 of GOTOFF relocations.
608 2014-02-19 Igor Zamyatin <igor.zamyatin@intel.com>
609 H.J. Lu <hongjiu.lu@intel.com>
611 * elf64-x86-64.c (elf_x86_64_bnd_plt0_entry): New.
612 (elf_x86_64_legacy_plt_entry): Likewise.
613 (elf_x86_64_bnd_plt_entry): Likewise.
614 (elf_x86_64_legacy_plt2_entry): Likewise.
615 (elf_x86_64_bnd_plt2_entry): Likewise.
616 (elf_x86_64_bnd_arch_bed): Likewise.
617 (elf_x86_64_link_hash_entry): Add has_bnd_reloc and plt_bnd.
618 (elf_x86_64_link_hash_table): Add plt_bnd.
619 (elf_x86_64_link_hash_newfunc): Initialize has_bnd_reloc and
621 (elf_x86_64_copy_indirect_symbol): Also copy has_bnd_reloc.
622 (elf_x86_64_check_relocs): Create the second PLT for Intel MPX
624 (elf_x86_64_allocate_dynrelocs): Handle the second PLT for IFUNC
625 symbols. Resolve call to the second PLT if it is created.
626 (elf_x86_64_size_dynamic_sections): Keep the second PLT section.
627 (elf_x86_64_relocate_section): Resolve PLT references to the
628 second PLT if it is created.
629 (elf_x86_64_finish_dynamic_symbol): Use BND PLT0 and fill the
630 second PLT entry for BND relocation.
631 (elf_x86_64_finish_dynamic_sections): Use MPX backend data if
632 the second PLT is created.
633 (elf_x86_64_get_synthetic_symtab): New.
634 (bfd_elf64_get_synthetic_symtab): Likewise. Undefine for NaCl.
636 2014-02-19 Alan Modra <amodra@gmail.com>
638 * elf64-ppc.h (struct ppc64_elf_params): Add save_restore_funcs.
639 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Use it to control
640 provision of out-of-line register save/restore routines.
642 2014-02-18 Jack Carter <jack.carter@imgtec.com>
644 * elfxx-mips.c(_bfd_mips_elf_modify_segment_map): Deleted hard coding of
645 PT_DYNAMIC segment flags.
647 2014-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
650 * simple.c (struct saved_offsets): New.
651 (simple_save_output_info): Use it for ptr.
652 (simple_restore_output_info): Use it for ptr. Check section_count.
653 (bfd_simple_get_relocated_section_contents): Use it for saved_offsets.
655 2014-02-17 Alan Modra <amodra@gmail.com>
657 * elf64-ppc.h (struct ppc64_elf_params): Define.
658 (ppc64_elf_init_stub_bfd, ppc64_elf_edit_opd, ppc64_elf_tls_setup,
659 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
660 ppc64_elf_build_stubs): Update prototype.
661 * elf64-ppp.c (struct ppc_link_hash_table): Add params, delete other
662 fields now in params. Adjust code throughout file.
663 (ppc64_elf_init_stub_bfd): Delete "abfd" parameter, add "params".
664 Save params pointer in htab.
665 (ppc64_elf_edit_opd, ppc64_elf_tls_setup,
666 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
667 ppc64_elf_build_stubs): Remove parameters now in "params".
669 2014-02-17 Alan Modra <amodra@gmail.com>
671 * elf32-ppc.c (ppc_elf_relocate_section): Move relocs on insns
672 patched for ppc476 workaround. Reapply branch taken/not taken
675 2014-02-12 Alan Modra <amodra@gmail.com>
677 * elf32-ppc.c (ppc_elf_relax_section): Don't build long-branch
678 stubs for calls to __tls_get_addr that we know will later be
681 2014-02-12 Alan Modra <amodra@gmail.com>
683 * elf32-ppc.c (ppc_elf_relax_section): Enable ppc476 workaround
684 for ld -r, when code sections are sufficiently aligned.
685 * elf32-ppc.h (struct ppc_elf_params): Delete pagesize. Add
688 2014-02-12 Alan Modra <amodra@gmail.com>
691 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
692 --export-dynamic and --dynamic-list marking of symbols.
693 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Reorder
696 2014-02-10 H.J. Lu <hongjiu.lu@intel.com>
699 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark symbol in
700 executables if it matches dynamic_list.
702 2014-02-10 Alan Modra <amodra@gmail.com>
704 * po/SRC-POTFILES.in: Regenerate.
705 * po/bfd.pot: Regenerate.
707 2014-02-09 Alan Modra <amodra@gmail.com>
709 * elf-bfd.h (struct elf_backend_data): Add caches_rawsize.
710 * elfxx-target.h (elf_backend_caches_rawsize): Define.
711 (elfNN_bed): Init new field.
712 * elflink.c (elf_link_input_bfd): Handle caches_rawsize.
713 * elf32-ppc.c (shared_stub_entry): Zero addi offset.
714 (ppc_elf_relax_section): Don't reallocate section here, write
715 stubs, or write out relocs for ld -r here..
716 (ppc_elf_relocate_section): ..instead write stubs here, and use
717 existing code to write out relocs for ld -r. Fix offset
718 adjustment on reloc for little-endian.
719 (elf_backend_caches_rawsize): Define.
721 2014-02-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
724 * cache.c (bfd_cache_max_open): Cast RLIM_INFINITY to rlim_t.
726 2014-02-04 Jan Kratochvil <jan.kratochvil@redhat.com>
728 * coff-rs6000.c (xcoff_write_archive_contents_big): Free OFFSETS in
729 return paths. Three times.
730 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Free HTAB in all
732 (ppc64_elf_tls_optimize): Free TOC_REF in return path.
733 (ppc64_elf_edit_toc): Free USED in return path.
735 2014-02-03 Sandra Loosemore <sandra@codesourcery.com>
737 * reloc.c (BFD_RELOC_NIOS2_GOT_LO, BFD_RELOC_NIOS2_GOT_HA): New.
738 (BFD_RELOC_NIOS2_CALL_LO, BFD_RELOC_NIOS2_CALL_HA): New.
739 * libbfd.h: Regenerated.
740 * bfd-in2.h: Regenerated.
741 * elf32-nios2.c (elf_nios2_howto_table_rel): Add new relocations.
742 (nios2_reloc_map): Likewise.
743 (GOT_USED, CALL_USED): Renamed from GOT16_USED and CALL16_USED.
744 Fixed all references.
745 (nios2_elf32_relocate_section): Add new relocations.
746 (nios2_elf32_check_relocs): Likewise.
747 (nios2_elf32_gc_sweep_hook): Likewise.
749 2014-02-03 Alan Modra <amodra@gmail.com>
751 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add params.
752 Delete emit_stub_syms, no_tls_get_addr_opt. Update all uses.
753 (ppc_elf_link_params): New function.
754 (ppc_elf_create_glink): Align .glink to 64 bytes for ppc476
756 (ppc_elf_select_plt_layout): Remove plt_style and emit_stub_syms
757 parameters. Use htab->params instead.
758 (ppc_elf_tls_setup): Remove no_tls_get_addr_opt parameter.
759 (ppc_elf_size_dynamic_sections): Align __glink_PLTresolve to
760 64 bytes for ppc476 workaround.
761 (struct ppc_elf_relax_info): New.
762 (ppc_elf_relax_section): Exclude linker created sections and
763 those too small to hold one instruction. Don't add another
764 branch around trampolines on later relax passes. Don't
765 generate trampolines for undefined symbols when !relocatable,
766 nor for plugin symbols. Allocate space for ppc476 workaround
767 patch area. Free fixups on error return path.
768 (ppc_elf_relocate_section): Handle ppc476 workaround patching.
769 * elf32-ppc.h (struct ppc_elf_params): New.
770 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Update prototype.
771 (ppc_elf_link_params): Declare.
772 * section.c (SEC_INFO_TYPE_TARGET): Define.
773 * bfd-in2.h: Regenerate.
775 2014-02-02 Sandra Loosemore <sandra@codesourcery.com>
777 * elf32-nios2.c (struct elf32_nios2_link_hash_table): Add
779 (nios2_elf32_relocate_section): Use got_base to adjust
780 GOT-pointer-relative relocations relative to _gp_got.
781 (create_got_section): Create _gp_got symbol.
782 (nios2_elf32_finish_dynamic_symbol): Make _gp_got absolute.
783 (nios2_elf32_size_dynamic_sections): Set _gp_got offset.
785 2014-01-30 Sandra Loosemore <sandra@codesourcery.com>
787 * bfd-in2.h: Update from reloc.c.
788 * elf32-nios2.c: Include elf32-nios2.h.
789 (elf_nios2_howto_table_rel): Add entry for R_NIOS2_CALL26_NOAT.
790 (nios2_reloc_map): Likewise.
791 (enum elf32_nios2_stub_type): Declare.
792 (struct elf32_nios2_stub_hash_entry): Declare.
793 (nios2_stub_hash_entry, nios2_stub_hash_lookup): New macros.
794 (struct elf32_nios2_link_hash_entry): Add hsh_cache field.
795 (struct elf32_nios2_link_hash_table): Add new fields bstab,
796 stub_bfd, add_stub_section, layout_sections_again, stub_group,
797 bfd_count, top_index, input_list, all_local_syms.
798 (nios2_call26_stub_entry): New.
799 (nios2_elf32_install_imm16): Move up in file.
800 (nios2_elf32_install_data): Move up in file.
801 (hiadj): Move up in file.
802 (stub_hash_newfunc): New.
803 (link_hash_newfunc): Initialize hsh_cache field.
805 (nios2_stub_name): New.
806 (nios2_get_stub_entry): New.
807 (nios2_add_stub): New.
808 (nios2_elf32_setup_section_lists): New.
809 (nios2_elf32_next_input_section): New.
810 (CALL26_SEGMENT): New.
811 (MAX_STUB_SECTION_SIZE): New.
812 (group_sections): New.
813 (nios2_type_of_stub): New.
814 (nios2_build_one_stub): New.
815 (nios2_size_one_stub): New.
816 (get_local_syms): New.
817 (nios2_elf32_size_stubs): New.
818 (nios2_elf32_build_stubs): New.
819 (nios2_elf32_do_call26_relocate): Correct CALL26 overflow test.
820 (nios2_elf32_relocate_section): Handle R_NIOS2_CALL26_NOAT. Add
821 trampolines for R_NIOS2_CALL26 stubs.
822 (nios2_elf32_check_relocs): Handle R_NIOS2_CALL26_NOAT.
823 (nios2_elf32_gc_sweep_hook): Likewise.
824 (nios2_elf32_link_hash_table_create): Initialize the stub hash table.
825 (nios2_elf32_link_hash_table_free): New.
826 (bfd_elf32_bfd_link_hash_table_free): Define.
827 * elf32-nios2.h: New file.
828 * libbfd.h: Update from reloc.c.
829 * reloc.c (BFD_RELOC_NIOS2_CALL26_NOAT): New.
831 2014-01-29 Nick Clifton <nickc@redhat.com>
834 * elf32-metag.c (elf_metag_post_process_headers): Call
835 _bfd_elf_post_process_headers.
836 * elf32-sh64.c (sh64_elf_copy_private_data): Call
837 _bfd_elf_copy_private_data.
838 * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
840 2014-01-29 Nick Clifton <nickc@redhat.com>
842 * bfd-in.h (bfd_set_section_vma): Delete.
843 (bfd_set_section_alignment): Delete.
844 (bfd_set_section_userdata): Delete.
845 (bfd_set_cacheable): Delete.
846 * bfd.c (bfd_set_cacheable): New static inline function.
847 * section.c (bfd_set_section_userdata): Likewise.
848 (bfd_set_section_vma): Likewise.
849 (bfd_set_section_alignment): Likewise.
850 * bfd-in2.h: Regenerate.
852 2014-01-28 Nick Clifton <nickc@redhat.com>
854 * dwarf2.c (find_abstract_instance_name): For DW_FORM_ref_addr
855 attributes select the CU containing the abbreviation, which may not
858 2014-01-24 Alan Modra <amodra@gmail.com>
860 * elf64-ppc.c (ppc_build_one_stub): Correct reloc count passed
861 to get_relocs for ELFv2.
863 2014-01-23 H.J. Lu <hongjiu.lu@intel.com>
866 * elf.c (_bfd_elf_map_sections_to_segments): Issue a linker error
867 if TLS sections are not adjacent.
869 2014-01-22 Alan Modra <amodra@gmail.com>
871 * elflink.c (elf_link_add_object_symbols): Call minfo for --as-needed.
873 2014-01-22 Alan Modra <amodra@gmail.com>
875 * elf64-ppc.c (STK_LINKER): Comment typo fix.
877 2014-01-21 H.J. Lu <hongjiu.lu@intel.com>
880 * elflink.c (_bfd_elf_merge_symbol): When types of the existing
881 regular default symbol definition and the versioned dynamic
882 symbol definition mismatch, skip the default symbol definition
883 if one of them is IFUNC.
885 2014-01-21 H.J. Lu <hongjiu.lu@intel.com>
888 * elflink.c (_bfd_elf_merge_symbol): Don't check info->shared,
889 info->export_dynamic nor h->ref_dynamic for type mismatch when
890 adding the default version.
892 2014-01-16 Alan Modra <amodra@gmail.com>
894 * elfxx-mips.c (mips_elf_record_got_page_entry): Pass in a
895 mips_elf_traverse_got_arg* rather than mips_got_info*.
896 Adjust caller. Alloc on output_bfd rather than symbol section
899 2014-01-15 H.J. Lu <hongjiu.lu@intel.com>
901 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
903 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
905 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
908 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't discard relocs
909 against __ehdr_start.
910 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
912 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
914 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
916 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
918 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
921 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't update reloc
922 count if there are any non pc-relative relocs.
923 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
925 2014-01-14 Michael Hudson-Doyle <michael.hudson@linaro.org>
926 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
928 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use correct
929 offset while calculating relocation address.
930 (elfNN_aarch64_create_small_pltn_entry): Likewise.
931 (elfNN_aarch64_init_small_plt0_entry): Likewise.
933 2014-01-13 Ma Jiang <ma.jiang@zte.com.cn>
936 * elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for
937 R_ARM_ABS8 and R_ARM_ABS16.
939 2014-01-13 Alan Modra <amodra@gmail.com>
941 * elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc,
942 error when shared and force a plt call otherwise.
943 (ppc_elf_size_dynamic_sections): Don't emit DT_PPC_GOT unless
945 (ppc_elf_relocate_section): Add missing test to resolve ifuncs to
946 the appropriate call stub.
948 2014-01-10 Alan Modra <amodra@gmail.com>
953 * elf.c (assign_file_positions_for_load_sections): Revert last change.
954 (assign_file_positions_for_non_load_sections): When setting up
955 PT_GNU_RELRO header, don't require a corresponding PT_LOAD
956 header that completely covers the relro region.
958 2014-01-09 Tristan Gingold <gingold@adacore.com>
960 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): use jump
961 table macros and add macros to initializa the structure.
963 2014-01-08 H.J. Lu <hongjiu.lu@intel.com>
968 * elf.c (_bfd_elf_map_sections_to_segments): Don't check section
969 size for PT_GNU_RELRO segment.
970 (assign_file_positions_for_load_sections): If PT_LOAD segment
971 doesn't fit PT_GNU_RELRO segment, adjust its p_filesz and p_memsz.
973 2014-01-07 Tom Tromey <tromey@redhat.com>
975 * elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility
978 2014-01-03 Nick Clifton <nickc@redhat.com>
981 * elf.c (vma_page_aligned_bias): Handle a maxpagesize value of
984 2014-01-02 Yuanhui Zhang <asmwarrior@gmail.com>
987 * pef.c (bfd_pef_xlib_read_header): Increase buffer size to 80.
989 2014-01-02 Nick Clifton <nickc@redhat.com>
992 * archive.c (_bfd_get_elt_at_filepos): Store a copy of the
993 filename in the bfd's filename field.
994 * elfcode.h (bfd_from_remote_memory): Likewise.
995 * ieee.c (ieee_object_p): Likewise.
996 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
997 * oasys.c (oasys_openr_next_archived_file): Likewise.
998 * vms-lib.c (_bfd_vms_lib_get_module): Likewise.
999 * opncls.c (bfd_fopen): Likewise.
1000 (bfd_openstreamr): Likewise.
1001 (bfd_openr_iovec): Likewise.
1002 (bfd_openw): Likewise.
1003 (bfd_create): Likewise.
1004 (_bfd_delete_bfd): Free filename.
1006 For older changes see ChangeLog-2013
1008 Copyright (C) 2014 Free Software Foundation, Inc.
1010 Copying and distribution of this file, with or without modification,
1011 are permitted in any medium without royalty provided the copyright
1012 notice and this notice are preserved.
1018 version-control: never