1 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
6 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
8 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
9 patched section contents for TLS IE reloc.
10 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
12 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
14 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
15 RELOC_FOR_GLOBAL_SYMBOL macro.
17 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
19 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
22 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
24 * config/tc-arc.c (md_undefined_symbol): Changed.
25 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
27 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
29 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
32 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
34 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
35 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
37 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
39 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
42 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
44 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
45 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
46 is non-zero. Add clarifying comments.
48 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
50 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
51 name. Use local IFUNC symbol name string to report unsupported
52 non-PIC call to IFUNC function.
53 (elf_i386_relocate_section): Dump local IFUNC name with minfo
54 when generating R_386_IRELATIVE relocation.
55 (elf_i386_finish_dynamic_symbol): Likewise.
56 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
58 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
59 when generating R_X86_64_IRELATIVE relocation.
60 (elf_x86_64_finish_dynamic_symbol): Likewise.
62 2017-06-08 Jiong Wang <jiong.wang@arm.com>
65 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
66 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
67 runtime for copy relocation elimination cases.
68 (alias_readonly_dynrelocs): New function.
69 (elfNN_aarch64_adjust_dynamic_symbol): Keep the dynamic relocs instead
70 of generating copy relocation if it is not against read-only sections.
71 (elfNN_aarch64_check_relocs): Likewise.
73 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
75 * elf.c (setup_group): Make sure BFD sections are created for all
76 group sections in the input file when processing SHF_GROUP
78 (bfd_section_from_shdr): Avoid duplicating logic already
79 implemented in `setup_group'.
81 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
84 * peXXigen.c (pe_print_idata): Use the address of the first thunk
85 if the hint address is zero.
87 2017-06-06 James Clarke <jrtc27@jrtc27.com>
90 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
91 ELF_COMMON_DEF_P for common symbols.
93 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
95 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
96 SEC_GROUP sections as SEC_EXCLUDE.
97 (bfd_elf_set_group_contents): Replace use of abort with an assert.
98 (assign_section_numbers): Use resolve_section_groups flag instead
99 of relocatable link type.
100 (_bfd_elf_init_private_section_data): Use resolve_section_groups
101 flag instead of checking the final_link flag for part of the
102 checks in here. Fix white space as a result.
103 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
104 instead of relocatable link type.
105 (bfd_elf_final_link): Likewise.
107 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
109 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
111 * elf32-score.c (score_elf_final_link_relocate): Likewise.
112 (s3_bfd_score_elf_check_relocs): Likewise.
113 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
114 (score_elf_final_link_relocate): Likewise.
115 (s7_bfd_score_elf_check_relocs): Likewise.
117 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
119 * elflink.c (init_reloc_cookie_rels): Remove unused variable
122 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
124 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
125 from `reloc_count' rather than decrementing it.
126 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
127 `reloc_count' by `int_rels_per_ext_rel'.
128 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
129 `reloc_count' by `int_rels_per_ext_rel' for last relocation
131 (s3_bfd_score_elf_check_relocs): Likewise.
132 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
133 (s7_bfd_score_elf_relocate_section): Likewise.
134 (s7_bfd_score_elf_check_relocs): Likewise.
135 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
136 prototype and function.
137 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
138 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
139 triple rather than once the sum of REL and RELA relocation entry
141 (bfd_elf64_get_reloc_upper_bound): Remove macro.
142 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
143 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
144 storage allocation size determination.
145 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
146 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
147 by `int_rels_per_ext_rel' for last relocation entry
149 (bfd_elf_final_link): Do not multiply `reloc_count' by
150 `int_rels_per_ext_rel' for internal relocation storage
151 allocation size determination.
152 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
153 `int_rels_per_ext_rel' for last relocation entry determination.
154 (elf_gc_smash_unused_vtentry_relocs): Likewise.
155 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
156 (_bfd_mips_elf_relocate_section): Likewise.
158 2017-06-05 Alan Modra <amodra@gmail.com>
161 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
163 2017-06-01 John Baldwin <jhb@FreeBSD.org>
165 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
166 determine structure sizes.
167 (elfcore_grok_freebsd_prstatus): Likewise.
169 2017-06-01 Alan Modra <amodra@gmail.com>
171 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
172 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
174 (is_elfv2_localentry0): New function.
175 (ppc64_elf_tls_setup): Default params->plt_localentry0.
176 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
177 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
178 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
179 optimized localentry:0 stubs.
180 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
181 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
183 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
185 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
187 2017-05-30 Casey Smith <clegg89@gmail.com>
190 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
191 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
193 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
195 * cpu-arc.c (arc_compatible): New function.
197 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
199 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
201 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
204 * bfdio.c (bfd_get_file_size): New function.
205 * bfd-in2.h: Regenerated.
207 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
209 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
212 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
214 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
215 dynobj instead of htab->elf.dynobj.
217 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
219 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
221 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
222 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
223 actual number of internal relocations retrieved. Adjust
224 function description.
225 (bfd_elf64_canonicalize_reloc): Remove macro.
226 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
228 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
230 * archures.c (bfd_mach_sparc_v9m8): Define.
231 (bfd_mach_sparc_v8plusm8): Likewise.
232 (bfd_mach_sparc_v9_p): Adjust to M8.
233 (bfd_mach_sparc_64bit_p): Likewise.
234 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
235 bfd_mach_sparc_v8plusm8.
236 * bfd-in2.h: Regenerated.
237 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
239 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
240 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
241 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
243 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
244 bfd_mach_sparc_v8plusm8.
246 2017-05-19 Alan Modra <amodra@gmail.com>
248 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
249 debug and special sections when no non-note alloc sections in an
252 2017-05-18 Alan Modra <amodra@gmail.com>
254 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
255 * elf-m10300.c: Likewise.
257 * elf32-arc.c: Likewise.
258 * elf32-bfin.c: Likewise.
259 * elf32-m68k.c: Likewise.
260 * elf32-nds32.c: Likewise.
261 * elf32-tilepro.c: Likewise.
262 * elflink.c: Likewise.
263 * elfnn-aarch64.c: Likewise.
264 * elfnn-riscv.c: Likewise.
265 * elfxx-tilegx.c: Likewise.
266 * mach-o.c: Likewise.
267 * peXXigen.c: Likewise.
268 * vms-alpha.c: Likewise.
269 * vms-lib.c: Likewise.
271 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
274 * elflink.c (elf_gc_mark_debug_section): New function.
275 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
276 referenced by kept debug sections.
278 2017-05-16 Alan Modra <amodra@gmail.com>
280 * elf-m10300.c: Rename occurrences of non_ir_ref.
281 * elf32-arm.c: Likewise.
282 * elf32-bfin.c: Likewise.
283 * elf32-cr16.c: Likewise.
284 * elf32-cris.c: Likewise.
285 * elf32-d10v.c: Likewise.
286 * elf32-dlx.c: Likewise.
287 * elf32-fr30.c: Likewise.
288 * elf32-frv.c: Likewise.
289 * elf32-hppa.c: Likewise.
290 * elf32-i370.c: Likewise.
291 * elf32-i386.c: Likewise.
292 * elf32-iq2000.c: Likewise.
293 * elf32-lm32.c: Likewise.
294 * elf32-m32c.c: Likewise.
295 * elf32-m32r.c: Likewise.
296 * elf32-m68hc1x.c: Likewise.
297 * elf32-m68k.c: Likewise.
298 * elf32-mcore.c: Likewise.
299 * elf32-metag.c: Likewise.
300 * elf32-microblaze.c: Likewise.
301 * elf32-moxie.c: Likewise.
302 * elf32-msp430.c: Likewise.
303 * elf32-mt.c: Likewise.
304 * elf32-nios2.c: Likewise.
305 * elf32-or1k.c: Likewise.
306 * elf32-ppc.c: Likewise.
307 * elf32-rl78.c: Likewise.
308 * elf32-s390.c: Likewise.
309 * elf32-score.c: Likewise.
310 * elf32-score7.c: Likewise.
311 * elf32-sh.c: Likewise.
312 * elf32-tic6x.c: Likewise.
313 * elf32-tilepro.c: Likewise.
314 * elf32-v850.c: Likewise.
315 * elf32-vax.c: Likewise.
316 * elf32-xstormy16.c: Likewise.
317 * elf32-xtensa.c: Likewise.
318 * elf64-alpha.c: Likewise.
319 * elf64-hppa.c: Likewise.
320 * elf64-ia64-vms.c: Likewise.
321 * elf64-mmix.c: Likewise.
322 * elf64-ppc.c: Likewise.
323 * elf64-s390.c: Likewise.
324 * elf64-sh64.c: Likewise.
325 * elf64-x86-64.c: Likewise.
326 * elflink.c: Likewise.
327 * elfnn-aarch64.c: Likewise.
328 * elfnn-ia64.c: Likewise.
329 * elfnn-riscv.c: Likewise.
330 * elfxx-mips.c: Likewise.
331 * elfxx-sparc.c: Likewise.
332 * elfxx-tilegx.c: Likewise.
333 * linker.c: Likewise.
335 2017-05-16 Alan Modra <amodra@gmail.com>
337 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
338 * elflink.c (elf_link_add_object_symbols): Update to use
340 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
342 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
344 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
346 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
348 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
350 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
351 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
353 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
355 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
357 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
359 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
360 to plt_second/plt_second_eh_frame.
361 (elf_x86_64_link_hash_newfunc): Updated.
362 (elf_x86_64_allocate_dynrelocs): Likewise.
363 (elf_x86_64_size_dynamic_sections): Likewise.
364 (elf_x86_64_relocate_section): Likewise.
365 (elf_x86_64_finish_dynamic_symbol): Likewise.
366 (elf_x86_64_finish_dynamic_sections): Likewise.
367 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
368 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
370 (elf_backend_setup_gnu_properties): Updated. Create the
371 .plt.sec section instead of the .plt.sec section.
373 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
375 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
376 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
377 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
379 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
381 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
382 (bfd_elf64_set_reloc): Define.
383 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
385 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
387 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
388 (struct bfd_target): New field _bfd_set_reloc.
389 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
390 * reloc.c (_bfd_generic_set_reloc): New function.
391 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
392 * nlm-target.h (nlm_set_reloc): Likewise.
393 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
394 * aout-tic30.c (MY_set_reloc): Likewise.
395 * aout-target.h (MY_set_reloc): Likewise.
396 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
397 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
398 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
399 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
400 * aout-adobe.c (aout_32_set_reloc): Likewise.
401 * bout.c (b_out_set_reloc): Likewise.
402 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
403 * i386os9k.c (aout_32_set_reloc): Likewise.
404 * ieee.c (ieee_set_reloc): Likewise.
405 * oasys.c (oasys_set_reloc): Likewise.
406 * som.c (som_set_reloc): Likewise.
407 * versados.c (versados_set_reloc): Likewise.
408 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
409 _bfd_generic_set_reloc.
410 (rs6000_xcoff64_aix_vec): LIkewise.
411 * libbfd.c (_bfd_norelocs_set_reloc): New function.
412 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
413 * i386msdos.c (msdos_set_reloc): Define to
414 _bfd_norelocs_set_reloc.
415 * elfcode.h (elf_set_reloc): Define.
416 * bfd-in2.h: Regenerated.
418 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
421 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
422 for IFUNC function address.
424 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
426 * elf32-arc.c (FEATURE_LIST_NAME): Define.
427 (CONFLICT_LIST): Likewise.
428 (opcode/arc-attrs.h): Include.
429 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
430 (arc_extract_features): New file.
431 (arc_stralloc): Likewise.
432 (arc_elf_merge_attributes): Likewise.
433 (arc_elf_merge_private_bfd_data): Use object attributes.
434 (bfd_arc_get_mach_from_attributes): New function.
435 (arc_elf_object_p): Use object attributes.
436 (arc_elf_final_write_processing): Likewise.
437 (elf32_arc_obj_attrs_arg_type): New function.
438 (elf32_arc_obj_attrs_handle_unknown): Likewise.
439 (elf32_arc_section_from_shdr): Likewise.
440 (elf_backend_obj_attrs_vendor): Define.
441 (elf_backend_obj_attrs_section): Likewise.
442 (elf_backend_obj_attrs_arg_type): Likewise.
443 (elf_backend_obj_attrs_section_type): Likewise.
444 (elf_backend_obj_attrs_handle_unknown): Likewise.
445 (elf_backend_section_from_shdr): Likewise.
447 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
450 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
451 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
452 and the destination is a Thumb symbol.
454 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
456 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
457 initializer to silence GCC 4.2.
458 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
460 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
462 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
463 (LAZY_PLT_ENTRY_SIZE): This.
464 (NON_LAZY_PLT_ENTRY_SIZE): New.
465 (elf_x86_64_plt0_entry): Renamed to ...
466 (elf_x86_64_lazy_plt0_entry): This.
467 (elf_x86_64_plt_entry): Renamed to ...
468 (elf_x86_64_lazy_plt_entry): This.
469 (elf_x86_64_bnd_plt0_entry): Renamed to ...
470 (elf_x86_64_lazy_bnd_plt0_entry): This.
471 (elf_x86_64_legacy_plt_entry): Removed.
472 (elf_x86_64_bnd_plt_entry): Renamed to ...
473 (elf_x86_64_lazy_bnd_plt_entry): This.
474 (elf_x86_64_legacy_plt2_entry): Renamed to ...
475 (elf_x86_64_non_lazy_plt_entry): This.
476 (elf_x86_64_bnd_plt2_entry): Renamed to ...
477 (elf_x86_64_non_lazy_bnd_plt_entry): This.
478 (elf_x86_64_eh_frame_plt): Renamed to ...
479 (elf_x86_64_eh_frame_lazy_plt): This.
480 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
481 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
482 (elf_x86_64_eh_frame_plt_got): Renamed to ...
483 (elf_x86_64_eh_frame_non_lazy_plt): This.
484 (elf_x86_64_lazy_plt_layout): New.
485 (elf_x86_64_non_lazy_plt_layout): Likewise.
486 (elf_x86_64_plt_layout): Likewise.
487 (elf_x86_64_backend_data): Remove PLT layout information. Add
488 os for target system.
489 (GET_PLT_ENTRY_SIZE): Removed.
490 (elf_x86_64_lazy_plt): New.
491 (elf_x86_64_non_lazy_plt): Likewise.
492 (elf_x86_64_lazy_bnd_plt): Likewise.
493 (elf_x86_64_non_lazy_bnd_plt): Likewise.
494 (elf_x86-64_arch_bed): Updated.
495 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
496 (elf_x86_64_create_dynamic_sections): Removed.
497 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
498 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
499 (elf_x86-64_adjust_dynamic_symbol): Updated.
500 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
501 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
502 size for PLT0 if there is no PLT0. Get plt_entry_size from
503 non_lazy_plt for non-lazy PLT entries.
504 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
505 from non_lazy_plt for non-lazy PLT entries.
506 (elf_x86-64_relocate_section): Updated. Properly get PLT index
508 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
509 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
510 entries with non-lazy PLT layout. Don't fill the second and third
511 slots in the PLT entry if there is no PLT0.
512 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
513 if there is no PLT0. Set sh_entsize on the .plt.got section.
514 (compare_relocs): New.
515 (elf_x86_64_plt_type): Likewise.
516 (elf_x86_64_plt): Likewise.
517 (elf_x86_64_nacl_plt): New. Forward declaration.
518 (elf_x86_64_get_plt_sym_val): Removed.
519 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
520 against all dynamic relocations.
521 (elf_x86_64_link_setup_gnu_properties): New function.
522 (elf_backend_create_dynamic_sections): Updated.
523 (elf_backend_setup_gnu_properties): New.
524 (elf_x86_64_nacl_plt): New.
525 (elf_x86_64_nacl_arch_bed): Updated.
527 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
529 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
530 (LAZY_PLT_ENTRY_SIZE): This.
531 (NON_LAZY_PLT_ENTRY_SIZE): New.
532 (elf_i386_plt0_entry): Renamed to ...
533 (elf_i386_lazy_plt0_entry): This.
534 (elf_i386_plt_entry): Renamed to ...
535 (elf_i386_lazy_plt_entry): This.
536 (elf_i386_pic_plt0_entry): Renamed to ...
537 (elf_i386_pic_lazy_plt0_entry): This.
538 (elf_i386_pic_plt_entry): Renamed to ...
539 (elf_i386_pic_lazy_plt_entry): This.
540 (elf_i386_got_plt_entry): Renamed to ...
541 (elf_i386_non_lazy_plt_entry): This.
542 (elf_i386_pic_got_plt_entry): Renamed to ...
543 (elf_i386_pic_non_lazy_plt_entry): This.
544 (elf_i386_eh_frame_plt): Renamed to ...
545 (elf_i386_eh_frame_lazy_plt): This.
546 (elf_i386_eh_frame_plt_got): Renamed to ...
547 (elf_i386_eh_frame_non_lazy_plt): This.
548 (elf_i386_plt_layout): Renamed to ...
549 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
550 eh_frame_plt_got_size.
551 (elf_i386_non_lazy_plt_layout): New.
552 (elf_i386_plt_layout): Likewise.
553 (elf_i386_non_lazy_plt): Likewise.
554 (GET_PLT_ENTRY_SIZE): Removed.
555 (elf_i386_plt): Renamed to ...
556 (elf_i386_lazy_plt): This.
557 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
558 (elf_i386_arch_bed): Updated.
559 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
560 (elf_i386_create_dynamic_sections): Removed.
561 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
562 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
563 (elf_i386_adjust_dynamic_symbol): Updated.
564 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
565 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
566 size for PLT0 if there is no PLT0.
567 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
568 output section is discarded only if GOT isn't empty.
569 (elf_i386_relocate_section): Updated. Properly get PLT index
571 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
572 second and third slots in the PLT entry if there is no PLT0.
573 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
574 if there is no PLT0. Set sh_entsize on the .plt.got section.
575 (elf_i386_nacl_plt): Forward declaration.
576 (elf_i386_get_plt_sym_val): Removed.
577 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
578 against all dynamic relocations.
579 (elf_i386_link_setup_gnu_properties): New function.
580 (elf_backend_create_dynamic_sections): Updated.
581 (elf_backend_setup_gnu_properties): New.
582 (elf_i386_nacl_plt): Updated.
583 (elf_i386_nacl_arch_bed): Likewise.
584 (elf_i386_vxworks_arch_bed): Likewise.
586 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
588 * elflink.c (elf_output_implib): Remove executable flag from import
590 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
591 library is a relocatable object file.
593 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
596 * elf32-avr.c (avr_should_move_sym): New function.
597 (avr_should_reduce_sym_size): Likewise.
598 (avr_should_increase_sym_size): Likewise.
599 (elf32_avr_relax_delete_bytes): Adjust symbol values
600 and sizes by calling new functions.
602 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
604 * config.bfd (riscv32-*): Enable rv64.
606 2017-05-02 Alan Modra <amodra@gmail.com>
609 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
610 rather than h->root.type == bfd_link_hash_new.
611 (bfd_elf_record_link_assignment): Similarly, call
612 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
614 2017-04-29 Alan Modra <amodra@gmail.com>
617 * reloc.c (reloc_offset_in_range): New function.
618 (bfd_perform_relocation, bfd_install_relocation): Use it.
619 (_bfd_final_link_relocate): Likewise.
621 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
623 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
624 before using .plt.got.
625 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
627 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
629 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
630 instead of "+=" to update 0.
632 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
634 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
635 .plt.got section here.
636 (elf_i386_check_relocs): Don't create the .plt.got section.
637 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
638 the .plt.got and .plt.bnd sections here.
639 (elf_x86_64_check_relocs): Don't create the .plt.got nor
642 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
644 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
646 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
647 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
648 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
649 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
652 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
654 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
656 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
657 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
658 the first relocatable ELF input with GNU properties.
660 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
662 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
665 2017-04-27 Alan Modra <amodra@gmail.com>
667 * elf-bfd.h (struct elf_backend_data): Make asection param of
668 elf_backend_eh_frame_address_size const.
669 (_bfd_elf_eh_frame_address_size): Likewise.
670 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
671 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
672 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
673 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
674 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
675 (next_cie_fde_offset): Constify params.
676 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
678 2017-04-27 Alan Modra <amodra@gmail.com>
680 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
681 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
682 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
684 (offset_adjust): New function.
685 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
686 (adjust_eh_frame_local_symbols): Likewise.
687 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
688 after changing anything. Return true if anything changed.
689 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
690 _bfd_elf_adjust_eh_frame_global_symbol for globals.
692 2017-04-27 Alan Modra <amodra@gmail.com>
694 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
697 2017-04-27 Alan Modra <amodra@gmail.com>
699 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
700 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
701 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
702 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
703 for undef and undefweak dyn_relocs.
704 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
705 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
706 (allocate_got, allocate_dynrelocs): Likewise.
707 (ppc64_elf_relocate_section): Likewise.
709 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
711 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
712 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
713 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
714 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
716 2017-04-26 Nick Clifton <nickc@redhat.com>
719 * reloc.c (bfd_perform_relocation): Check for a negative address
722 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
725 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
727 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
728 (elf_backend_always_renumber_dynsyms): Define.
729 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
730 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
731 * elflink.c (bfd_elf_size_dynamic_sections): Also call
732 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
734 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
736 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
738 * elflink.c (bfd_elf_size_dynamic_sections): Only call
739 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
740 sections have been created.
742 2017-04-26 Nick Clifton <nickc@redhat.com>
745 * compress.c (bfd_init_section_compress_status): Check the return
746 value from bfd_malloc.
748 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
750 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
751 no_finish_dynamic_symbol.
752 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
754 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
755 weak symbol, don't make it dynamic.
756 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
757 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
758 relocation for GOT reference.
759 (elf_x86_64_finish_dynamic_symbol): Abort if
760 no_finish_dynamic_symbol isn't 0.
762 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
765 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
766 undefined weak symbol, don't make it dynamic.
767 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
768 set no_finish_dynamic_symbol and generate R_386_RELATIVE
769 relocation for R_386_GOT32.
771 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
774 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
776 2017-04-23 Alan Modra <amodra@gmail.com>
779 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
780 * elf.c (lcomm_sym): New.
781 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
782 * bfd-in2.h: Regenerate.
784 2017-04-23 Alan Modra <amodra@gmail.com>
787 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
788 parameters and comment.
789 (_bfd_elf_get_reloc_section): Delete.
790 (_bfd_elf_plt_get_reloc_section): Declare.
791 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
792 New functions. Don't blindly skip over assumed .rel/.rela prefix.
794 (_bfd_elf_get_reloc_section): ..here. Delete.
795 (assign_section_numbers): Call elf_get_reloc_section.
796 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
797 * elfxx-target.h (elf_backend_get_reloc_section): Update.
799 2017-04-23 Alan Modra <amodra@gmail.com>
802 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
805 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
808 * elf32-i386.c (elf_i386_link_hash_entry): Add
809 no_finish_dynamic_symbol.
810 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
811 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
812 symbol, don't make it dynamic in PIE.
813 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
814 set no_finish_dynamic_symbol and generate R_386_RELATIVE
815 relocation for R_386_GOT32
816 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
819 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
823 * elflink.c (elf_link_add_object_symbols): Require
824 --no-dynamic-linker with -E/--dynamic-list when creating
827 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
829 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
832 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
834 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
835 dynamic symbol sorting.
837 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
840 * elflink.c (elf_link_add_object_symbols): Preserve
841 dynamic_ref_after_ir_def when restoring the symbol table for
842 unneeded dynamic object.
844 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
847 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
848 on on undefined IFUNC symbol in the second PLT.
850 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
852 * peXXigen.c (pe_print_reloc): Correct chunk_end.
854 2017-04-19 Alan Modra <amodra@gmail.com>
856 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
857 or make dynamic for info->dynamic_undefined_weak 0 and 1.
858 * elf32-ppc.c:Formatting.
859 (ensure_undefweak_dynamic): Don't make dynamic when
860 info->dynamic_undefined_weak is zero.
861 (allocate_dynrelocs): Discard undefweak dyn_relocs for
862 info->dynamic_undefined_weak. Discard undef dyn_relocs when
863 not default visibility. Discard undef and undefweak
865 (ppc_elf_relocate_section): Adjust to suit.
866 * elf64-ppc.c: Formatting.
867 (ensure_undefweak_dynamic): Don't make dynamic when
868 info->dynamic_undefined_weak is zero.
869 (allocate_dynrelocs): Discard undefweak dyn_relocs for
870 info->dynamic_undefined_weak. Discard them earlier.
872 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
875 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
876 before generating the version definition section.
878 2017-04-17 Alan Modra <amodra@gmail.com>
880 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
881 state when a regular object file defines a symbol with
882 incompatible type to that defined by an earlier shared lib.
884 2017-04-13 Alan Modra <amodra@gmail.com>
886 * coffcode.h: Wrap some overly long _bfd_error_handler args.
888 * elf32-arm.c: Likewise.
889 * elf32-i386.c: Likewise.
890 * elf32-mep.c: Likewise.
891 * elf64-ia64-vms.c: Likewise.
892 * elf64-x86-64.c: Likewise.
893 * elflink.c: Likewise.
894 * elfnn-ia64.c: Likewise.
895 * elfxx-mips.c: Likewise.
897 2017-04-13 Alan Modra <amodra@gmail.com>
899 * aoutx.h: Use %B and %A in error messages throughout file.
900 * aout-cris.c: Likewise.
901 * archive.c: Likewise.
902 * binary.c: Likewise.
903 * coff-rs6000.c: Likewise.
904 * coff-tic4x.c: Likewise.
905 * coffcode.h: Likewise.
906 * coffgen.c: Likewise.
907 * cofflink.c: Likewise.
908 * coffswap.h: Likewise.
909 * cpu-arm.c: Likewise.
910 * elf-eh-frame.c: Likewise.
911 * elf-m10300.c: Likewise.
913 * elf32-arc.c: Likewise.
914 * elf32-arm.c: Likewise.
915 * elf32-bfin.c: Likewise.
916 * elf32-frv.c: Likewise.
917 * elf32-iq2000.c: Likewise.
918 * elf32-m32c.c: Likewise.
919 * elf32-microblaze.c: Likewise.
920 * elf32-nds32.c: Likewise.
921 * elf32-rl78.c: Likewise.
922 * elf32-rx.c: Likewise.
923 * elf32-score.c: Likewise.
924 * elf32-score7.c: Likewise.
925 * elf32-sh64.c: Likewise.
926 * elf32-v850.c: Likewise.
927 * elf32-vax.c: Likewise.
928 * elf32-visium.c: Likewise.
929 * elf64-ia64-vms.c: Likewise.
930 * elf64-mmix.c: Likewise.
931 * elf64-sh64.c: Likewise.
932 * elfcode.h: Likewise.
933 * elfnn-aarch64.c: Likewise.
934 * elfnn-ia64.c: Likewise.
935 * elfxx-mips.c: Likewise.
936 * hpux-core.c: Likewise.
939 * linker.c: Likewise.
944 * peXXigen.c: Likewise.
945 * rs6000-core.c: Likewise.
946 * vms-alpha.c: Likewise.
947 * xcofflink.c: Likewise.
949 2017-04-13 Alan Modra <amodra@gmail.com>
951 * bfd.c (PRINT_TYPE): Define.
952 (_doprnt): New function.
953 (error_handler_internal): Use _doprnt.
954 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
955 calls in their natural order, throughout file.
956 * coff-mcore.c: Likewise.
957 * coff-ppc.c: Likewise.
958 * coff-tic80.c: Likewise.
959 * cofflink.c: Likewise.
960 * elf-s390-common.c: Likewise.
962 * elf32-arm.c: Likewise.
963 * elf32-i386.c: Likewise.
964 * elf32-m32r.c: Likewise.
965 * elf32-msp430.c: Likewise.
966 * elf32-spu.c: Likewise.
967 * elf64-ia64-vms.c: Likewise.
968 * elf64-sparc.c: Likewise.
969 * elf64-x86-64.c: Likewise.
970 * elflink.c: Likewise.
971 * elfnn-aarch64.c: Likewise.
972 * elfnn-ia64.c: Likewise.
973 * elfxx-mips.c: Likewise.
975 2017-04-13 Alan Modra <amodra@gmail.com>
977 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
978 branch veneers" error. Fix double space and format message.
979 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
980 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
982 2017-04-13 Alan Modra <amodra@gmail.com>
984 * bfd-in2.h: Regenerate.
986 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
988 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
989 extra `\n' in warning/error messages.
990 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
991 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
993 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
995 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
996 processor-specific properties with generic ELF target vector.
998 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
1000 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1001 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1002 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1003 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1005 (link_hash_newfunc): Initialize has_got_reloc and
1007 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1009 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1011 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1013 (_bfd_sparc_elf_fixup_symbol): New function.
1014 (allocate_dynrelocs): Don't allocate space for dynamic
1015 relocations and discard relocations against resolved undefined
1016 weak symbols in executable. Don't make resolved undefined weak
1017 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1018 relocation against undefined weak symbols in PIE.
1019 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1020 relocations against resolved undefined weak symbols in PIE
1021 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1022 without ynamic PLT/GOT relocations for resolved undefined weak
1024 Don't generate dynamic relocation against resolved undefined
1025 weak symbol in executable.
1026 (pie_finish_undefweak_symbol): New function.
1027 (_bfd_sparc_elf_finish_dynamic_sections): Call
1028 pie_finish_undefweak_symbol on all symbols in PIE.
1029 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1030 (_bfd_sparc_elf_fixup_symbol): New function.
1032 2017-04-10 Nick Clifton <nickc@redhat.com>
1034 * config.bfd: Remove ns32k from obsolete list.
1036 2017-04-10 Alan Modra <amodra@gmail.com>
1039 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1040 (special_sections_i): Likewise for .init_array.
1041 (special_sections_p): Likewise for .preinit_array.
1043 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1047 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1048 ELF_COMMON_DEF_P for common symbols.
1049 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1050 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1051 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1052 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1053 07492f668d2173da7a2bda3707ff0985e0f460b6.
1055 2017-04-07 Pedro Alves <palves@redhat.com>
1057 * opncls.c (bfd_get_debug_link_info): Rename to...
1058 (bfd_get_debug_link_info_1): ... this. Change type of second
1059 parameter to void pointer. Adjust.
1060 (bfd_get_debug_link_info): Reimplement on top of
1061 bfd_get_debug_link_info_1.
1062 (separate_debug_file_exists, separate_alt_debug_file_exists):
1063 Change type of second parameter to void pointer. Adjust.
1064 (get_func_type, check_func_type): Change type of second parameter
1066 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1067 the callback functions instead of passing the address of a local.
1068 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1069 find_separate_debug_file.
1070 (get_alt_debug_link_info_shim): Change type of second parameter to
1071 void pointer. Adjust.
1072 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1073 find_separate_debug_file.
1074 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1075 of second parameter to void pointer. Adjust.
1076 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1077 pointer local to find_separate_debug_file.
1079 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1081 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1082 external symbols with a definition.
1083 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1085 2017-04-07 Alan Modra <amodra@gmail.com>
1087 * po/SRC-POTFILES.in: Regenerate.
1089 2017-04-05 Alan Modra <amodra@gmail.com>
1091 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1094 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1096 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1097 numbers for DataDirectory entry indicies passed to
1100 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1102 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1103 each GNU_MBIND section and align GNU_MBIND section to page size.
1104 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1105 segment for each GNU_MBIND section.
1106 (_bfd_elf_init_private_section_data): Copy sh_info from input
1107 for GNU_MBIND section.
1109 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1111 * elfnn-riscv.c (GP_NAME): Delete.
1112 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1113 (_bfd_riscv_relax_lui): Likewise.
1115 2017-04-04 Nick Clifton <nickc@redhat.com>
1118 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1120 (bfd_elf_final_link): Only initialize the extended symbol index
1121 section if there are extended symbol tables to list.
1123 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1125 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1126 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1127 * configure.ac (elf): Add elf-properties.lo.
1128 * Makefile.in: Regenerated.
1129 * configure: Likewise.
1130 * elf-bfd.h (elf_property_kind): New.
1131 (elf_property): Likewise.
1132 (elf_property_list): Likewise.
1133 (elf_properties): Likewise.
1134 (_bfd_elf_parse_gnu_properties): Likewise.
1135 (_bfd_elf_get_property): Likewise.
1136 (_bfd_elf_link_setup_gnu_properties): Likewise.
1137 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1138 and setup_gnu_properties.
1139 (elf_obj_tdata): Add properties.
1140 * elf-properties.c: New file.
1141 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1142 (elf_i386_merge_gnu_properties): Likewise.
1143 (elf_backend_parse_gnu_properties): Likewise.
1144 (elf_backend_merge_gnu_properties): Likewise.
1145 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1146 (elf_x86_64_merge_gnu_properties): Likewise.
1147 (elf_backend_parse_gnu_properties): Likewise.
1148 (elf_backend_merge_gnu_properties): Likewise.
1149 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1150 (elf_backend_parse_gnu_properties): Likewise.
1151 (elf_backend_setup_gnu_properties): Likewise.
1152 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1153 elf_backend_merge_gnu_properties and
1154 elf_backend_setup_gnu_properties.
1156 2017-03-30 Pip Cet <pipcet@gmail.com>
1158 * elf32-wasm32.c: Add relocation code, two relocs.
1159 * reloc.c: Add wasm32 relocations.
1160 * libbfd.h: Regenerate.
1161 * bfd-in2.h: Regenerate.
1162 * bfd/po/bfd.pot: Regenerate.
1164 2017-03-29 Nick Clifton <nickc@redhat.com>
1167 * coff-bfd.h (struct coff_section_data): Add new fields:
1168 saved_bias and bias.
1169 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1170 computed for PE binaries.
1171 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1174 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1177 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1178 to handle a local symbol with a hash-symbol-entry; without PLT.
1179 Add BFD_ASSERT for an incidental case with GOT entry present.
1180 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1181 isn't forced-or-set local.
1183 2017-03-27 Pip Cet <pipcet@gmail.com>
1185 * wasm-module.c: New file to support WebAssembly modules.
1186 * wasm-module.h: New file to support WebAssembly modules.
1187 * doc/webassembly.texi: Start documenting wasm-module.c.
1188 * config.bfd: Add wasm_vec.
1189 * targets.c: Likewise.
1190 * configure.ac: Likewise.
1191 * Makefile.am: Add entries for wasm-module.c.
1192 * Makefile.in: Regenerate.
1193 * configure: Regenerate.
1194 * po/SRC-POTFILES.in: Regenerate.
1196 2017-03-27 Pip Cet <pipcet@gmail.com>
1198 * cpu-wasm32.c: New file to support wasm32 architecture.
1199 * elf32-wasm32.c: New file to support wasm32 architecture.
1200 * Makefile.am: Add wasm32 architecture.
1201 * archures.c: Likewise.
1202 * config.bfd: Likewise.
1203 * configure.ac: Likewise.
1204 * targets.c: Likewise.
1205 * Makefile.in: Regenerate.
1206 * bfd-in2.h: Regenerate.
1207 * configure: Regenerate.
1208 * po/SRC-POTFILES.in: Regenerate.
1210 2017-03-20 Alan Modra <amodra@gmail.com>
1213 * elf64-ppc.c (compare_symbols): Stabilize sort.
1215 2017-03-18 Alan Modra <amodra@gmail.com>
1217 * elf64-ppc.c (struct ppc_link_hash_table): Add
1218 local_ifunc_resolver and maybe_local_ifunc_resolver.
1219 (ppc_build_one_stub): Set flags on emitting dynamic
1220 relocation to ifunc.
1221 (ppc64_elf_relocate_section): Likewise.
1222 (ppc64_elf_finish_dynamic_symbol): Likewise.
1223 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1224 local dynamic relocs to ifuncs.
1225 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1226 local_ifunc_resolver and maybe_local_ifunc_resolver.
1227 (ppc_elf_relocate_section): Set flag on emitting dynamic
1228 relocation to ifuncs.
1229 (ppc_elf_finish_dynamic_symbol): Likewise.
1230 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1231 dynamic relocs to ifuncs.
1233 2017-03-13 Nick Clifton <nickc@redhat.com>
1236 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1237 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1238 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1239 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1240 * bfd-in2.h: Regenerate.
1241 * libbfd.h: Regenerate.
1242 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1244 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1245 (elfNN_aarch64_howto_table): Likewise.
1246 (aarch64_tls_transition_without_check): Likewise.
1247 (aarch64_reloc_got_type): Likewise.
1248 (elfNN_aarch64_final_link_relocate): Likewise.
1249 (elfNN_aarch64_tls_relax): Likewise.
1250 (elfNN_aarch64_relocate_section): Likewise.
1251 (elfNN_aarch64_gc_sweep_hook): Likewise.
1252 (elfNN_aarch64_check_relocs): Likewise.
1253 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1254 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1256 2017-03-11 Alan Modra <amodra@gmail.com>
1258 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1259 parameter is in fact used. Whitespace fixes.
1260 * elf64-ppc.c: Likewise.
1262 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1264 * rs6000-core.c (CORE_NEW): Simplify macro when
1265 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1267 2017-03-07 Alan Modra <amodra@gmail.com>
1271 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1274 2017-03-05 Alan Modra <amodra@gmail.com>
1276 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1277 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1278 (next_cie_fde_offset): New function.
1279 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1280 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1281 four bytes. Align CIEs to four or eight bytes depending on
1282 per_encoding_aligned8. Align FDEs according to their encoding.
1283 Pad last FDE to output section alignment.
1284 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1286 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1287 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1288 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1290 2017-03-02 Martin Bickel <binutils@ineranves.de>
1293 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1294 empty segments which have a zero filesz, but a non-zero memsz.
1296 2017-03-02 Alan Modra <amodra@gmail.com>
1298 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1300 2017-02-28 Alan Modra <amodra@gmail.com>
1302 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1303 (ppc64_elf_relocate_section): Likewise.
1305 2017-02-28 Alan Modra <amodra@gmail.com>
1308 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1309 rather than elf32_nios2_hash_table or elf_hash_table.
1310 (create_got_section): Likewise.
1311 (nios2_elf32_finish_dynamic_symbol): Likewise.
1312 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1313 (nios2_elf32_size_dynamic_sections): Likewise.
1314 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1315 vars. Use htab equivalents directly instead. Don't create
1316 all dynamic sections on needing just the GOT. Use a goto
1317 rather than a fall-through with reloc test. Ensure
1318 htab->dynobj is set when making dynamic sreloc section.
1319 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1320 equivalent directly instead. Don't segfault on looking for
1321 .dynamic when dynamic sections have not been created. Don't
1322 segfault on .got.plt being discarded.
1323 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1324 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1325 fixme and another not so relevant comment.
1326 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1327 already set, set hash table dynobj on creating .sbss.
1329 2017-02-28 Alan Modra <amodra@gmail.com>
1331 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1332 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1333 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1334 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1335 (ppc64_elf_relocate_section): Likewise.
1336 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1337 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1338 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1339 * libbfd.h: Regenerate.
1340 * bfd-in2.h: Regenerate.
1342 2017-02-28 Alan Modra <amodra@gmail.com>
1344 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1345 dynamic .data.rel.ro read-only.
1346 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1347 rather than section flags when deciding where copy reloc goes.
1348 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1349 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1350 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1351 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1352 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1353 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1354 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1355 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1356 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1357 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1358 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1359 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1360 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1361 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1362 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1363 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1364 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1365 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1366 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1368 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1370 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1371 `jalr $0, $25' instruction encoding.
1373 2017-02-27 Nick Clifton <nickc@redhat.com>
1376 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1377 generating a seg-fault when encountering a symbol that has been
1378 deleted by garbage collection.
1380 2017-02-25 Alan Modra <amodra@gmail.com>
1382 * elf32-arc.c (struct dynamic_sections): Delete.
1383 (enum dyn_section_types): Delete.
1384 (dyn_section_names): Delete.
1385 (arc_create_dynamic_sections): Delete.
1386 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1387 segfault on discarded .rela.plt section.
1388 (elf_arc_size_dynamic_sections): Formatting. Don't call
1389 arc_create_dynamic_sections. Don't allocate memory for sections
1390 handled by the generic linker. Correct code finding relocs in
1391 read-only sections. Set SEC_EXCLUDE on zero size .got,
1392 .got.plt, and .dynbss sections. Do set .interp for pies.
1394 2017-02-24 Andrew Waterman <andrew@sifive.com>
1396 * elfnn-riscv.c (GP_NAME): New macro.
1397 (riscv_global_pointer_value): Use it.
1398 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1399 output section, consider only that section's alignment.
1401 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1403 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1404 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1405 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1406 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1408 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1410 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1411 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1414 2017-02-23 Alan Modra <amodra@gmail.com>
1417 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1419 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1420 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1423 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1426 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1427 processing ahead of the call to `elf_gc_sweep_symbol'.
1429 2017-02-22 Nick Clifton <nickc@redhat.com>
1432 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1433 created section 4-byte alignment.
1435 2017-02-22 Alan Modra <amodra@gmail.com>
1437 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1438 on .got or .plt output section being discarded by script.
1439 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1442 2017-02-21 Alan Modra <amodra@gmail.com>
1444 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1445 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1447 2017-02-20 Alan Modra <amodra@gmail.com>
1450 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1451 if DT_RELSZ/DT_RELASZ is zero.
1453 2017-02-17 Nick Clifton <nickc@redhat.com>
1455 * compress.c (bfd_get_full_section_contents): Remember to reduce
1456 compressed size by the sizeof the compression header when
1457 decompressing the contents.
1459 2017-02-17 Pedro Alves <palves@redhat.com>
1461 * srec.c (Chunk): Rename to ...
1462 (_bfd_srec_len): ... this.
1463 (S3Forced): Rename to ...
1464 (_bfd_srec_forceS3): ... this.
1465 * objcopy.c: Adjust all references.
1467 2017-02-17 Pedro Alves <palves@redhat.com>
1469 * archive.c (bsd_write_armap): Rename to ...
1470 (_bfd_bsd_write_armap): ... this.
1471 (coff_write_armap): Rename to ...
1472 (_bfd_coff_write_armap): ... this.
1473 * libbfd-in.h (bsd_write_armap): Rename to ...
1474 (_bfd_bsd_write_armap): ... this.
1475 (coff_write_armap): Rename to ...
1476 (_bfd_coff_write_armap): ... this.
1477 * aout-target.h, aout-tic30.c: Adjust all users.
1478 * libbfd.h: Regenerate.
1480 2017-02-17 Pedro Alves <palves@redhat.com>
1482 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1483 (warn_deprecated): Rename to ...
1484 (_bfd_warn_deprecated): ... this.
1485 * libbfd.c (warn_deprecated): Rename to ...
1486 (_bfd_warn_deprecated): ... this.
1487 * bfd-in2.h: Regenerate.
1489 2017-02-17 Pedro Alves <palves@redhat.com>
1491 * bfdio.c (real_ftell): Rename to ...
1492 (_bfd_real_ftell): ... this.
1493 (real_fseek): Rename to ...
1494 (_bfd_real_fseek): ... this.
1495 (real_fopen): Rename to ...
1496 (_bfd_real_fopen): ... this.
1497 * libbfd-in.h (real_ftell): Rename to ...
1498 (_bfd_real_ftell): ... this.
1499 (real_fseek): Rename to ...
1500 (_bfd_real_fseek): ... this.
1501 (real_fopen): Rename to ...
1502 (_bfd_real_fopen): ... this.
1503 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1504 * libbfd.h: Regenerate.
1506 2017-02-17 Pedro Alves <palves@redhat.com>
1508 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1509 * libbfd.c (read_unsigned_leb128): Rename to ...
1510 (_bfd_read_unsigned_leb128): ... this.
1511 (read_signed_leb128): Rename to ...
1512 (_bfd_read_signed_leb128): ... this.
1513 (safe_read_leb128): Rename to ...
1514 (_bfd_safe_read_leb128): ... this.
1515 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1516 (_bfd_read_unsigned_leb128): ... this.
1517 (read_signed_leb128): Rename to ...
1518 (_bfd_read_signed_leb128): ... this.
1519 (safe_read_leb128): Rename to ...
1520 (_bfd_safe_read_leb128): ... this.
1521 * libbfd.h: Renegerate.
1523 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1525 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1526 before trying to fine matching file and line information.
1528 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1530 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1531 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1532 not match current bfd, then reload debug information. Record bfd
1533 we're loading debug info for in the stash. If we have debug
1534 informatin in the cache then perform section placement before
1537 2017-02-16 Alan Modra <amodra@gmail.com>
1540 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1541 * elfxx-target.h (elf_backend_no_page_alias): Define.
1542 (elfNN_bed): Init new field.
1543 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1544 ensure PT_LOAD segment starts on a new page.
1545 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1547 2017-02-16 Alan Modra <amodra@gmail.com>
1550 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1553 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1555 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1556 * bfd-in2.h: Regenerated.
1558 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1561 * elf32-i386.c (elf_i386_relocate_section): Allow
1562 "lea foo@GOT, %reg" in PIC.
1564 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1567 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1568 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1569 error against local IFUNC symbol without a base register for
1572 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1574 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1575 `%P: %H:' with `info->callbacks->einfo'.
1576 (ppc_elf_relocate_section): Likewise.
1577 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1578 (ppc64_elf_edit_toc): Likewise.
1579 (ppc64_elf_relocate_section): Likewise.
1581 2017-02-14 Alan Modra <amodra@gmail.com>
1583 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1584 --gc-keep-exported, and test versioned field of sym rather than
1585 looking for @ in name.
1587 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1589 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1592 2017-02-13 Nick Clifton <nickc@redhat.com>
1595 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1598 2017-02-07 Andrew Waterman <andrew@sifive.com>
1600 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1601 entry size if PLT header is written.
1603 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1605 Fix sparc64 dynamic relocation processing to use the dynamic
1607 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1608 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1611 2017-02-03 Nick Clifton <nickc@redhat.com>
1614 * coffcode.h (coff_write_object_contents): Enlarge size of
1615 s_name_buf in order to avoid compile time warning about possible
1617 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1618 32-bits of insn value before printing into buffer.
1620 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1622 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1623 `max_local_dynindx'.
1624 (mips_elf_sort_hash_table): Handle it.
1625 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1626 symbols bump up `max_local_dynindx' rather than
1627 `max_non_got_dynindx'.
1629 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1631 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1632 `min_got_dynindx', `max_unref_got_dynindx' and
1633 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1634 (mips_elf_sort_hash_table): Adjust accordingly.
1636 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1638 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1639 to access the hash table.
1641 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1643 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1644 non-NULL `htab' to the beginning.
1646 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1648 * elflink.c (elf_gc_sweep): Wrap overlong line.
1650 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1652 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1653 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1654 * elfxx-mips.c (mips_elf_link_hash_table): Add
1655 `ignore_branch_isa' member.
1656 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1657 in branch relocation calculation as an error if
1658 `ignore_branch_isa' has been set.
1659 (_bfd_mips_elf_insn32): Rename to...
1660 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1661 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1662 Handle the new parameter.
1664 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1666 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1667 local variable dynobj.
1670 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1671 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1672 executable from read-only sections into sdynrelro.
1673 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1674 dynamic relocs in sdynrelro.
1675 (elf_backend_want_dynrelro): Define.
1677 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1679 * config.bfd (*-*-rtemsaout*): Mark as removed.
1681 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1683 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1684 (arm-*-rtems*): Move to (arm*-*-eabi*).
1685 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1686 (m68-*-rtems*): Move to (m68*-*-elf*).
1688 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1690 * config.bfd (*-*-rtemscoff*): Mark as removed.
1692 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1695 * elflink.c (bfd_elf_record_link_assignment): Revert last
1696 change and don't ever clear `forced_local'. Set `mark'
1698 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1700 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1701 (bfd_elf_size_dynamic_sections): ... here.
1702 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1703 and set `mark' instead in `__tls_get_addr_opt' processing.
1704 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1706 2017-01-24 Alan Modra <amodra@gmail.com>
1708 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1709 where dynamic relocs are preferable. Allow ifunc too.
1710 (ensure_undefweak_dynamic): New function.
1711 (allocate_dynrelocs): Use it here. Move plt handling last and
1712 don't make symbols dynamic, simplifying loop. Only make undef
1713 weak symbols with GOT entries dynamic. Correct condition
1714 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1715 comments. Remove goto.
1716 (ppc_elf_relocate_section): Correct test for using dynamic
1717 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1718 to suit. Set up explicit tls_index entries and implicit GOT
1719 tls_index entries resolvable at link time for
1720 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1721 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1722 (ensure_undefweak_dynamic): New function.
1723 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1724 with GOT entries dynamic. Remove unnecessary test of
1725 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1726 (ppc64_elf_relocate_section): Correct test for using dynamic
1727 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1728 to suit. Set up explicit tls_index entries and implicit GOT
1729 tls_index entries resolvable at link time for __tls_get_addr_opt.
1730 Simplify expression to clear mem for prelink.
1732 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1734 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1736 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1738 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1739 (elf_backend_hash_symbol): Define.
1741 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1744 * elflink.c (bfd_elf_record_link_assignment): Clear any
1745 `forced_local' marking for DSO symbols that are not being
1748 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1750 * elfnn-riscv.c (riscv_elf_object_p): New function.
1752 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1755 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1757 (elf_x86_64_check_relocs): Create .eh_frame section for the
1759 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1760 .eh_frame section for the .plt.bnd section.
1761 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1762 for the .plt.bnd section.
1764 2017-01-12 Nick Clifton <nickc@redhat.com>
1767 * opncls.c (find_separate_debug_file): Add include_dirs
1768 parameter. Only include the directory part of the bfd's filename
1769 in search paths if include_dirs is true. Add a couple of extra
1770 locations for looking for debug files.
1771 ( bfd_follow_gnu_debuglink): Update invocation of
1772 find_separate_debug_file.
1773 (bfd_follow_gnu_debugaltlink): Likewise.
1774 (get_build_id): New function: Finds the build-id of the given bfd.
1775 (get_build_id_name): New function: Computes the name of the
1776 separate debug info file for a bfd, based upon its build-id.
1777 (check_build_id_file): New function: Checks to see if a separate
1778 debug info file exists at the given location, and that its
1779 build-id matches that of the original bfd.
1780 (bfd_follow_build_id_debuglink): New function: Finds a separate
1781 debug info file for a given bfd by using the build-id method.
1782 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1783 method of locating a separate debug info file before using the
1785 * bfd-in2.h: Regenerate.
1787 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1790 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1791 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1792 elf_x86_64_eh_frame_plt_got.
1793 (elf_x86_64_size_dynamic_sections): Get unwind info from
1794 elf_x86_64_bnd_arch_bed for the BND PLT.
1796 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1798 * config.bfd: Add entries for i686-redox and x86_64-redox.
1800 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1802 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1804 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1805 .eh_frame section to 4 bytes for x32.
1806 (elf_x86_64_check_relocs): Likewise.
1808 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1811 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1812 (PLT_GOT_FDE_LENGTH): Likewise.
1813 (elf_i386_plt_layout): Add eh_frame_plt_got and
1814 eh_frame_plt_got_size.
1815 (elf_i386_plt): Updated.
1816 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1817 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1818 (elf_i386_size_dynamic_sections): Allocate and initialize
1819 .eh_frame section for .plt.got.
1820 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1822 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1823 eh_frame_plt_got_size.
1824 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1825 (PLT_GOT_FDE_LENGTH): Likewise.
1826 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1827 eh_frame_plt_got_size.
1828 (elf_x86_64_arch_bed): Updated.
1829 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1830 eh_frame_plt_got_size.
1831 (elf_x86_64_nacl_arch_bed): Likewise.
1832 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1833 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1834 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1835 .eh_frame section for .plt.got.
1836 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1839 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1841 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1842 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1844 2017-01-09 Nick Clifton <nickc@redhat.com>
1846 * dwarf2.c (lookup_address_in_function_table): Return early if
1847 there are no functions in the given comp unit, or if the high
1848 address of the last function in the comp unit is less than the
1851 2017-01-09 Nick Clifton <nickc@redhat.com>
1854 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1855 message if there are too many symbols to load.
1857 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1859 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1860 if relocs are cached.
1862 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1865 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1866 for R_MICROBLAZE_GOTOFF_64.
1868 2017-01-03 Nick Clifton <nickc@redhat.com>
1870 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1871 warning about using a possibly uninitialised variable.
1873 2017-01-02 Alan Modra <amodra@gmail.com>
1875 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1876 (allocate_plt_static, allocate_dynrelocs): Use it.
1878 2017-01-02 Alan Modra <amodra@gmail.com>
1880 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1881 .PARISC.unwind section.
1883 2017-01-02 Alan Modra <amodra@gmail.com>
1886 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1887 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1888 indirect to GOT pointer relative code edit.
1890 2017-01-02 Alan Modra <amodra@gmail.com>
1892 Update year range in copyright notice of all files.
1894 For older changes see ChangeLog-2016
1896 Copyright (C) 2017 Free Software Foundation, Inc.
1898 Copying and distribution of this file, with or without modification,
1899 are permitted in any medium without royalty provided the copyright
1900 notice and this notice are preserved.
1906 version-control: never