1 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
5 (elf_i386_check_relocs): Don't create the .plt.got section.
6 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
7 the .plt.got and .plt.bnd sections here.
8 (elf_x86_64_check_relocs): Don't create the .plt.got nor
11 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
13 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
15 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
16 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
17 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
18 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
21 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
23 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
25 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
26 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
27 the first relocatable ELF input with GNU properties.
29 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
31 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
34 2017-04-27 Alan Modra <amodra@gmail.com>
36 * elf-bfd.h (struct elf_backend_data): Make asection param of
37 elf_backend_eh_frame_address_size const.
38 (_bfd_elf_eh_frame_address_size): Likewise.
39 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
40 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
41 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
42 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
43 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
44 (next_cie_fde_offset): Constify params.
45 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
47 2017-04-27 Alan Modra <amodra@gmail.com>
49 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
50 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
51 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
53 (offset_adjust): New function.
54 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
55 (adjust_eh_frame_local_symbols): Likewise.
56 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
57 after changing anything. Return true if anything changed.
58 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
59 _bfd_elf_adjust_eh_frame_global_symbol for globals.
61 2017-04-27 Alan Modra <amodra@gmail.com>
63 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
66 2017-04-27 Alan Modra <amodra@gmail.com>
68 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
69 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
70 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
71 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
72 for undef and undefweak dyn_relocs.
73 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
74 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
75 (allocate_got, allocate_dynrelocs): Likewise.
76 (ppc64_elf_relocate_section): Likewise.
78 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
80 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
81 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
82 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
83 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
85 2017-04-26 Nick Clifton <nickc@redhat.com>
88 * reloc.c (bfd_perform_relocation): Check for a negative address
91 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
94 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
96 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
97 (elf_backend_always_renumber_dynsyms): Define.
98 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
99 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
100 * elflink.c (bfd_elf_size_dynamic_sections): Also call
101 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
103 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
105 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
107 * elflink.c (bfd_elf_size_dynamic_sections): Only call
108 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
109 sections have been created.
111 2017-04-26 Nick Clifton <nickc@redhat.com>
114 * compress.c (bfd_init_section_compress_status): Check the return
115 value from bfd_malloc.
117 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
119 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
120 no_finish_dynamic_symbol.
121 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
123 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
124 weak symbol, don't make it dynamic.
125 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
126 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
127 relocation for GOT reference.
128 (elf_x86_64_finish_dynamic_symbol): Abort if
129 no_finish_dynamic_symbol isn't 0.
131 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
134 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
135 undefined weak symbol, don't make it dynamic.
136 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
137 set no_finish_dynamic_symbol and generate R_386_RELATIVE
138 relocation for R_386_GOT32.
140 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
143 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
145 2017-04-23 Alan Modra <amodra@gmail.com>
148 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
149 * elf.c (lcomm_sym): New.
150 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
151 * bfd-in2.h: Regenerate.
153 2017-04-23 Alan Modra <amodra@gmail.com>
156 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
157 parameters and comment.
158 (_bfd_elf_get_reloc_section): Delete.
159 (_bfd_elf_plt_get_reloc_section): Declare.
160 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
161 New functions. Don't blindly skip over assumed .rel/.rela prefix.
163 (_bfd_elf_get_reloc_section): ..here. Delete.
164 (assign_section_numbers): Call elf_get_reloc_section.
165 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
166 * elfxx-target.h (elf_backend_get_reloc_section): Update.
168 2017-04-23 Alan Modra <amodra@gmail.com>
171 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
174 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
177 * elf32-i386.c (elf_i386_link_hash_entry): Add
178 no_finish_dynamic_symbol.
179 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
180 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
181 symbol, don't make it dynamic in PIE.
182 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
183 set no_finish_dynamic_symbol and generate R_386_RELATIVE
184 relocation for R_386_GOT32
185 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
188 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
192 * elflink.c (elf_link_add_object_symbols): Require
193 --no-dynamic-linker with -E/--dynamic-list when creating
196 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
198 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
201 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
203 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
204 dynamic symbol sorting.
206 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
209 * elflink.c (elf_link_add_object_symbols): Preserve
210 dynamic_ref_after_ir_def when restoring the symbol table for
211 unneeded dynamic object.
213 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
216 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
217 on on undefined IFUNC symbol in the second PLT.
219 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
221 * peXXigen.c (pe_print_reloc): Correct chunk_end.
223 2017-04-19 Alan Modra <amodra@gmail.com>
225 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
226 or make dynamic for info->dynamic_undefined_weak 0 and 1.
227 * elf32-ppc.c:Formatting.
228 (ensure_undefweak_dynamic): Don't make dynamic when
229 info->dynamic_undefined_weak is zero.
230 (allocate_dynrelocs): Discard undefweak dyn_relocs for
231 info->dynamic_undefined_weak. Discard undef dyn_relocs when
232 not default visibility. Discard undef and undefweak
234 (ppc_elf_relocate_section): Adjust to suit.
235 * elf64-ppc.c: Formatting.
236 (ensure_undefweak_dynamic): Don't make dynamic when
237 info->dynamic_undefined_weak is zero.
238 (allocate_dynrelocs): Discard undefweak dyn_relocs for
239 info->dynamic_undefined_weak. Discard them earlier.
241 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
244 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
245 before generating the version definition section.
247 2017-04-17 Alan Modra <amodra@gmail.com>
249 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
250 state when a regular object file defines a symbol with
251 incompatible type to that defined by an earlier shared lib.
253 2017-04-13 Alan Modra <amodra@gmail.com>
255 * coffcode.h: Wrap some overly long _bfd_error_handler args.
257 * elf32-arm.c: Likewise.
258 * elf32-i386.c: Likewise.
259 * elf32-mep.c: Likewise.
260 * elf64-ia64-vms.c: Likewise.
261 * elf64-x86-64.c: Likewise.
262 * elflink.c: Likewise.
263 * elfnn-ia64.c: Likewise.
264 * elfxx-mips.c: Likewise.
266 2017-04-13 Alan Modra <amodra@gmail.com>
268 * aoutx.h: Use %B and %A in error messages throughout file.
269 * aout-cris.c: Likewise.
270 * archive.c: Likewise.
271 * binary.c: Likewise.
272 * coff-rs6000.c: Likewise.
273 * coff-tic4x.c: Likewise.
274 * coffcode.h: Likewise.
275 * coffgen.c: Likewise.
276 * cofflink.c: Likewise.
277 * coffswap.h: Likewise.
278 * cpu-arm.c: Likewise.
279 * elf-eh-frame.c: Likewise.
280 * elf-m10300.c: Likewise.
282 * elf32-arc.c: Likewise.
283 * elf32-arm.c: Likewise.
284 * elf32-bfin.c: Likewise.
285 * elf32-frv.c: Likewise.
286 * elf32-iq2000.c: Likewise.
287 * elf32-m32c.c: Likewise.
288 * elf32-microblaze.c: Likewise.
289 * elf32-nds32.c: Likewise.
290 * elf32-rl78.c: Likewise.
291 * elf32-rx.c: Likewise.
292 * elf32-score.c: Likewise.
293 * elf32-score7.c: Likewise.
294 * elf32-sh64.c: Likewise.
295 * elf32-v850.c: Likewise.
296 * elf32-vax.c: Likewise.
297 * elf32-visium.c: Likewise.
298 * elf64-ia64-vms.c: Likewise.
299 * elf64-mmix.c: Likewise.
300 * elf64-sh64.c: Likewise.
301 * elfcode.h: Likewise.
302 * elfnn-aarch64.c: Likewise.
303 * elfnn-ia64.c: Likewise.
304 * elfxx-mips.c: Likewise.
305 * hpux-core.c: Likewise.
308 * linker.c: Likewise.
313 * peXXigen.c: Likewise.
314 * rs6000-core.c: Likewise.
315 * vms-alpha.c: Likewise.
316 * xcofflink.c: Likewise.
318 2017-04-13 Alan Modra <amodra@gmail.com>
320 * bfd.c (PRINT_TYPE): Define.
321 (_doprnt): New function.
322 (error_handler_internal): Use _doprnt.
323 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
324 calls in their natural order, throughout file.
325 * coff-mcore.c: Likewise.
326 * coff-ppc.c: Likewise.
327 * coff-tic80.c: Likewise.
328 * cofflink.c: Likewise.
329 * elf-s390-common.c: Likewise.
331 * elf32-arm.c: Likewise.
332 * elf32-i386.c: Likewise.
333 * elf32-m32r.c: Likewise.
334 * elf32-msp430.c: Likewise.
335 * elf32-spu.c: Likewise.
336 * elf64-ia64-vms.c: Likewise.
337 * elf64-sparc.c: Likewise.
338 * elf64-x86-64.c: Likewise.
339 * elflink.c: Likewise.
340 * elfnn-aarch64.c: Likewise.
341 * elfnn-ia64.c: Likewise.
342 * elfxx-mips.c: Likewise.
344 2017-04-13 Alan Modra <amodra@gmail.com>
346 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
347 branch veneers" error. Fix double space and format message.
348 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
349 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
351 2017-04-13 Alan Modra <amodra@gmail.com>
353 * bfd-in2.h: Regenerate.
355 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
357 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
358 extra `\n' in warning/error messages.
359 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
360 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
362 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
364 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
365 processor-specific properties with generic ELF target vector.
367 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
369 * elf32-sparc.c (elf_backend_fixup_symbol): New.
370 * elf64-sparc.c (elf_backend_fixup_symbol): New.
371 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
372 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
374 (link_hash_newfunc): Initialize has_got_reloc and
376 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
378 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
380 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
382 (_bfd_sparc_elf_fixup_symbol): New function.
383 (allocate_dynrelocs): Don't allocate space for dynamic
384 relocations and discard relocations against resolved undefined
385 weak symbols in executable. Don't make resolved undefined weak
386 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
387 relocation against undefined weak symbols in PIE.
388 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
389 relocations against resolved undefined weak symbols in PIE
390 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
391 without ynamic PLT/GOT relocations for resolved undefined weak
393 Don't generate dynamic relocation against resolved undefined
394 weak symbol in executable.
395 (pie_finish_undefweak_symbol): New function.
396 (_bfd_sparc_elf_finish_dynamic_sections): Call
397 pie_finish_undefweak_symbol on all symbols in PIE.
398 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
399 (_bfd_sparc_elf_fixup_symbol): New function.
401 2017-04-10 Nick Clifton <nickc@redhat.com>
403 * config.bfd: Remove ns32k from obsolete list.
405 2017-04-10 Alan Modra <amodra@gmail.com>
408 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
409 (special_sections_i): Likewise for .init_array.
410 (special_sections_p): Likewise for .preinit_array.
412 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
416 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
417 ELF_COMMON_DEF_P for common symbols.
418 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
419 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
420 * elflink.c (_bfd_elf_merge_symbol): Revert commits
421 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
422 07492f668d2173da7a2bda3707ff0985e0f460b6.
424 2017-04-07 Pedro Alves <palves@redhat.com>
426 * opncls.c (bfd_get_debug_link_info): Rename to...
427 (bfd_get_debug_link_info_1): ... this. Change type of second
428 parameter to void pointer. Adjust.
429 (bfd_get_debug_link_info): Reimplement on top of
430 bfd_get_debug_link_info_1.
431 (separate_debug_file_exists, separate_alt_debug_file_exists):
432 Change type of second parameter to void pointer. Adjust.
433 (get_func_type, check_func_type): Change type of second parameter
435 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
436 the callback functions instead of passing the address of a local.
437 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
438 find_separate_debug_file.
439 (get_alt_debug_link_info_shim): Change type of second parameter to
440 void pointer. Adjust.
441 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
442 find_separate_debug_file.
443 (get_build_id_name, bfd_boolean check_build_id_file): Change type
444 of second parameter to void pointer. Adjust.
445 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
446 pointer local to find_separate_debug_file.
448 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
450 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
451 external symbols with a definition.
452 (_bfd_coff_gc_mark_extra_sections): Fix typo.
454 2017-04-07 Alan Modra <amodra@gmail.com>
456 * po/SRC-POTFILES.in: Regenerate.
458 2017-04-05 Alan Modra <amodra@gmail.com>
460 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
463 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
465 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
466 numbers for DataDirectory entry indicies passed to
469 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
471 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
472 each GNU_MBIND section and align GNU_MBIND section to page size.
473 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
474 segment for each GNU_MBIND section.
475 (_bfd_elf_init_private_section_data): Copy sh_info from input
476 for GNU_MBIND section.
478 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
480 * elfnn-riscv.c (GP_NAME): Delete.
481 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
482 (_bfd_riscv_relax_lui): Likewise.
484 2017-04-04 Nick Clifton <nickc@redhat.com>
487 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
489 (bfd_elf_final_link): Only initialize the extended symbol index
490 section if there are extended symbol tables to list.
492 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
494 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
495 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
496 * configure.ac (elf): Add elf-properties.lo.
497 * Makefile.in: Regenerated.
498 * configure: Likewise.
499 * elf-bfd.h (elf_property_kind): New.
500 (elf_property): Likewise.
501 (elf_property_list): Likewise.
502 (elf_properties): Likewise.
503 (_bfd_elf_parse_gnu_properties): Likewise.
504 (_bfd_elf_get_property): Likewise.
505 (_bfd_elf_link_setup_gnu_properties): Likewise.
506 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
507 and setup_gnu_properties.
508 (elf_obj_tdata): Add properties.
509 * elf-properties.c: New file.
510 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
511 (elf_i386_merge_gnu_properties): Likewise.
512 (elf_backend_parse_gnu_properties): Likewise.
513 (elf_backend_merge_gnu_properties): Likewise.
514 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
515 (elf_x86_64_merge_gnu_properties): Likewise.
516 (elf_backend_parse_gnu_properties): Likewise.
517 (elf_backend_merge_gnu_properties): Likewise.
518 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
519 (elf_backend_parse_gnu_properties): Likewise.
520 (elf_backend_setup_gnu_properties): Likewise.
521 (elfNN_bed): Add elf_backend_parse_gnu_properties,
522 elf_backend_merge_gnu_properties and
523 elf_backend_setup_gnu_properties.
525 2017-03-30 Pip Cet <pipcet@gmail.com>
527 * elf32-wasm32.c: Add relocation code, two relocs.
528 * reloc.c: Add wasm32 relocations.
529 * libbfd.h: Regenerate.
530 * bfd-in2.h: Regenerate.
531 * bfd/po/bfd.pot: Regenerate.
533 2017-03-29 Nick Clifton <nickc@redhat.com>
536 * coff-bfd.h (struct coff_section_data): Add new fields:
538 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
539 computed for PE binaries.
540 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
543 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
546 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
547 to handle a local symbol with a hash-symbol-entry; without PLT.
548 Add BFD_ASSERT for an incidental case with GOT entry present.
549 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
550 isn't forced-or-set local.
552 2017-03-27 Pip Cet <pipcet@gmail.com>
554 * wasm-module.c: New file to support WebAssembly modules.
555 * wasm-module.h: New file to support WebAssembly modules.
556 * doc/webassembly.texi: Start documenting wasm-module.c.
557 * config.bfd: Add wasm_vec.
558 * targets.c: Likewise.
559 * configure.ac: Likewise.
560 * Makefile.am: Add entries for wasm-module.c.
561 * Makefile.in: Regenerate.
562 * configure: Regenerate.
563 * po/SRC-POTFILES.in: Regenerate.
565 2017-03-27 Pip Cet <pipcet@gmail.com>
567 * cpu-wasm32.c: New file to support wasm32 architecture.
568 * elf32-wasm32.c: New file to support wasm32 architecture.
569 * Makefile.am: Add wasm32 architecture.
570 * archures.c: Likewise.
571 * config.bfd: Likewise.
572 * configure.ac: Likewise.
573 * targets.c: Likewise.
574 * Makefile.in: Regenerate.
575 * bfd-in2.h: Regenerate.
576 * configure: Regenerate.
577 * po/SRC-POTFILES.in: Regenerate.
579 2017-03-20 Alan Modra <amodra@gmail.com>
582 * elf64-ppc.c (compare_symbols): Stabilize sort.
584 2017-03-18 Alan Modra <amodra@gmail.com>
586 * elf64-ppc.c (struct ppc_link_hash_table): Add
587 local_ifunc_resolver and maybe_local_ifunc_resolver.
588 (ppc_build_one_stub): Set flags on emitting dynamic
590 (ppc64_elf_relocate_section): Likewise.
591 (ppc64_elf_finish_dynamic_symbol): Likewise.
592 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
593 local dynamic relocs to ifuncs.
594 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
595 local_ifunc_resolver and maybe_local_ifunc_resolver.
596 (ppc_elf_relocate_section): Set flag on emitting dynamic
597 relocation to ifuncs.
598 (ppc_elf_finish_dynamic_symbol): Likewise.
599 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
600 dynamic relocs to ifuncs.
602 2017-03-13 Nick Clifton <nickc@redhat.com>
605 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
606 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
607 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
608 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
609 * bfd-in2.h: Regenerate.
610 * libbfd.h: Regenerate.
611 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
613 (IS_AARCH64_TLSDESC_RELOC): Likewise.
614 (elfNN_aarch64_howto_table): Likewise.
615 (aarch64_tls_transition_without_check): Likewise.
616 (aarch64_reloc_got_type): Likewise.
617 (elfNN_aarch64_final_link_relocate): Likewise.
618 (elfNN_aarch64_tls_relax): Likewise.
619 (elfNN_aarch64_relocate_section): Likewise.
620 (elfNN_aarch64_gc_sweep_hook): Likewise.
621 (elfNN_aarch64_check_relocs): Likewise.
622 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
623 (_bfd_aarch64_elf_resolve_relocation): Likewise.
625 2017-03-11 Alan Modra <amodra@gmail.com>
627 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
628 parameter is in fact used. Whitespace fixes.
629 * elf64-ppc.c: Likewise.
631 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
633 * rs6000-core.c (CORE_NEW): Simplify macro when
634 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
636 2017-03-07 Alan Modra <amodra@gmail.com>
640 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
643 2017-03-05 Alan Modra <amodra@gmail.com>
645 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
646 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
647 (next_cie_fde_offset): New function.
648 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
649 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
650 four bytes. Align CIEs to four or eight bytes depending on
651 per_encoding_aligned8. Align FDEs according to their encoding.
652 Pad last FDE to output section alignment.
653 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
655 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
656 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
657 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
659 2017-03-02 Martin Bickel <binutils@ineranves.de>
662 * elf.c (rewrite_elf_program_header): Do not issue a warning for
663 empty segments which have a zero filesz, but a non-zero memsz.
665 2017-03-02 Alan Modra <amodra@gmail.com>
667 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
669 2017-02-28 Alan Modra <amodra@gmail.com>
671 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
672 (ppc64_elf_relocate_section): Likewise.
674 2017-02-28 Alan Modra <amodra@gmail.com>
677 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
678 rather than elf32_nios2_hash_table or elf_hash_table.
679 (create_got_section): Likewise.
680 (nios2_elf32_finish_dynamic_symbol): Likewise.
681 (nios2_elf32_adjust_dynamic_symbol): Likewise.
682 (nios2_elf32_size_dynamic_sections): Likewise.
683 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
684 vars. Use htab equivalents directly instead. Don't create
685 all dynamic sections on needing just the GOT. Use a goto
686 rather than a fall-through with reloc test. Ensure
687 htab->dynobj is set when making dynamic sreloc section.
688 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
689 equivalent directly instead. Don't segfault on looking for
690 .dynamic when dynamic sections have not been created. Don't
691 segfault on .got.plt being discarded.
692 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
693 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
694 fixme and another not so relevant comment.
695 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
696 already set, set hash table dynobj on creating .sbss.
698 2017-02-28 Alan Modra <amodra@gmail.com>
700 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
701 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
702 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
703 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
704 (ppc64_elf_relocate_section): Likewise.
705 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
706 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
707 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
708 * libbfd.h: Regenerate.
709 * bfd-in2.h: Regenerate.
711 2017-02-28 Alan Modra <amodra@gmail.com>
713 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
714 dynamic .data.rel.ro read-only.
715 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
716 rather than section flags when deciding where copy reloc goes.
717 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
718 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
719 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
720 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
721 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
722 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
723 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
724 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
725 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
726 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
727 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
728 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
729 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
730 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
731 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
732 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
733 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
734 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
735 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
737 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
739 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
740 `jalr $0, $25' instruction encoding.
742 2017-02-27 Nick Clifton <nickc@redhat.com>
745 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
746 generating a seg-fault when encountering a symbol that has been
747 deleted by garbage collection.
749 2017-02-25 Alan Modra <amodra@gmail.com>
751 * elf32-arc.c (struct dynamic_sections): Delete.
752 (enum dyn_section_types): Delete.
753 (dyn_section_names): Delete.
754 (arc_create_dynamic_sections): Delete.
755 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
756 segfault on discarded .rela.plt section.
757 (elf_arc_size_dynamic_sections): Formatting. Don't call
758 arc_create_dynamic_sections. Don't allocate memory for sections
759 handled by the generic linker. Correct code finding relocs in
760 read-only sections. Set SEC_EXCLUDE on zero size .got,
761 .got.plt, and .dynbss sections. Do set .interp for pies.
763 2017-02-24 Andrew Waterman <andrew@sifive.com>
765 * elfnn-riscv.c (GP_NAME): New macro.
766 (riscv_global_pointer_value): Use it.
767 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
768 output section, consider only that section's alignment.
770 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
772 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
773 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
774 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
775 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
777 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
779 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
780 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
783 2017-02-23 Alan Modra <amodra@gmail.com>
786 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
788 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
789 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
792 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
795 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
796 processing ahead of the call to `elf_gc_sweep_symbol'.
798 2017-02-22 Nick Clifton <nickc@redhat.com>
801 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
802 created section 4-byte alignment.
804 2017-02-22 Alan Modra <amodra@gmail.com>
806 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
807 on .got or .plt output section being discarded by script.
808 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
811 2017-02-21 Alan Modra <amodra@gmail.com>
813 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
814 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
816 2017-02-20 Alan Modra <amodra@gmail.com>
819 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
820 if DT_RELSZ/DT_RELASZ is zero.
822 2017-02-17 Nick Clifton <nickc@redhat.com>
824 * compress.c (bfd_get_full_section_contents): Remember to reduce
825 compressed size by the sizeof the compression header when
826 decompressing the contents.
828 2017-02-17 Pedro Alves <palves@redhat.com>
830 * srec.c (Chunk): Rename to ...
831 (_bfd_srec_len): ... this.
832 (S3Forced): Rename to ...
833 (_bfd_srec_forceS3): ... this.
834 * objcopy.c: Adjust all references.
836 2017-02-17 Pedro Alves <palves@redhat.com>
838 * archive.c (bsd_write_armap): Rename to ...
839 (_bfd_bsd_write_armap): ... this.
840 (coff_write_armap): Rename to ...
841 (_bfd_coff_write_armap): ... this.
842 * libbfd-in.h (bsd_write_armap): Rename to ...
843 (_bfd_bsd_write_armap): ... this.
844 (coff_write_armap): Rename to ...
845 (_bfd_coff_write_armap): ... this.
846 * aout-target.h, aout-tic30.c: Adjust all users.
847 * libbfd.h: Regenerate.
849 2017-02-17 Pedro Alves <palves@redhat.com>
851 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
852 (warn_deprecated): Rename to ...
853 (_bfd_warn_deprecated): ... this.
854 * libbfd.c (warn_deprecated): Rename to ...
855 (_bfd_warn_deprecated): ... this.
856 * bfd-in2.h: Regenerate.
858 2017-02-17 Pedro Alves <palves@redhat.com>
860 * bfdio.c (real_ftell): Rename to ...
861 (_bfd_real_ftell): ... this.
862 (real_fseek): Rename to ...
863 (_bfd_real_fseek): ... this.
864 (real_fopen): Rename to ...
865 (_bfd_real_fopen): ... this.
866 * libbfd-in.h (real_ftell): Rename to ...
867 (_bfd_real_ftell): ... this.
868 (real_fseek): Rename to ...
869 (_bfd_real_fseek): ... this.
870 (real_fopen): Rename to ...
871 (_bfd_real_fopen): ... this.
872 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
873 * libbfd.h: Regenerate.
875 2017-02-17 Pedro Alves <palves@redhat.com>
877 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
878 * libbfd.c (read_unsigned_leb128): Rename to ...
879 (_bfd_read_unsigned_leb128): ... this.
880 (read_signed_leb128): Rename to ...
881 (_bfd_read_signed_leb128): ... this.
882 (safe_read_leb128): Rename to ...
883 (_bfd_safe_read_leb128): ... this.
884 * libbfd-in.h (read_unsigned_leb128): Rename to ...
885 (_bfd_read_unsigned_leb128): ... this.
886 (read_signed_leb128): Rename to ...
887 (_bfd_read_signed_leb128): ... this.
888 (safe_read_leb128): Rename to ...
889 (_bfd_safe_read_leb128): ... this.
890 * libbfd.h: Renegerate.
892 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
894 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
895 before trying to fine matching file and line information.
897 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
899 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
900 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
901 not match current bfd, then reload debug information. Record bfd
902 we're loading debug info for in the stash. If we have debug
903 informatin in the cache then perform section placement before
906 2017-02-16 Alan Modra <amodra@gmail.com>
909 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
910 * elfxx-target.h (elf_backend_no_page_alias): Define.
911 (elfNN_bed): Init new field.
912 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
913 ensure PT_LOAD segment starts on a new page.
914 * elf32-hppa.c (elf_backend_no_page_alias): Define.
916 2017-02-16 Alan Modra <amodra@gmail.com>
919 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
922 2017-02-16 Jiong Wang <jiong.wang@arm.com>
924 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
925 * bfd-in2.h: Regenerated.
927 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
930 * elf32-i386.c (elf_i386_relocate_section): Allow
931 "lea foo@GOT, %reg" in PIC.
933 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
936 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
937 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
938 error against local IFUNC symbol without a base register for
941 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
943 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
944 `%P: %H:' with `info->callbacks->einfo'.
945 (ppc_elf_relocate_section): Likewise.
946 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
947 (ppc64_elf_edit_toc): Likewise.
948 (ppc64_elf_relocate_section): Likewise.
950 2017-02-14 Alan Modra <amodra@gmail.com>
952 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
953 --gc-keep-exported, and test versioned field of sym rather than
954 looking for @ in name.
956 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
958 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
961 2017-02-13 Nick Clifton <nickc@redhat.com>
964 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
967 2017-02-07 Andrew Waterman <andrew@sifive.com>
969 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
970 entry size if PLT header is written.
972 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
974 Fix sparc64 dynamic relocation processing to use the dynamic
976 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
977 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
980 2017-02-03 Nick Clifton <nickc@redhat.com>
983 * coffcode.h (coff_write_object_contents): Enlarge size of
984 s_name_buf in order to avoid compile time warning about possible
986 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
987 32-bits of insn value before printing into buffer.
989 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
991 * elfxx-mips.c (mips_elf_hash_sort_data): Add
993 (mips_elf_sort_hash_table): Handle it.
994 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
995 symbols bump up `max_local_dynindx' rather than
996 `max_non_got_dynindx'.
998 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1000 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1001 `min_got_dynindx', `max_unref_got_dynindx' and
1002 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1003 (mips_elf_sort_hash_table): Adjust accordingly.
1005 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1007 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1008 to access the hash table.
1010 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1012 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1013 non-NULL `htab' to the beginning.
1015 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1017 * elflink.c (elf_gc_sweep): Wrap overlong line.
1019 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1021 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1022 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1023 * elfxx-mips.c (mips_elf_link_hash_table): Add
1024 `ignore_branch_isa' member.
1025 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1026 in branch relocation calculation as an error if
1027 `ignore_branch_isa' has been set.
1028 (_bfd_mips_elf_insn32): Rename to...
1029 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1030 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1031 Handle the new parameter.
1033 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1035 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1036 local variable dynobj.
1039 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1040 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1041 executable from read-only sections into sdynrelro.
1042 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1043 dynamic relocs in sdynrelro.
1044 (elf_backend_want_dynrelro): Define.
1046 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1048 * config.bfd (*-*-rtemsaout*): Mark as removed.
1050 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1052 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1053 (arm-*-rtems*): Move to (arm*-*-eabi*).
1054 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1055 (m68-*-rtems*): Move to (m68*-*-elf*).
1057 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1059 * config.bfd (*-*-rtemscoff*): Mark as removed.
1061 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1064 * elflink.c (bfd_elf_record_link_assignment): Revert last
1065 change and don't ever clear `forced_local'. Set `mark'
1067 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1069 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1070 (bfd_elf_size_dynamic_sections): ... here.
1071 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1072 and set `mark' instead in `__tls_get_addr_opt' processing.
1073 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1075 2017-01-24 Alan Modra <amodra@gmail.com>
1077 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1078 where dynamic relocs are preferable. Allow ifunc too.
1079 (ensure_undefweak_dynamic): New function.
1080 (allocate_dynrelocs): Use it here. Move plt handling last and
1081 don't make symbols dynamic, simplifying loop. Only make undef
1082 weak symbols with GOT entries dynamic. Correct condition
1083 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1084 comments. Remove goto.
1085 (ppc_elf_relocate_section): Correct test for using dynamic
1086 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1087 to suit. Set up explicit tls_index entries and implicit GOT
1088 tls_index entries resolvable at link time for
1089 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1090 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1091 (ensure_undefweak_dynamic): New function.
1092 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1093 with GOT entries dynamic. Remove unnecessary test of
1094 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1095 (ppc64_elf_relocate_section): Correct test for using dynamic
1096 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1097 to suit. Set up explicit tls_index entries and implicit GOT
1098 tls_index entries resolvable at link time for __tls_get_addr_opt.
1099 Simplify expression to clear mem for prelink.
1101 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1103 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1105 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1107 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1108 (elf_backend_hash_symbol): Define.
1110 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1113 * elflink.c (bfd_elf_record_link_assignment): Clear any
1114 `forced_local' marking for DSO symbols that are not being
1117 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1119 * elfnn-riscv.c (riscv_elf_object_p): New function.
1121 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1124 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1126 (elf_x86_64_check_relocs): Create .eh_frame section for the
1128 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1129 .eh_frame section for the .plt.bnd section.
1130 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1131 for the .plt.bnd section.
1133 2017-01-12 Nick Clifton <nickc@redhat.com>
1136 * opncls.c (find_separate_debug_file): Add include_dirs
1137 parameter. Only include the directory part of the bfd's filename
1138 in search paths if include_dirs is true. Add a couple of extra
1139 locations for looking for debug files.
1140 ( bfd_follow_gnu_debuglink): Update invocation of
1141 find_separate_debug_file.
1142 (bfd_follow_gnu_debugaltlink): Likewise.
1143 (get_build_id): New function: Finds the build-id of the given bfd.
1144 (get_build_id_name): New function: Computes the name of the
1145 separate debug info file for a bfd, based upon its build-id.
1146 (check_build_id_file): New function: Checks to see if a separate
1147 debug info file exists at the given location, and that its
1148 build-id matches that of the original bfd.
1149 (bfd_follow_build_id_debuglink): New function: Finds a separate
1150 debug info file for a given bfd by using the build-id method.
1151 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1152 method of locating a separate debug info file before using the
1154 * bfd-in2.h: Regenerate.
1156 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1159 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1160 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1161 elf_x86_64_eh_frame_plt_got.
1162 (elf_x86_64_size_dynamic_sections): Get unwind info from
1163 elf_x86_64_bnd_arch_bed for the BND PLT.
1165 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1167 * config.bfd: Add entries for i686-redox and x86_64-redox.
1169 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1171 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1173 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1174 .eh_frame section to 4 bytes for x32.
1175 (elf_x86_64_check_relocs): Likewise.
1177 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1180 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1181 (PLT_GOT_FDE_LENGTH): Likewise.
1182 (elf_i386_plt_layout): Add eh_frame_plt_got and
1183 eh_frame_plt_got_size.
1184 (elf_i386_plt): Updated.
1185 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1186 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1187 (elf_i386_size_dynamic_sections): Allocate and initialize
1188 .eh_frame section for .plt.got.
1189 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1191 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1192 eh_frame_plt_got_size.
1193 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1194 (PLT_GOT_FDE_LENGTH): Likewise.
1195 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1196 eh_frame_plt_got_size.
1197 (elf_x86_64_arch_bed): Updated.
1198 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1199 eh_frame_plt_got_size.
1200 (elf_x86_64_nacl_arch_bed): Likewise.
1201 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1202 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1203 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1204 .eh_frame section for .plt.got.
1205 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1208 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1210 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1211 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1213 2017-01-09 Nick Clifton <nickc@redhat.com>
1215 * dwarf2.c (lookup_address_in_function_table): Return early if
1216 there are no functions in the given comp unit, or if the high
1217 address of the last function in the comp unit is less than the
1220 2017-01-09 Nick Clifton <nickc@redhat.com>
1223 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1224 message if there are too many symbols to load.
1226 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1228 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1229 if relocs are cached.
1231 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1234 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1235 for R_MICROBLAZE_GOTOFF_64.
1237 2017-01-03 Nick Clifton <nickc@redhat.com>
1239 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1240 warning about using a possibly uninitialised variable.
1242 2017-01-02 Alan Modra <amodra@gmail.com>
1244 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1245 (allocate_plt_static, allocate_dynrelocs): Use it.
1247 2017-01-02 Alan Modra <amodra@gmail.com>
1249 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1250 .PARISC.unwind section.
1252 2017-01-02 Alan Modra <amodra@gmail.com>
1255 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1256 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1257 indirect to GOT pointer relative code edit.
1259 2017-01-02 Alan Modra <amodra@gmail.com>
1261 Update year range in copyright notice of all files.
1263 For older changes see ChangeLog-2016
1265 Copyright (C) 2017 Free Software Foundation, Inc.
1267 Copying and distribution of this file, with or without modification,
1268 are permitted in any medium without royalty provided the copyright
1269 notice and this notice are preserved.
1275 version-control: never