1 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
6 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
8 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
9 dynamic symbol sorting.
11 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
14 * elflink.c (elf_link_add_object_symbols): Preserve
15 dynamic_ref_after_ir_def when restoring the symbol table for
16 unneeded dynamic object.
18 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
21 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
22 on on undefined IFUNC symbol in the second PLT.
24 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
26 * peXXigen.c (pe_print_reloc): Correct chunk_end.
28 2017-04-19 Alan Modra <amodra@gmail.com>
30 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
31 or make dynamic for info->dynamic_undefined_weak 0 and 1.
32 * elf32-ppc.c:Formatting.
33 (ensure_undefweak_dynamic): Don't make dynamic when
34 info->dynamic_undefined_weak is zero.
35 (allocate_dynrelocs): Discard undefweak dyn_relocs for
36 info->dynamic_undefined_weak. Discard undef dyn_relocs when
37 not default visibility. Discard undef and undefweak
39 (ppc_elf_relocate_section): Adjust to suit.
40 * elf64-ppc.c: Formatting.
41 (ensure_undefweak_dynamic): Don't make dynamic when
42 info->dynamic_undefined_weak is zero.
43 (allocate_dynrelocs): Discard undefweak dyn_relocs for
44 info->dynamic_undefined_weak. Discard them earlier.
46 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
49 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
50 before generating the version definition section.
52 2017-04-17 Alan Modra <amodra@gmail.com>
54 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
55 state when a regular object file defines a symbol with
56 incompatible type to that defined by an earlier shared lib.
58 2017-04-13 Alan Modra <amodra@gmail.com>
60 * coffcode.h: Wrap some overly long _bfd_error_handler args.
62 * elf32-arm.c: Likewise.
63 * elf32-i386.c: Likewise.
64 * elf32-mep.c: Likewise.
65 * elf64-ia64-vms.c: Likewise.
66 * elf64-x86-64.c: Likewise.
67 * elflink.c: Likewise.
68 * elfnn-ia64.c: Likewise.
69 * elfxx-mips.c: Likewise.
71 2017-04-13 Alan Modra <amodra@gmail.com>
73 * aoutx.h: Use %B and %A in error messages throughout file.
74 * aout-cris.c: Likewise.
75 * archive.c: Likewise.
77 * coff-rs6000.c: Likewise.
78 * coff-tic4x.c: Likewise.
79 * coffcode.h: Likewise.
80 * coffgen.c: Likewise.
81 * cofflink.c: Likewise.
82 * coffswap.h: Likewise.
83 * cpu-arm.c: Likewise.
84 * elf-eh-frame.c: Likewise.
85 * elf-m10300.c: Likewise.
87 * elf32-arc.c: Likewise.
88 * elf32-arm.c: Likewise.
89 * elf32-bfin.c: Likewise.
90 * elf32-frv.c: Likewise.
91 * elf32-iq2000.c: Likewise.
92 * elf32-m32c.c: Likewise.
93 * elf32-microblaze.c: Likewise.
94 * elf32-nds32.c: Likewise.
95 * elf32-rl78.c: Likewise.
96 * elf32-rx.c: Likewise.
97 * elf32-score.c: Likewise.
98 * elf32-score7.c: Likewise.
99 * elf32-sh64.c: Likewise.
100 * elf32-v850.c: Likewise.
101 * elf32-vax.c: Likewise.
102 * elf32-visium.c: Likewise.
103 * elf64-ia64-vms.c: Likewise.
104 * elf64-mmix.c: Likewise.
105 * elf64-sh64.c: Likewise.
106 * elfcode.h: Likewise.
107 * elfnn-aarch64.c: Likewise.
108 * elfnn-ia64.c: Likewise.
109 * elfxx-mips.c: Likewise.
110 * hpux-core.c: Likewise.
113 * linker.c: Likewise.
118 * peXXigen.c: Likewise.
119 * rs6000-core.c: Likewise.
120 * vms-alpha.c: Likewise.
121 * xcofflink.c: Likewise.
123 2017-04-13 Alan Modra <amodra@gmail.com>
125 * bfd.c (PRINT_TYPE): Define.
126 (_doprnt): New function.
127 (error_handler_internal): Use _doprnt.
128 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
129 calls in their natural order, throughout file.
130 * coff-mcore.c: Likewise.
131 * coff-ppc.c: Likewise.
132 * coff-tic80.c: Likewise.
133 * cofflink.c: Likewise.
134 * elf-s390-common.c: Likewise.
136 * elf32-arm.c: Likewise.
137 * elf32-i386.c: Likewise.
138 * elf32-m32r.c: Likewise.
139 * elf32-msp430.c: Likewise.
140 * elf32-spu.c: Likewise.
141 * elf64-ia64-vms.c: Likewise.
142 * elf64-sparc.c: Likewise.
143 * elf64-x86-64.c: Likewise.
144 * elflink.c: Likewise.
145 * elfnn-aarch64.c: Likewise.
146 * elfnn-ia64.c: Likewise.
147 * elfxx-mips.c: Likewise.
149 2017-04-13 Alan Modra <amodra@gmail.com>
151 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
152 branch veneers" error. Fix double space and format message.
153 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
154 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
156 2017-04-13 Alan Modra <amodra@gmail.com>
158 * bfd-in2.h: Regenerate.
160 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
162 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
163 extra `\n' in warning/error messages.
164 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
165 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
167 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
169 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
170 processor-specific properties with generic ELF target vector.
172 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
174 * elf32-sparc.c (elf_backend_fixup_symbol): New.
175 * elf64-sparc.c (elf_backend_fixup_symbol): New.
176 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
177 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
179 (link_hash_newfunc): Initialize has_got_reloc and
181 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
183 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
185 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
187 (_bfd_sparc_elf_fixup_symbol): New function.
188 (allocate_dynrelocs): Don't allocate space for dynamic
189 relocations and discard relocations against resolved undefined
190 weak symbols in executable. Don't make resolved undefined weak
191 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
192 relocation against undefined weak symbols in PIE.
193 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
194 relocations against resolved undefined weak symbols in PIE
195 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
196 without ynamic PLT/GOT relocations for resolved undefined weak
198 Don't generate dynamic relocation against resolved undefined
199 weak symbol in executable.
200 (pie_finish_undefweak_symbol): New function.
201 (_bfd_sparc_elf_finish_dynamic_sections): Call
202 pie_finish_undefweak_symbol on all symbols in PIE.
203 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
204 (_bfd_sparc_elf_fixup_symbol): New function.
206 2017-04-10 Nick Clifton <nickc@redhat.com>
208 * config.bfd: Remove ns32k from obsolete list.
210 2017-04-10 Alan Modra <amodra@gmail.com>
213 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
214 (special_sections_i): Likewise for .init_array.
215 (special_sections_p): Likewise for .preinit_array.
217 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
221 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
222 ELF_COMMON_DEF_P for common symbols.
223 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
224 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
225 * elflink.c (_bfd_elf_merge_symbol): Revert commits
226 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
227 07492f668d2173da7a2bda3707ff0985e0f460b6.
229 2017-04-07 Pedro Alves <palves@redhat.com>
231 * opncls.c (bfd_get_debug_link_info): Rename to...
232 (bfd_get_debug_link_info_1): ... this. Change type of second
233 parameter to void pointer. Adjust.
234 (bfd_get_debug_link_info): Reimplement on top of
235 bfd_get_debug_link_info_1.
236 (separate_debug_file_exists, separate_alt_debug_file_exists):
237 Change type of second parameter to void pointer. Adjust.
238 (get_func_type, check_func_type): Change type of second parameter
240 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
241 the callback functions instead of passing the address of a local.
242 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
243 find_separate_debug_file.
244 (get_alt_debug_link_info_shim): Change type of second parameter to
245 void pointer. Adjust.
246 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
247 find_separate_debug_file.
248 (get_build_id_name, bfd_boolean check_build_id_file): Change type
249 of second parameter to void pointer. Adjust.
250 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
251 pointer local to find_separate_debug_file.
253 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
255 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
256 external symbols with a definition.
257 (_bfd_coff_gc_mark_extra_sections): Fix typo.
259 2017-04-07 Alan Modra <amodra@gmail.com>
261 * po/SRC-POTFILES.in: Regenerate.
263 2017-04-05 Alan Modra <amodra@gmail.com>
265 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
268 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
270 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
271 numbers for DataDirectory entry indicies passed to
274 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
276 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
277 each GNU_MBIND section and align GNU_MBIND section to page size.
278 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
279 segment for each GNU_MBIND section.
280 (_bfd_elf_init_private_section_data): Copy sh_info from input
281 for GNU_MBIND section.
283 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
285 * elfnn-riscv.c (GP_NAME): Delete.
286 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
287 (_bfd_riscv_relax_lui): Likewise.
289 2017-04-04 Nick Clifton <nickc@redhat.com>
292 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
294 (bfd_elf_final_link): Only initialize the extended symbol index
295 section if there are extended symbol tables to list.
297 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
299 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
300 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
301 * configure.ac (elf): Add elf-properties.lo.
302 * Makefile.in: Regenerated.
303 * configure: Likewise.
304 * elf-bfd.h (elf_property_kind): New.
305 (elf_property): Likewise.
306 (elf_property_list): Likewise.
307 (elf_properties): Likewise.
308 (_bfd_elf_parse_gnu_properties): Likewise.
309 (_bfd_elf_get_property): Likewise.
310 (_bfd_elf_link_setup_gnu_properties): Likewise.
311 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
312 and setup_gnu_properties.
313 (elf_obj_tdata): Add properties.
314 * elf-properties.c: New file.
315 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
316 (elf_i386_merge_gnu_properties): Likewise.
317 (elf_backend_parse_gnu_properties): Likewise.
318 (elf_backend_merge_gnu_properties): Likewise.
319 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
320 (elf_x86_64_merge_gnu_properties): Likewise.
321 (elf_backend_parse_gnu_properties): Likewise.
322 (elf_backend_merge_gnu_properties): Likewise.
323 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
324 (elf_backend_parse_gnu_properties): Likewise.
325 (elf_backend_setup_gnu_properties): Likewise.
326 (elfNN_bed): Add elf_backend_parse_gnu_properties,
327 elf_backend_merge_gnu_properties and
328 elf_backend_setup_gnu_properties.
330 2017-03-30 Pip Cet <pipcet@gmail.com>
332 * elf32-wasm32.c: Add relocation code, two relocs.
333 * reloc.c: Add wasm32 relocations.
334 * libbfd.h: Regenerate.
335 * bfd-in2.h: Regenerate.
336 * bfd/po/bfd.pot: Regenerate.
338 2017-03-29 Nick Clifton <nickc@redhat.com>
341 * coff-bfd.h (struct coff_section_data): Add new fields:
343 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
344 computed for PE binaries.
345 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
348 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
351 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
352 to handle a local symbol with a hash-symbol-entry; without PLT.
353 Add BFD_ASSERT for an incidental case with GOT entry present.
354 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
355 isn't forced-or-set local.
357 2017-03-27 Pip Cet <pipcet@gmail.com>
359 * wasm-module.c: New file to support WebAssembly modules.
360 * wasm-module.h: New file to support WebAssembly modules.
361 * doc/webassembly.texi: Start documenting wasm-module.c.
362 * config.bfd: Add wasm_vec.
363 * targets.c: Likewise.
364 * configure.ac: Likewise.
365 * Makefile.am: Add entries for wasm-module.c.
366 * Makefile.in: Regenerate.
367 * configure: Regenerate.
368 * po/SRC-POTFILES.in: Regenerate.
370 2017-03-27 Pip Cet <pipcet@gmail.com>
372 * cpu-wasm32.c: New file to support wasm32 architecture.
373 * elf32-wasm32.c: New file to support wasm32 architecture.
374 * Makefile.am: Add wasm32 architecture.
375 * archures.c: Likewise.
376 * config.bfd: Likewise.
377 * configure.ac: Likewise.
378 * targets.c: Likewise.
379 * Makefile.in: Regenerate.
380 * bfd-in2.h: Regenerate.
381 * configure: Regenerate.
382 * po/SRC-POTFILES.in: Regenerate.
384 2017-03-20 Alan Modra <amodra@gmail.com>
387 * elf64-ppc.c (compare_symbols): Stabilize sort.
389 2017-03-18 Alan Modra <amodra@gmail.com>
391 * elf64-ppc.c (struct ppc_link_hash_table): Add
392 local_ifunc_resolver and maybe_local_ifunc_resolver.
393 (ppc_build_one_stub): Set flags on emitting dynamic
395 (ppc64_elf_relocate_section): Likewise.
396 (ppc64_elf_finish_dynamic_symbol): Likewise.
397 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
398 local dynamic relocs to ifuncs.
399 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
400 local_ifunc_resolver and maybe_local_ifunc_resolver.
401 (ppc_elf_relocate_section): Set flag on emitting dynamic
402 relocation to ifuncs.
403 (ppc_elf_finish_dynamic_symbol): Likewise.
404 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
405 dynamic relocs to ifuncs.
407 2017-03-13 Nick Clifton <nickc@redhat.com>
410 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
411 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
412 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
413 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
414 * bfd-in2.h: Regenerate.
415 * libbfd.h: Regenerate.
416 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
418 (IS_AARCH64_TLSDESC_RELOC): Likewise.
419 (elfNN_aarch64_howto_table): Likewise.
420 (aarch64_tls_transition_without_check): Likewise.
421 (aarch64_reloc_got_type): Likewise.
422 (elfNN_aarch64_final_link_relocate): Likewise.
423 (elfNN_aarch64_tls_relax): Likewise.
424 (elfNN_aarch64_relocate_section): Likewise.
425 (elfNN_aarch64_gc_sweep_hook): Likewise.
426 (elfNN_aarch64_check_relocs): Likewise.
427 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
428 (_bfd_aarch64_elf_resolve_relocation): Likewise.
430 2017-03-11 Alan Modra <amodra@gmail.com>
432 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
433 parameter is in fact used. Whitespace fixes.
434 * elf64-ppc.c: Likewise.
436 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
438 * rs6000-core.c (CORE_NEW): Simplify macro when
439 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
441 2017-03-07 Alan Modra <amodra@gmail.com>
445 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
448 2017-03-05 Alan Modra <amodra@gmail.com>
450 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
451 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
452 (next_cie_fde_offset): New function.
453 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
454 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
455 four bytes. Align CIEs to four or eight bytes depending on
456 per_encoding_aligned8. Align FDEs according to their encoding.
457 Pad last FDE to output section alignment.
458 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
460 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
461 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
462 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
464 2017-03-02 Martin Bickel <binutils@ineranves.de>
467 * elf.c (rewrite_elf_program_header): Do not issue a warning for
468 empty segments which have a zero filesz, but a non-zero memsz.
470 2017-03-02 Alan Modra <amodra@gmail.com>
472 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
474 2017-02-28 Alan Modra <amodra@gmail.com>
476 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
477 (ppc64_elf_relocate_section): Likewise.
479 2017-02-28 Alan Modra <amodra@gmail.com>
482 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
483 rather than elf32_nios2_hash_table or elf_hash_table.
484 (create_got_section): Likewise.
485 (nios2_elf32_finish_dynamic_symbol): Likewise.
486 (nios2_elf32_adjust_dynamic_symbol): Likewise.
487 (nios2_elf32_size_dynamic_sections): Likewise.
488 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
489 vars. Use htab equivalents directly instead. Don't create
490 all dynamic sections on needing just the GOT. Use a goto
491 rather than a fall-through with reloc test. Ensure
492 htab->dynobj is set when making dynamic sreloc section.
493 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
494 equivalent directly instead. Don't segfault on looking for
495 .dynamic when dynamic sections have not been created. Don't
496 segfault on .got.plt being discarded.
497 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
498 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
499 fixme and another not so relevant comment.
500 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
501 already set, set hash table dynobj on creating .sbss.
503 2017-02-28 Alan Modra <amodra@gmail.com>
505 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
506 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
507 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
508 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
509 (ppc64_elf_relocate_section): Likewise.
510 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
511 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
512 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
513 * libbfd.h: Regenerate.
514 * bfd-in2.h: Regenerate.
516 2017-02-28 Alan Modra <amodra@gmail.com>
518 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
519 dynamic .data.rel.ro read-only.
520 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
521 rather than section flags when deciding where copy reloc goes.
522 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
523 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
524 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
525 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
526 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
527 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
528 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
529 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
530 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
531 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
532 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
533 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
534 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
535 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
536 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
537 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
538 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
539 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
540 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
542 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
544 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
545 `jalr $0, $25' instruction encoding.
547 2017-02-27 Nick Clifton <nickc@redhat.com>
550 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
551 generating a seg-fault when encountering a symbol that has been
552 deleted by garbage collection.
554 2017-02-25 Alan Modra <amodra@gmail.com>
556 * elf32-arc.c (struct dynamic_sections): Delete.
557 (enum dyn_section_types): Delete.
558 (dyn_section_names): Delete.
559 (arc_create_dynamic_sections): Delete.
560 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
561 segfault on discarded .rela.plt section.
562 (elf_arc_size_dynamic_sections): Formatting. Don't call
563 arc_create_dynamic_sections. Don't allocate memory for sections
564 handled by the generic linker. Correct code finding relocs in
565 read-only sections. Set SEC_EXCLUDE on zero size .got,
566 .got.plt, and .dynbss sections. Do set .interp for pies.
568 2017-02-24 Andrew Waterman <andrew@sifive.com>
570 * elfnn-riscv.c (GP_NAME): New macro.
571 (riscv_global_pointer_value): Use it.
572 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
573 output section, consider only that section's alignment.
575 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
577 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
578 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
579 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
580 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
582 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
584 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
585 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
588 2017-02-23 Alan Modra <amodra@gmail.com>
591 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
593 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
594 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
597 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
600 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
601 processing ahead of the call to `elf_gc_sweep_symbol'.
603 2017-02-22 Nick Clifton <nickc@redhat.com>
606 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
607 created section 4-byte alignment.
609 2017-02-22 Alan Modra <amodra@gmail.com>
611 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
612 on .got or .plt output section being discarded by script.
613 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
616 2017-02-21 Alan Modra <amodra@gmail.com>
618 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
619 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
621 2017-02-20 Alan Modra <amodra@gmail.com>
624 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
625 if DT_RELSZ/DT_RELASZ is zero.
627 2017-02-17 Nick Clifton <nickc@redhat.com>
629 * compress.c (bfd_get_full_section_contents): Remember to reduce
630 compressed size by the sizeof the compression header when
631 decompressing the contents.
633 2017-02-17 Pedro Alves <palves@redhat.com>
635 * srec.c (Chunk): Rename to ...
636 (_bfd_srec_len): ... this.
637 (S3Forced): Rename to ...
638 (_bfd_srec_forceS3): ... this.
639 * objcopy.c: Adjust all references.
641 2017-02-17 Pedro Alves <palves@redhat.com>
643 * archive.c (bsd_write_armap): Rename to ...
644 (_bfd_bsd_write_armap): ... this.
645 (coff_write_armap): Rename to ...
646 (_bfd_coff_write_armap): ... this.
647 * libbfd-in.h (bsd_write_armap): Rename to ...
648 (_bfd_bsd_write_armap): ... this.
649 (coff_write_armap): Rename to ...
650 (_bfd_coff_write_armap): ... this.
651 * aout-target.h, aout-tic30.c: Adjust all users.
652 * libbfd.h: Regenerate.
654 2017-02-17 Pedro Alves <palves@redhat.com>
656 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
657 (warn_deprecated): Rename to ...
658 (_bfd_warn_deprecated): ... this.
659 * libbfd.c (warn_deprecated): Rename to ...
660 (_bfd_warn_deprecated): ... this.
661 * bfd-in2.h: Regenerate.
663 2017-02-17 Pedro Alves <palves@redhat.com>
665 * bfdio.c (real_ftell): Rename to ...
666 (_bfd_real_ftell): ... this.
667 (real_fseek): Rename to ...
668 (_bfd_real_fseek): ... this.
669 (real_fopen): Rename to ...
670 (_bfd_real_fopen): ... this.
671 * libbfd-in.h (real_ftell): Rename to ...
672 (_bfd_real_ftell): ... this.
673 (real_fseek): Rename to ...
674 (_bfd_real_fseek): ... this.
675 (real_fopen): Rename to ...
676 (_bfd_real_fopen): ... this.
677 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
678 * libbfd.h: Regenerate.
680 2017-02-17 Pedro Alves <palves@redhat.com>
682 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
683 * libbfd.c (read_unsigned_leb128): Rename to ...
684 (_bfd_read_unsigned_leb128): ... this.
685 (read_signed_leb128): Rename to ...
686 (_bfd_read_signed_leb128): ... this.
687 (safe_read_leb128): Rename to ...
688 (_bfd_safe_read_leb128): ... this.
689 * libbfd-in.h (read_unsigned_leb128): Rename to ...
690 (_bfd_read_unsigned_leb128): ... this.
691 (read_signed_leb128): Rename to ...
692 (_bfd_read_signed_leb128): ... this.
693 (safe_read_leb128): Rename to ...
694 (_bfd_safe_read_leb128): ... this.
695 * libbfd.h: Renegerate.
697 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
699 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
700 before trying to fine matching file and line information.
702 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
704 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
705 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
706 not match current bfd, then reload debug information. Record bfd
707 we're loading debug info for in the stash. If we have debug
708 informatin in the cache then perform section placement before
711 2017-02-16 Alan Modra <amodra@gmail.com>
714 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
715 * elfxx-target.h (elf_backend_no_page_alias): Define.
716 (elfNN_bed): Init new field.
717 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
718 ensure PT_LOAD segment starts on a new page.
719 * elf32-hppa.c (elf_backend_no_page_alias): Define.
721 2017-02-16 Alan Modra <amodra@gmail.com>
724 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
727 2017-02-16 Jiong Wang <jiong.wang@arm.com>
729 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
730 * bfd-in2.h: Regenerated.
732 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
735 * elf32-i386.c (elf_i386_relocate_section): Allow
736 "lea foo@GOT, %reg" in PIC.
738 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
741 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
742 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
743 error against local IFUNC symbol without a base register for
746 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
748 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
749 `%P: %H:' with `info->callbacks->einfo'.
750 (ppc_elf_relocate_section): Likewise.
751 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
752 (ppc64_elf_edit_toc): Likewise.
753 (ppc64_elf_relocate_section): Likewise.
755 2017-02-14 Alan Modra <amodra@gmail.com>
757 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
758 --gc-keep-exported, and test versioned field of sym rather than
759 looking for @ in name.
761 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
763 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
766 2017-02-13 Nick Clifton <nickc@redhat.com>
769 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
772 2017-02-07 Andrew Waterman <andrew@sifive.com>
774 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
775 entry size if PLT header is written.
777 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
779 Fix sparc64 dynamic relocation processing to use the dynamic
781 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
782 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
785 2017-02-03 Nick Clifton <nickc@redhat.com>
788 * coffcode.h (coff_write_object_contents): Enlarge size of
789 s_name_buf in order to avoid compile time warning about possible
791 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
792 32-bits of insn value before printing into buffer.
794 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
796 * elfxx-mips.c (mips_elf_hash_sort_data): Add
798 (mips_elf_sort_hash_table): Handle it.
799 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
800 symbols bump up `max_local_dynindx' rather than
801 `max_non_got_dynindx'.
803 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
805 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
806 `min_got_dynindx', `max_unref_got_dynindx' and
807 `max_non_got_dynindx' members to the `bfd_size_type' data type.
808 (mips_elf_sort_hash_table): Adjust accordingly.
810 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
812 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
813 to access the hash table.
815 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
817 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
818 non-NULL `htab' to the beginning.
820 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
822 * elflink.c (elf_gc_sweep): Wrap overlong line.
824 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
826 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
827 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
828 * elfxx-mips.c (mips_elf_link_hash_table): Add
829 `ignore_branch_isa' member.
830 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
831 in branch relocation calculation as an error if
832 `ignore_branch_isa' has been set.
833 (_bfd_mips_elf_insn32): Rename to...
834 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
835 parameter to `insn32' and add an `ignore_branch_isa' parameter.
836 Handle the new parameter.
838 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
840 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
841 local variable dynobj.
844 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
845 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
846 executable from read-only sections into sdynrelro.
847 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
848 dynamic relocs in sdynrelro.
849 (elf_backend_want_dynrelro): Define.
851 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
853 * config.bfd (*-*-rtemsaout*): Mark as removed.
855 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
857 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
858 (arm-*-rtems*): Move to (arm*-*-eabi*).
859 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
860 (m68-*-rtems*): Move to (m68*-*-elf*).
862 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
864 * config.bfd (*-*-rtemscoff*): Mark as removed.
866 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
869 * elflink.c (bfd_elf_record_link_assignment): Revert last
870 change and don't ever clear `forced_local'. Set `mark'
872 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
874 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
875 (bfd_elf_size_dynamic_sections): ... here.
876 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
877 and set `mark' instead in `__tls_get_addr_opt' processing.
878 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
880 2017-01-24 Alan Modra <amodra@gmail.com>
882 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
883 where dynamic relocs are preferable. Allow ifunc too.
884 (ensure_undefweak_dynamic): New function.
885 (allocate_dynrelocs): Use it here. Move plt handling last and
886 don't make symbols dynamic, simplifying loop. Only make undef
887 weak symbols with GOT entries dynamic. Correct condition
888 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
889 comments. Remove goto.
890 (ppc_elf_relocate_section): Correct test for using dynamic
891 symbol on GOT relocs. Rearrange test for emitting GOT relocs
892 to suit. Set up explicit tls_index entries and implicit GOT
893 tls_index entries resolvable at link time for
894 __tls_get_addr_opt. Simplify test to clear mem for prelink.
895 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
896 (ensure_undefweak_dynamic): New function.
897 (allocate_dynrelocs): Use it here. Only make undef weak symbols
898 with GOT entries dynamic. Remove unnecessary test of
899 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
900 (ppc64_elf_relocate_section): Correct test for using dynamic
901 symbol on GOT relocs. Rearrange test for emitting GOT relocs
902 to suit. Set up explicit tls_index entries and implicit GOT
903 tls_index entries resolvable at link time for __tls_get_addr_opt.
904 Simplify expression to clear mem for prelink.
906 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
908 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
910 2017-01-20 Jiong Wang <jiong.wang@arm.com>
912 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
913 (elf_backend_hash_symbol): Define.
915 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
918 * elflink.c (bfd_elf_record_link_assignment): Clear any
919 `forced_local' marking for DSO symbols that are not being
922 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
924 * elfnn-riscv.c (riscv_elf_object_p): New function.
926 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
929 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
931 (elf_x86_64_check_relocs): Create .eh_frame section for the
933 (elf_x86_64_size_dynamic_sections): Allocate and initialize
934 .eh_frame section for the .plt.bnd section.
935 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
936 for the .plt.bnd section.
938 2017-01-12 Nick Clifton <nickc@redhat.com>
941 * opncls.c (find_separate_debug_file): Add include_dirs
942 parameter. Only include the directory part of the bfd's filename
943 in search paths if include_dirs is true. Add a couple of extra
944 locations for looking for debug files.
945 ( bfd_follow_gnu_debuglink): Update invocation of
946 find_separate_debug_file.
947 (bfd_follow_gnu_debugaltlink): Likewise.
948 (get_build_id): New function: Finds the build-id of the given bfd.
949 (get_build_id_name): New function: Computes the name of the
950 separate debug info file for a bfd, based upon its build-id.
951 (check_build_id_file): New function: Checks to see if a separate
952 debug info file exists at the given location, and that its
953 build-id matches that of the original bfd.
954 (bfd_follow_build_id_debuglink): New function: Finds a separate
955 debug info file for a given bfd by using the build-id method.
956 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
957 method of locating a separate debug info file before using the
959 * bfd-in2.h: Regenerate.
961 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
964 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
965 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
966 elf_x86_64_eh_frame_plt_got.
967 (elf_x86_64_size_dynamic_sections): Get unwind info from
968 elf_x86_64_bnd_arch_bed for the BND PLT.
970 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
972 * config.bfd: Add entries for i686-redox and x86_64-redox.
974 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
976 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
978 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
979 .eh_frame section to 4 bytes for x32.
980 (elf_x86_64_check_relocs): Likewise.
982 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
985 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
986 (PLT_GOT_FDE_LENGTH): Likewise.
987 (elf_i386_plt_layout): Add eh_frame_plt_got and
988 eh_frame_plt_got_size.
989 (elf_i386_plt): Updated.
990 (elf_i386_link_hash_table): Add plt_got_eh_frame.
991 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
992 (elf_i386_size_dynamic_sections): Allocate and initialize
993 .eh_frame section for .plt.got.
994 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
996 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
997 eh_frame_plt_got_size.
998 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
999 (PLT_GOT_FDE_LENGTH): Likewise.
1000 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1001 eh_frame_plt_got_size.
1002 (elf_x86_64_arch_bed): Updated.
1003 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1004 eh_frame_plt_got_size.
1005 (elf_x86_64_nacl_arch_bed): Likewise.
1006 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1007 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1008 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1009 .eh_frame section for .plt.got.
1010 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1013 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1015 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1016 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1018 2017-01-09 Nick Clifton <nickc@redhat.com>
1020 * dwarf2.c (lookup_address_in_function_table): Return early if
1021 there are no functions in the given comp unit, or if the high
1022 address of the last function in the comp unit is less than the
1025 2017-01-09 Nick Clifton <nickc@redhat.com>
1028 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1029 message if there are too many symbols to load.
1031 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1033 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1034 if relocs are cached.
1036 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1039 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1040 for R_MICROBLAZE_GOTOFF_64.
1042 2017-01-03 Nick Clifton <nickc@redhat.com>
1044 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1045 warning about using a possibly uninitialised variable.
1047 2017-01-02 Alan Modra <amodra@gmail.com>
1049 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1050 (allocate_plt_static, allocate_dynrelocs): Use it.
1052 2017-01-02 Alan Modra <amodra@gmail.com>
1054 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1055 .PARISC.unwind section.
1057 2017-01-02 Alan Modra <amodra@gmail.com>
1060 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1061 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1062 indirect to GOT pointer relative code edit.
1064 2017-01-02 Alan Modra <amodra@gmail.com>
1066 Update year range in copyright notice of all files.
1068 For older changes see ChangeLog-2016
1070 Copyright (C) 2017 Free Software Foundation, Inc.
1072 Copying and distribution of this file, with or without modification,
1073 are permitted in any medium without royalty provided the copyright
1074 notice and this notice are preserved.
1080 version-control: never