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