1 2017-06-13 Nick Clifton <nickc@redhat.com>
4 * elflink.c (elf_link_adjust_relocs): Generate an error when
5 encountering a reloc against a symbol removed by garbage
8 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
10 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
11 to merge_gnu_properties.
12 * elf-properties.c (elf_merge_gnu_properties): Add struct
13 bfd_link_info * and pass it to merge_gnu_properties.
14 (elf_merge_gnu_property_list): Add struct bfd_link_info *
15 and pass it to elf_merge_gnu_properties.
16 (_bfd_elf_link_setup_gnu_properties): Pass info to
17 elf_merge_gnu_property_list.
18 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
20 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
22 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
25 * binary.c (binary_set_section_contents): Scale lma by octets
26 per byte to set filepos.
28 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
30 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
33 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
35 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
38 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
40 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
41 patched section contents for TLS IE reloc.
42 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
44 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
46 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
47 RELOC_FOR_GLOBAL_SYMBOL macro.
49 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
51 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
54 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
56 * config/tc-arc.c (md_undefined_symbol): Changed.
57 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
59 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
61 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
64 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
66 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
67 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
69 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
71 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
74 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
76 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
77 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
78 is non-zero. Add clarifying comments.
80 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
82 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
83 name. Use local IFUNC symbol name string to report unsupported
84 non-PIC call to IFUNC function.
85 (elf_i386_relocate_section): Dump local IFUNC name with minfo
86 when generating R_386_IRELATIVE relocation.
87 (elf_i386_finish_dynamic_symbol): Likewise.
88 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
90 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
91 when generating R_X86_64_IRELATIVE relocation.
92 (elf_x86_64_finish_dynamic_symbol): Likewise.
94 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
96 * elf.c (setup_group): Make sure BFD sections are created for all
97 group sections in the input file when processing SHF_GROUP
99 (bfd_section_from_shdr): Avoid duplicating logic already
100 implemented in `setup_group'.
102 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
105 * peXXigen.c (pe_print_idata): Use the address of the first thunk
106 if the hint address is zero.
108 2017-06-06 James Clarke <jrtc27@jrtc27.com>
111 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
112 ELF_COMMON_DEF_P for common symbols.
114 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
116 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
117 SEC_GROUP sections as SEC_EXCLUDE.
118 (bfd_elf_set_group_contents): Replace use of abort with an assert.
119 (assign_section_numbers): Use resolve_section_groups flag instead
120 of relocatable link type.
121 (_bfd_elf_init_private_section_data): Use resolve_section_groups
122 flag instead of checking the final_link flag for part of the
123 checks in here. Fix white space as a result.
124 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
125 instead of relocatable link type.
126 (bfd_elf_final_link): Likewise.
128 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
130 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
132 * elf32-score.c (score_elf_final_link_relocate): Likewise.
133 (s3_bfd_score_elf_check_relocs): Likewise.
134 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
135 (score_elf_final_link_relocate): Likewise.
136 (s7_bfd_score_elf_check_relocs): Likewise.
138 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
140 * elflink.c (init_reloc_cookie_rels): Remove unused variable
143 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
145 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
146 from `reloc_count' rather than decrementing it.
147 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
148 `reloc_count' by `int_rels_per_ext_rel'.
149 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
150 `reloc_count' by `int_rels_per_ext_rel' for last relocation
152 (s3_bfd_score_elf_check_relocs): Likewise.
153 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
154 (s7_bfd_score_elf_relocate_section): Likewise.
155 (s7_bfd_score_elf_check_relocs): Likewise.
156 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
157 prototype and function.
158 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
159 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
160 triple rather than once the sum of REL and RELA relocation entry
162 (bfd_elf64_get_reloc_upper_bound): Remove macro.
163 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
164 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
165 storage allocation size determination.
166 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
167 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
168 by `int_rels_per_ext_rel' for last relocation entry
170 (bfd_elf_final_link): Do not multiply `reloc_count' by
171 `int_rels_per_ext_rel' for internal relocation storage
172 allocation size determination.
173 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
174 `int_rels_per_ext_rel' for last relocation entry determination.
175 (elf_gc_smash_unused_vtentry_relocs): Likewise.
176 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
177 (_bfd_mips_elf_relocate_section): Likewise.
179 2017-06-05 Alan Modra <amodra@gmail.com>
182 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
184 2017-06-01 John Baldwin <jhb@FreeBSD.org>
186 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
187 determine structure sizes.
188 (elfcore_grok_freebsd_prstatus): Likewise.
190 2017-06-01 Alan Modra <amodra@gmail.com>
192 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
193 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
195 (is_elfv2_localentry0): New function.
196 (ppc64_elf_tls_setup): Default params->plt_localentry0.
197 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
198 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
199 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
200 optimized localentry:0 stubs.
201 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
202 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
204 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
206 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
208 2017-05-30 Casey Smith <clegg89@gmail.com>
211 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
212 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
214 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
216 * cpu-arc.c (arc_compatible): New function.
218 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
220 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
222 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
225 * bfdio.c (bfd_get_file_size): New function.
226 * bfd-in2.h: Regenerated.
228 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
230 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
233 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
235 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
236 dynobj instead of htab->elf.dynobj.
238 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
240 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
242 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
243 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
244 actual number of internal relocations retrieved. Adjust
245 function description.
246 (bfd_elf64_canonicalize_reloc): Remove macro.
247 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
249 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
251 * archures.c (bfd_mach_sparc_v9m8): Define.
252 (bfd_mach_sparc_v8plusm8): Likewise.
253 (bfd_mach_sparc_v9_p): Adjust to M8.
254 (bfd_mach_sparc_64bit_p): Likewise.
255 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
256 bfd_mach_sparc_v8plusm8.
257 * bfd-in2.h: Regenerated.
258 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
260 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
261 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
262 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
264 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
265 bfd_mach_sparc_v8plusm8.
267 2017-05-19 Alan Modra <amodra@gmail.com>
269 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
270 debug and special sections when no non-note alloc sections in an
273 2017-05-18 Alan Modra <amodra@gmail.com>
275 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
276 * elf-m10300.c: Likewise.
278 * elf32-arc.c: Likewise.
279 * elf32-bfin.c: Likewise.
280 * elf32-m68k.c: Likewise.
281 * elf32-nds32.c: Likewise.
282 * elf32-tilepro.c: Likewise.
283 * elflink.c: Likewise.
284 * elfnn-aarch64.c: Likewise.
285 * elfnn-riscv.c: Likewise.
286 * elfxx-tilegx.c: Likewise.
287 * mach-o.c: Likewise.
288 * peXXigen.c: Likewise.
289 * vms-alpha.c: Likewise.
290 * vms-lib.c: Likewise.
292 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
295 * elflink.c (elf_gc_mark_debug_section): New function.
296 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
297 referenced by kept debug sections.
299 2017-05-16 Alan Modra <amodra@gmail.com>
301 * elf-m10300.c: Rename occurrences of non_ir_ref.
302 * elf32-arm.c: Likewise.
303 * elf32-bfin.c: Likewise.
304 * elf32-cr16.c: Likewise.
305 * elf32-cris.c: Likewise.
306 * elf32-d10v.c: Likewise.
307 * elf32-dlx.c: Likewise.
308 * elf32-fr30.c: Likewise.
309 * elf32-frv.c: Likewise.
310 * elf32-hppa.c: Likewise.
311 * elf32-i370.c: Likewise.
312 * elf32-i386.c: Likewise.
313 * elf32-iq2000.c: Likewise.
314 * elf32-lm32.c: Likewise.
315 * elf32-m32c.c: Likewise.
316 * elf32-m32r.c: Likewise.
317 * elf32-m68hc1x.c: Likewise.
318 * elf32-m68k.c: Likewise.
319 * elf32-mcore.c: Likewise.
320 * elf32-metag.c: Likewise.
321 * elf32-microblaze.c: Likewise.
322 * elf32-moxie.c: Likewise.
323 * elf32-msp430.c: Likewise.
324 * elf32-mt.c: Likewise.
325 * elf32-nios2.c: Likewise.
326 * elf32-or1k.c: Likewise.
327 * elf32-ppc.c: Likewise.
328 * elf32-rl78.c: Likewise.
329 * elf32-s390.c: Likewise.
330 * elf32-score.c: Likewise.
331 * elf32-score7.c: Likewise.
332 * elf32-sh.c: Likewise.
333 * elf32-tic6x.c: Likewise.
334 * elf32-tilepro.c: Likewise.
335 * elf32-v850.c: Likewise.
336 * elf32-vax.c: Likewise.
337 * elf32-xstormy16.c: Likewise.
338 * elf32-xtensa.c: Likewise.
339 * elf64-alpha.c: Likewise.
340 * elf64-hppa.c: Likewise.
341 * elf64-ia64-vms.c: Likewise.
342 * elf64-mmix.c: Likewise.
343 * elf64-ppc.c: Likewise.
344 * elf64-s390.c: Likewise.
345 * elf64-sh64.c: Likewise.
346 * elf64-x86-64.c: Likewise.
347 * elflink.c: Likewise.
348 * elfnn-aarch64.c: Likewise.
349 * elfnn-ia64.c: Likewise.
350 * elfnn-riscv.c: Likewise.
351 * elfxx-mips.c: Likewise.
352 * elfxx-sparc.c: Likewise.
353 * elfxx-tilegx.c: Likewise.
354 * linker.c: Likewise.
356 2017-05-16 Alan Modra <amodra@gmail.com>
358 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
359 * elflink.c (elf_link_add_object_symbols): Update to use
361 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
363 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
365 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
367 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
369 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
371 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
372 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
374 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
376 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
378 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
380 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
381 to plt_second/plt_second_eh_frame.
382 (elf_x86_64_link_hash_newfunc): Updated.
383 (elf_x86_64_allocate_dynrelocs): Likewise.
384 (elf_x86_64_size_dynamic_sections): Likewise.
385 (elf_x86_64_relocate_section): Likewise.
386 (elf_x86_64_finish_dynamic_symbol): Likewise.
387 (elf_x86_64_finish_dynamic_sections): Likewise.
388 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
389 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
391 (elf_backend_setup_gnu_properties): Updated. Create the
392 .plt.sec section instead of the .plt.sec section.
394 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
396 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
397 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
398 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
400 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
402 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
403 (bfd_elf64_set_reloc): Define.
404 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
406 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
408 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
409 (struct bfd_target): New field _bfd_set_reloc.
410 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
411 * reloc.c (_bfd_generic_set_reloc): New function.
412 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
413 * nlm-target.h (nlm_set_reloc): Likewise.
414 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
415 * aout-tic30.c (MY_set_reloc): Likewise.
416 * aout-target.h (MY_set_reloc): Likewise.
417 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
418 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
419 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
420 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
421 * aout-adobe.c (aout_32_set_reloc): Likewise.
422 * bout.c (b_out_set_reloc): Likewise.
423 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
424 * i386os9k.c (aout_32_set_reloc): Likewise.
425 * ieee.c (ieee_set_reloc): Likewise.
426 * oasys.c (oasys_set_reloc): Likewise.
427 * som.c (som_set_reloc): Likewise.
428 * versados.c (versados_set_reloc): Likewise.
429 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
430 _bfd_generic_set_reloc.
431 (rs6000_xcoff64_aix_vec): LIkewise.
432 * libbfd.c (_bfd_norelocs_set_reloc): New function.
433 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
434 * i386msdos.c (msdos_set_reloc): Define to
435 _bfd_norelocs_set_reloc.
436 * elfcode.h (elf_set_reloc): Define.
437 * bfd-in2.h: Regenerated.
439 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
442 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
443 for IFUNC function address.
445 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
447 * elf32-arc.c (FEATURE_LIST_NAME): Define.
448 (CONFLICT_LIST): Likewise.
449 (opcode/arc-attrs.h): Include.
450 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
451 (arc_extract_features): New file.
452 (arc_stralloc): Likewise.
453 (arc_elf_merge_attributes): Likewise.
454 (arc_elf_merge_private_bfd_data): Use object attributes.
455 (bfd_arc_get_mach_from_attributes): New function.
456 (arc_elf_object_p): Use object attributes.
457 (arc_elf_final_write_processing): Likewise.
458 (elf32_arc_obj_attrs_arg_type): New function.
459 (elf32_arc_obj_attrs_handle_unknown): Likewise.
460 (elf32_arc_section_from_shdr): Likewise.
461 (elf_backend_obj_attrs_vendor): Define.
462 (elf_backend_obj_attrs_section): Likewise.
463 (elf_backend_obj_attrs_arg_type): Likewise.
464 (elf_backend_obj_attrs_section_type): Likewise.
465 (elf_backend_obj_attrs_handle_unknown): Likewise.
466 (elf_backend_section_from_shdr): Likewise.
468 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
471 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
472 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
473 and the destination is a Thumb symbol.
475 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
477 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
478 initializer to silence GCC 4.2.
479 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
481 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
483 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
484 (LAZY_PLT_ENTRY_SIZE): This.
485 (NON_LAZY_PLT_ENTRY_SIZE): New.
486 (elf_x86_64_plt0_entry): Renamed to ...
487 (elf_x86_64_lazy_plt0_entry): This.
488 (elf_x86_64_plt_entry): Renamed to ...
489 (elf_x86_64_lazy_plt_entry): This.
490 (elf_x86_64_bnd_plt0_entry): Renamed to ...
491 (elf_x86_64_lazy_bnd_plt0_entry): This.
492 (elf_x86_64_legacy_plt_entry): Removed.
493 (elf_x86_64_bnd_plt_entry): Renamed to ...
494 (elf_x86_64_lazy_bnd_plt_entry): This.
495 (elf_x86_64_legacy_plt2_entry): Renamed to ...
496 (elf_x86_64_non_lazy_plt_entry): This.
497 (elf_x86_64_bnd_plt2_entry): Renamed to ...
498 (elf_x86_64_non_lazy_bnd_plt_entry): This.
499 (elf_x86_64_eh_frame_plt): Renamed to ...
500 (elf_x86_64_eh_frame_lazy_plt): This.
501 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
502 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
503 (elf_x86_64_eh_frame_plt_got): Renamed to ...
504 (elf_x86_64_eh_frame_non_lazy_plt): This.
505 (elf_x86_64_lazy_plt_layout): New.
506 (elf_x86_64_non_lazy_plt_layout): Likewise.
507 (elf_x86_64_plt_layout): Likewise.
508 (elf_x86_64_backend_data): Remove PLT layout information. Add
509 os for target system.
510 (GET_PLT_ENTRY_SIZE): Removed.
511 (elf_x86_64_lazy_plt): New.
512 (elf_x86_64_non_lazy_plt): Likewise.
513 (elf_x86_64_lazy_bnd_plt): Likewise.
514 (elf_x86_64_non_lazy_bnd_plt): Likewise.
515 (elf_x86-64_arch_bed): Updated.
516 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
517 (elf_x86_64_create_dynamic_sections): Removed.
518 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
519 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
520 (elf_x86-64_adjust_dynamic_symbol): Updated.
521 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
522 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
523 size for PLT0 if there is no PLT0. Get plt_entry_size from
524 non_lazy_plt for non-lazy PLT entries.
525 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
526 from non_lazy_plt for non-lazy PLT entries.
527 (elf_x86-64_relocate_section): Updated. Properly get PLT index
529 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
530 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
531 entries with non-lazy PLT layout. Don't fill the second and third
532 slots in the PLT entry if there is no PLT0.
533 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
534 if there is no PLT0. Set sh_entsize on the .plt.got section.
535 (compare_relocs): New.
536 (elf_x86_64_plt_type): Likewise.
537 (elf_x86_64_plt): Likewise.
538 (elf_x86_64_nacl_plt): New. Forward declaration.
539 (elf_x86_64_get_plt_sym_val): Removed.
540 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
541 against all dynamic relocations.
542 (elf_x86_64_link_setup_gnu_properties): New function.
543 (elf_backend_create_dynamic_sections): Updated.
544 (elf_backend_setup_gnu_properties): New.
545 (elf_x86_64_nacl_plt): New.
546 (elf_x86_64_nacl_arch_bed): Updated.
548 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
550 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
551 (LAZY_PLT_ENTRY_SIZE): This.
552 (NON_LAZY_PLT_ENTRY_SIZE): New.
553 (elf_i386_plt0_entry): Renamed to ...
554 (elf_i386_lazy_plt0_entry): This.
555 (elf_i386_plt_entry): Renamed to ...
556 (elf_i386_lazy_plt_entry): This.
557 (elf_i386_pic_plt0_entry): Renamed to ...
558 (elf_i386_pic_lazy_plt0_entry): This.
559 (elf_i386_pic_plt_entry): Renamed to ...
560 (elf_i386_pic_lazy_plt_entry): This.
561 (elf_i386_got_plt_entry): Renamed to ...
562 (elf_i386_non_lazy_plt_entry): This.
563 (elf_i386_pic_got_plt_entry): Renamed to ...
564 (elf_i386_pic_non_lazy_plt_entry): This.
565 (elf_i386_eh_frame_plt): Renamed to ...
566 (elf_i386_eh_frame_lazy_plt): This.
567 (elf_i386_eh_frame_plt_got): Renamed to ...
568 (elf_i386_eh_frame_non_lazy_plt): This.
569 (elf_i386_plt_layout): Renamed to ...
570 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
571 eh_frame_plt_got_size.
572 (elf_i386_non_lazy_plt_layout): New.
573 (elf_i386_plt_layout): Likewise.
574 (elf_i386_non_lazy_plt): Likewise.
575 (GET_PLT_ENTRY_SIZE): Removed.
576 (elf_i386_plt): Renamed to ...
577 (elf_i386_lazy_plt): This.
578 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
579 (elf_i386_arch_bed): Updated.
580 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
581 (elf_i386_create_dynamic_sections): Removed.
582 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
583 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
584 (elf_i386_adjust_dynamic_symbol): Updated.
585 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
586 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
587 size for PLT0 if there is no PLT0.
588 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
589 output section is discarded only if GOT isn't empty.
590 (elf_i386_relocate_section): Updated. Properly get PLT index
592 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
593 second and third slots in the PLT entry if there is no PLT0.
594 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
595 if there is no PLT0. Set sh_entsize on the .plt.got section.
596 (elf_i386_nacl_plt): Forward declaration.
597 (elf_i386_get_plt_sym_val): Removed.
598 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
599 against all dynamic relocations.
600 (elf_i386_link_setup_gnu_properties): New function.
601 (elf_backend_create_dynamic_sections): Updated.
602 (elf_backend_setup_gnu_properties): New.
603 (elf_i386_nacl_plt): Updated.
604 (elf_i386_nacl_arch_bed): Likewise.
605 (elf_i386_vxworks_arch_bed): Likewise.
607 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
609 * elflink.c (elf_output_implib): Remove executable flag from import
611 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
612 library is a relocatable object file.
614 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
617 * elf32-avr.c (avr_should_move_sym): New function.
618 (avr_should_reduce_sym_size): Likewise.
619 (avr_should_increase_sym_size): Likewise.
620 (elf32_avr_relax_delete_bytes): Adjust symbol values
621 and sizes by calling new functions.
623 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
625 * config.bfd (riscv32-*): Enable rv64.
627 2017-05-02 Alan Modra <amodra@gmail.com>
630 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
631 rather than h->root.type == bfd_link_hash_new.
632 (bfd_elf_record_link_assignment): Similarly, call
633 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
635 2017-04-29 Alan Modra <amodra@gmail.com>
638 * reloc.c (reloc_offset_in_range): New function.
639 (bfd_perform_relocation, bfd_install_relocation): Use it.
640 (_bfd_final_link_relocate): Likewise.
642 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
644 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
645 before using .plt.got.
646 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
648 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
650 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
651 instead of "+=" to update 0.
653 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
655 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
656 .plt.got section here.
657 (elf_i386_check_relocs): Don't create the .plt.got section.
658 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
659 the .plt.got and .plt.bnd sections here.
660 (elf_x86_64_check_relocs): Don't create the .plt.got nor
663 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
665 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
667 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
668 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
669 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
670 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
673 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
675 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
677 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
678 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
679 the first relocatable ELF input with GNU properties.
681 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
683 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
686 2017-04-27 Alan Modra <amodra@gmail.com>
688 * elf-bfd.h (struct elf_backend_data): Make asection param of
689 elf_backend_eh_frame_address_size const.
690 (_bfd_elf_eh_frame_address_size): Likewise.
691 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
692 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
693 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
694 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
695 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
696 (next_cie_fde_offset): Constify params.
697 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
699 2017-04-27 Alan Modra <amodra@gmail.com>
701 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
702 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
703 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
705 (offset_adjust): New function.
706 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
707 (adjust_eh_frame_local_symbols): Likewise.
708 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
709 after changing anything. Return true if anything changed.
710 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
711 _bfd_elf_adjust_eh_frame_global_symbol for globals.
713 2017-04-27 Alan Modra <amodra@gmail.com>
715 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
718 2017-04-27 Alan Modra <amodra@gmail.com>
720 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
721 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
722 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
723 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
724 for undef and undefweak dyn_relocs.
725 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
726 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
727 (allocate_got, allocate_dynrelocs): Likewise.
728 (ppc64_elf_relocate_section): Likewise.
730 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
732 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
733 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
734 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
735 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
737 2017-04-26 Nick Clifton <nickc@redhat.com>
740 * reloc.c (bfd_perform_relocation): Check for a negative address
743 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
746 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
748 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
749 (elf_backend_always_renumber_dynsyms): Define.
750 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
751 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
752 * elflink.c (bfd_elf_size_dynamic_sections): Also call
753 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
755 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
757 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
759 * elflink.c (bfd_elf_size_dynamic_sections): Only call
760 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
761 sections have been created.
763 2017-04-26 Nick Clifton <nickc@redhat.com>
766 * compress.c (bfd_init_section_compress_status): Check the return
767 value from bfd_malloc.
769 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
771 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
772 no_finish_dynamic_symbol.
773 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
775 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
776 weak symbol, don't make it dynamic.
777 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
778 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
779 relocation for GOT reference.
780 (elf_x86_64_finish_dynamic_symbol): Abort if
781 no_finish_dynamic_symbol isn't 0.
783 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
786 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
787 undefined weak symbol, don't make it dynamic.
788 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
789 set no_finish_dynamic_symbol and generate R_386_RELATIVE
790 relocation for R_386_GOT32.
792 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
795 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
797 2017-04-23 Alan Modra <amodra@gmail.com>
800 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
801 * elf.c (lcomm_sym): New.
802 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
803 * bfd-in2.h: Regenerate.
805 2017-04-23 Alan Modra <amodra@gmail.com>
808 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
809 parameters and comment.
810 (_bfd_elf_get_reloc_section): Delete.
811 (_bfd_elf_plt_get_reloc_section): Declare.
812 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
813 New functions. Don't blindly skip over assumed .rel/.rela prefix.
815 (_bfd_elf_get_reloc_section): ..here. Delete.
816 (assign_section_numbers): Call elf_get_reloc_section.
817 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
818 * elfxx-target.h (elf_backend_get_reloc_section): Update.
820 2017-04-23 Alan Modra <amodra@gmail.com>
823 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
826 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
829 * elf32-i386.c (elf_i386_link_hash_entry): Add
830 no_finish_dynamic_symbol.
831 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
832 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
833 symbol, don't make it dynamic in PIE.
834 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
835 set no_finish_dynamic_symbol and generate R_386_RELATIVE
836 relocation for R_386_GOT32
837 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
840 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
844 * elflink.c (elf_link_add_object_symbols): Require
845 --no-dynamic-linker with -E/--dynamic-list when creating
848 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
850 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
853 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
855 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
856 dynamic symbol sorting.
858 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
861 * elflink.c (elf_link_add_object_symbols): Preserve
862 dynamic_ref_after_ir_def when restoring the symbol table for
863 unneeded dynamic object.
865 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
868 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
869 on on undefined IFUNC symbol in the second PLT.
871 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
873 * peXXigen.c (pe_print_reloc): Correct chunk_end.
875 2017-04-19 Alan Modra <amodra@gmail.com>
877 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
878 or make dynamic for info->dynamic_undefined_weak 0 and 1.
879 * elf32-ppc.c:Formatting.
880 (ensure_undefweak_dynamic): Don't make dynamic when
881 info->dynamic_undefined_weak is zero.
882 (allocate_dynrelocs): Discard undefweak dyn_relocs for
883 info->dynamic_undefined_weak. Discard undef dyn_relocs when
884 not default visibility. Discard undef and undefweak
886 (ppc_elf_relocate_section): Adjust to suit.
887 * elf64-ppc.c: Formatting.
888 (ensure_undefweak_dynamic): Don't make dynamic when
889 info->dynamic_undefined_weak is zero.
890 (allocate_dynrelocs): Discard undefweak dyn_relocs for
891 info->dynamic_undefined_weak. Discard them earlier.
893 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
896 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
897 before generating the version definition section.
899 2017-04-17 Alan Modra <amodra@gmail.com>
901 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
902 state when a regular object file defines a symbol with
903 incompatible type to that defined by an earlier shared lib.
905 2017-04-13 Alan Modra <amodra@gmail.com>
907 * coffcode.h: Wrap some overly long _bfd_error_handler args.
909 * elf32-arm.c: Likewise.
910 * elf32-i386.c: Likewise.
911 * elf32-mep.c: Likewise.
912 * elf64-ia64-vms.c: Likewise.
913 * elf64-x86-64.c: Likewise.
914 * elflink.c: Likewise.
915 * elfnn-ia64.c: Likewise.
916 * elfxx-mips.c: Likewise.
918 2017-04-13 Alan Modra <amodra@gmail.com>
920 * aoutx.h: Use %B and %A in error messages throughout file.
921 * aout-cris.c: Likewise.
922 * archive.c: Likewise.
923 * binary.c: Likewise.
924 * coff-rs6000.c: Likewise.
925 * coff-tic4x.c: Likewise.
926 * coffcode.h: Likewise.
927 * coffgen.c: Likewise.
928 * cofflink.c: Likewise.
929 * coffswap.h: Likewise.
930 * cpu-arm.c: Likewise.
931 * elf-eh-frame.c: Likewise.
932 * elf-m10300.c: Likewise.
934 * elf32-arc.c: Likewise.
935 * elf32-arm.c: Likewise.
936 * elf32-bfin.c: Likewise.
937 * elf32-frv.c: Likewise.
938 * elf32-iq2000.c: Likewise.
939 * elf32-m32c.c: Likewise.
940 * elf32-microblaze.c: Likewise.
941 * elf32-nds32.c: Likewise.
942 * elf32-rl78.c: Likewise.
943 * elf32-rx.c: Likewise.
944 * elf32-score.c: Likewise.
945 * elf32-score7.c: Likewise.
946 * elf32-sh64.c: Likewise.
947 * elf32-v850.c: Likewise.
948 * elf32-vax.c: Likewise.
949 * elf32-visium.c: Likewise.
950 * elf64-ia64-vms.c: Likewise.
951 * elf64-mmix.c: Likewise.
952 * elf64-sh64.c: Likewise.
953 * elfcode.h: Likewise.
954 * elfnn-aarch64.c: Likewise.
955 * elfnn-ia64.c: Likewise.
956 * elfxx-mips.c: Likewise.
957 * hpux-core.c: Likewise.
960 * linker.c: Likewise.
965 * peXXigen.c: Likewise.
966 * rs6000-core.c: Likewise.
967 * vms-alpha.c: Likewise.
968 * xcofflink.c: Likewise.
970 2017-04-13 Alan Modra <amodra@gmail.com>
972 * bfd.c (PRINT_TYPE): Define.
973 (_doprnt): New function.
974 (error_handler_internal): Use _doprnt.
975 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
976 calls in their natural order, throughout file.
977 * coff-mcore.c: Likewise.
978 * coff-ppc.c: Likewise.
979 * coff-tic80.c: Likewise.
980 * cofflink.c: Likewise.
981 * elf-s390-common.c: Likewise.
983 * elf32-arm.c: Likewise.
984 * elf32-i386.c: Likewise.
985 * elf32-m32r.c: Likewise.
986 * elf32-msp430.c: Likewise.
987 * elf32-spu.c: Likewise.
988 * elf64-ia64-vms.c: Likewise.
989 * elf64-sparc.c: Likewise.
990 * elf64-x86-64.c: Likewise.
991 * elflink.c: Likewise.
992 * elfnn-aarch64.c: Likewise.
993 * elfnn-ia64.c: Likewise.
994 * elfxx-mips.c: Likewise.
996 2017-04-13 Alan Modra <amodra@gmail.com>
998 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
999 branch veneers" error. Fix double space and format message.
1000 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1001 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1003 2017-04-13 Alan Modra <amodra@gmail.com>
1005 * bfd-in2.h: Regenerate.
1007 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1009 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1010 extra `\n' in warning/error messages.
1011 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1012 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1014 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1016 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1017 processor-specific properties with generic ELF target vector.
1019 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
1021 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1022 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1023 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1024 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1026 (link_hash_newfunc): Initialize has_got_reloc and
1028 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1030 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1032 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1034 (_bfd_sparc_elf_fixup_symbol): New function.
1035 (allocate_dynrelocs): Don't allocate space for dynamic
1036 relocations and discard relocations against resolved undefined
1037 weak symbols in executable. Don't make resolved undefined weak
1038 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1039 relocation against undefined weak symbols in PIE.
1040 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1041 relocations against resolved undefined weak symbols in PIE
1042 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1043 without ynamic PLT/GOT relocations for resolved undefined weak
1045 Don't generate dynamic relocation against resolved undefined
1046 weak symbol in executable.
1047 (pie_finish_undefweak_symbol): New function.
1048 (_bfd_sparc_elf_finish_dynamic_sections): Call
1049 pie_finish_undefweak_symbol on all symbols in PIE.
1050 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1051 (_bfd_sparc_elf_fixup_symbol): New function.
1053 2017-04-10 Nick Clifton <nickc@redhat.com>
1055 * config.bfd: Remove ns32k from obsolete list.
1057 2017-04-10 Alan Modra <amodra@gmail.com>
1060 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1061 (special_sections_i): Likewise for .init_array.
1062 (special_sections_p): Likewise for .preinit_array.
1064 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1068 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1069 ELF_COMMON_DEF_P for common symbols.
1070 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1071 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1072 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1073 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1074 07492f668d2173da7a2bda3707ff0985e0f460b6.
1076 2017-04-07 Pedro Alves <palves@redhat.com>
1078 * opncls.c (bfd_get_debug_link_info): Rename to...
1079 (bfd_get_debug_link_info_1): ... this. Change type of second
1080 parameter to void pointer. Adjust.
1081 (bfd_get_debug_link_info): Reimplement on top of
1082 bfd_get_debug_link_info_1.
1083 (separate_debug_file_exists, separate_alt_debug_file_exists):
1084 Change type of second parameter to void pointer. Adjust.
1085 (get_func_type, check_func_type): Change type of second parameter
1087 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1088 the callback functions instead of passing the address of a local.
1089 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1090 find_separate_debug_file.
1091 (get_alt_debug_link_info_shim): Change type of second parameter to
1092 void pointer. Adjust.
1093 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1094 find_separate_debug_file.
1095 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1096 of second parameter to void pointer. Adjust.
1097 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1098 pointer local to find_separate_debug_file.
1100 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1102 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1103 external symbols with a definition.
1104 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1106 2017-04-07 Alan Modra <amodra@gmail.com>
1108 * po/SRC-POTFILES.in: Regenerate.
1110 2017-04-05 Alan Modra <amodra@gmail.com>
1112 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1115 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1117 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1118 numbers for DataDirectory entry indicies passed to
1121 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1123 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1124 each GNU_MBIND section and align GNU_MBIND section to page size.
1125 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1126 segment for each GNU_MBIND section.
1127 (_bfd_elf_init_private_section_data): Copy sh_info from input
1128 for GNU_MBIND section.
1130 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1132 * elfnn-riscv.c (GP_NAME): Delete.
1133 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1134 (_bfd_riscv_relax_lui): Likewise.
1136 2017-04-04 Nick Clifton <nickc@redhat.com>
1139 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1141 (bfd_elf_final_link): Only initialize the extended symbol index
1142 section if there are extended symbol tables to list.
1144 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1146 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1147 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1148 * configure.ac (elf): Add elf-properties.lo.
1149 * Makefile.in: Regenerated.
1150 * configure: Likewise.
1151 * elf-bfd.h (elf_property_kind): New.
1152 (elf_property): Likewise.
1153 (elf_property_list): Likewise.
1154 (elf_properties): Likewise.
1155 (_bfd_elf_parse_gnu_properties): Likewise.
1156 (_bfd_elf_get_property): Likewise.
1157 (_bfd_elf_link_setup_gnu_properties): Likewise.
1158 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1159 and setup_gnu_properties.
1160 (elf_obj_tdata): Add properties.
1161 * elf-properties.c: New file.
1162 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1163 (elf_i386_merge_gnu_properties): Likewise.
1164 (elf_backend_parse_gnu_properties): Likewise.
1165 (elf_backend_merge_gnu_properties): Likewise.
1166 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1167 (elf_x86_64_merge_gnu_properties): Likewise.
1168 (elf_backend_parse_gnu_properties): Likewise.
1169 (elf_backend_merge_gnu_properties): Likewise.
1170 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1171 (elf_backend_parse_gnu_properties): Likewise.
1172 (elf_backend_setup_gnu_properties): Likewise.
1173 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1174 elf_backend_merge_gnu_properties and
1175 elf_backend_setup_gnu_properties.
1177 2017-03-30 Pip Cet <pipcet@gmail.com>
1179 * elf32-wasm32.c: Add relocation code, two relocs.
1180 * reloc.c: Add wasm32 relocations.
1181 * libbfd.h: Regenerate.
1182 * bfd-in2.h: Regenerate.
1183 * bfd/po/bfd.pot: Regenerate.
1185 2017-03-29 Nick Clifton <nickc@redhat.com>
1188 * coff-bfd.h (struct coff_section_data): Add new fields:
1189 saved_bias and bias.
1190 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1191 computed for PE binaries.
1192 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1195 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1198 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1199 to handle a local symbol with a hash-symbol-entry; without PLT.
1200 Add BFD_ASSERT for an incidental case with GOT entry present.
1201 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1202 isn't forced-or-set local.
1204 2017-03-27 Pip Cet <pipcet@gmail.com>
1206 * wasm-module.c: New file to support WebAssembly modules.
1207 * wasm-module.h: New file to support WebAssembly modules.
1208 * doc/webassembly.texi: Start documenting wasm-module.c.
1209 * config.bfd: Add wasm_vec.
1210 * targets.c: Likewise.
1211 * configure.ac: Likewise.
1212 * Makefile.am: Add entries for wasm-module.c.
1213 * Makefile.in: Regenerate.
1214 * configure: Regenerate.
1215 * po/SRC-POTFILES.in: Regenerate.
1217 2017-03-27 Pip Cet <pipcet@gmail.com>
1219 * cpu-wasm32.c: New file to support wasm32 architecture.
1220 * elf32-wasm32.c: New file to support wasm32 architecture.
1221 * Makefile.am: Add wasm32 architecture.
1222 * archures.c: Likewise.
1223 * config.bfd: Likewise.
1224 * configure.ac: Likewise.
1225 * targets.c: Likewise.
1226 * Makefile.in: Regenerate.
1227 * bfd-in2.h: Regenerate.
1228 * configure: Regenerate.
1229 * po/SRC-POTFILES.in: Regenerate.
1231 2017-03-20 Alan Modra <amodra@gmail.com>
1234 * elf64-ppc.c (compare_symbols): Stabilize sort.
1236 2017-03-18 Alan Modra <amodra@gmail.com>
1238 * elf64-ppc.c (struct ppc_link_hash_table): Add
1239 local_ifunc_resolver and maybe_local_ifunc_resolver.
1240 (ppc_build_one_stub): Set flags on emitting dynamic
1241 relocation to ifunc.
1242 (ppc64_elf_relocate_section): Likewise.
1243 (ppc64_elf_finish_dynamic_symbol): Likewise.
1244 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1245 local dynamic relocs to ifuncs.
1246 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1247 local_ifunc_resolver and maybe_local_ifunc_resolver.
1248 (ppc_elf_relocate_section): Set flag on emitting dynamic
1249 relocation to ifuncs.
1250 (ppc_elf_finish_dynamic_symbol): Likewise.
1251 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1252 dynamic relocs to ifuncs.
1254 2017-03-13 Nick Clifton <nickc@redhat.com>
1257 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1258 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1259 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1260 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1261 * bfd-in2.h: Regenerate.
1262 * libbfd.h: Regenerate.
1263 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1265 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1266 (elfNN_aarch64_howto_table): Likewise.
1267 (aarch64_tls_transition_without_check): Likewise.
1268 (aarch64_reloc_got_type): Likewise.
1269 (elfNN_aarch64_final_link_relocate): Likewise.
1270 (elfNN_aarch64_tls_relax): Likewise.
1271 (elfNN_aarch64_relocate_section): Likewise.
1272 (elfNN_aarch64_gc_sweep_hook): Likewise.
1273 (elfNN_aarch64_check_relocs): Likewise.
1274 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1275 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1277 2017-03-11 Alan Modra <amodra@gmail.com>
1279 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1280 parameter is in fact used. Whitespace fixes.
1281 * elf64-ppc.c: Likewise.
1283 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1285 * rs6000-core.c (CORE_NEW): Simplify macro when
1286 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1288 2017-03-07 Alan Modra <amodra@gmail.com>
1292 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1295 2017-03-05 Alan Modra <amodra@gmail.com>
1297 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1298 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1299 (next_cie_fde_offset): New function.
1300 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1301 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1302 four bytes. Align CIEs to four or eight bytes depending on
1303 per_encoding_aligned8. Align FDEs according to their encoding.
1304 Pad last FDE to output section alignment.
1305 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1307 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1308 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1309 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1311 2017-03-02 Martin Bickel <binutils@ineranves.de>
1314 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1315 empty segments which have a zero filesz, but a non-zero memsz.
1317 2017-03-02 Alan Modra <amodra@gmail.com>
1319 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1321 2017-02-28 Alan Modra <amodra@gmail.com>
1323 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1324 (ppc64_elf_relocate_section): Likewise.
1326 2017-02-28 Alan Modra <amodra@gmail.com>
1329 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1330 rather than elf32_nios2_hash_table or elf_hash_table.
1331 (create_got_section): Likewise.
1332 (nios2_elf32_finish_dynamic_symbol): Likewise.
1333 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1334 (nios2_elf32_size_dynamic_sections): Likewise.
1335 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1336 vars. Use htab equivalents directly instead. Don't create
1337 all dynamic sections on needing just the GOT. Use a goto
1338 rather than a fall-through with reloc test. Ensure
1339 htab->dynobj is set when making dynamic sreloc section.
1340 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1341 equivalent directly instead. Don't segfault on looking for
1342 .dynamic when dynamic sections have not been created. Don't
1343 segfault on .got.plt being discarded.
1344 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1345 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1346 fixme and another not so relevant comment.
1347 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1348 already set, set hash table dynobj on creating .sbss.
1350 2017-02-28 Alan Modra <amodra@gmail.com>
1352 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1353 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1354 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1355 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1356 (ppc64_elf_relocate_section): Likewise.
1357 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1358 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1359 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1360 * libbfd.h: Regenerate.
1361 * bfd-in2.h: Regenerate.
1363 2017-02-28 Alan Modra <amodra@gmail.com>
1365 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1366 dynamic .data.rel.ro read-only.
1367 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1368 rather than section flags when deciding where copy reloc goes.
1369 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1370 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1371 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1372 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1373 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1374 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1375 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1376 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1377 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1378 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1379 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1380 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1381 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1382 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1383 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1384 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1385 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1386 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1387 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1389 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1391 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1392 `jalr $0, $25' instruction encoding.
1394 2017-02-27 Nick Clifton <nickc@redhat.com>
1397 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1398 generating a seg-fault when encountering a symbol that has been
1399 deleted by garbage collection.
1401 2017-02-25 Alan Modra <amodra@gmail.com>
1403 * elf32-arc.c (struct dynamic_sections): Delete.
1404 (enum dyn_section_types): Delete.
1405 (dyn_section_names): Delete.
1406 (arc_create_dynamic_sections): Delete.
1407 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1408 segfault on discarded .rela.plt section.
1409 (elf_arc_size_dynamic_sections): Formatting. Don't call
1410 arc_create_dynamic_sections. Don't allocate memory for sections
1411 handled by the generic linker. Correct code finding relocs in
1412 read-only sections. Set SEC_EXCLUDE on zero size .got,
1413 .got.plt, and .dynbss sections. Do set .interp for pies.
1415 2017-02-24 Andrew Waterman <andrew@sifive.com>
1417 * elfnn-riscv.c (GP_NAME): New macro.
1418 (riscv_global_pointer_value): Use it.
1419 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1420 output section, consider only that section's alignment.
1422 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1424 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1425 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1426 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1427 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1429 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1431 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1432 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1435 2017-02-23 Alan Modra <amodra@gmail.com>
1438 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1440 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1441 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1444 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1447 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1448 processing ahead of the call to `elf_gc_sweep_symbol'.
1450 2017-02-22 Nick Clifton <nickc@redhat.com>
1453 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1454 created section 4-byte alignment.
1456 2017-02-22 Alan Modra <amodra@gmail.com>
1458 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1459 on .got or .plt output section being discarded by script.
1460 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1463 2017-02-21 Alan Modra <amodra@gmail.com>
1465 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1466 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1468 2017-02-20 Alan Modra <amodra@gmail.com>
1471 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1472 if DT_RELSZ/DT_RELASZ is zero.
1474 2017-02-17 Nick Clifton <nickc@redhat.com>
1476 * compress.c (bfd_get_full_section_contents): Remember to reduce
1477 compressed size by the sizeof the compression header when
1478 decompressing the contents.
1480 2017-02-17 Pedro Alves <palves@redhat.com>
1482 * srec.c (Chunk): Rename to ...
1483 (_bfd_srec_len): ... this.
1484 (S3Forced): Rename to ...
1485 (_bfd_srec_forceS3): ... this.
1486 * objcopy.c: Adjust all references.
1488 2017-02-17 Pedro Alves <palves@redhat.com>
1490 * archive.c (bsd_write_armap): Rename to ...
1491 (_bfd_bsd_write_armap): ... this.
1492 (coff_write_armap): Rename to ...
1493 (_bfd_coff_write_armap): ... this.
1494 * libbfd-in.h (bsd_write_armap): Rename to ...
1495 (_bfd_bsd_write_armap): ... this.
1496 (coff_write_armap): Rename to ...
1497 (_bfd_coff_write_armap): ... this.
1498 * aout-target.h, aout-tic30.c: Adjust all users.
1499 * libbfd.h: Regenerate.
1501 2017-02-17 Pedro Alves <palves@redhat.com>
1503 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1504 (warn_deprecated): Rename to ...
1505 (_bfd_warn_deprecated): ... this.
1506 * libbfd.c (warn_deprecated): Rename to ...
1507 (_bfd_warn_deprecated): ... this.
1508 * bfd-in2.h: Regenerate.
1510 2017-02-17 Pedro Alves <palves@redhat.com>
1512 * bfdio.c (real_ftell): Rename to ...
1513 (_bfd_real_ftell): ... this.
1514 (real_fseek): Rename to ...
1515 (_bfd_real_fseek): ... this.
1516 (real_fopen): Rename to ...
1517 (_bfd_real_fopen): ... this.
1518 * libbfd-in.h (real_ftell): Rename to ...
1519 (_bfd_real_ftell): ... this.
1520 (real_fseek): Rename to ...
1521 (_bfd_real_fseek): ... this.
1522 (real_fopen): Rename to ...
1523 (_bfd_real_fopen): ... this.
1524 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1525 * libbfd.h: Regenerate.
1527 2017-02-17 Pedro Alves <palves@redhat.com>
1529 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1530 * libbfd.c (read_unsigned_leb128): Rename to ...
1531 (_bfd_read_unsigned_leb128): ... this.
1532 (read_signed_leb128): Rename to ...
1533 (_bfd_read_signed_leb128): ... this.
1534 (safe_read_leb128): Rename to ...
1535 (_bfd_safe_read_leb128): ... this.
1536 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1537 (_bfd_read_unsigned_leb128): ... this.
1538 (read_signed_leb128): Rename to ...
1539 (_bfd_read_signed_leb128): ... this.
1540 (safe_read_leb128): Rename to ...
1541 (_bfd_safe_read_leb128): ... this.
1542 * libbfd.h: Renegerate.
1544 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1546 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1547 before trying to fine matching file and line information.
1549 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1551 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1552 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1553 not match current bfd, then reload debug information. Record bfd
1554 we're loading debug info for in the stash. If we have debug
1555 informatin in the cache then perform section placement before
1558 2017-02-16 Alan Modra <amodra@gmail.com>
1561 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1562 * elfxx-target.h (elf_backend_no_page_alias): Define.
1563 (elfNN_bed): Init new field.
1564 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1565 ensure PT_LOAD segment starts on a new page.
1566 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1568 2017-02-16 Alan Modra <amodra@gmail.com>
1571 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1574 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1576 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1577 * bfd-in2.h: Regenerated.
1579 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1582 * elf32-i386.c (elf_i386_relocate_section): Allow
1583 "lea foo@GOT, %reg" in PIC.
1585 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1588 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1589 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1590 error against local IFUNC symbol without a base register for
1593 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1595 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1596 `%P: %H:' with `info->callbacks->einfo'.
1597 (ppc_elf_relocate_section): Likewise.
1598 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1599 (ppc64_elf_edit_toc): Likewise.
1600 (ppc64_elf_relocate_section): Likewise.
1602 2017-02-14 Alan Modra <amodra@gmail.com>
1604 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1605 --gc-keep-exported, and test versioned field of sym rather than
1606 looking for @ in name.
1608 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1610 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1613 2017-02-13 Nick Clifton <nickc@redhat.com>
1616 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1619 2017-02-07 Andrew Waterman <andrew@sifive.com>
1621 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1622 entry size if PLT header is written.
1624 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1626 Fix sparc64 dynamic relocation processing to use the dynamic
1628 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1629 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1632 2017-02-03 Nick Clifton <nickc@redhat.com>
1635 * coffcode.h (coff_write_object_contents): Enlarge size of
1636 s_name_buf in order to avoid compile time warning about possible
1638 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1639 32-bits of insn value before printing into buffer.
1641 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1643 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1644 `max_local_dynindx'.
1645 (mips_elf_sort_hash_table): Handle it.
1646 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1647 symbols bump up `max_local_dynindx' rather than
1648 `max_non_got_dynindx'.
1650 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1652 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1653 `min_got_dynindx', `max_unref_got_dynindx' and
1654 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1655 (mips_elf_sort_hash_table): Adjust accordingly.
1657 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1659 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1660 to access the hash table.
1662 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1664 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1665 non-NULL `htab' to the beginning.
1667 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1669 * elflink.c (elf_gc_sweep): Wrap overlong line.
1671 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1673 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1674 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1675 * elfxx-mips.c (mips_elf_link_hash_table): Add
1676 `ignore_branch_isa' member.
1677 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1678 in branch relocation calculation as an error if
1679 `ignore_branch_isa' has been set.
1680 (_bfd_mips_elf_insn32): Rename to...
1681 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1682 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1683 Handle the new parameter.
1685 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1687 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1688 local variable dynobj.
1691 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1692 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1693 executable from read-only sections into sdynrelro.
1694 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1695 dynamic relocs in sdynrelro.
1696 (elf_backend_want_dynrelro): Define.
1698 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1700 * config.bfd (*-*-rtemsaout*): Mark as removed.
1702 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1704 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1705 (arm-*-rtems*): Move to (arm*-*-eabi*).
1706 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1707 (m68-*-rtems*): Move to (m68*-*-elf*).
1709 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1711 * config.bfd (*-*-rtemscoff*): Mark as removed.
1713 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1716 * elflink.c (bfd_elf_record_link_assignment): Revert last
1717 change and don't ever clear `forced_local'. Set `mark'
1719 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1721 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1722 (bfd_elf_size_dynamic_sections): ... here.
1723 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1724 and set `mark' instead in `__tls_get_addr_opt' processing.
1725 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1727 2017-01-24 Alan Modra <amodra@gmail.com>
1729 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1730 where dynamic relocs are preferable. Allow ifunc too.
1731 (ensure_undefweak_dynamic): New function.
1732 (allocate_dynrelocs): Use it here. Move plt handling last and
1733 don't make symbols dynamic, simplifying loop. Only make undef
1734 weak symbols with GOT entries dynamic. Correct condition
1735 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1736 comments. Remove goto.
1737 (ppc_elf_relocate_section): Correct test for using dynamic
1738 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1739 to suit. Set up explicit tls_index entries and implicit GOT
1740 tls_index entries resolvable at link time for
1741 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1742 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1743 (ensure_undefweak_dynamic): New function.
1744 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1745 with GOT entries dynamic. Remove unnecessary test of
1746 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1747 (ppc64_elf_relocate_section): Correct test for using dynamic
1748 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1749 to suit. Set up explicit tls_index entries and implicit GOT
1750 tls_index entries resolvable at link time for __tls_get_addr_opt.
1751 Simplify expression to clear mem for prelink.
1753 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1755 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1757 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1759 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1760 (elf_backend_hash_symbol): Define.
1762 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1765 * elflink.c (bfd_elf_record_link_assignment): Clear any
1766 `forced_local' marking for DSO symbols that are not being
1769 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1771 * elfnn-riscv.c (riscv_elf_object_p): New function.
1773 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1776 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1778 (elf_x86_64_check_relocs): Create .eh_frame section for the
1780 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1781 .eh_frame section for the .plt.bnd section.
1782 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1783 for the .plt.bnd section.
1785 2017-01-12 Nick Clifton <nickc@redhat.com>
1788 * opncls.c (find_separate_debug_file): Add include_dirs
1789 parameter. Only include the directory part of the bfd's filename
1790 in search paths if include_dirs is true. Add a couple of extra
1791 locations for looking for debug files.
1792 ( bfd_follow_gnu_debuglink): Update invocation of
1793 find_separate_debug_file.
1794 (bfd_follow_gnu_debugaltlink): Likewise.
1795 (get_build_id): New function: Finds the build-id of the given bfd.
1796 (get_build_id_name): New function: Computes the name of the
1797 separate debug info file for a bfd, based upon its build-id.
1798 (check_build_id_file): New function: Checks to see if a separate
1799 debug info file exists at the given location, and that its
1800 build-id matches that of the original bfd.
1801 (bfd_follow_build_id_debuglink): New function: Finds a separate
1802 debug info file for a given bfd by using the build-id method.
1803 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1804 method of locating a separate debug info file before using the
1806 * bfd-in2.h: Regenerate.
1808 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1811 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1812 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1813 elf_x86_64_eh_frame_plt_got.
1814 (elf_x86_64_size_dynamic_sections): Get unwind info from
1815 elf_x86_64_bnd_arch_bed for the BND PLT.
1817 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1819 * config.bfd: Add entries for i686-redox and x86_64-redox.
1821 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1823 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1825 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1826 .eh_frame section to 4 bytes for x32.
1827 (elf_x86_64_check_relocs): Likewise.
1829 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1832 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1833 (PLT_GOT_FDE_LENGTH): Likewise.
1834 (elf_i386_plt_layout): Add eh_frame_plt_got and
1835 eh_frame_plt_got_size.
1836 (elf_i386_plt): Updated.
1837 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1838 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1839 (elf_i386_size_dynamic_sections): Allocate and initialize
1840 .eh_frame section for .plt.got.
1841 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1843 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1844 eh_frame_plt_got_size.
1845 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1846 (PLT_GOT_FDE_LENGTH): Likewise.
1847 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1848 eh_frame_plt_got_size.
1849 (elf_x86_64_arch_bed): Updated.
1850 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1851 eh_frame_plt_got_size.
1852 (elf_x86_64_nacl_arch_bed): Likewise.
1853 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1854 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1855 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1856 .eh_frame section for .plt.got.
1857 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1860 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1862 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1863 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1865 2017-01-09 Nick Clifton <nickc@redhat.com>
1867 * dwarf2.c (lookup_address_in_function_table): Return early if
1868 there are no functions in the given comp unit, or if the high
1869 address of the last function in the comp unit is less than the
1872 2017-01-09 Nick Clifton <nickc@redhat.com>
1875 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1876 message if there are too many symbols to load.
1878 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1880 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1881 if relocs are cached.
1883 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1886 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1887 for R_MICROBLAZE_GOTOFF_64.
1889 2017-01-03 Nick Clifton <nickc@redhat.com>
1891 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1892 warning about using a possibly uninitialised variable.
1894 2017-01-02 Alan Modra <amodra@gmail.com>
1896 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1897 (allocate_plt_static, allocate_dynrelocs): Use it.
1899 2017-01-02 Alan Modra <amodra@gmail.com>
1901 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1902 .PARISC.unwind section.
1904 2017-01-02 Alan Modra <amodra@gmail.com>
1907 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1908 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1909 indirect to GOT pointer relative code edit.
1911 2017-01-02 Alan Modra <amodra@gmail.com>
1913 Update year range in copyright notice of all files.
1915 For older changes see ChangeLog-2016
1917 Copyright (C) 2017 Free Software Foundation, Inc.
1919 Copying and distribution of this file, with or without modification,
1920 are permitted in any medium without royalty provided the copyright
1921 notice and this notice are preserved.
1927 version-control: never