1 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
4 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
5 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
6 and the destination is a Thumb symbol.
8 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
10 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
11 initializer to silence GCC 4.2.
12 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
14 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
16 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
17 (LAZY_PLT_ENTRY_SIZE): This.
18 (NON_LAZY_PLT_ENTRY_SIZE): New.
19 (elf_x86_64_plt0_entry): Renamed to ...
20 (elf_x86_64_lazy_plt0_entry): This.
21 (elf_x86_64_plt_entry): Renamed to ...
22 (elf_x86_64_lazy_plt_entry): This.
23 (elf_x86_64_bnd_plt0_entry): Renamed to ...
24 (elf_x86_64_lazy_bnd_plt0_entry): This.
25 (elf_x86_64_legacy_plt_entry): Removed.
26 (elf_x86_64_bnd_plt_entry): Renamed to ...
27 (elf_x86_64_lazy_bnd_plt_entry): This.
28 (elf_x86_64_legacy_plt2_entry): Renamed to ...
29 (elf_x86_64_non_lazy_plt_entry): This.
30 (elf_x86_64_bnd_plt2_entry): Renamed to ...
31 (elf_x86_64_non_lazy_bnd_plt_entry): This.
32 (elf_x86_64_eh_frame_plt): Renamed to ...
33 (elf_x86_64_eh_frame_lazy_plt): This.
34 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
35 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
36 (elf_x86_64_eh_frame_plt_got): Renamed to ...
37 (elf_x86_64_eh_frame_non_lazy_plt): This.
38 (elf_x86_64_lazy_plt_layout): New.
39 (elf_x86_64_non_lazy_plt_layout): Likewise.
40 (elf_x86_64_plt_layout): Likewise.
41 (elf_x86_64_backend_data): Remove PLT layout information. Add
43 (GET_PLT_ENTRY_SIZE): Removed.
44 (elf_x86_64_lazy_plt): New.
45 (elf_x86_64_non_lazy_plt): Likewise.
46 (elf_x86_64_lazy_bnd_plt): Likewise.
47 (elf_x86_64_non_lazy_bnd_plt): Likewise.
48 (elf_x86-64_arch_bed): Updated.
49 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
50 (elf_x86_64_create_dynamic_sections): Removed.
51 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
52 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
53 (elf_x86-64_adjust_dynamic_symbol): Updated.
54 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
55 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
56 size for PLT0 if there is no PLT0. Get plt_entry_size from
57 non_lazy_plt for non-lazy PLT entries.
58 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
59 from non_lazy_plt for non-lazy PLT entries.
60 (elf_x86-64_relocate_section): Updated. Properly get PLT index
62 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
63 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
64 entries with non-lazy PLT layout. Don't fill the second and third
65 slots in the PLT entry if there is no PLT0.
66 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
67 if there is no PLT0. Set sh_entsize on the .plt.got section.
68 (compare_relocs): New.
69 (elf_x86_64_plt_type): Likewise.
70 (elf_x86_64_plt): Likewise.
71 (elf_x86_64_nacl_plt): New. Forward declaration.
72 (elf_x86_64_get_plt_sym_val): Removed.
73 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
74 against all dynamic relocations.
75 (elf_x86_64_link_setup_gnu_properties): New function.
76 (elf_backend_create_dynamic_sections): Updated.
77 (elf_backend_setup_gnu_properties): New.
78 (elf_x86_64_nacl_plt): New.
79 (elf_x86_64_nacl_arch_bed): Updated.
81 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
83 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
84 (LAZY_PLT_ENTRY_SIZE): This.
85 (NON_LAZY_PLT_ENTRY_SIZE): New.
86 (elf_i386_plt0_entry): Renamed to ...
87 (elf_i386_lazy_plt0_entry): This.
88 (elf_i386_plt_entry): Renamed to ...
89 (elf_i386_lazy_plt_entry): This.
90 (elf_i386_pic_plt0_entry): Renamed to ...
91 (elf_i386_pic_lazy_plt0_entry): This.
92 (elf_i386_pic_plt_entry): Renamed to ...
93 (elf_i386_pic_lazy_plt_entry): This.
94 (elf_i386_got_plt_entry): Renamed to ...
95 (elf_i386_non_lazy_plt_entry): This.
96 (elf_i386_pic_got_plt_entry): Renamed to ...
97 (elf_i386_pic_non_lazy_plt_entry): This.
98 (elf_i386_eh_frame_plt): Renamed to ...
99 (elf_i386_eh_frame_lazy_plt): This.
100 (elf_i386_eh_frame_plt_got): Renamed to ...
101 (elf_i386_eh_frame_non_lazy_plt): This.
102 (elf_i386_plt_layout): Renamed to ...
103 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
104 eh_frame_plt_got_size.
105 (elf_i386_non_lazy_plt_layout): New.
106 (elf_i386_plt_layout): Likewise.
107 (elf_i386_non_lazy_plt): Likewise.
108 (GET_PLT_ENTRY_SIZE): Removed.
109 (elf_i386_plt): Renamed to ...
110 (elf_i386_lazy_plt): This.
111 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
112 (elf_i386_arch_bed): Updated.
113 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
114 (elf_i386_create_dynamic_sections): Removed.
115 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
116 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
117 (elf_i386_adjust_dynamic_symbol): Updated.
118 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
119 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
120 size for PLT0 if there is no PLT0.
121 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
122 output section is discarded only if GOT isn't empty.
123 (elf_i386_relocate_section): Updated. Properly get PLT index
125 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
126 second and third slots in the PLT entry if there is no PLT0.
127 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
128 if there is no PLT0. Set sh_entsize on the .plt.got section.
129 (elf_i386_nacl_plt): Forward declaration.
130 (elf_i386_get_plt_sym_val): Removed.
131 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
132 against all dynamic relocations.
133 (elf_i386_link_setup_gnu_properties): New function.
134 (elf_backend_create_dynamic_sections): Updated.
135 (elf_backend_setup_gnu_properties): New.
136 (elf_i386_nacl_plt): Updated.
137 (elf_i386_nacl_arch_bed): Likewise.
138 (elf_i386_vxworks_arch_bed): Likewise.
140 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
142 * elflink.c (elf_output_implib): Remove executable flag from import
144 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
145 library is a relocatable object file.
147 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
150 * elf32-avr.c (avr_should_move_sym): New function.
151 (avr_should_reduce_sym_size): Likewise.
152 (avr_should_increase_sym_size): Likewise.
153 (elf32_avr_relax_delete_bytes): Adjust symbol values
154 and sizes by calling new functions.
156 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
158 * config.bfd (riscv32-*): Enable rv64.
160 2017-05-02 Alan Modra <amodra@gmail.com>
163 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
164 rather than h->root.type == bfd_link_hash_new.
165 (bfd_elf_record_link_assignment): Similarly, call
166 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
168 2017-04-29 Alan Modra <amodra@gmail.com>
171 * reloc.c (reloc_offset_in_range): New function.
172 (bfd_perform_relocation, bfd_install_relocation): Use it.
173 (_bfd_final_link_relocate): Likewise.
175 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
177 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
178 before using .plt.got.
179 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
181 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
183 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
184 instead of "+=" to update 0.
186 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
188 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
189 .plt.got section here.
190 (elf_i386_check_relocs): Don't create the .plt.got section.
191 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
192 the .plt.got and .plt.bnd sections here.
193 (elf_x86_64_check_relocs): Don't create the .plt.got nor
196 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
198 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
200 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
201 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
202 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
203 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
206 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
208 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
210 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
211 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
212 the first relocatable ELF input with GNU properties.
214 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
216 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
219 2017-04-27 Alan Modra <amodra@gmail.com>
221 * elf-bfd.h (struct elf_backend_data): Make asection param of
222 elf_backend_eh_frame_address_size const.
223 (_bfd_elf_eh_frame_address_size): Likewise.
224 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
225 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
226 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
227 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
228 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
229 (next_cie_fde_offset): Constify params.
230 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
232 2017-04-27 Alan Modra <amodra@gmail.com>
234 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
235 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
236 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
238 (offset_adjust): New function.
239 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
240 (adjust_eh_frame_local_symbols): Likewise.
241 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
242 after changing anything. Return true if anything changed.
243 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
244 _bfd_elf_adjust_eh_frame_global_symbol for globals.
246 2017-04-27 Alan Modra <amodra@gmail.com>
248 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
251 2017-04-27 Alan Modra <amodra@gmail.com>
253 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
254 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
255 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
256 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
257 for undef and undefweak dyn_relocs.
258 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
259 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
260 (allocate_got, allocate_dynrelocs): Likewise.
261 (ppc64_elf_relocate_section): Likewise.
263 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
265 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
266 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
267 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
268 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
270 2017-04-26 Nick Clifton <nickc@redhat.com>
273 * reloc.c (bfd_perform_relocation): Check for a negative address
276 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
279 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
281 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
282 (elf_backend_always_renumber_dynsyms): Define.
283 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
284 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
285 * elflink.c (bfd_elf_size_dynamic_sections): Also call
286 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
288 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
290 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
292 * elflink.c (bfd_elf_size_dynamic_sections): Only call
293 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
294 sections have been created.
296 2017-04-26 Nick Clifton <nickc@redhat.com>
299 * compress.c (bfd_init_section_compress_status): Check the return
300 value from bfd_malloc.
302 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
304 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
305 no_finish_dynamic_symbol.
306 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
308 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
309 weak symbol, don't make it dynamic.
310 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
311 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
312 relocation for GOT reference.
313 (elf_x86_64_finish_dynamic_symbol): Abort if
314 no_finish_dynamic_symbol isn't 0.
316 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
319 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
320 undefined weak symbol, don't make it dynamic.
321 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
322 set no_finish_dynamic_symbol and generate R_386_RELATIVE
323 relocation for R_386_GOT32.
325 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
328 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
330 2017-04-23 Alan Modra <amodra@gmail.com>
333 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
334 * elf.c (lcomm_sym): New.
335 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
336 * bfd-in2.h: Regenerate.
338 2017-04-23 Alan Modra <amodra@gmail.com>
341 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
342 parameters and comment.
343 (_bfd_elf_get_reloc_section): Delete.
344 (_bfd_elf_plt_get_reloc_section): Declare.
345 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
346 New functions. Don't blindly skip over assumed .rel/.rela prefix.
348 (_bfd_elf_get_reloc_section): ..here. Delete.
349 (assign_section_numbers): Call elf_get_reloc_section.
350 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
351 * elfxx-target.h (elf_backend_get_reloc_section): Update.
353 2017-04-23 Alan Modra <amodra@gmail.com>
356 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
359 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
362 * elf32-i386.c (elf_i386_link_hash_entry): Add
363 no_finish_dynamic_symbol.
364 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
365 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
366 symbol, don't make it dynamic in PIE.
367 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
368 set no_finish_dynamic_symbol and generate R_386_RELATIVE
369 relocation for R_386_GOT32
370 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
373 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
377 * elflink.c (elf_link_add_object_symbols): Require
378 --no-dynamic-linker with -E/--dynamic-list when creating
381 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
383 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
386 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
388 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
389 dynamic symbol sorting.
391 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
394 * elflink.c (elf_link_add_object_symbols): Preserve
395 dynamic_ref_after_ir_def when restoring the symbol table for
396 unneeded dynamic object.
398 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
401 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
402 on on undefined IFUNC symbol in the second PLT.
404 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
406 * peXXigen.c (pe_print_reloc): Correct chunk_end.
408 2017-04-19 Alan Modra <amodra@gmail.com>
410 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
411 or make dynamic for info->dynamic_undefined_weak 0 and 1.
412 * elf32-ppc.c:Formatting.
413 (ensure_undefweak_dynamic): Don't make dynamic when
414 info->dynamic_undefined_weak is zero.
415 (allocate_dynrelocs): Discard undefweak dyn_relocs for
416 info->dynamic_undefined_weak. Discard undef dyn_relocs when
417 not default visibility. Discard undef and undefweak
419 (ppc_elf_relocate_section): Adjust to suit.
420 * elf64-ppc.c: Formatting.
421 (ensure_undefweak_dynamic): Don't make dynamic when
422 info->dynamic_undefined_weak is zero.
423 (allocate_dynrelocs): Discard undefweak dyn_relocs for
424 info->dynamic_undefined_weak. Discard them earlier.
426 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
429 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
430 before generating the version definition section.
432 2017-04-17 Alan Modra <amodra@gmail.com>
434 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
435 state when a regular object file defines a symbol with
436 incompatible type to that defined by an earlier shared lib.
438 2017-04-13 Alan Modra <amodra@gmail.com>
440 * coffcode.h: Wrap some overly long _bfd_error_handler args.
442 * elf32-arm.c: Likewise.
443 * elf32-i386.c: Likewise.
444 * elf32-mep.c: Likewise.
445 * elf64-ia64-vms.c: Likewise.
446 * elf64-x86-64.c: Likewise.
447 * elflink.c: Likewise.
448 * elfnn-ia64.c: Likewise.
449 * elfxx-mips.c: Likewise.
451 2017-04-13 Alan Modra <amodra@gmail.com>
453 * aoutx.h: Use %B and %A in error messages throughout file.
454 * aout-cris.c: Likewise.
455 * archive.c: Likewise.
456 * binary.c: Likewise.
457 * coff-rs6000.c: Likewise.
458 * coff-tic4x.c: Likewise.
459 * coffcode.h: Likewise.
460 * coffgen.c: Likewise.
461 * cofflink.c: Likewise.
462 * coffswap.h: Likewise.
463 * cpu-arm.c: Likewise.
464 * elf-eh-frame.c: Likewise.
465 * elf-m10300.c: Likewise.
467 * elf32-arc.c: Likewise.
468 * elf32-arm.c: Likewise.
469 * elf32-bfin.c: Likewise.
470 * elf32-frv.c: Likewise.
471 * elf32-iq2000.c: Likewise.
472 * elf32-m32c.c: Likewise.
473 * elf32-microblaze.c: Likewise.
474 * elf32-nds32.c: Likewise.
475 * elf32-rl78.c: Likewise.
476 * elf32-rx.c: Likewise.
477 * elf32-score.c: Likewise.
478 * elf32-score7.c: Likewise.
479 * elf32-sh64.c: Likewise.
480 * elf32-v850.c: Likewise.
481 * elf32-vax.c: Likewise.
482 * elf32-visium.c: Likewise.
483 * elf64-ia64-vms.c: Likewise.
484 * elf64-mmix.c: Likewise.
485 * elf64-sh64.c: Likewise.
486 * elfcode.h: Likewise.
487 * elfnn-aarch64.c: Likewise.
488 * elfnn-ia64.c: Likewise.
489 * elfxx-mips.c: Likewise.
490 * hpux-core.c: Likewise.
493 * linker.c: Likewise.
498 * peXXigen.c: Likewise.
499 * rs6000-core.c: Likewise.
500 * vms-alpha.c: Likewise.
501 * xcofflink.c: Likewise.
503 2017-04-13 Alan Modra <amodra@gmail.com>
505 * bfd.c (PRINT_TYPE): Define.
506 (_doprnt): New function.
507 (error_handler_internal): Use _doprnt.
508 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
509 calls in their natural order, throughout file.
510 * coff-mcore.c: Likewise.
511 * coff-ppc.c: Likewise.
512 * coff-tic80.c: Likewise.
513 * cofflink.c: Likewise.
514 * elf-s390-common.c: Likewise.
516 * elf32-arm.c: Likewise.
517 * elf32-i386.c: Likewise.
518 * elf32-m32r.c: Likewise.
519 * elf32-msp430.c: Likewise.
520 * elf32-spu.c: Likewise.
521 * elf64-ia64-vms.c: Likewise.
522 * elf64-sparc.c: Likewise.
523 * elf64-x86-64.c: Likewise.
524 * elflink.c: Likewise.
525 * elfnn-aarch64.c: Likewise.
526 * elfnn-ia64.c: Likewise.
527 * elfxx-mips.c: Likewise.
529 2017-04-13 Alan Modra <amodra@gmail.com>
531 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
532 branch veneers" error. Fix double space and format message.
533 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
534 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
536 2017-04-13 Alan Modra <amodra@gmail.com>
538 * bfd-in2.h: Regenerate.
540 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
542 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
543 extra `\n' in warning/error messages.
544 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
545 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
547 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
549 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
550 processor-specific properties with generic ELF target vector.
552 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
554 * elf32-sparc.c (elf_backend_fixup_symbol): New.
555 * elf64-sparc.c (elf_backend_fixup_symbol): New.
556 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
557 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
559 (link_hash_newfunc): Initialize has_got_reloc and
561 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
563 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
565 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
567 (_bfd_sparc_elf_fixup_symbol): New function.
568 (allocate_dynrelocs): Don't allocate space for dynamic
569 relocations and discard relocations against resolved undefined
570 weak symbols in executable. Don't make resolved undefined weak
571 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
572 relocation against undefined weak symbols in PIE.
573 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
574 relocations against resolved undefined weak symbols in PIE
575 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
576 without ynamic PLT/GOT relocations for resolved undefined weak
578 Don't generate dynamic relocation against resolved undefined
579 weak symbol in executable.
580 (pie_finish_undefweak_symbol): New function.
581 (_bfd_sparc_elf_finish_dynamic_sections): Call
582 pie_finish_undefweak_symbol on all symbols in PIE.
583 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
584 (_bfd_sparc_elf_fixup_symbol): New function.
586 2017-04-10 Nick Clifton <nickc@redhat.com>
588 * config.bfd: Remove ns32k from obsolete list.
590 2017-04-10 Alan Modra <amodra@gmail.com>
593 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
594 (special_sections_i): Likewise for .init_array.
595 (special_sections_p): Likewise for .preinit_array.
597 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
601 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
602 ELF_COMMON_DEF_P for common symbols.
603 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
604 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
605 * elflink.c (_bfd_elf_merge_symbol): Revert commits
606 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
607 07492f668d2173da7a2bda3707ff0985e0f460b6.
609 2017-04-07 Pedro Alves <palves@redhat.com>
611 * opncls.c (bfd_get_debug_link_info): Rename to...
612 (bfd_get_debug_link_info_1): ... this. Change type of second
613 parameter to void pointer. Adjust.
614 (bfd_get_debug_link_info): Reimplement on top of
615 bfd_get_debug_link_info_1.
616 (separate_debug_file_exists, separate_alt_debug_file_exists):
617 Change type of second parameter to void pointer. Adjust.
618 (get_func_type, check_func_type): Change type of second parameter
620 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
621 the callback functions instead of passing the address of a local.
622 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
623 find_separate_debug_file.
624 (get_alt_debug_link_info_shim): Change type of second parameter to
625 void pointer. Adjust.
626 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
627 find_separate_debug_file.
628 (get_build_id_name, bfd_boolean check_build_id_file): Change type
629 of second parameter to void pointer. Adjust.
630 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
631 pointer local to find_separate_debug_file.
633 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
635 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
636 external symbols with a definition.
637 (_bfd_coff_gc_mark_extra_sections): Fix typo.
639 2017-04-07 Alan Modra <amodra@gmail.com>
641 * po/SRC-POTFILES.in: Regenerate.
643 2017-04-05 Alan Modra <amodra@gmail.com>
645 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
648 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
650 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
651 numbers for DataDirectory entry indicies passed to
654 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
656 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
657 each GNU_MBIND section and align GNU_MBIND section to page size.
658 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
659 segment for each GNU_MBIND section.
660 (_bfd_elf_init_private_section_data): Copy sh_info from input
661 for GNU_MBIND section.
663 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
665 * elfnn-riscv.c (GP_NAME): Delete.
666 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
667 (_bfd_riscv_relax_lui): Likewise.
669 2017-04-04 Nick Clifton <nickc@redhat.com>
672 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
674 (bfd_elf_final_link): Only initialize the extended symbol index
675 section if there are extended symbol tables to list.
677 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
679 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
680 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
681 * configure.ac (elf): Add elf-properties.lo.
682 * Makefile.in: Regenerated.
683 * configure: Likewise.
684 * elf-bfd.h (elf_property_kind): New.
685 (elf_property): Likewise.
686 (elf_property_list): Likewise.
687 (elf_properties): Likewise.
688 (_bfd_elf_parse_gnu_properties): Likewise.
689 (_bfd_elf_get_property): Likewise.
690 (_bfd_elf_link_setup_gnu_properties): Likewise.
691 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
692 and setup_gnu_properties.
693 (elf_obj_tdata): Add properties.
694 * elf-properties.c: New file.
695 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
696 (elf_i386_merge_gnu_properties): Likewise.
697 (elf_backend_parse_gnu_properties): Likewise.
698 (elf_backend_merge_gnu_properties): Likewise.
699 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
700 (elf_x86_64_merge_gnu_properties): Likewise.
701 (elf_backend_parse_gnu_properties): Likewise.
702 (elf_backend_merge_gnu_properties): Likewise.
703 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
704 (elf_backend_parse_gnu_properties): Likewise.
705 (elf_backend_setup_gnu_properties): Likewise.
706 (elfNN_bed): Add elf_backend_parse_gnu_properties,
707 elf_backend_merge_gnu_properties and
708 elf_backend_setup_gnu_properties.
710 2017-03-30 Pip Cet <pipcet@gmail.com>
712 * elf32-wasm32.c: Add relocation code, two relocs.
713 * reloc.c: Add wasm32 relocations.
714 * libbfd.h: Regenerate.
715 * bfd-in2.h: Regenerate.
716 * bfd/po/bfd.pot: Regenerate.
718 2017-03-29 Nick Clifton <nickc@redhat.com>
721 * coff-bfd.h (struct coff_section_data): Add new fields:
723 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
724 computed for PE binaries.
725 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
728 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
731 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
732 to handle a local symbol with a hash-symbol-entry; without PLT.
733 Add BFD_ASSERT for an incidental case with GOT entry present.
734 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
735 isn't forced-or-set local.
737 2017-03-27 Pip Cet <pipcet@gmail.com>
739 * wasm-module.c: New file to support WebAssembly modules.
740 * wasm-module.h: New file to support WebAssembly modules.
741 * doc/webassembly.texi: Start documenting wasm-module.c.
742 * config.bfd: Add wasm_vec.
743 * targets.c: Likewise.
744 * configure.ac: Likewise.
745 * Makefile.am: Add entries for wasm-module.c.
746 * Makefile.in: Regenerate.
747 * configure: Regenerate.
748 * po/SRC-POTFILES.in: Regenerate.
750 2017-03-27 Pip Cet <pipcet@gmail.com>
752 * cpu-wasm32.c: New file to support wasm32 architecture.
753 * elf32-wasm32.c: New file to support wasm32 architecture.
754 * Makefile.am: Add wasm32 architecture.
755 * archures.c: Likewise.
756 * config.bfd: Likewise.
757 * configure.ac: Likewise.
758 * targets.c: Likewise.
759 * Makefile.in: Regenerate.
760 * bfd-in2.h: Regenerate.
761 * configure: Regenerate.
762 * po/SRC-POTFILES.in: Regenerate.
764 2017-03-20 Alan Modra <amodra@gmail.com>
767 * elf64-ppc.c (compare_symbols): Stabilize sort.
769 2017-03-18 Alan Modra <amodra@gmail.com>
771 * elf64-ppc.c (struct ppc_link_hash_table): Add
772 local_ifunc_resolver and maybe_local_ifunc_resolver.
773 (ppc_build_one_stub): Set flags on emitting dynamic
775 (ppc64_elf_relocate_section): Likewise.
776 (ppc64_elf_finish_dynamic_symbol): Likewise.
777 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
778 local dynamic relocs to ifuncs.
779 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
780 local_ifunc_resolver and maybe_local_ifunc_resolver.
781 (ppc_elf_relocate_section): Set flag on emitting dynamic
782 relocation to ifuncs.
783 (ppc_elf_finish_dynamic_symbol): Likewise.
784 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
785 dynamic relocs to ifuncs.
787 2017-03-13 Nick Clifton <nickc@redhat.com>
790 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
791 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
792 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
793 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
794 * bfd-in2.h: Regenerate.
795 * libbfd.h: Regenerate.
796 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
798 (IS_AARCH64_TLSDESC_RELOC): Likewise.
799 (elfNN_aarch64_howto_table): Likewise.
800 (aarch64_tls_transition_without_check): Likewise.
801 (aarch64_reloc_got_type): Likewise.
802 (elfNN_aarch64_final_link_relocate): Likewise.
803 (elfNN_aarch64_tls_relax): Likewise.
804 (elfNN_aarch64_relocate_section): Likewise.
805 (elfNN_aarch64_gc_sweep_hook): Likewise.
806 (elfNN_aarch64_check_relocs): Likewise.
807 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
808 (_bfd_aarch64_elf_resolve_relocation): Likewise.
810 2017-03-11 Alan Modra <amodra@gmail.com>
812 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
813 parameter is in fact used. Whitespace fixes.
814 * elf64-ppc.c: Likewise.
816 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
818 * rs6000-core.c (CORE_NEW): Simplify macro when
819 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
821 2017-03-07 Alan Modra <amodra@gmail.com>
825 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
828 2017-03-05 Alan Modra <amodra@gmail.com>
830 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
831 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
832 (next_cie_fde_offset): New function.
833 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
834 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
835 four bytes. Align CIEs to four or eight bytes depending on
836 per_encoding_aligned8. Align FDEs according to their encoding.
837 Pad last FDE to output section alignment.
838 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
840 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
841 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
842 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
844 2017-03-02 Martin Bickel <binutils@ineranves.de>
847 * elf.c (rewrite_elf_program_header): Do not issue a warning for
848 empty segments which have a zero filesz, but a non-zero memsz.
850 2017-03-02 Alan Modra <amodra@gmail.com>
852 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
854 2017-02-28 Alan Modra <amodra@gmail.com>
856 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
857 (ppc64_elf_relocate_section): Likewise.
859 2017-02-28 Alan Modra <amodra@gmail.com>
862 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
863 rather than elf32_nios2_hash_table or elf_hash_table.
864 (create_got_section): Likewise.
865 (nios2_elf32_finish_dynamic_symbol): Likewise.
866 (nios2_elf32_adjust_dynamic_symbol): Likewise.
867 (nios2_elf32_size_dynamic_sections): Likewise.
868 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
869 vars. Use htab equivalents directly instead. Don't create
870 all dynamic sections on needing just the GOT. Use a goto
871 rather than a fall-through with reloc test. Ensure
872 htab->dynobj is set when making dynamic sreloc section.
873 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
874 equivalent directly instead. Don't segfault on looking for
875 .dynamic when dynamic sections have not been created. Don't
876 segfault on .got.plt being discarded.
877 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
878 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
879 fixme and another not so relevant comment.
880 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
881 already set, set hash table dynobj on creating .sbss.
883 2017-02-28 Alan Modra <amodra@gmail.com>
885 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
886 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
887 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
888 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
889 (ppc64_elf_relocate_section): Likewise.
890 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
891 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
892 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
893 * libbfd.h: Regenerate.
894 * bfd-in2.h: Regenerate.
896 2017-02-28 Alan Modra <amodra@gmail.com>
898 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
899 dynamic .data.rel.ro read-only.
900 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
901 rather than section flags when deciding where copy reloc goes.
902 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
903 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
904 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
905 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
906 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
907 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
908 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
909 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
910 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
911 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
912 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
913 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
914 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
915 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
916 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
917 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
918 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
919 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
920 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
922 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
924 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
925 `jalr $0, $25' instruction encoding.
927 2017-02-27 Nick Clifton <nickc@redhat.com>
930 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
931 generating a seg-fault when encountering a symbol that has been
932 deleted by garbage collection.
934 2017-02-25 Alan Modra <amodra@gmail.com>
936 * elf32-arc.c (struct dynamic_sections): Delete.
937 (enum dyn_section_types): Delete.
938 (dyn_section_names): Delete.
939 (arc_create_dynamic_sections): Delete.
940 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
941 segfault on discarded .rela.plt section.
942 (elf_arc_size_dynamic_sections): Formatting. Don't call
943 arc_create_dynamic_sections. Don't allocate memory for sections
944 handled by the generic linker. Correct code finding relocs in
945 read-only sections. Set SEC_EXCLUDE on zero size .got,
946 .got.plt, and .dynbss sections. Do set .interp for pies.
948 2017-02-24 Andrew Waterman <andrew@sifive.com>
950 * elfnn-riscv.c (GP_NAME): New macro.
951 (riscv_global_pointer_value): Use it.
952 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
953 output section, consider only that section's alignment.
955 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
957 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
958 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
959 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
960 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
962 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
964 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
965 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
968 2017-02-23 Alan Modra <amodra@gmail.com>
971 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
973 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
974 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
977 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
980 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
981 processing ahead of the call to `elf_gc_sweep_symbol'.
983 2017-02-22 Nick Clifton <nickc@redhat.com>
986 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
987 created section 4-byte alignment.
989 2017-02-22 Alan Modra <amodra@gmail.com>
991 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
992 on .got or .plt output section being discarded by script.
993 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
996 2017-02-21 Alan Modra <amodra@gmail.com>
998 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
999 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1001 2017-02-20 Alan Modra <amodra@gmail.com>
1004 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1005 if DT_RELSZ/DT_RELASZ is zero.
1007 2017-02-17 Nick Clifton <nickc@redhat.com>
1009 * compress.c (bfd_get_full_section_contents): Remember to reduce
1010 compressed size by the sizeof the compression header when
1011 decompressing the contents.
1013 2017-02-17 Pedro Alves <palves@redhat.com>
1015 * srec.c (Chunk): Rename to ...
1016 (_bfd_srec_len): ... this.
1017 (S3Forced): Rename to ...
1018 (_bfd_srec_forceS3): ... this.
1019 * objcopy.c: Adjust all references.
1021 2017-02-17 Pedro Alves <palves@redhat.com>
1023 * archive.c (bsd_write_armap): Rename to ...
1024 (_bfd_bsd_write_armap): ... this.
1025 (coff_write_armap): Rename to ...
1026 (_bfd_coff_write_armap): ... this.
1027 * libbfd-in.h (bsd_write_armap): Rename to ...
1028 (_bfd_bsd_write_armap): ... this.
1029 (coff_write_armap): Rename to ...
1030 (_bfd_coff_write_armap): ... this.
1031 * aout-target.h, aout-tic30.c: Adjust all users.
1032 * libbfd.h: Regenerate.
1034 2017-02-17 Pedro Alves <palves@redhat.com>
1036 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1037 (warn_deprecated): Rename to ...
1038 (_bfd_warn_deprecated): ... this.
1039 * libbfd.c (warn_deprecated): Rename to ...
1040 (_bfd_warn_deprecated): ... this.
1041 * bfd-in2.h: Regenerate.
1043 2017-02-17 Pedro Alves <palves@redhat.com>
1045 * bfdio.c (real_ftell): Rename to ...
1046 (_bfd_real_ftell): ... this.
1047 (real_fseek): Rename to ...
1048 (_bfd_real_fseek): ... this.
1049 (real_fopen): Rename to ...
1050 (_bfd_real_fopen): ... this.
1051 * libbfd-in.h (real_ftell): Rename to ...
1052 (_bfd_real_ftell): ... this.
1053 (real_fseek): Rename to ...
1054 (_bfd_real_fseek): ... this.
1055 (real_fopen): Rename to ...
1056 (_bfd_real_fopen): ... this.
1057 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1058 * libbfd.h: Regenerate.
1060 2017-02-17 Pedro Alves <palves@redhat.com>
1062 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1063 * libbfd.c (read_unsigned_leb128): Rename to ...
1064 (_bfd_read_unsigned_leb128): ... this.
1065 (read_signed_leb128): Rename to ...
1066 (_bfd_read_signed_leb128): ... this.
1067 (safe_read_leb128): Rename to ...
1068 (_bfd_safe_read_leb128): ... this.
1069 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1070 (_bfd_read_unsigned_leb128): ... this.
1071 (read_signed_leb128): Rename to ...
1072 (_bfd_read_signed_leb128): ... this.
1073 (safe_read_leb128): Rename to ...
1074 (_bfd_safe_read_leb128): ... this.
1075 * libbfd.h: Renegerate.
1077 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1079 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1080 before trying to fine matching file and line information.
1082 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1084 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1085 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1086 not match current bfd, then reload debug information. Record bfd
1087 we're loading debug info for in the stash. If we have debug
1088 informatin in the cache then perform section placement before
1091 2017-02-16 Alan Modra <amodra@gmail.com>
1094 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1095 * elfxx-target.h (elf_backend_no_page_alias): Define.
1096 (elfNN_bed): Init new field.
1097 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1098 ensure PT_LOAD segment starts on a new page.
1099 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1101 2017-02-16 Alan Modra <amodra@gmail.com>
1104 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1107 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1109 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1110 * bfd-in2.h: Regenerated.
1112 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1115 * elf32-i386.c (elf_i386_relocate_section): Allow
1116 "lea foo@GOT, %reg" in PIC.
1118 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1121 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1122 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1123 error against local IFUNC symbol without a base register for
1126 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1128 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1129 `%P: %H:' with `info->callbacks->einfo'.
1130 (ppc_elf_relocate_section): Likewise.
1131 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1132 (ppc64_elf_edit_toc): Likewise.
1133 (ppc64_elf_relocate_section): Likewise.
1135 2017-02-14 Alan Modra <amodra@gmail.com>
1137 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1138 --gc-keep-exported, and test versioned field of sym rather than
1139 looking for @ in name.
1141 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1143 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1146 2017-02-13 Nick Clifton <nickc@redhat.com>
1149 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1152 2017-02-07 Andrew Waterman <andrew@sifive.com>
1154 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1155 entry size if PLT header is written.
1157 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1159 Fix sparc64 dynamic relocation processing to use the dynamic
1161 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1162 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1165 2017-02-03 Nick Clifton <nickc@redhat.com>
1168 * coffcode.h (coff_write_object_contents): Enlarge size of
1169 s_name_buf in order to avoid compile time warning about possible
1171 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1172 32-bits of insn value before printing into buffer.
1174 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1176 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1177 `max_local_dynindx'.
1178 (mips_elf_sort_hash_table): Handle it.
1179 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1180 symbols bump up `max_local_dynindx' rather than
1181 `max_non_got_dynindx'.
1183 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1185 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1186 `min_got_dynindx', `max_unref_got_dynindx' and
1187 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1188 (mips_elf_sort_hash_table): Adjust accordingly.
1190 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1192 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1193 to access the hash table.
1195 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1197 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1198 non-NULL `htab' to the beginning.
1200 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1202 * elflink.c (elf_gc_sweep): Wrap overlong line.
1204 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1206 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1207 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1208 * elfxx-mips.c (mips_elf_link_hash_table): Add
1209 `ignore_branch_isa' member.
1210 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1211 in branch relocation calculation as an error if
1212 `ignore_branch_isa' has been set.
1213 (_bfd_mips_elf_insn32): Rename to...
1214 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1215 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1216 Handle the new parameter.
1218 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1220 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1221 local variable dynobj.
1224 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1225 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1226 executable from read-only sections into sdynrelro.
1227 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1228 dynamic relocs in sdynrelro.
1229 (elf_backend_want_dynrelro): Define.
1231 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1233 * config.bfd (*-*-rtemsaout*): Mark as removed.
1235 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1237 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1238 (arm-*-rtems*): Move to (arm*-*-eabi*).
1239 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1240 (m68-*-rtems*): Move to (m68*-*-elf*).
1242 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1244 * config.bfd (*-*-rtemscoff*): Mark as removed.
1246 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1249 * elflink.c (bfd_elf_record_link_assignment): Revert last
1250 change and don't ever clear `forced_local'. Set `mark'
1252 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1254 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1255 (bfd_elf_size_dynamic_sections): ... here.
1256 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1257 and set `mark' instead in `__tls_get_addr_opt' processing.
1258 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1260 2017-01-24 Alan Modra <amodra@gmail.com>
1262 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1263 where dynamic relocs are preferable. Allow ifunc too.
1264 (ensure_undefweak_dynamic): New function.
1265 (allocate_dynrelocs): Use it here. Move plt handling last and
1266 don't make symbols dynamic, simplifying loop. Only make undef
1267 weak symbols with GOT entries dynamic. Correct condition
1268 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1269 comments. Remove goto.
1270 (ppc_elf_relocate_section): Correct test for using dynamic
1271 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1272 to suit. Set up explicit tls_index entries and implicit GOT
1273 tls_index entries resolvable at link time for
1274 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1275 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1276 (ensure_undefweak_dynamic): New function.
1277 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1278 with GOT entries dynamic. Remove unnecessary test of
1279 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1280 (ppc64_elf_relocate_section): Correct test for using dynamic
1281 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1282 to suit. Set up explicit tls_index entries and implicit GOT
1283 tls_index entries resolvable at link time for __tls_get_addr_opt.
1284 Simplify expression to clear mem for prelink.
1286 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1288 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1290 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1292 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1293 (elf_backend_hash_symbol): Define.
1295 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1298 * elflink.c (bfd_elf_record_link_assignment): Clear any
1299 `forced_local' marking for DSO symbols that are not being
1302 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1304 * elfnn-riscv.c (riscv_elf_object_p): New function.
1306 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1309 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1311 (elf_x86_64_check_relocs): Create .eh_frame section for the
1313 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1314 .eh_frame section for the .plt.bnd section.
1315 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1316 for the .plt.bnd section.
1318 2017-01-12 Nick Clifton <nickc@redhat.com>
1321 * opncls.c (find_separate_debug_file): Add include_dirs
1322 parameter. Only include the directory part of the bfd's filename
1323 in search paths if include_dirs is true. Add a couple of extra
1324 locations for looking for debug files.
1325 ( bfd_follow_gnu_debuglink): Update invocation of
1326 find_separate_debug_file.
1327 (bfd_follow_gnu_debugaltlink): Likewise.
1328 (get_build_id): New function: Finds the build-id of the given bfd.
1329 (get_build_id_name): New function: Computes the name of the
1330 separate debug info file for a bfd, based upon its build-id.
1331 (check_build_id_file): New function: Checks to see if a separate
1332 debug info file exists at the given location, and that its
1333 build-id matches that of the original bfd.
1334 (bfd_follow_build_id_debuglink): New function: Finds a separate
1335 debug info file for a given bfd by using the build-id method.
1336 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1337 method of locating a separate debug info file before using the
1339 * bfd-in2.h: Regenerate.
1341 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1344 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1345 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1346 elf_x86_64_eh_frame_plt_got.
1347 (elf_x86_64_size_dynamic_sections): Get unwind info from
1348 elf_x86_64_bnd_arch_bed for the BND PLT.
1350 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1352 * config.bfd: Add entries for i686-redox and x86_64-redox.
1354 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1356 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1358 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1359 .eh_frame section to 4 bytes for x32.
1360 (elf_x86_64_check_relocs): Likewise.
1362 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1365 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1366 (PLT_GOT_FDE_LENGTH): Likewise.
1367 (elf_i386_plt_layout): Add eh_frame_plt_got and
1368 eh_frame_plt_got_size.
1369 (elf_i386_plt): Updated.
1370 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1371 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1372 (elf_i386_size_dynamic_sections): Allocate and initialize
1373 .eh_frame section for .plt.got.
1374 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1376 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1377 eh_frame_plt_got_size.
1378 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1379 (PLT_GOT_FDE_LENGTH): Likewise.
1380 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1381 eh_frame_plt_got_size.
1382 (elf_x86_64_arch_bed): Updated.
1383 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1384 eh_frame_plt_got_size.
1385 (elf_x86_64_nacl_arch_bed): Likewise.
1386 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1387 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1388 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1389 .eh_frame section for .plt.got.
1390 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1393 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1395 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1396 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1398 2017-01-09 Nick Clifton <nickc@redhat.com>
1400 * dwarf2.c (lookup_address_in_function_table): Return early if
1401 there are no functions in the given comp unit, or if the high
1402 address of the last function in the comp unit is less than the
1405 2017-01-09 Nick Clifton <nickc@redhat.com>
1408 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1409 message if there are too many symbols to load.
1411 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1413 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1414 if relocs are cached.
1416 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1419 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1420 for R_MICROBLAZE_GOTOFF_64.
1422 2017-01-03 Nick Clifton <nickc@redhat.com>
1424 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1425 warning about using a possibly uninitialised variable.
1427 2017-01-02 Alan Modra <amodra@gmail.com>
1429 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1430 (allocate_plt_static, allocate_dynrelocs): Use it.
1432 2017-01-02 Alan Modra <amodra@gmail.com>
1434 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1435 .PARISC.unwind section.
1437 2017-01-02 Alan Modra <amodra@gmail.com>
1440 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1441 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1442 indirect to GOT pointer relative code edit.
1444 2017-01-02 Alan Modra <amodra@gmail.com>
1446 Update year range in copyright notice of all files.
1448 For older changes see ChangeLog-2016
1450 Copyright (C) 2017 Free Software Foundation, Inc.
1452 Copying and distribution of this file, with or without modification,
1453 are permitted in any medium without royalty provided the copyright
1454 notice and this notice are preserved.
1460 version-control: never