1 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
5 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
6 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
8 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
10 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
11 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
14 2017-02-23 Alan Modra <amodra@gmail.com>
17 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
19 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
20 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
23 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
26 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
27 processing ahead of the call to `elf_gc_sweep_symbol'.
29 2017-02-22 Nick Clifton <nickc@redhat.com>
32 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
33 created section 4-byte alignment.
35 2017-02-22 Alan Modra <amodra@gmail.com>
37 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
38 on .got or .plt output section being discarded by script.
39 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
42 2017-02-21 Alan Modra <amodra@gmail.com>
44 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
45 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
47 2017-02-20 Alan Modra <amodra@gmail.com>
50 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
51 if DT_RELSZ/DT_RELASZ is zero.
53 2017-02-17 Nick Clifton <nickc@redhat.com>
55 * compress.c (bfd_get_full_section_contents): Remember to reduce
56 compressed size by the sizeof the compression header when
57 decompressing the contents.
59 2017-02-17 Pedro Alves <palves@redhat.com>
61 * srec.c (Chunk): Rename to ...
62 (_bfd_srec_len): ... this.
63 (S3Forced): Rename to ...
64 (_bfd_srec_forceS3): ... this.
65 * objcopy.c: Adjust all references.
67 2017-02-17 Pedro Alves <palves@redhat.com>
69 * archive.c (bsd_write_armap): Rename to ...
70 (_bfd_bsd_write_armap): ... this.
71 (coff_write_armap): Rename to ...
72 (_bfd_coff_write_armap): ... this.
73 * libbfd-in.h (bsd_write_armap): Rename to ...
74 (_bfd_bsd_write_armap): ... this.
75 (coff_write_armap): Rename to ...
76 (_bfd_coff_write_armap): ... this.
77 * aout-target.h, aout-tic30.c: Adjust all users.
78 * libbfd.h: Regenerate.
80 2017-02-17 Pedro Alves <palves@redhat.com>
82 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
83 (warn_deprecated): Rename to ...
84 (_bfd_warn_deprecated): ... this.
85 * libbfd.c (warn_deprecated): Rename to ...
86 (_bfd_warn_deprecated): ... this.
87 * bfd-in2.h: Regenerate.
89 2017-02-17 Pedro Alves <palves@redhat.com>
91 * bfdio.c (real_ftell): Rename to ...
92 (_bfd_real_ftell): ... this.
93 (real_fseek): Rename to ...
94 (_bfd_real_fseek): ... this.
95 (real_fopen): Rename to ...
96 (_bfd_real_fopen): ... this.
97 * libbfd-in.h (real_ftell): Rename to ...
98 (_bfd_real_ftell): ... this.
99 (real_fseek): Rename to ...
100 (_bfd_real_fseek): ... this.
101 (real_fopen): Rename to ...
102 (_bfd_real_fopen): ... this.
103 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
104 * libbfd.h: Regenerate.
106 2017-02-17 Pedro Alves <palves@redhat.com>
108 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
109 * libbfd.c (read_unsigned_leb128): Rename to ...
110 (_bfd_read_unsigned_leb128): ... this.
111 (read_signed_leb128): Rename to ...
112 (_bfd_read_signed_leb128): ... this.
113 (safe_read_leb128): Rename to ...
114 (_bfd_safe_read_leb128): ... this.
115 * libbfd-in.h (read_unsigned_leb128): Rename to ...
116 (_bfd_read_unsigned_leb128): ... this.
117 (read_signed_leb128): Rename to ...
118 (_bfd_read_signed_leb128): ... this.
119 (safe_read_leb128): Rename to ...
120 (_bfd_safe_read_leb128): ... this.
121 * libbfd.h: Renegerate.
123 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
125 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
126 before trying to fine matching file and line information.
128 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
130 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
131 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
132 not match current bfd, then reload debug information. Record bfd
133 we're loading debug info for in the stash. If we have debug
134 informatin in the cache then perform section placement before
137 2017-02-16 Alan Modra <amodra@gmail.com>
140 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
141 * elfxx-target.h (elf_backend_no_page_alias): Define.
142 (elfNN_bed): Init new field.
143 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
144 ensure PT_LOAD segment starts on a new page.
145 * elf32-hppa.c (elf_backend_no_page_alias): Define.
147 2017-02-16 Alan Modra <amodra@gmail.com>
150 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
153 2017-02-16 Jiong Wang <jiong.wang@arm.com>
155 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
156 * bfd-in2.h: Regenerated.
158 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
161 * elf32-i386.c (elf_i386_relocate_section): Allow
162 "lea foo@GOT, %reg" in PIC.
164 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
167 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
168 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
169 error against local IFUNC symbol without a base register for
172 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
174 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
175 `%P: %H:' with `info->callbacks->einfo'.
176 (ppc_elf_relocate_section): Likewise.
177 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
178 (ppc64_elf_edit_toc): Likewise.
179 (ppc64_elf_relocate_section): Likewise.
181 2017-02-14 Alan Modra <amodra@gmail.com>
183 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
184 --gc-keep-exported, and test versioned field of sym rather than
185 looking for @ in name.
187 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
189 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
192 2017-02-13 Nick Clifton <nickc@redhat.com>
195 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
198 2017-02-07 Andrew Waterman <andrew@sifive.com>
200 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
201 entry size if PLT header is written.
203 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
205 Fix sparc64 dynamic relocation processing to use the dynamic
207 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
208 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
211 2017-02-03 Nick Clifton <nickc@redhat.com>
214 * coffcode.h (coff_write_object_contents): Enlarge size of
215 s_name_buf in order to avoid compile time warning about possible
217 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
218 32-bits of insn value before printing into buffer.
220 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
222 * elfxx-mips.c (mips_elf_hash_sort_data): Add
224 (mips_elf_sort_hash_table): Handle it.
225 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
226 symbols bump up `max_local_dynindx' rather than
227 `max_non_got_dynindx'.
229 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
231 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
232 `min_got_dynindx', `max_unref_got_dynindx' and
233 `max_non_got_dynindx' members to the `bfd_size_type' data type.
234 (mips_elf_sort_hash_table): Adjust accordingly.
236 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
238 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
239 to access the hash table.
241 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
243 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
244 non-NULL `htab' to the beginning.
246 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
248 * elflink.c (elf_gc_sweep): Wrap overlong line.
250 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
252 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
253 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
254 * elfxx-mips.c (mips_elf_link_hash_table): Add
255 `ignore_branch_isa' member.
256 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
257 in branch relocation calculation as an error if
258 `ignore_branch_isa' has been set.
259 (_bfd_mips_elf_insn32): Rename to...
260 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
261 parameter to `insn32' and add an `ignore_branch_isa' parameter.
262 Handle the new parameter.
264 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
266 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
267 local variable dynobj.
270 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
271 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
272 executable from read-only sections into sdynrelro.
273 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
274 dynamic relocs in sdynrelro.
275 (elf_backend_want_dynrelro): Define.
277 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
279 * config.bfd (*-*-rtemsaout*): Mark as removed.
281 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
283 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
284 (arm-*-rtems*): Move to (arm*-*-eabi*).
285 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
286 (m68-*-rtems*): Move to (m68*-*-elf*).
288 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
290 * config.bfd (*-*-rtemscoff*): Mark as removed.
292 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
295 * elflink.c (bfd_elf_record_link_assignment): Revert last
296 change and don't ever clear `forced_local'. Set `mark'
298 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
300 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
301 (bfd_elf_size_dynamic_sections): ... here.
302 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
303 and set `mark' instead in `__tls_get_addr_opt' processing.
304 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
306 2017-01-24 Alan Modra <amodra@gmail.com>
308 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
309 where dynamic relocs are preferable. Allow ifunc too.
310 (ensure_undefweak_dynamic): New function.
311 (allocate_dynrelocs): Use it here. Move plt handling last and
312 don't make symbols dynamic, simplifying loop. Only make undef
313 weak symbols with GOT entries dynamic. Correct condition
314 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
315 comments. Remove goto.
316 (ppc_elf_relocate_section): Correct test for using dynamic
317 symbol on GOT relocs. Rearrange test for emitting GOT relocs
318 to suit. Set up explicit tls_index entries and implicit GOT
319 tls_index entries resolvable at link time for
320 __tls_get_addr_opt. Simplify test to clear mem for prelink.
321 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
322 (ensure_undefweak_dynamic): New function.
323 (allocate_dynrelocs): Use it here. Only make undef weak symbols
324 with GOT entries dynamic. Remove unnecessary test of
325 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
326 (ppc64_elf_relocate_section): Correct test for using dynamic
327 symbol on GOT relocs. Rearrange test for emitting GOT relocs
328 to suit. Set up explicit tls_index entries and implicit GOT
329 tls_index entries resolvable at link time for __tls_get_addr_opt.
330 Simplify expression to clear mem for prelink.
332 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
334 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
336 2017-01-20 Jiong Wang <jiong.wang@arm.com>
338 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
339 (elf_backend_hash_symbol): Define.
341 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
344 * elflink.c (bfd_elf_record_link_assignment): Clear any
345 `forced_local' marking for DSO symbols that are not being
348 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
350 * elfnn-riscv.c (riscv_elf_object_p): New function.
352 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
355 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
357 (elf_x86_64_check_relocs): Create .eh_frame section for the
359 (elf_x86_64_size_dynamic_sections): Allocate and initialize
360 .eh_frame section for the .plt.bnd section.
361 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
362 for the .plt.bnd section.
364 2017-01-12 Nick Clifton <nickc@redhat.com>
367 * opncls.c (find_separate_debug_file): Add include_dirs
368 parameter. Only include the directory part of the bfd's filename
369 in search paths if include_dirs is true. Add a couple of extra
370 locations for looking for debug files.
371 ( bfd_follow_gnu_debuglink): Update invocation of
372 find_separate_debug_file.
373 (bfd_follow_gnu_debugaltlink): Likewise.
374 (get_build_id): New function: Finds the build-id of the given bfd.
375 (get_build_id_name): New function: Computes the name of the
376 separate debug info file for a bfd, based upon its build-id.
377 (check_build_id_file): New function: Checks to see if a separate
378 debug info file exists at the given location, and that its
379 build-id matches that of the original bfd.
380 (bfd_follow_build_id_debuglink): New function: Finds a separate
381 debug info file for a given bfd by using the build-id method.
382 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
383 method of locating a separate debug info file before using the
385 * bfd-in2.h: Regenerate.
387 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
390 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
391 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
392 elf_x86_64_eh_frame_plt_got.
393 (elf_x86_64_size_dynamic_sections): Get unwind info from
394 elf_x86_64_bnd_arch_bed for the BND PLT.
396 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
398 * config.bfd: Add entries for i686-redox and x86_64-redox.
400 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
402 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
404 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
405 .eh_frame section to 4 bytes for x32.
406 (elf_x86_64_check_relocs): Likewise.
408 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
411 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
412 (PLT_GOT_FDE_LENGTH): Likewise.
413 (elf_i386_plt_layout): Add eh_frame_plt_got and
414 eh_frame_plt_got_size.
415 (elf_i386_plt): Updated.
416 (elf_i386_link_hash_table): Add plt_got_eh_frame.
417 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
418 (elf_i386_size_dynamic_sections): Allocate and initialize
419 .eh_frame section for .plt.got.
420 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
422 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
423 eh_frame_plt_got_size.
424 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
425 (PLT_GOT_FDE_LENGTH): Likewise.
426 (elf_x86_64_backend_data): Add eh_frame_plt_got and
427 eh_frame_plt_got_size.
428 (elf_x86_64_arch_bed): Updated.
429 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
430 eh_frame_plt_got_size.
431 (elf_x86_64_nacl_arch_bed): Likewise.
432 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
433 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
434 (elf_x86_64_size_dynamic_sections): Allocate and initialize
435 .eh_frame section for .plt.got.
436 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
439 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
441 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
442 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
444 2017-01-09 Nick Clifton <nickc@redhat.com>
446 * dwarf2.c (lookup_address_in_function_table): Return early if
447 there are no functions in the given comp unit, or if the high
448 address of the last function in the comp unit is less than the
451 2017-01-09 Nick Clifton <nickc@redhat.com>
454 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
455 message if there are too many symbols to load.
457 2017-01-04 James Clarke <jrtc27@jrtc27.com>
459 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
460 if relocs are cached.
462 2017-01-03 Rich Felker <bugdal@aerifal.cx>
465 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
466 for R_MICROBLAZE_GOTOFF_64.
468 2017-01-03 Nick Clifton <nickc@redhat.com>
470 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
471 warning about using a possibly uninitialised variable.
473 2017-01-02 Alan Modra <amodra@gmail.com>
475 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
476 (allocate_plt_static, allocate_dynrelocs): Use it.
478 2017-01-02 Alan Modra <amodra@gmail.com>
480 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
481 .PARISC.unwind section.
483 2017-01-02 Alan Modra <amodra@gmail.com>
486 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
487 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
488 indirect to GOT pointer relative code edit.
490 2017-01-02 Alan Modra <amodra@gmail.com>
492 Update year range in copyright notice of all files.
494 For older changes see ChangeLog-2016
496 Copyright (C) 2017 Free Software Foundation, Inc.
498 Copying and distribution of this file, with or without modification,
499 are permitted in any medium without royalty provided the copyright
500 notice and this notice are preserved.
506 version-control: never