1 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
4 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
6 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
8 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
11 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
13 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
14 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
15 is non-zero. Add clarifying comments.
17 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
19 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
20 name. Use local IFUNC symbol name string to report unsupported
21 non-PIC call to IFUNC function.
22 (elf_i386_relocate_section): Dump local IFUNC name with minfo
23 when generating R_386_IRELATIVE relocation.
24 (elf_i386_finish_dynamic_symbol): Likewise.
25 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
27 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
28 when generating R_X86_64_IRELATIVE relocation.
29 (elf_x86_64_finish_dynamic_symbol): Likewise.
31 2017-06-08 Jiong Wang <jiong.wang@arm.com>
34 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
35 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
36 runtime for copy relocation elimination cases.
37 (alias_readonly_dynrelocs): New function.
38 (elfNN_aarch64_adjust_dynamic_symbol): Keep the dynamic relocs instead
39 of generating copy relocation if it is not against read-only sections.
40 (elfNN_aarch64_check_relocs): Likewise.
42 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
44 * elf.c (setup_group): Make sure BFD sections are created for all
45 group sections in the input file when processing SHF_GROUP
47 (bfd_section_from_shdr): Avoid duplicating logic already
48 implemented in `setup_group'.
50 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
53 * peXXigen.c (pe_print_idata): Use the address of the first thunk
54 if the hint address is zero.
56 2017-06-06 James Clarke <jrtc27@jrtc27.com>
59 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
60 ELF_COMMON_DEF_P for common symbols.
62 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
64 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
65 SEC_GROUP sections as SEC_EXCLUDE.
66 (bfd_elf_set_group_contents): Replace use of abort with an assert.
67 (assign_section_numbers): Use resolve_section_groups flag instead
68 of relocatable link type.
69 (_bfd_elf_init_private_section_data): Use resolve_section_groups
70 flag instead of checking the final_link flag for part of the
71 checks in here. Fix white space as a result.
72 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
73 instead of relocatable link type.
74 (bfd_elf_final_link): Likewise.
76 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
78 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
80 * elf32-score.c (score_elf_final_link_relocate): Likewise.
81 (s3_bfd_score_elf_check_relocs): Likewise.
82 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
83 (score_elf_final_link_relocate): Likewise.
84 (s7_bfd_score_elf_check_relocs): Likewise.
86 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
88 * elflink.c (init_reloc_cookie_rels): Remove unused variable
91 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
93 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
94 from `reloc_count' rather than decrementing it.
95 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
96 `reloc_count' by `int_rels_per_ext_rel'.
97 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
98 `reloc_count' by `int_rels_per_ext_rel' for last relocation
100 (s3_bfd_score_elf_check_relocs): Likewise.
101 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
102 (s7_bfd_score_elf_relocate_section): Likewise.
103 (s7_bfd_score_elf_check_relocs): Likewise.
104 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
105 prototype and function.
106 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
107 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
108 triple rather than once the sum of REL and RELA relocation entry
110 (bfd_elf64_get_reloc_upper_bound): Remove macro.
111 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
112 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
113 storage allocation size determination.
114 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
115 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
116 by `int_rels_per_ext_rel' for last relocation entry
118 (bfd_elf_final_link): Do not multiply `reloc_count' by
119 `int_rels_per_ext_rel' for internal relocation storage
120 allocation size determination.
121 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
122 `int_rels_per_ext_rel' for last relocation entry determination.
123 (elf_gc_smash_unused_vtentry_relocs): Likewise.
124 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
125 (_bfd_mips_elf_relocate_section): Likewise.
127 2017-06-05 Alan Modra <amodra@gmail.com>
130 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
132 2017-06-01 John Baldwin <jhb@FreeBSD.org>
134 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
135 determine structure sizes.
136 (elfcore_grok_freebsd_prstatus): Likewise.
138 2017-06-01 Alan Modra <amodra@gmail.com>
140 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
141 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
143 (is_elfv2_localentry0): New function.
144 (ppc64_elf_tls_setup): Default params->plt_localentry0.
145 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
146 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
147 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
148 optimized localentry:0 stubs.
149 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
150 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
152 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
154 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
156 2017-05-30 Casey Smith <clegg89@gmail.com>
159 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
160 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
162 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
164 * cpu-arc.c (arc_compatible): New function.
166 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
168 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
170 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
173 * bfdio.c (bfd_get_file_size): New function.
174 * bfd-in2.h: Regenerated.
176 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
178 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
181 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
183 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
184 dynobj instead of htab->elf.dynobj.
186 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
188 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
190 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
191 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
192 actual number of internal relocations retrieved. Adjust
193 function description.
194 (bfd_elf64_canonicalize_reloc): Remove macro.
195 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
197 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
199 * archures.c (bfd_mach_sparc_v9m8): Define.
200 (bfd_mach_sparc_v8plusm8): Likewise.
201 (bfd_mach_sparc_v9_p): Adjust to M8.
202 (bfd_mach_sparc_64bit_p): Likewise.
203 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
204 bfd_mach_sparc_v8plusm8.
205 * bfd-in2.h: Regenerated.
206 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
208 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
209 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
210 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
212 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
213 bfd_mach_sparc_v8plusm8.
215 2017-05-19 Alan Modra <amodra@gmail.com>
217 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
218 debug and special sections when no non-note alloc sections in an
221 2017-05-18 Alan Modra <amodra@gmail.com>
223 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
224 * elf-m10300.c: Likewise.
226 * elf32-arc.c: Likewise.
227 * elf32-bfin.c: Likewise.
228 * elf32-m68k.c: Likewise.
229 * elf32-nds32.c: Likewise.
230 * elf32-tilepro.c: Likewise.
231 * elflink.c: Likewise.
232 * elfnn-aarch64.c: Likewise.
233 * elfnn-riscv.c: Likewise.
234 * elfxx-tilegx.c: Likewise.
235 * mach-o.c: Likewise.
236 * peXXigen.c: Likewise.
237 * vms-alpha.c: Likewise.
238 * vms-lib.c: Likewise.
240 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
243 * elflink.c (elf_gc_mark_debug_section): New function.
244 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
245 referenced by kept debug sections.
247 2017-05-16 Alan Modra <amodra@gmail.com>
249 * elf-m10300.c: Rename occurrences of non_ir_ref.
250 * elf32-arm.c: Likewise.
251 * elf32-bfin.c: Likewise.
252 * elf32-cr16.c: Likewise.
253 * elf32-cris.c: Likewise.
254 * elf32-d10v.c: Likewise.
255 * elf32-dlx.c: Likewise.
256 * elf32-fr30.c: Likewise.
257 * elf32-frv.c: Likewise.
258 * elf32-hppa.c: Likewise.
259 * elf32-i370.c: Likewise.
260 * elf32-i386.c: Likewise.
261 * elf32-iq2000.c: Likewise.
262 * elf32-lm32.c: Likewise.
263 * elf32-m32c.c: Likewise.
264 * elf32-m32r.c: Likewise.
265 * elf32-m68hc1x.c: Likewise.
266 * elf32-m68k.c: Likewise.
267 * elf32-mcore.c: Likewise.
268 * elf32-metag.c: Likewise.
269 * elf32-microblaze.c: Likewise.
270 * elf32-moxie.c: Likewise.
271 * elf32-msp430.c: Likewise.
272 * elf32-mt.c: Likewise.
273 * elf32-nios2.c: Likewise.
274 * elf32-or1k.c: Likewise.
275 * elf32-ppc.c: Likewise.
276 * elf32-rl78.c: Likewise.
277 * elf32-s390.c: Likewise.
278 * elf32-score.c: Likewise.
279 * elf32-score7.c: Likewise.
280 * elf32-sh.c: Likewise.
281 * elf32-tic6x.c: Likewise.
282 * elf32-tilepro.c: Likewise.
283 * elf32-v850.c: Likewise.
284 * elf32-vax.c: Likewise.
285 * elf32-xstormy16.c: Likewise.
286 * elf32-xtensa.c: Likewise.
287 * elf64-alpha.c: Likewise.
288 * elf64-hppa.c: Likewise.
289 * elf64-ia64-vms.c: Likewise.
290 * elf64-mmix.c: Likewise.
291 * elf64-ppc.c: Likewise.
292 * elf64-s390.c: Likewise.
293 * elf64-sh64.c: Likewise.
294 * elf64-x86-64.c: Likewise.
295 * elflink.c: Likewise.
296 * elfnn-aarch64.c: Likewise.
297 * elfnn-ia64.c: Likewise.
298 * elfnn-riscv.c: Likewise.
299 * elfxx-mips.c: Likewise.
300 * elfxx-sparc.c: Likewise.
301 * elfxx-tilegx.c: Likewise.
302 * linker.c: Likewise.
304 2017-05-16 Alan Modra <amodra@gmail.com>
306 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
307 * elflink.c (elf_link_add_object_symbols): Update to use
309 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
311 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
313 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
315 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
317 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
319 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
320 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
322 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
324 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
326 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
328 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
329 to plt_second/plt_second_eh_frame.
330 (elf_x86_64_link_hash_newfunc): Updated.
331 (elf_x86_64_allocate_dynrelocs): Likewise.
332 (elf_x86_64_size_dynamic_sections): Likewise.
333 (elf_x86_64_relocate_section): Likewise.
334 (elf_x86_64_finish_dynamic_symbol): Likewise.
335 (elf_x86_64_finish_dynamic_sections): Likewise.
336 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
337 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
339 (elf_backend_setup_gnu_properties): Updated. Create the
340 .plt.sec section instead of the .plt.sec section.
342 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
344 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
345 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
346 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
348 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
350 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
351 (bfd_elf64_set_reloc): Define.
352 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
354 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
356 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
357 (struct bfd_target): New field _bfd_set_reloc.
358 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
359 * reloc.c (_bfd_generic_set_reloc): New function.
360 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
361 * nlm-target.h (nlm_set_reloc): Likewise.
362 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
363 * aout-tic30.c (MY_set_reloc): Likewise.
364 * aout-target.h (MY_set_reloc): Likewise.
365 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
366 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
367 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
368 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
369 * aout-adobe.c (aout_32_set_reloc): Likewise.
370 * bout.c (b_out_set_reloc): Likewise.
371 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
372 * i386os9k.c (aout_32_set_reloc): Likewise.
373 * ieee.c (ieee_set_reloc): Likewise.
374 * oasys.c (oasys_set_reloc): Likewise.
375 * som.c (som_set_reloc): Likewise.
376 * versados.c (versados_set_reloc): Likewise.
377 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
378 _bfd_generic_set_reloc.
379 (rs6000_xcoff64_aix_vec): LIkewise.
380 * libbfd.c (_bfd_norelocs_set_reloc): New function.
381 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
382 * i386msdos.c (msdos_set_reloc): Define to
383 _bfd_norelocs_set_reloc.
384 * elfcode.h (elf_set_reloc): Define.
385 * bfd-in2.h: Regenerated.
387 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
390 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
391 for IFUNC function address.
393 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
395 * elf32-arc.c (FEATURE_LIST_NAME): Define.
396 (CONFLICT_LIST): Likewise.
397 (opcode/arc-attrs.h): Include.
398 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
399 (arc_extract_features): New file.
400 (arc_stralloc): Likewise.
401 (arc_elf_merge_attributes): Likewise.
402 (arc_elf_merge_private_bfd_data): Use object attributes.
403 (bfd_arc_get_mach_from_attributes): New function.
404 (arc_elf_object_p): Use object attributes.
405 (arc_elf_final_write_processing): Likewise.
406 (elf32_arc_obj_attrs_arg_type): New function.
407 (elf32_arc_obj_attrs_handle_unknown): Likewise.
408 (elf32_arc_section_from_shdr): Likewise.
409 (elf_backend_obj_attrs_vendor): Define.
410 (elf_backend_obj_attrs_section): Likewise.
411 (elf_backend_obj_attrs_arg_type): Likewise.
412 (elf_backend_obj_attrs_section_type): Likewise.
413 (elf_backend_obj_attrs_handle_unknown): Likewise.
414 (elf_backend_section_from_shdr): Likewise.
416 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
419 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
420 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
421 and the destination is a Thumb symbol.
423 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
425 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
426 initializer to silence GCC 4.2.
427 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
429 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
431 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
432 (LAZY_PLT_ENTRY_SIZE): This.
433 (NON_LAZY_PLT_ENTRY_SIZE): New.
434 (elf_x86_64_plt0_entry): Renamed to ...
435 (elf_x86_64_lazy_plt0_entry): This.
436 (elf_x86_64_plt_entry): Renamed to ...
437 (elf_x86_64_lazy_plt_entry): This.
438 (elf_x86_64_bnd_plt0_entry): Renamed to ...
439 (elf_x86_64_lazy_bnd_plt0_entry): This.
440 (elf_x86_64_legacy_plt_entry): Removed.
441 (elf_x86_64_bnd_plt_entry): Renamed to ...
442 (elf_x86_64_lazy_bnd_plt_entry): This.
443 (elf_x86_64_legacy_plt2_entry): Renamed to ...
444 (elf_x86_64_non_lazy_plt_entry): This.
445 (elf_x86_64_bnd_plt2_entry): Renamed to ...
446 (elf_x86_64_non_lazy_bnd_plt_entry): This.
447 (elf_x86_64_eh_frame_plt): Renamed to ...
448 (elf_x86_64_eh_frame_lazy_plt): This.
449 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
450 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
451 (elf_x86_64_eh_frame_plt_got): Renamed to ...
452 (elf_x86_64_eh_frame_non_lazy_plt): This.
453 (elf_x86_64_lazy_plt_layout): New.
454 (elf_x86_64_non_lazy_plt_layout): Likewise.
455 (elf_x86_64_plt_layout): Likewise.
456 (elf_x86_64_backend_data): Remove PLT layout information. Add
457 os for target system.
458 (GET_PLT_ENTRY_SIZE): Removed.
459 (elf_x86_64_lazy_plt): New.
460 (elf_x86_64_non_lazy_plt): Likewise.
461 (elf_x86_64_lazy_bnd_plt): Likewise.
462 (elf_x86_64_non_lazy_bnd_plt): Likewise.
463 (elf_x86-64_arch_bed): Updated.
464 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
465 (elf_x86_64_create_dynamic_sections): Removed.
466 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
467 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
468 (elf_x86-64_adjust_dynamic_symbol): Updated.
469 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
470 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
471 size for PLT0 if there is no PLT0. Get plt_entry_size from
472 non_lazy_plt for non-lazy PLT entries.
473 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
474 from non_lazy_plt for non-lazy PLT entries.
475 (elf_x86-64_relocate_section): Updated. Properly get PLT index
477 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
478 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
479 entries with non-lazy PLT layout. Don't fill the second and third
480 slots in the PLT entry if there is no PLT0.
481 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
482 if there is no PLT0. Set sh_entsize on the .plt.got section.
483 (compare_relocs): New.
484 (elf_x86_64_plt_type): Likewise.
485 (elf_x86_64_plt): Likewise.
486 (elf_x86_64_nacl_plt): New. Forward declaration.
487 (elf_x86_64_get_plt_sym_val): Removed.
488 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
489 against all dynamic relocations.
490 (elf_x86_64_link_setup_gnu_properties): New function.
491 (elf_backend_create_dynamic_sections): Updated.
492 (elf_backend_setup_gnu_properties): New.
493 (elf_x86_64_nacl_plt): New.
494 (elf_x86_64_nacl_arch_bed): Updated.
496 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
498 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
499 (LAZY_PLT_ENTRY_SIZE): This.
500 (NON_LAZY_PLT_ENTRY_SIZE): New.
501 (elf_i386_plt0_entry): Renamed to ...
502 (elf_i386_lazy_plt0_entry): This.
503 (elf_i386_plt_entry): Renamed to ...
504 (elf_i386_lazy_plt_entry): This.
505 (elf_i386_pic_plt0_entry): Renamed to ...
506 (elf_i386_pic_lazy_plt0_entry): This.
507 (elf_i386_pic_plt_entry): Renamed to ...
508 (elf_i386_pic_lazy_plt_entry): This.
509 (elf_i386_got_plt_entry): Renamed to ...
510 (elf_i386_non_lazy_plt_entry): This.
511 (elf_i386_pic_got_plt_entry): Renamed to ...
512 (elf_i386_pic_non_lazy_plt_entry): This.
513 (elf_i386_eh_frame_plt): Renamed to ...
514 (elf_i386_eh_frame_lazy_plt): This.
515 (elf_i386_eh_frame_plt_got): Renamed to ...
516 (elf_i386_eh_frame_non_lazy_plt): This.
517 (elf_i386_plt_layout): Renamed to ...
518 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
519 eh_frame_plt_got_size.
520 (elf_i386_non_lazy_plt_layout): New.
521 (elf_i386_plt_layout): Likewise.
522 (elf_i386_non_lazy_plt): Likewise.
523 (GET_PLT_ENTRY_SIZE): Removed.
524 (elf_i386_plt): Renamed to ...
525 (elf_i386_lazy_plt): This.
526 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
527 (elf_i386_arch_bed): Updated.
528 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
529 (elf_i386_create_dynamic_sections): Removed.
530 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
531 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
532 (elf_i386_adjust_dynamic_symbol): Updated.
533 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
534 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
535 size for PLT0 if there is no PLT0.
536 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
537 output section is discarded only if GOT isn't empty.
538 (elf_i386_relocate_section): Updated. Properly get PLT index
540 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
541 second and third slots in the PLT entry if there is no PLT0.
542 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
543 if there is no PLT0. Set sh_entsize on the .plt.got section.
544 (elf_i386_nacl_plt): Forward declaration.
545 (elf_i386_get_plt_sym_val): Removed.
546 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
547 against all dynamic relocations.
548 (elf_i386_link_setup_gnu_properties): New function.
549 (elf_backend_create_dynamic_sections): Updated.
550 (elf_backend_setup_gnu_properties): New.
551 (elf_i386_nacl_plt): Updated.
552 (elf_i386_nacl_arch_bed): Likewise.
553 (elf_i386_vxworks_arch_bed): Likewise.
555 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
557 * elflink.c (elf_output_implib): Remove executable flag from import
559 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
560 library is a relocatable object file.
562 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
565 * elf32-avr.c (avr_should_move_sym): New function.
566 (avr_should_reduce_sym_size): Likewise.
567 (avr_should_increase_sym_size): Likewise.
568 (elf32_avr_relax_delete_bytes): Adjust symbol values
569 and sizes by calling new functions.
571 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
573 * config.bfd (riscv32-*): Enable rv64.
575 2017-05-02 Alan Modra <amodra@gmail.com>
578 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
579 rather than h->root.type == bfd_link_hash_new.
580 (bfd_elf_record_link_assignment): Similarly, call
581 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
583 2017-04-29 Alan Modra <amodra@gmail.com>
586 * reloc.c (reloc_offset_in_range): New function.
587 (bfd_perform_relocation, bfd_install_relocation): Use it.
588 (_bfd_final_link_relocate): Likewise.
590 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
592 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
593 before using .plt.got.
594 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
596 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
598 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
599 instead of "+=" to update 0.
601 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
603 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
604 .plt.got section here.
605 (elf_i386_check_relocs): Don't create the .plt.got section.
606 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
607 the .plt.got and .plt.bnd sections here.
608 (elf_x86_64_check_relocs): Don't create the .plt.got nor
611 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
613 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
615 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
616 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
617 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
618 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
621 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
623 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
625 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
626 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
627 the first relocatable ELF input with GNU properties.
629 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
631 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
634 2017-04-27 Alan Modra <amodra@gmail.com>
636 * elf-bfd.h (struct elf_backend_data): Make asection param of
637 elf_backend_eh_frame_address_size const.
638 (_bfd_elf_eh_frame_address_size): Likewise.
639 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
640 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
641 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
642 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
643 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
644 (next_cie_fde_offset): Constify params.
645 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
647 2017-04-27 Alan Modra <amodra@gmail.com>
649 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
650 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
651 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
653 (offset_adjust): New function.
654 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
655 (adjust_eh_frame_local_symbols): Likewise.
656 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
657 after changing anything. Return true if anything changed.
658 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
659 _bfd_elf_adjust_eh_frame_global_symbol for globals.
661 2017-04-27 Alan Modra <amodra@gmail.com>
663 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
666 2017-04-27 Alan Modra <amodra@gmail.com>
668 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
669 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
670 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
671 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
672 for undef and undefweak dyn_relocs.
673 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
674 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
675 (allocate_got, allocate_dynrelocs): Likewise.
676 (ppc64_elf_relocate_section): Likewise.
678 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
680 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
681 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
682 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
683 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
685 2017-04-26 Nick Clifton <nickc@redhat.com>
688 * reloc.c (bfd_perform_relocation): Check for a negative address
691 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
694 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
696 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
697 (elf_backend_always_renumber_dynsyms): Define.
698 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
699 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
700 * elflink.c (bfd_elf_size_dynamic_sections): Also call
701 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
703 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
705 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
707 * elflink.c (bfd_elf_size_dynamic_sections): Only call
708 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
709 sections have been created.
711 2017-04-26 Nick Clifton <nickc@redhat.com>
714 * compress.c (bfd_init_section_compress_status): Check the return
715 value from bfd_malloc.
717 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
719 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
720 no_finish_dynamic_symbol.
721 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
723 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
724 weak symbol, don't make it dynamic.
725 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
726 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
727 relocation for GOT reference.
728 (elf_x86_64_finish_dynamic_symbol): Abort if
729 no_finish_dynamic_symbol isn't 0.
731 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
734 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
735 undefined weak symbol, don't make it dynamic.
736 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
737 set no_finish_dynamic_symbol and generate R_386_RELATIVE
738 relocation for R_386_GOT32.
740 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
743 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
745 2017-04-23 Alan Modra <amodra@gmail.com>
748 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
749 * elf.c (lcomm_sym): New.
750 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
751 * bfd-in2.h: Regenerate.
753 2017-04-23 Alan Modra <amodra@gmail.com>
756 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
757 parameters and comment.
758 (_bfd_elf_get_reloc_section): Delete.
759 (_bfd_elf_plt_get_reloc_section): Declare.
760 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
761 New functions. Don't blindly skip over assumed .rel/.rela prefix.
763 (_bfd_elf_get_reloc_section): ..here. Delete.
764 (assign_section_numbers): Call elf_get_reloc_section.
765 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
766 * elfxx-target.h (elf_backend_get_reloc_section): Update.
768 2017-04-23 Alan Modra <amodra@gmail.com>
771 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
774 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
777 * elf32-i386.c (elf_i386_link_hash_entry): Add
778 no_finish_dynamic_symbol.
779 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
780 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
781 symbol, don't make it dynamic in PIE.
782 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
783 set no_finish_dynamic_symbol and generate R_386_RELATIVE
784 relocation for R_386_GOT32
785 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
788 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
792 * elflink.c (elf_link_add_object_symbols): Require
793 --no-dynamic-linker with -E/--dynamic-list when creating
796 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
798 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
801 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
803 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
804 dynamic symbol sorting.
806 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
809 * elflink.c (elf_link_add_object_symbols): Preserve
810 dynamic_ref_after_ir_def when restoring the symbol table for
811 unneeded dynamic object.
813 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
816 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
817 on on undefined IFUNC symbol in the second PLT.
819 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
821 * peXXigen.c (pe_print_reloc): Correct chunk_end.
823 2017-04-19 Alan Modra <amodra@gmail.com>
825 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
826 or make dynamic for info->dynamic_undefined_weak 0 and 1.
827 * elf32-ppc.c:Formatting.
828 (ensure_undefweak_dynamic): Don't make dynamic when
829 info->dynamic_undefined_weak is zero.
830 (allocate_dynrelocs): Discard undefweak dyn_relocs for
831 info->dynamic_undefined_weak. Discard undef dyn_relocs when
832 not default visibility. Discard undef and undefweak
834 (ppc_elf_relocate_section): Adjust to suit.
835 * elf64-ppc.c: Formatting.
836 (ensure_undefweak_dynamic): Don't make dynamic when
837 info->dynamic_undefined_weak is zero.
838 (allocate_dynrelocs): Discard undefweak dyn_relocs for
839 info->dynamic_undefined_weak. Discard them earlier.
841 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
844 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
845 before generating the version definition section.
847 2017-04-17 Alan Modra <amodra@gmail.com>
849 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
850 state when a regular object file defines a symbol with
851 incompatible type to that defined by an earlier shared lib.
853 2017-04-13 Alan Modra <amodra@gmail.com>
855 * coffcode.h: Wrap some overly long _bfd_error_handler args.
857 * elf32-arm.c: Likewise.
858 * elf32-i386.c: Likewise.
859 * elf32-mep.c: Likewise.
860 * elf64-ia64-vms.c: Likewise.
861 * elf64-x86-64.c: Likewise.
862 * elflink.c: Likewise.
863 * elfnn-ia64.c: Likewise.
864 * elfxx-mips.c: Likewise.
866 2017-04-13 Alan Modra <amodra@gmail.com>
868 * aoutx.h: Use %B and %A in error messages throughout file.
869 * aout-cris.c: Likewise.
870 * archive.c: Likewise.
871 * binary.c: Likewise.
872 * coff-rs6000.c: Likewise.
873 * coff-tic4x.c: Likewise.
874 * coffcode.h: Likewise.
875 * coffgen.c: Likewise.
876 * cofflink.c: Likewise.
877 * coffswap.h: Likewise.
878 * cpu-arm.c: Likewise.
879 * elf-eh-frame.c: Likewise.
880 * elf-m10300.c: Likewise.
882 * elf32-arc.c: Likewise.
883 * elf32-arm.c: Likewise.
884 * elf32-bfin.c: Likewise.
885 * elf32-frv.c: Likewise.
886 * elf32-iq2000.c: Likewise.
887 * elf32-m32c.c: Likewise.
888 * elf32-microblaze.c: Likewise.
889 * elf32-nds32.c: Likewise.
890 * elf32-rl78.c: Likewise.
891 * elf32-rx.c: Likewise.
892 * elf32-score.c: Likewise.
893 * elf32-score7.c: Likewise.
894 * elf32-sh64.c: Likewise.
895 * elf32-v850.c: Likewise.
896 * elf32-vax.c: Likewise.
897 * elf32-visium.c: Likewise.
898 * elf64-ia64-vms.c: Likewise.
899 * elf64-mmix.c: Likewise.
900 * elf64-sh64.c: Likewise.
901 * elfcode.h: Likewise.
902 * elfnn-aarch64.c: Likewise.
903 * elfnn-ia64.c: Likewise.
904 * elfxx-mips.c: Likewise.
905 * hpux-core.c: Likewise.
908 * linker.c: Likewise.
913 * peXXigen.c: Likewise.
914 * rs6000-core.c: Likewise.
915 * vms-alpha.c: Likewise.
916 * xcofflink.c: Likewise.
918 2017-04-13 Alan Modra <amodra@gmail.com>
920 * bfd.c (PRINT_TYPE): Define.
921 (_doprnt): New function.
922 (error_handler_internal): Use _doprnt.
923 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
924 calls in their natural order, throughout file.
925 * coff-mcore.c: Likewise.
926 * coff-ppc.c: Likewise.
927 * coff-tic80.c: Likewise.
928 * cofflink.c: Likewise.
929 * elf-s390-common.c: Likewise.
931 * elf32-arm.c: Likewise.
932 * elf32-i386.c: Likewise.
933 * elf32-m32r.c: Likewise.
934 * elf32-msp430.c: Likewise.
935 * elf32-spu.c: Likewise.
936 * elf64-ia64-vms.c: Likewise.
937 * elf64-sparc.c: Likewise.
938 * elf64-x86-64.c: Likewise.
939 * elflink.c: Likewise.
940 * elfnn-aarch64.c: Likewise.
941 * elfnn-ia64.c: Likewise.
942 * elfxx-mips.c: Likewise.
944 2017-04-13 Alan Modra <amodra@gmail.com>
946 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
947 branch veneers" error. Fix double space and format message.
948 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
949 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
951 2017-04-13 Alan Modra <amodra@gmail.com>
953 * bfd-in2.h: Regenerate.
955 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
957 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
958 extra `\n' in warning/error messages.
959 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
960 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
962 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
964 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
965 processor-specific properties with generic ELF target vector.
967 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
969 * elf32-sparc.c (elf_backend_fixup_symbol): New.
970 * elf64-sparc.c (elf_backend_fixup_symbol): New.
971 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
972 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
974 (link_hash_newfunc): Initialize has_got_reloc and
976 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
978 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
980 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
982 (_bfd_sparc_elf_fixup_symbol): New function.
983 (allocate_dynrelocs): Don't allocate space for dynamic
984 relocations and discard relocations against resolved undefined
985 weak symbols in executable. Don't make resolved undefined weak
986 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
987 relocation against undefined weak symbols in PIE.
988 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
989 relocations against resolved undefined weak symbols in PIE
990 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
991 without ynamic PLT/GOT relocations for resolved undefined weak
993 Don't generate dynamic relocation against resolved undefined
994 weak symbol in executable.
995 (pie_finish_undefweak_symbol): New function.
996 (_bfd_sparc_elf_finish_dynamic_sections): Call
997 pie_finish_undefweak_symbol on all symbols in PIE.
998 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
999 (_bfd_sparc_elf_fixup_symbol): New function.
1001 2017-04-10 Nick Clifton <nickc@redhat.com>
1003 * config.bfd: Remove ns32k from obsolete list.
1005 2017-04-10 Alan Modra <amodra@gmail.com>
1008 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1009 (special_sections_i): Likewise for .init_array.
1010 (special_sections_p): Likewise for .preinit_array.
1012 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1016 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1017 ELF_COMMON_DEF_P for common symbols.
1018 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1019 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1020 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1021 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1022 07492f668d2173da7a2bda3707ff0985e0f460b6.
1024 2017-04-07 Pedro Alves <palves@redhat.com>
1026 * opncls.c (bfd_get_debug_link_info): Rename to...
1027 (bfd_get_debug_link_info_1): ... this. Change type of second
1028 parameter to void pointer. Adjust.
1029 (bfd_get_debug_link_info): Reimplement on top of
1030 bfd_get_debug_link_info_1.
1031 (separate_debug_file_exists, separate_alt_debug_file_exists):
1032 Change type of second parameter to void pointer. Adjust.
1033 (get_func_type, check_func_type): Change type of second parameter
1035 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1036 the callback functions instead of passing the address of a local.
1037 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1038 find_separate_debug_file.
1039 (get_alt_debug_link_info_shim): Change type of second parameter to
1040 void pointer. Adjust.
1041 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1042 find_separate_debug_file.
1043 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1044 of second parameter to void pointer. Adjust.
1045 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1046 pointer local to find_separate_debug_file.
1048 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1050 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1051 external symbols with a definition.
1052 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1054 2017-04-07 Alan Modra <amodra@gmail.com>
1056 * po/SRC-POTFILES.in: Regenerate.
1058 2017-04-05 Alan Modra <amodra@gmail.com>
1060 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1063 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1065 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1066 numbers for DataDirectory entry indicies passed to
1069 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1071 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1072 each GNU_MBIND section and align GNU_MBIND section to page size.
1073 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1074 segment for each GNU_MBIND section.
1075 (_bfd_elf_init_private_section_data): Copy sh_info from input
1076 for GNU_MBIND section.
1078 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1080 * elfnn-riscv.c (GP_NAME): Delete.
1081 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1082 (_bfd_riscv_relax_lui): Likewise.
1084 2017-04-04 Nick Clifton <nickc@redhat.com>
1087 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1089 (bfd_elf_final_link): Only initialize the extended symbol index
1090 section if there are extended symbol tables to list.
1092 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1094 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1095 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1096 * configure.ac (elf): Add elf-properties.lo.
1097 * Makefile.in: Regenerated.
1098 * configure: Likewise.
1099 * elf-bfd.h (elf_property_kind): New.
1100 (elf_property): Likewise.
1101 (elf_property_list): Likewise.
1102 (elf_properties): Likewise.
1103 (_bfd_elf_parse_gnu_properties): Likewise.
1104 (_bfd_elf_get_property): Likewise.
1105 (_bfd_elf_link_setup_gnu_properties): Likewise.
1106 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1107 and setup_gnu_properties.
1108 (elf_obj_tdata): Add properties.
1109 * elf-properties.c: New file.
1110 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1111 (elf_i386_merge_gnu_properties): Likewise.
1112 (elf_backend_parse_gnu_properties): Likewise.
1113 (elf_backend_merge_gnu_properties): Likewise.
1114 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1115 (elf_x86_64_merge_gnu_properties): Likewise.
1116 (elf_backend_parse_gnu_properties): Likewise.
1117 (elf_backend_merge_gnu_properties): Likewise.
1118 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1119 (elf_backend_parse_gnu_properties): Likewise.
1120 (elf_backend_setup_gnu_properties): Likewise.
1121 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1122 elf_backend_merge_gnu_properties and
1123 elf_backend_setup_gnu_properties.
1125 2017-03-30 Pip Cet <pipcet@gmail.com>
1127 * elf32-wasm32.c: Add relocation code, two relocs.
1128 * reloc.c: Add wasm32 relocations.
1129 * libbfd.h: Regenerate.
1130 * bfd-in2.h: Regenerate.
1131 * bfd/po/bfd.pot: Regenerate.
1133 2017-03-29 Nick Clifton <nickc@redhat.com>
1136 * coff-bfd.h (struct coff_section_data): Add new fields:
1137 saved_bias and bias.
1138 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1139 computed for PE binaries.
1140 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1143 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1146 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1147 to handle a local symbol with a hash-symbol-entry; without PLT.
1148 Add BFD_ASSERT for an incidental case with GOT entry present.
1149 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1150 isn't forced-or-set local.
1152 2017-03-27 Pip Cet <pipcet@gmail.com>
1154 * wasm-module.c: New file to support WebAssembly modules.
1155 * wasm-module.h: New file to support WebAssembly modules.
1156 * doc/webassembly.texi: Start documenting wasm-module.c.
1157 * config.bfd: Add wasm_vec.
1158 * targets.c: Likewise.
1159 * configure.ac: Likewise.
1160 * Makefile.am: Add entries for wasm-module.c.
1161 * Makefile.in: Regenerate.
1162 * configure: Regenerate.
1163 * po/SRC-POTFILES.in: Regenerate.
1165 2017-03-27 Pip Cet <pipcet@gmail.com>
1167 * cpu-wasm32.c: New file to support wasm32 architecture.
1168 * elf32-wasm32.c: New file to support wasm32 architecture.
1169 * Makefile.am: Add wasm32 architecture.
1170 * archures.c: Likewise.
1171 * config.bfd: Likewise.
1172 * configure.ac: Likewise.
1173 * targets.c: Likewise.
1174 * Makefile.in: Regenerate.
1175 * bfd-in2.h: Regenerate.
1176 * configure: Regenerate.
1177 * po/SRC-POTFILES.in: Regenerate.
1179 2017-03-20 Alan Modra <amodra@gmail.com>
1182 * elf64-ppc.c (compare_symbols): Stabilize sort.
1184 2017-03-18 Alan Modra <amodra@gmail.com>
1186 * elf64-ppc.c (struct ppc_link_hash_table): Add
1187 local_ifunc_resolver and maybe_local_ifunc_resolver.
1188 (ppc_build_one_stub): Set flags on emitting dynamic
1189 relocation to ifunc.
1190 (ppc64_elf_relocate_section): Likewise.
1191 (ppc64_elf_finish_dynamic_symbol): Likewise.
1192 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1193 local dynamic relocs to ifuncs.
1194 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1195 local_ifunc_resolver and maybe_local_ifunc_resolver.
1196 (ppc_elf_relocate_section): Set flag on emitting dynamic
1197 relocation to ifuncs.
1198 (ppc_elf_finish_dynamic_symbol): Likewise.
1199 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1200 dynamic relocs to ifuncs.
1202 2017-03-13 Nick Clifton <nickc@redhat.com>
1205 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1206 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1207 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1208 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1209 * bfd-in2.h: Regenerate.
1210 * libbfd.h: Regenerate.
1211 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1213 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1214 (elfNN_aarch64_howto_table): Likewise.
1215 (aarch64_tls_transition_without_check): Likewise.
1216 (aarch64_reloc_got_type): Likewise.
1217 (elfNN_aarch64_final_link_relocate): Likewise.
1218 (elfNN_aarch64_tls_relax): Likewise.
1219 (elfNN_aarch64_relocate_section): Likewise.
1220 (elfNN_aarch64_gc_sweep_hook): Likewise.
1221 (elfNN_aarch64_check_relocs): Likewise.
1222 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1223 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1225 2017-03-11 Alan Modra <amodra@gmail.com>
1227 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1228 parameter is in fact used. Whitespace fixes.
1229 * elf64-ppc.c: Likewise.
1231 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1233 * rs6000-core.c (CORE_NEW): Simplify macro when
1234 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1236 2017-03-07 Alan Modra <amodra@gmail.com>
1240 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1243 2017-03-05 Alan Modra <amodra@gmail.com>
1245 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1246 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1247 (next_cie_fde_offset): New function.
1248 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1249 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1250 four bytes. Align CIEs to four or eight bytes depending on
1251 per_encoding_aligned8. Align FDEs according to their encoding.
1252 Pad last FDE to output section alignment.
1253 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1255 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1256 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1257 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1259 2017-03-02 Martin Bickel <binutils@ineranves.de>
1262 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1263 empty segments which have a zero filesz, but a non-zero memsz.
1265 2017-03-02 Alan Modra <amodra@gmail.com>
1267 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1269 2017-02-28 Alan Modra <amodra@gmail.com>
1271 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1272 (ppc64_elf_relocate_section): Likewise.
1274 2017-02-28 Alan Modra <amodra@gmail.com>
1277 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1278 rather than elf32_nios2_hash_table or elf_hash_table.
1279 (create_got_section): Likewise.
1280 (nios2_elf32_finish_dynamic_symbol): Likewise.
1281 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1282 (nios2_elf32_size_dynamic_sections): Likewise.
1283 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1284 vars. Use htab equivalents directly instead. Don't create
1285 all dynamic sections on needing just the GOT. Use a goto
1286 rather than a fall-through with reloc test. Ensure
1287 htab->dynobj is set when making dynamic sreloc section.
1288 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1289 equivalent directly instead. Don't segfault on looking for
1290 .dynamic when dynamic sections have not been created. Don't
1291 segfault on .got.plt being discarded.
1292 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1293 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1294 fixme and another not so relevant comment.
1295 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1296 already set, set hash table dynobj on creating .sbss.
1298 2017-02-28 Alan Modra <amodra@gmail.com>
1300 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1301 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1302 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1303 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1304 (ppc64_elf_relocate_section): Likewise.
1305 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1306 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1307 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1308 * libbfd.h: Regenerate.
1309 * bfd-in2.h: Regenerate.
1311 2017-02-28 Alan Modra <amodra@gmail.com>
1313 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1314 dynamic .data.rel.ro read-only.
1315 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1316 rather than section flags when deciding where copy reloc goes.
1317 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1318 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1319 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1320 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1321 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1322 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1323 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1324 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1325 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1326 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1327 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1328 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1329 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1330 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1331 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1332 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1333 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1334 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1335 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1337 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1339 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1340 `jalr $0, $25' instruction encoding.
1342 2017-02-27 Nick Clifton <nickc@redhat.com>
1345 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1346 generating a seg-fault when encountering a symbol that has been
1347 deleted by garbage collection.
1349 2017-02-25 Alan Modra <amodra@gmail.com>
1351 * elf32-arc.c (struct dynamic_sections): Delete.
1352 (enum dyn_section_types): Delete.
1353 (dyn_section_names): Delete.
1354 (arc_create_dynamic_sections): Delete.
1355 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1356 segfault on discarded .rela.plt section.
1357 (elf_arc_size_dynamic_sections): Formatting. Don't call
1358 arc_create_dynamic_sections. Don't allocate memory for sections
1359 handled by the generic linker. Correct code finding relocs in
1360 read-only sections. Set SEC_EXCLUDE on zero size .got,
1361 .got.plt, and .dynbss sections. Do set .interp for pies.
1363 2017-02-24 Andrew Waterman <andrew@sifive.com>
1365 * elfnn-riscv.c (GP_NAME): New macro.
1366 (riscv_global_pointer_value): Use it.
1367 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1368 output section, consider only that section's alignment.
1370 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1372 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1373 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1374 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1375 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1377 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1379 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1380 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1383 2017-02-23 Alan Modra <amodra@gmail.com>
1386 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1388 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1389 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1392 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1395 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1396 processing ahead of the call to `elf_gc_sweep_symbol'.
1398 2017-02-22 Nick Clifton <nickc@redhat.com>
1401 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1402 created section 4-byte alignment.
1404 2017-02-22 Alan Modra <amodra@gmail.com>
1406 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1407 on .got or .plt output section being discarded by script.
1408 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1411 2017-02-21 Alan Modra <amodra@gmail.com>
1413 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1414 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1416 2017-02-20 Alan Modra <amodra@gmail.com>
1419 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1420 if DT_RELSZ/DT_RELASZ is zero.
1422 2017-02-17 Nick Clifton <nickc@redhat.com>
1424 * compress.c (bfd_get_full_section_contents): Remember to reduce
1425 compressed size by the sizeof the compression header when
1426 decompressing the contents.
1428 2017-02-17 Pedro Alves <palves@redhat.com>
1430 * srec.c (Chunk): Rename to ...
1431 (_bfd_srec_len): ... this.
1432 (S3Forced): Rename to ...
1433 (_bfd_srec_forceS3): ... this.
1434 * objcopy.c: Adjust all references.
1436 2017-02-17 Pedro Alves <palves@redhat.com>
1438 * archive.c (bsd_write_armap): Rename to ...
1439 (_bfd_bsd_write_armap): ... this.
1440 (coff_write_armap): Rename to ...
1441 (_bfd_coff_write_armap): ... this.
1442 * libbfd-in.h (bsd_write_armap): Rename to ...
1443 (_bfd_bsd_write_armap): ... this.
1444 (coff_write_armap): Rename to ...
1445 (_bfd_coff_write_armap): ... this.
1446 * aout-target.h, aout-tic30.c: Adjust all users.
1447 * libbfd.h: Regenerate.
1449 2017-02-17 Pedro Alves <palves@redhat.com>
1451 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1452 (warn_deprecated): Rename to ...
1453 (_bfd_warn_deprecated): ... this.
1454 * libbfd.c (warn_deprecated): Rename to ...
1455 (_bfd_warn_deprecated): ... this.
1456 * bfd-in2.h: Regenerate.
1458 2017-02-17 Pedro Alves <palves@redhat.com>
1460 * bfdio.c (real_ftell): Rename to ...
1461 (_bfd_real_ftell): ... this.
1462 (real_fseek): Rename to ...
1463 (_bfd_real_fseek): ... this.
1464 (real_fopen): Rename to ...
1465 (_bfd_real_fopen): ... this.
1466 * libbfd-in.h (real_ftell): Rename to ...
1467 (_bfd_real_ftell): ... this.
1468 (real_fseek): Rename to ...
1469 (_bfd_real_fseek): ... this.
1470 (real_fopen): Rename to ...
1471 (_bfd_real_fopen): ... this.
1472 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1473 * libbfd.h: Regenerate.
1475 2017-02-17 Pedro Alves <palves@redhat.com>
1477 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1478 * libbfd.c (read_unsigned_leb128): Rename to ...
1479 (_bfd_read_unsigned_leb128): ... this.
1480 (read_signed_leb128): Rename to ...
1481 (_bfd_read_signed_leb128): ... this.
1482 (safe_read_leb128): Rename to ...
1483 (_bfd_safe_read_leb128): ... this.
1484 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1485 (_bfd_read_unsigned_leb128): ... this.
1486 (read_signed_leb128): Rename to ...
1487 (_bfd_read_signed_leb128): ... this.
1488 (safe_read_leb128): Rename to ...
1489 (_bfd_safe_read_leb128): ... this.
1490 * libbfd.h: Renegerate.
1492 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1494 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1495 before trying to fine matching file and line information.
1497 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1499 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1500 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1501 not match current bfd, then reload debug information. Record bfd
1502 we're loading debug info for in the stash. If we have debug
1503 informatin in the cache then perform section placement before
1506 2017-02-16 Alan Modra <amodra@gmail.com>
1509 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1510 * elfxx-target.h (elf_backend_no_page_alias): Define.
1511 (elfNN_bed): Init new field.
1512 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1513 ensure PT_LOAD segment starts on a new page.
1514 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1516 2017-02-16 Alan Modra <amodra@gmail.com>
1519 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1522 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1524 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1525 * bfd-in2.h: Regenerated.
1527 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1530 * elf32-i386.c (elf_i386_relocate_section): Allow
1531 "lea foo@GOT, %reg" in PIC.
1533 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1536 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1537 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1538 error against local IFUNC symbol without a base register for
1541 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1543 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1544 `%P: %H:' with `info->callbacks->einfo'.
1545 (ppc_elf_relocate_section): Likewise.
1546 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1547 (ppc64_elf_edit_toc): Likewise.
1548 (ppc64_elf_relocate_section): Likewise.
1550 2017-02-14 Alan Modra <amodra@gmail.com>
1552 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1553 --gc-keep-exported, and test versioned field of sym rather than
1554 looking for @ in name.
1556 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1558 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1561 2017-02-13 Nick Clifton <nickc@redhat.com>
1564 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1567 2017-02-07 Andrew Waterman <andrew@sifive.com>
1569 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1570 entry size if PLT header is written.
1572 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1574 Fix sparc64 dynamic relocation processing to use the dynamic
1576 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1577 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1580 2017-02-03 Nick Clifton <nickc@redhat.com>
1583 * coffcode.h (coff_write_object_contents): Enlarge size of
1584 s_name_buf in order to avoid compile time warning about possible
1586 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1587 32-bits of insn value before printing into buffer.
1589 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1591 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1592 `max_local_dynindx'.
1593 (mips_elf_sort_hash_table): Handle it.
1594 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1595 symbols bump up `max_local_dynindx' rather than
1596 `max_non_got_dynindx'.
1598 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1600 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1601 `min_got_dynindx', `max_unref_got_dynindx' and
1602 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1603 (mips_elf_sort_hash_table): Adjust accordingly.
1605 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1607 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1608 to access the hash table.
1610 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1612 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1613 non-NULL `htab' to the beginning.
1615 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1617 * elflink.c (elf_gc_sweep): Wrap overlong line.
1619 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1621 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1622 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1623 * elfxx-mips.c (mips_elf_link_hash_table): Add
1624 `ignore_branch_isa' member.
1625 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1626 in branch relocation calculation as an error if
1627 `ignore_branch_isa' has been set.
1628 (_bfd_mips_elf_insn32): Rename to...
1629 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1630 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1631 Handle the new parameter.
1633 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1635 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1636 local variable dynobj.
1639 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1640 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1641 executable from read-only sections into sdynrelro.
1642 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1643 dynamic relocs in sdynrelro.
1644 (elf_backend_want_dynrelro): Define.
1646 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1648 * config.bfd (*-*-rtemsaout*): Mark as removed.
1650 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1652 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1653 (arm-*-rtems*): Move to (arm*-*-eabi*).
1654 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1655 (m68-*-rtems*): Move to (m68*-*-elf*).
1657 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1659 * config.bfd (*-*-rtemscoff*): Mark as removed.
1661 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1664 * elflink.c (bfd_elf_record_link_assignment): Revert last
1665 change and don't ever clear `forced_local'. Set `mark'
1667 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1669 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1670 (bfd_elf_size_dynamic_sections): ... here.
1671 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1672 and set `mark' instead in `__tls_get_addr_opt' processing.
1673 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1675 2017-01-24 Alan Modra <amodra@gmail.com>
1677 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1678 where dynamic relocs are preferable. Allow ifunc too.
1679 (ensure_undefweak_dynamic): New function.
1680 (allocate_dynrelocs): Use it here. Move plt handling last and
1681 don't make symbols dynamic, simplifying loop. Only make undef
1682 weak symbols with GOT entries dynamic. Correct condition
1683 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1684 comments. Remove goto.
1685 (ppc_elf_relocate_section): Correct test for using dynamic
1686 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1687 to suit. Set up explicit tls_index entries and implicit GOT
1688 tls_index entries resolvable at link time for
1689 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1690 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1691 (ensure_undefweak_dynamic): New function.
1692 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1693 with GOT entries dynamic. Remove unnecessary test of
1694 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1695 (ppc64_elf_relocate_section): Correct test for using dynamic
1696 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1697 to suit. Set up explicit tls_index entries and implicit GOT
1698 tls_index entries resolvable at link time for __tls_get_addr_opt.
1699 Simplify expression to clear mem for prelink.
1701 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1703 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1705 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1707 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1708 (elf_backend_hash_symbol): Define.
1710 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1713 * elflink.c (bfd_elf_record_link_assignment): Clear any
1714 `forced_local' marking for DSO symbols that are not being
1717 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1719 * elfnn-riscv.c (riscv_elf_object_p): New function.
1721 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1724 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1726 (elf_x86_64_check_relocs): Create .eh_frame section for the
1728 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1729 .eh_frame section for the .plt.bnd section.
1730 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1731 for the .plt.bnd section.
1733 2017-01-12 Nick Clifton <nickc@redhat.com>
1736 * opncls.c (find_separate_debug_file): Add include_dirs
1737 parameter. Only include the directory part of the bfd's filename
1738 in search paths if include_dirs is true. Add a couple of extra
1739 locations for looking for debug files.
1740 ( bfd_follow_gnu_debuglink): Update invocation of
1741 find_separate_debug_file.
1742 (bfd_follow_gnu_debugaltlink): Likewise.
1743 (get_build_id): New function: Finds the build-id of the given bfd.
1744 (get_build_id_name): New function: Computes the name of the
1745 separate debug info file for a bfd, based upon its build-id.
1746 (check_build_id_file): New function: Checks to see if a separate
1747 debug info file exists at the given location, and that its
1748 build-id matches that of the original bfd.
1749 (bfd_follow_build_id_debuglink): New function: Finds a separate
1750 debug info file for a given bfd by using the build-id method.
1751 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1752 method of locating a separate debug info file before using the
1754 * bfd-in2.h: Regenerate.
1756 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1759 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1760 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1761 elf_x86_64_eh_frame_plt_got.
1762 (elf_x86_64_size_dynamic_sections): Get unwind info from
1763 elf_x86_64_bnd_arch_bed for the BND PLT.
1765 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1767 * config.bfd: Add entries for i686-redox and x86_64-redox.
1769 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1771 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1773 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1774 .eh_frame section to 4 bytes for x32.
1775 (elf_x86_64_check_relocs): Likewise.
1777 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1780 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1781 (PLT_GOT_FDE_LENGTH): Likewise.
1782 (elf_i386_plt_layout): Add eh_frame_plt_got and
1783 eh_frame_plt_got_size.
1784 (elf_i386_plt): Updated.
1785 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1786 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1787 (elf_i386_size_dynamic_sections): Allocate and initialize
1788 .eh_frame section for .plt.got.
1789 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1791 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1792 eh_frame_plt_got_size.
1793 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1794 (PLT_GOT_FDE_LENGTH): Likewise.
1795 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1796 eh_frame_plt_got_size.
1797 (elf_x86_64_arch_bed): Updated.
1798 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1799 eh_frame_plt_got_size.
1800 (elf_x86_64_nacl_arch_bed): Likewise.
1801 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1802 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1803 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1804 .eh_frame section for .plt.got.
1805 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1808 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1810 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1811 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1813 2017-01-09 Nick Clifton <nickc@redhat.com>
1815 * dwarf2.c (lookup_address_in_function_table): Return early if
1816 there are no functions in the given comp unit, or if the high
1817 address of the last function in the comp unit is less than the
1820 2017-01-09 Nick Clifton <nickc@redhat.com>
1823 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1824 message if there are too many symbols to load.
1826 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1828 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1829 if relocs are cached.
1831 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1834 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1835 for R_MICROBLAZE_GOTOFF_64.
1837 2017-01-03 Nick Clifton <nickc@redhat.com>
1839 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1840 warning about using a possibly uninitialised variable.
1842 2017-01-02 Alan Modra <amodra@gmail.com>
1844 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1845 (allocate_plt_static, allocate_dynrelocs): Use it.
1847 2017-01-02 Alan Modra <amodra@gmail.com>
1849 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1850 .PARISC.unwind section.
1852 2017-01-02 Alan Modra <amodra@gmail.com>
1855 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1856 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1857 indirect to GOT pointer relative code edit.
1859 2017-01-02 Alan Modra <amodra@gmail.com>
1861 Update year range in copyright notice of all files.
1863 For older changes see ChangeLog-2016
1865 Copyright (C) 2017 Free Software Foundation, Inc.
1867 Copying and distribution of this file, with or without modification,
1868 are permitted in any medium without royalty provided the copyright
1869 notice and this notice are preserved.
1875 version-control: never