1 2017-05-31 John Baldwin <jhb@FreeBSD.org>
3 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
4 determine structure sizes.
5 (elfcore_grok_freebsd_prstatus): Likewise.
7 2017-06-01 Alan Modra <amodra@gmail.com>
9 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
10 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
12 (is_elfv2_localentry0): New function.
13 (ppc64_elf_tls_setup): Default params->plt_localentry0.
14 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
15 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
16 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
17 optimized localentry:0 stubs.
18 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
19 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
21 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
23 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
25 2017-05-30 Casey Smith <clegg89@gmail.com>
28 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
29 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
31 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
33 * cpu-arc.c (arc_compatible): New function.
35 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
37 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
39 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
42 * bfdio.c (bfd_get_file_size): New function.
43 * bfd-in2.h: Regenerated.
45 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
47 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
50 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
52 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
53 dynobj instead of htab->elf.dynobj.
55 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
57 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
59 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
60 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
61 actual number of internal relocations retrieved. Adjust
63 (bfd_elf64_canonicalize_reloc): Remove macro.
64 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
66 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
68 * archures.c (bfd_mach_sparc_v9m8): Define.
69 (bfd_mach_sparc_v8plusm8): Likewise.
70 (bfd_mach_sparc_v9_p): Adjust to M8.
71 (bfd_mach_sparc_64bit_p): Likewise.
72 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
73 bfd_mach_sparc_v8plusm8.
74 * bfd-in2.h: Regenerated.
75 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
77 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
78 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
79 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
81 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
82 bfd_mach_sparc_v8plusm8.
84 2017-05-19 Alan Modra <amodra@gmail.com>
86 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
87 debug and special sections when no non-note alloc sections in an
90 2017-05-18 Alan Modra <amodra@gmail.com>
92 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
93 * elf-m10300.c: Likewise.
95 * elf32-arc.c: Likewise.
96 * elf32-bfin.c: Likewise.
97 * elf32-m68k.c: Likewise.
98 * elf32-nds32.c: Likewise.
99 * elf32-tilepro.c: Likewise.
100 * elflink.c: Likewise.
101 * elfnn-aarch64.c: Likewise.
102 * elfnn-riscv.c: Likewise.
103 * elfxx-tilegx.c: Likewise.
104 * mach-o.c: Likewise.
105 * peXXigen.c: Likewise.
106 * vms-alpha.c: Likewise.
107 * vms-lib.c: Likewise.
109 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
112 * elflink.c (elf_gc_mark_debug_section): New function.
113 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
114 referenced by kept debug sections.
116 2017-05-16 Alan Modra <amodra@gmail.com>
118 * elf-m10300.c: Rename occurrences of non_ir_ref.
119 * elf32-arm.c: Likewise.
120 * elf32-bfin.c: Likewise.
121 * elf32-cr16.c: Likewise.
122 * elf32-cris.c: Likewise.
123 * elf32-d10v.c: Likewise.
124 * elf32-dlx.c: Likewise.
125 * elf32-fr30.c: Likewise.
126 * elf32-frv.c: Likewise.
127 * elf32-hppa.c: Likewise.
128 * elf32-i370.c: Likewise.
129 * elf32-i386.c: Likewise.
130 * elf32-iq2000.c: Likewise.
131 * elf32-lm32.c: Likewise.
132 * elf32-m32c.c: Likewise.
133 * elf32-m32r.c: Likewise.
134 * elf32-m68hc1x.c: Likewise.
135 * elf32-m68k.c: Likewise.
136 * elf32-mcore.c: Likewise.
137 * elf32-metag.c: Likewise.
138 * elf32-microblaze.c: Likewise.
139 * elf32-moxie.c: Likewise.
140 * elf32-msp430.c: Likewise.
141 * elf32-mt.c: Likewise.
142 * elf32-nios2.c: Likewise.
143 * elf32-or1k.c: Likewise.
144 * elf32-ppc.c: Likewise.
145 * elf32-rl78.c: Likewise.
146 * elf32-s390.c: Likewise.
147 * elf32-score.c: Likewise.
148 * elf32-score7.c: Likewise.
149 * elf32-sh.c: Likewise.
150 * elf32-tic6x.c: Likewise.
151 * elf32-tilepro.c: Likewise.
152 * elf32-v850.c: Likewise.
153 * elf32-vax.c: Likewise.
154 * elf32-xstormy16.c: Likewise.
155 * elf32-xtensa.c: Likewise.
156 * elf64-alpha.c: Likewise.
157 * elf64-hppa.c: Likewise.
158 * elf64-ia64-vms.c: Likewise.
159 * elf64-mmix.c: Likewise.
160 * elf64-ppc.c: Likewise.
161 * elf64-s390.c: Likewise.
162 * elf64-sh64.c: Likewise.
163 * elf64-x86-64.c: Likewise.
164 * elflink.c: Likewise.
165 * elfnn-aarch64.c: Likewise.
166 * elfnn-ia64.c: Likewise.
167 * elfnn-riscv.c: Likewise.
168 * elfxx-mips.c: Likewise.
169 * elfxx-sparc.c: Likewise.
170 * elfxx-tilegx.c: Likewise.
171 * linker.c: Likewise.
173 2017-05-16 Alan Modra <amodra@gmail.com>
175 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
176 * elflink.c (elf_link_add_object_symbols): Update to use
178 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
180 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
182 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
184 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
186 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
188 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
189 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
191 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
193 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
195 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
197 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
198 to plt_second/plt_second_eh_frame.
199 (elf_x86_64_link_hash_newfunc): Updated.
200 (elf_x86_64_allocate_dynrelocs): Likewise.
201 (elf_x86_64_size_dynamic_sections): Likewise.
202 (elf_x86_64_relocate_section): Likewise.
203 (elf_x86_64_finish_dynamic_symbol): Likewise.
204 (elf_x86_64_finish_dynamic_sections): Likewise.
205 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
206 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
208 (elf_backend_setup_gnu_properties): Updated. Create the
209 .plt.sec section instead of the .plt.sec section.
211 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
213 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
214 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
215 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
217 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
219 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
220 (bfd_elf64_set_reloc): Define.
221 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
223 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
225 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
226 (struct bfd_target): New field _bfd_set_reloc.
227 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
228 * reloc.c (_bfd_generic_set_reloc): New function.
229 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
230 * nlm-target.h (nlm_set_reloc): Likewise.
231 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
232 * aout-tic30.c (MY_set_reloc): Likewise.
233 * aout-target.h (MY_set_reloc): Likewise.
234 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
235 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
236 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
237 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
238 * aout-adobe.c (aout_32_set_reloc): Likewise.
239 * bout.c (b_out_set_reloc): Likewise.
240 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
241 * i386os9k.c (aout_32_set_reloc): Likewise.
242 * ieee.c (ieee_set_reloc): Likewise.
243 * oasys.c (oasys_set_reloc): Likewise.
244 * som.c (som_set_reloc): Likewise.
245 * versados.c (versados_set_reloc): Likewise.
246 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
247 _bfd_generic_set_reloc.
248 (rs6000_xcoff64_aix_vec): LIkewise.
249 * libbfd.c (_bfd_norelocs_set_reloc): New function.
250 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
251 * i386msdos.c (msdos_set_reloc): Define to
252 _bfd_norelocs_set_reloc.
253 * elfcode.h (elf_set_reloc): Define.
254 * bfd-in2.h: Regenerated.
256 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
259 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
260 for IFUNC function address.
262 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
264 * elf32-arc.c (FEATURE_LIST_NAME): Define.
265 (CONFLICT_LIST): Likewise.
266 (opcode/arc-attrs.h): Include.
267 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
268 (arc_extract_features): New file.
269 (arc_stralloc): Likewise.
270 (arc_elf_merge_attributes): Likewise.
271 (arc_elf_merge_private_bfd_data): Use object attributes.
272 (bfd_arc_get_mach_from_attributes): New function.
273 (arc_elf_object_p): Use object attributes.
274 (arc_elf_final_write_processing): Likewise.
275 (elf32_arc_obj_attrs_arg_type): New function.
276 (elf32_arc_obj_attrs_handle_unknown): Likewise.
277 (elf32_arc_section_from_shdr): Likewise.
278 (elf_backend_obj_attrs_vendor): Define.
279 (elf_backend_obj_attrs_section): Likewise.
280 (elf_backend_obj_attrs_arg_type): Likewise.
281 (elf_backend_obj_attrs_section_type): Likewise.
282 (elf_backend_obj_attrs_handle_unknown): Likewise.
283 (elf_backend_section_from_shdr): Likewise.
285 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
288 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
289 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
290 and the destination is a Thumb symbol.
292 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
294 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
295 initializer to silence GCC 4.2.
296 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
298 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
300 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
301 (LAZY_PLT_ENTRY_SIZE): This.
302 (NON_LAZY_PLT_ENTRY_SIZE): New.
303 (elf_x86_64_plt0_entry): Renamed to ...
304 (elf_x86_64_lazy_plt0_entry): This.
305 (elf_x86_64_plt_entry): Renamed to ...
306 (elf_x86_64_lazy_plt_entry): This.
307 (elf_x86_64_bnd_plt0_entry): Renamed to ...
308 (elf_x86_64_lazy_bnd_plt0_entry): This.
309 (elf_x86_64_legacy_plt_entry): Removed.
310 (elf_x86_64_bnd_plt_entry): Renamed to ...
311 (elf_x86_64_lazy_bnd_plt_entry): This.
312 (elf_x86_64_legacy_plt2_entry): Renamed to ...
313 (elf_x86_64_non_lazy_plt_entry): This.
314 (elf_x86_64_bnd_plt2_entry): Renamed to ...
315 (elf_x86_64_non_lazy_bnd_plt_entry): This.
316 (elf_x86_64_eh_frame_plt): Renamed to ...
317 (elf_x86_64_eh_frame_lazy_plt): This.
318 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
319 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
320 (elf_x86_64_eh_frame_plt_got): Renamed to ...
321 (elf_x86_64_eh_frame_non_lazy_plt): This.
322 (elf_x86_64_lazy_plt_layout): New.
323 (elf_x86_64_non_lazy_plt_layout): Likewise.
324 (elf_x86_64_plt_layout): Likewise.
325 (elf_x86_64_backend_data): Remove PLT layout information. Add
326 os for target system.
327 (GET_PLT_ENTRY_SIZE): Removed.
328 (elf_x86_64_lazy_plt): New.
329 (elf_x86_64_non_lazy_plt): Likewise.
330 (elf_x86_64_lazy_bnd_plt): Likewise.
331 (elf_x86_64_non_lazy_bnd_plt): Likewise.
332 (elf_x86-64_arch_bed): Updated.
333 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
334 (elf_x86_64_create_dynamic_sections): Removed.
335 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
336 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
337 (elf_x86-64_adjust_dynamic_symbol): Updated.
338 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
339 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
340 size for PLT0 if there is no PLT0. Get plt_entry_size from
341 non_lazy_plt for non-lazy PLT entries.
342 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
343 from non_lazy_plt for non-lazy PLT entries.
344 (elf_x86-64_relocate_section): Updated. Properly get PLT index
346 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
347 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
348 entries with non-lazy PLT layout. Don't fill the second and third
349 slots in the PLT entry if there is no PLT0.
350 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
351 if there is no PLT0. Set sh_entsize on the .plt.got section.
352 (compare_relocs): New.
353 (elf_x86_64_plt_type): Likewise.
354 (elf_x86_64_plt): Likewise.
355 (elf_x86_64_nacl_plt): New. Forward declaration.
356 (elf_x86_64_get_plt_sym_val): Removed.
357 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
358 against all dynamic relocations.
359 (elf_x86_64_link_setup_gnu_properties): New function.
360 (elf_backend_create_dynamic_sections): Updated.
361 (elf_backend_setup_gnu_properties): New.
362 (elf_x86_64_nacl_plt): New.
363 (elf_x86_64_nacl_arch_bed): Updated.
365 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
367 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
368 (LAZY_PLT_ENTRY_SIZE): This.
369 (NON_LAZY_PLT_ENTRY_SIZE): New.
370 (elf_i386_plt0_entry): Renamed to ...
371 (elf_i386_lazy_plt0_entry): This.
372 (elf_i386_plt_entry): Renamed to ...
373 (elf_i386_lazy_plt_entry): This.
374 (elf_i386_pic_plt0_entry): Renamed to ...
375 (elf_i386_pic_lazy_plt0_entry): This.
376 (elf_i386_pic_plt_entry): Renamed to ...
377 (elf_i386_pic_lazy_plt_entry): This.
378 (elf_i386_got_plt_entry): Renamed to ...
379 (elf_i386_non_lazy_plt_entry): This.
380 (elf_i386_pic_got_plt_entry): Renamed to ...
381 (elf_i386_pic_non_lazy_plt_entry): This.
382 (elf_i386_eh_frame_plt): Renamed to ...
383 (elf_i386_eh_frame_lazy_plt): This.
384 (elf_i386_eh_frame_plt_got): Renamed to ...
385 (elf_i386_eh_frame_non_lazy_plt): This.
386 (elf_i386_plt_layout): Renamed to ...
387 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
388 eh_frame_plt_got_size.
389 (elf_i386_non_lazy_plt_layout): New.
390 (elf_i386_plt_layout): Likewise.
391 (elf_i386_non_lazy_plt): Likewise.
392 (GET_PLT_ENTRY_SIZE): Removed.
393 (elf_i386_plt): Renamed to ...
394 (elf_i386_lazy_plt): This.
395 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
396 (elf_i386_arch_bed): Updated.
397 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
398 (elf_i386_create_dynamic_sections): Removed.
399 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
400 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
401 (elf_i386_adjust_dynamic_symbol): Updated.
402 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
403 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
404 size for PLT0 if there is no PLT0.
405 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
406 output section is discarded only if GOT isn't empty.
407 (elf_i386_relocate_section): Updated. Properly get PLT index
409 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
410 second and third slots in the PLT entry if there is no PLT0.
411 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
412 if there is no PLT0. Set sh_entsize on the .plt.got section.
413 (elf_i386_nacl_plt): Forward declaration.
414 (elf_i386_get_plt_sym_val): Removed.
415 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
416 against all dynamic relocations.
417 (elf_i386_link_setup_gnu_properties): New function.
418 (elf_backend_create_dynamic_sections): Updated.
419 (elf_backend_setup_gnu_properties): New.
420 (elf_i386_nacl_plt): Updated.
421 (elf_i386_nacl_arch_bed): Likewise.
422 (elf_i386_vxworks_arch_bed): Likewise.
424 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
426 * elflink.c (elf_output_implib): Remove executable flag from import
428 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
429 library is a relocatable object file.
431 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
434 * elf32-avr.c (avr_should_move_sym): New function.
435 (avr_should_reduce_sym_size): Likewise.
436 (avr_should_increase_sym_size): Likewise.
437 (elf32_avr_relax_delete_bytes): Adjust symbol values
438 and sizes by calling new functions.
440 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
442 * config.bfd (riscv32-*): Enable rv64.
444 2017-05-02 Alan Modra <amodra@gmail.com>
447 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
448 rather than h->root.type == bfd_link_hash_new.
449 (bfd_elf_record_link_assignment): Similarly, call
450 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
452 2017-04-29 Alan Modra <amodra@gmail.com>
455 * reloc.c (reloc_offset_in_range): New function.
456 (bfd_perform_relocation, bfd_install_relocation): Use it.
457 (_bfd_final_link_relocate): Likewise.
459 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
461 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
462 before using .plt.got.
463 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
465 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
467 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
468 instead of "+=" to update 0.
470 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
472 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
473 .plt.got section here.
474 (elf_i386_check_relocs): Don't create the .plt.got section.
475 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
476 the .plt.got and .plt.bnd sections here.
477 (elf_x86_64_check_relocs): Don't create the .plt.got nor
480 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
482 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
484 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
485 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
486 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
487 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
490 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
492 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
494 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
495 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
496 the first relocatable ELF input with GNU properties.
498 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
500 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
503 2017-04-27 Alan Modra <amodra@gmail.com>
505 * elf-bfd.h (struct elf_backend_data): Make asection param of
506 elf_backend_eh_frame_address_size const.
507 (_bfd_elf_eh_frame_address_size): Likewise.
508 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
509 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
510 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
511 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
512 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
513 (next_cie_fde_offset): Constify params.
514 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
516 2017-04-27 Alan Modra <amodra@gmail.com>
518 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
519 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
520 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
522 (offset_adjust): New function.
523 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
524 (adjust_eh_frame_local_symbols): Likewise.
525 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
526 after changing anything. Return true if anything changed.
527 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
528 _bfd_elf_adjust_eh_frame_global_symbol for globals.
530 2017-04-27 Alan Modra <amodra@gmail.com>
532 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
535 2017-04-27 Alan Modra <amodra@gmail.com>
537 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
538 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
539 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
540 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
541 for undef and undefweak dyn_relocs.
542 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
543 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
544 (allocate_got, allocate_dynrelocs): Likewise.
545 (ppc64_elf_relocate_section): Likewise.
547 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
549 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
550 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
551 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
552 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
554 2017-04-26 Nick Clifton <nickc@redhat.com>
557 * reloc.c (bfd_perform_relocation): Check for a negative address
560 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
563 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
565 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
566 (elf_backend_always_renumber_dynsyms): Define.
567 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
568 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
569 * elflink.c (bfd_elf_size_dynamic_sections): Also call
570 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
572 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
574 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
576 * elflink.c (bfd_elf_size_dynamic_sections): Only call
577 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
578 sections have been created.
580 2017-04-26 Nick Clifton <nickc@redhat.com>
583 * compress.c (bfd_init_section_compress_status): Check the return
584 value from bfd_malloc.
586 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
588 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
589 no_finish_dynamic_symbol.
590 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
592 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
593 weak symbol, don't make it dynamic.
594 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
595 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
596 relocation for GOT reference.
597 (elf_x86_64_finish_dynamic_symbol): Abort if
598 no_finish_dynamic_symbol isn't 0.
600 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
603 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
604 undefined weak symbol, don't make it dynamic.
605 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
606 set no_finish_dynamic_symbol and generate R_386_RELATIVE
607 relocation for R_386_GOT32.
609 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
612 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
614 2017-04-23 Alan Modra <amodra@gmail.com>
617 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
618 * elf.c (lcomm_sym): New.
619 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
620 * bfd-in2.h: Regenerate.
622 2017-04-23 Alan Modra <amodra@gmail.com>
625 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
626 parameters and comment.
627 (_bfd_elf_get_reloc_section): Delete.
628 (_bfd_elf_plt_get_reloc_section): Declare.
629 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
630 New functions. Don't blindly skip over assumed .rel/.rela prefix.
632 (_bfd_elf_get_reloc_section): ..here. Delete.
633 (assign_section_numbers): Call elf_get_reloc_section.
634 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
635 * elfxx-target.h (elf_backend_get_reloc_section): Update.
637 2017-04-23 Alan Modra <amodra@gmail.com>
640 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
643 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
646 * elf32-i386.c (elf_i386_link_hash_entry): Add
647 no_finish_dynamic_symbol.
648 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
649 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
650 symbol, don't make it dynamic in PIE.
651 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
652 set no_finish_dynamic_symbol and generate R_386_RELATIVE
653 relocation for R_386_GOT32
654 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
657 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
661 * elflink.c (elf_link_add_object_symbols): Require
662 --no-dynamic-linker with -E/--dynamic-list when creating
665 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
667 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
670 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
672 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
673 dynamic symbol sorting.
675 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
678 * elflink.c (elf_link_add_object_symbols): Preserve
679 dynamic_ref_after_ir_def when restoring the symbol table for
680 unneeded dynamic object.
682 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
685 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
686 on on undefined IFUNC symbol in the second PLT.
688 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
690 * peXXigen.c (pe_print_reloc): Correct chunk_end.
692 2017-04-19 Alan Modra <amodra@gmail.com>
694 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
695 or make dynamic for info->dynamic_undefined_weak 0 and 1.
696 * elf32-ppc.c:Formatting.
697 (ensure_undefweak_dynamic): Don't make dynamic when
698 info->dynamic_undefined_weak is zero.
699 (allocate_dynrelocs): Discard undefweak dyn_relocs for
700 info->dynamic_undefined_weak. Discard undef dyn_relocs when
701 not default visibility. Discard undef and undefweak
703 (ppc_elf_relocate_section): Adjust to suit.
704 * elf64-ppc.c: Formatting.
705 (ensure_undefweak_dynamic): Don't make dynamic when
706 info->dynamic_undefined_weak is zero.
707 (allocate_dynrelocs): Discard undefweak dyn_relocs for
708 info->dynamic_undefined_weak. Discard them earlier.
710 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
713 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
714 before generating the version definition section.
716 2017-04-17 Alan Modra <amodra@gmail.com>
718 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
719 state when a regular object file defines a symbol with
720 incompatible type to that defined by an earlier shared lib.
722 2017-04-13 Alan Modra <amodra@gmail.com>
724 * coffcode.h: Wrap some overly long _bfd_error_handler args.
726 * elf32-arm.c: Likewise.
727 * elf32-i386.c: Likewise.
728 * elf32-mep.c: Likewise.
729 * elf64-ia64-vms.c: Likewise.
730 * elf64-x86-64.c: Likewise.
731 * elflink.c: Likewise.
732 * elfnn-ia64.c: Likewise.
733 * elfxx-mips.c: Likewise.
735 2017-04-13 Alan Modra <amodra@gmail.com>
737 * aoutx.h: Use %B and %A in error messages throughout file.
738 * aout-cris.c: Likewise.
739 * archive.c: Likewise.
740 * binary.c: Likewise.
741 * coff-rs6000.c: Likewise.
742 * coff-tic4x.c: Likewise.
743 * coffcode.h: Likewise.
744 * coffgen.c: Likewise.
745 * cofflink.c: Likewise.
746 * coffswap.h: Likewise.
747 * cpu-arm.c: Likewise.
748 * elf-eh-frame.c: Likewise.
749 * elf-m10300.c: Likewise.
751 * elf32-arc.c: Likewise.
752 * elf32-arm.c: Likewise.
753 * elf32-bfin.c: Likewise.
754 * elf32-frv.c: Likewise.
755 * elf32-iq2000.c: Likewise.
756 * elf32-m32c.c: Likewise.
757 * elf32-microblaze.c: Likewise.
758 * elf32-nds32.c: Likewise.
759 * elf32-rl78.c: Likewise.
760 * elf32-rx.c: Likewise.
761 * elf32-score.c: Likewise.
762 * elf32-score7.c: Likewise.
763 * elf32-sh64.c: Likewise.
764 * elf32-v850.c: Likewise.
765 * elf32-vax.c: Likewise.
766 * elf32-visium.c: Likewise.
767 * elf64-ia64-vms.c: Likewise.
768 * elf64-mmix.c: Likewise.
769 * elf64-sh64.c: Likewise.
770 * elfcode.h: Likewise.
771 * elfnn-aarch64.c: Likewise.
772 * elfnn-ia64.c: Likewise.
773 * elfxx-mips.c: Likewise.
774 * hpux-core.c: Likewise.
777 * linker.c: Likewise.
782 * peXXigen.c: Likewise.
783 * rs6000-core.c: Likewise.
784 * vms-alpha.c: Likewise.
785 * xcofflink.c: Likewise.
787 2017-04-13 Alan Modra <amodra@gmail.com>
789 * bfd.c (PRINT_TYPE): Define.
790 (_doprnt): New function.
791 (error_handler_internal): Use _doprnt.
792 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
793 calls in their natural order, throughout file.
794 * coff-mcore.c: Likewise.
795 * coff-ppc.c: Likewise.
796 * coff-tic80.c: Likewise.
797 * cofflink.c: Likewise.
798 * elf-s390-common.c: Likewise.
800 * elf32-arm.c: Likewise.
801 * elf32-i386.c: Likewise.
802 * elf32-m32r.c: Likewise.
803 * elf32-msp430.c: Likewise.
804 * elf32-spu.c: Likewise.
805 * elf64-ia64-vms.c: Likewise.
806 * elf64-sparc.c: Likewise.
807 * elf64-x86-64.c: Likewise.
808 * elflink.c: Likewise.
809 * elfnn-aarch64.c: Likewise.
810 * elfnn-ia64.c: Likewise.
811 * elfxx-mips.c: Likewise.
813 2017-04-13 Alan Modra <amodra@gmail.com>
815 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
816 branch veneers" error. Fix double space and format message.
817 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
818 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
820 2017-04-13 Alan Modra <amodra@gmail.com>
822 * bfd-in2.h: Regenerate.
824 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
826 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
827 extra `\n' in warning/error messages.
828 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
829 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
831 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
833 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
834 processor-specific properties with generic ELF target vector.
836 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
838 * elf32-sparc.c (elf_backend_fixup_symbol): New.
839 * elf64-sparc.c (elf_backend_fixup_symbol): New.
840 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
841 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
843 (link_hash_newfunc): Initialize has_got_reloc and
845 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
847 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
849 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
851 (_bfd_sparc_elf_fixup_symbol): New function.
852 (allocate_dynrelocs): Don't allocate space for dynamic
853 relocations and discard relocations against resolved undefined
854 weak symbols in executable. Don't make resolved undefined weak
855 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
856 relocation against undefined weak symbols in PIE.
857 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
858 relocations against resolved undefined weak symbols in PIE
859 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
860 without ynamic PLT/GOT relocations for resolved undefined weak
862 Don't generate dynamic relocation against resolved undefined
863 weak symbol in executable.
864 (pie_finish_undefweak_symbol): New function.
865 (_bfd_sparc_elf_finish_dynamic_sections): Call
866 pie_finish_undefweak_symbol on all symbols in PIE.
867 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
868 (_bfd_sparc_elf_fixup_symbol): New function.
870 2017-04-10 Nick Clifton <nickc@redhat.com>
872 * config.bfd: Remove ns32k from obsolete list.
874 2017-04-10 Alan Modra <amodra@gmail.com>
877 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
878 (special_sections_i): Likewise for .init_array.
879 (special_sections_p): Likewise for .preinit_array.
881 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
885 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
886 ELF_COMMON_DEF_P for common symbols.
887 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
888 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
889 * elflink.c (_bfd_elf_merge_symbol): Revert commits
890 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
891 07492f668d2173da7a2bda3707ff0985e0f460b6.
893 2017-04-07 Pedro Alves <palves@redhat.com>
895 * opncls.c (bfd_get_debug_link_info): Rename to...
896 (bfd_get_debug_link_info_1): ... this. Change type of second
897 parameter to void pointer. Adjust.
898 (bfd_get_debug_link_info): Reimplement on top of
899 bfd_get_debug_link_info_1.
900 (separate_debug_file_exists, separate_alt_debug_file_exists):
901 Change type of second parameter to void pointer. Adjust.
902 (get_func_type, check_func_type): Change type of second parameter
904 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
905 the callback functions instead of passing the address of a local.
906 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
907 find_separate_debug_file.
908 (get_alt_debug_link_info_shim): Change type of second parameter to
909 void pointer. Adjust.
910 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
911 find_separate_debug_file.
912 (get_build_id_name, bfd_boolean check_build_id_file): Change type
913 of second parameter to void pointer. Adjust.
914 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
915 pointer local to find_separate_debug_file.
917 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
919 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
920 external symbols with a definition.
921 (_bfd_coff_gc_mark_extra_sections): Fix typo.
923 2017-04-07 Alan Modra <amodra@gmail.com>
925 * po/SRC-POTFILES.in: Regenerate.
927 2017-04-05 Alan Modra <amodra@gmail.com>
929 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
932 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
934 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
935 numbers for DataDirectory entry indicies passed to
938 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
940 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
941 each GNU_MBIND section and align GNU_MBIND section to page size.
942 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
943 segment for each GNU_MBIND section.
944 (_bfd_elf_init_private_section_data): Copy sh_info from input
945 for GNU_MBIND section.
947 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
949 * elfnn-riscv.c (GP_NAME): Delete.
950 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
951 (_bfd_riscv_relax_lui): Likewise.
953 2017-04-04 Nick Clifton <nickc@redhat.com>
956 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
958 (bfd_elf_final_link): Only initialize the extended symbol index
959 section if there are extended symbol tables to list.
961 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
963 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
964 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
965 * configure.ac (elf): Add elf-properties.lo.
966 * Makefile.in: Regenerated.
967 * configure: Likewise.
968 * elf-bfd.h (elf_property_kind): New.
969 (elf_property): Likewise.
970 (elf_property_list): Likewise.
971 (elf_properties): Likewise.
972 (_bfd_elf_parse_gnu_properties): Likewise.
973 (_bfd_elf_get_property): Likewise.
974 (_bfd_elf_link_setup_gnu_properties): Likewise.
975 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
976 and setup_gnu_properties.
977 (elf_obj_tdata): Add properties.
978 * elf-properties.c: New file.
979 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
980 (elf_i386_merge_gnu_properties): Likewise.
981 (elf_backend_parse_gnu_properties): Likewise.
982 (elf_backend_merge_gnu_properties): Likewise.
983 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
984 (elf_x86_64_merge_gnu_properties): Likewise.
985 (elf_backend_parse_gnu_properties): Likewise.
986 (elf_backend_merge_gnu_properties): Likewise.
987 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
988 (elf_backend_parse_gnu_properties): Likewise.
989 (elf_backend_setup_gnu_properties): Likewise.
990 (elfNN_bed): Add elf_backend_parse_gnu_properties,
991 elf_backend_merge_gnu_properties and
992 elf_backend_setup_gnu_properties.
994 2017-03-30 Pip Cet <pipcet@gmail.com>
996 * elf32-wasm32.c: Add relocation code, two relocs.
997 * reloc.c: Add wasm32 relocations.
998 * libbfd.h: Regenerate.
999 * bfd-in2.h: Regenerate.
1000 * bfd/po/bfd.pot: Regenerate.
1002 2017-03-29 Nick Clifton <nickc@redhat.com>
1005 * coff-bfd.h (struct coff_section_data): Add new fields:
1006 saved_bias and bias.
1007 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1008 computed for PE binaries.
1009 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1012 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1015 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1016 to handle a local symbol with a hash-symbol-entry; without PLT.
1017 Add BFD_ASSERT for an incidental case with GOT entry present.
1018 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1019 isn't forced-or-set local.
1021 2017-03-27 Pip Cet <pipcet@gmail.com>
1023 * wasm-module.c: New file to support WebAssembly modules.
1024 * wasm-module.h: New file to support WebAssembly modules.
1025 * doc/webassembly.texi: Start documenting wasm-module.c.
1026 * config.bfd: Add wasm_vec.
1027 * targets.c: Likewise.
1028 * configure.ac: Likewise.
1029 * Makefile.am: Add entries for wasm-module.c.
1030 * Makefile.in: Regenerate.
1031 * configure: Regenerate.
1032 * po/SRC-POTFILES.in: Regenerate.
1034 2017-03-27 Pip Cet <pipcet@gmail.com>
1036 * cpu-wasm32.c: New file to support wasm32 architecture.
1037 * elf32-wasm32.c: New file to support wasm32 architecture.
1038 * Makefile.am: Add wasm32 architecture.
1039 * archures.c: Likewise.
1040 * config.bfd: Likewise.
1041 * configure.ac: Likewise.
1042 * targets.c: Likewise.
1043 * Makefile.in: Regenerate.
1044 * bfd-in2.h: Regenerate.
1045 * configure: Regenerate.
1046 * po/SRC-POTFILES.in: Regenerate.
1048 2017-03-20 Alan Modra <amodra@gmail.com>
1051 * elf64-ppc.c (compare_symbols): Stabilize sort.
1053 2017-03-18 Alan Modra <amodra@gmail.com>
1055 * elf64-ppc.c (struct ppc_link_hash_table): Add
1056 local_ifunc_resolver and maybe_local_ifunc_resolver.
1057 (ppc_build_one_stub): Set flags on emitting dynamic
1058 relocation to ifunc.
1059 (ppc64_elf_relocate_section): Likewise.
1060 (ppc64_elf_finish_dynamic_symbol): Likewise.
1061 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1062 local dynamic relocs to ifuncs.
1063 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1064 local_ifunc_resolver and maybe_local_ifunc_resolver.
1065 (ppc_elf_relocate_section): Set flag on emitting dynamic
1066 relocation to ifuncs.
1067 (ppc_elf_finish_dynamic_symbol): Likewise.
1068 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1069 dynamic relocs to ifuncs.
1071 2017-03-13 Nick Clifton <nickc@redhat.com>
1074 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1075 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1076 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1077 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1078 * bfd-in2.h: Regenerate.
1079 * libbfd.h: Regenerate.
1080 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1082 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1083 (elfNN_aarch64_howto_table): Likewise.
1084 (aarch64_tls_transition_without_check): Likewise.
1085 (aarch64_reloc_got_type): Likewise.
1086 (elfNN_aarch64_final_link_relocate): Likewise.
1087 (elfNN_aarch64_tls_relax): Likewise.
1088 (elfNN_aarch64_relocate_section): Likewise.
1089 (elfNN_aarch64_gc_sweep_hook): Likewise.
1090 (elfNN_aarch64_check_relocs): Likewise.
1091 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1092 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1094 2017-03-11 Alan Modra <amodra@gmail.com>
1096 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1097 parameter is in fact used. Whitespace fixes.
1098 * elf64-ppc.c: Likewise.
1100 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1102 * rs6000-core.c (CORE_NEW): Simplify macro when
1103 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1105 2017-03-07 Alan Modra <amodra@gmail.com>
1109 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1112 2017-03-05 Alan Modra <amodra@gmail.com>
1114 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1115 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1116 (next_cie_fde_offset): New function.
1117 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1118 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1119 four bytes. Align CIEs to four or eight bytes depending on
1120 per_encoding_aligned8. Align FDEs according to their encoding.
1121 Pad last FDE to output section alignment.
1122 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1124 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1125 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1126 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1128 2017-03-02 Martin Bickel <binutils@ineranves.de>
1131 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1132 empty segments which have a zero filesz, but a non-zero memsz.
1134 2017-03-02 Alan Modra <amodra@gmail.com>
1136 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1138 2017-02-28 Alan Modra <amodra@gmail.com>
1140 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1141 (ppc64_elf_relocate_section): Likewise.
1143 2017-02-28 Alan Modra <amodra@gmail.com>
1146 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1147 rather than elf32_nios2_hash_table or elf_hash_table.
1148 (create_got_section): Likewise.
1149 (nios2_elf32_finish_dynamic_symbol): Likewise.
1150 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1151 (nios2_elf32_size_dynamic_sections): Likewise.
1152 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1153 vars. Use htab equivalents directly instead. Don't create
1154 all dynamic sections on needing just the GOT. Use a goto
1155 rather than a fall-through with reloc test. Ensure
1156 htab->dynobj is set when making dynamic sreloc section.
1157 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1158 equivalent directly instead. Don't segfault on looking for
1159 .dynamic when dynamic sections have not been created. Don't
1160 segfault on .got.plt being discarded.
1161 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1162 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1163 fixme and another not so relevant comment.
1164 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1165 already set, set hash table dynobj on creating .sbss.
1167 2017-02-28 Alan Modra <amodra@gmail.com>
1169 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1170 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1171 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1172 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1173 (ppc64_elf_relocate_section): Likewise.
1174 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1175 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1176 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1177 * libbfd.h: Regenerate.
1178 * bfd-in2.h: Regenerate.
1180 2017-02-28 Alan Modra <amodra@gmail.com>
1182 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1183 dynamic .data.rel.ro read-only.
1184 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1185 rather than section flags when deciding where copy reloc goes.
1186 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1187 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1188 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1189 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1190 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1191 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1192 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1193 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1194 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1195 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1196 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1197 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1198 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1199 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1200 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1201 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1202 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1203 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1204 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1206 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1208 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1209 `jalr $0, $25' instruction encoding.
1211 2017-02-27 Nick Clifton <nickc@redhat.com>
1214 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1215 generating a seg-fault when encountering a symbol that has been
1216 deleted by garbage collection.
1218 2017-02-25 Alan Modra <amodra@gmail.com>
1220 * elf32-arc.c (struct dynamic_sections): Delete.
1221 (enum dyn_section_types): Delete.
1222 (dyn_section_names): Delete.
1223 (arc_create_dynamic_sections): Delete.
1224 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1225 segfault on discarded .rela.plt section.
1226 (elf_arc_size_dynamic_sections): Formatting. Don't call
1227 arc_create_dynamic_sections. Don't allocate memory for sections
1228 handled by the generic linker. Correct code finding relocs in
1229 read-only sections. Set SEC_EXCLUDE on zero size .got,
1230 .got.plt, and .dynbss sections. Do set .interp for pies.
1232 2017-02-24 Andrew Waterman <andrew@sifive.com>
1234 * elfnn-riscv.c (GP_NAME): New macro.
1235 (riscv_global_pointer_value): Use it.
1236 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1237 output section, consider only that section's alignment.
1239 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1241 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1242 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1243 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1244 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1246 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1248 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1249 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1252 2017-02-23 Alan Modra <amodra@gmail.com>
1255 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1257 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1258 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1261 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1264 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1265 processing ahead of the call to `elf_gc_sweep_symbol'.
1267 2017-02-22 Nick Clifton <nickc@redhat.com>
1270 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1271 created section 4-byte alignment.
1273 2017-02-22 Alan Modra <amodra@gmail.com>
1275 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1276 on .got or .plt output section being discarded by script.
1277 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1280 2017-02-21 Alan Modra <amodra@gmail.com>
1282 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1283 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1285 2017-02-20 Alan Modra <amodra@gmail.com>
1288 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1289 if DT_RELSZ/DT_RELASZ is zero.
1291 2017-02-17 Nick Clifton <nickc@redhat.com>
1293 * compress.c (bfd_get_full_section_contents): Remember to reduce
1294 compressed size by the sizeof the compression header when
1295 decompressing the contents.
1297 2017-02-17 Pedro Alves <palves@redhat.com>
1299 * srec.c (Chunk): Rename to ...
1300 (_bfd_srec_len): ... this.
1301 (S3Forced): Rename to ...
1302 (_bfd_srec_forceS3): ... this.
1303 * objcopy.c: Adjust all references.
1305 2017-02-17 Pedro Alves <palves@redhat.com>
1307 * archive.c (bsd_write_armap): Rename to ...
1308 (_bfd_bsd_write_armap): ... this.
1309 (coff_write_armap): Rename to ...
1310 (_bfd_coff_write_armap): ... this.
1311 * libbfd-in.h (bsd_write_armap): Rename to ...
1312 (_bfd_bsd_write_armap): ... this.
1313 (coff_write_armap): Rename to ...
1314 (_bfd_coff_write_armap): ... this.
1315 * aout-target.h, aout-tic30.c: Adjust all users.
1316 * libbfd.h: Regenerate.
1318 2017-02-17 Pedro Alves <palves@redhat.com>
1320 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1321 (warn_deprecated): Rename to ...
1322 (_bfd_warn_deprecated): ... this.
1323 * libbfd.c (warn_deprecated): Rename to ...
1324 (_bfd_warn_deprecated): ... this.
1325 * bfd-in2.h: Regenerate.
1327 2017-02-17 Pedro Alves <palves@redhat.com>
1329 * bfdio.c (real_ftell): Rename to ...
1330 (_bfd_real_ftell): ... this.
1331 (real_fseek): Rename to ...
1332 (_bfd_real_fseek): ... this.
1333 (real_fopen): Rename to ...
1334 (_bfd_real_fopen): ... this.
1335 * libbfd-in.h (real_ftell): Rename to ...
1336 (_bfd_real_ftell): ... this.
1337 (real_fseek): Rename to ...
1338 (_bfd_real_fseek): ... this.
1339 (real_fopen): Rename to ...
1340 (_bfd_real_fopen): ... this.
1341 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1342 * libbfd.h: Regenerate.
1344 2017-02-17 Pedro Alves <palves@redhat.com>
1346 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1347 * libbfd.c (read_unsigned_leb128): Rename to ...
1348 (_bfd_read_unsigned_leb128): ... this.
1349 (read_signed_leb128): Rename to ...
1350 (_bfd_read_signed_leb128): ... this.
1351 (safe_read_leb128): Rename to ...
1352 (_bfd_safe_read_leb128): ... this.
1353 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1354 (_bfd_read_unsigned_leb128): ... this.
1355 (read_signed_leb128): Rename to ...
1356 (_bfd_read_signed_leb128): ... this.
1357 (safe_read_leb128): Rename to ...
1358 (_bfd_safe_read_leb128): ... this.
1359 * libbfd.h: Renegerate.
1361 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1363 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1364 before trying to fine matching file and line information.
1366 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1368 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1369 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1370 not match current bfd, then reload debug information. Record bfd
1371 we're loading debug info for in the stash. If we have debug
1372 informatin in the cache then perform section placement before
1375 2017-02-16 Alan Modra <amodra@gmail.com>
1378 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1379 * elfxx-target.h (elf_backend_no_page_alias): Define.
1380 (elfNN_bed): Init new field.
1381 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1382 ensure PT_LOAD segment starts on a new page.
1383 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1385 2017-02-16 Alan Modra <amodra@gmail.com>
1388 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1391 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1393 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1394 * bfd-in2.h: Regenerated.
1396 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1399 * elf32-i386.c (elf_i386_relocate_section): Allow
1400 "lea foo@GOT, %reg" in PIC.
1402 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1405 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1406 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1407 error against local IFUNC symbol without a base register for
1410 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1412 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1413 `%P: %H:' with `info->callbacks->einfo'.
1414 (ppc_elf_relocate_section): Likewise.
1415 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1416 (ppc64_elf_edit_toc): Likewise.
1417 (ppc64_elf_relocate_section): Likewise.
1419 2017-02-14 Alan Modra <amodra@gmail.com>
1421 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1422 --gc-keep-exported, and test versioned field of sym rather than
1423 looking for @ in name.
1425 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1427 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1430 2017-02-13 Nick Clifton <nickc@redhat.com>
1433 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1436 2017-02-07 Andrew Waterman <andrew@sifive.com>
1438 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1439 entry size if PLT header is written.
1441 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1443 Fix sparc64 dynamic relocation processing to use the dynamic
1445 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1446 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1449 2017-02-03 Nick Clifton <nickc@redhat.com>
1452 * coffcode.h (coff_write_object_contents): Enlarge size of
1453 s_name_buf in order to avoid compile time warning about possible
1455 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1456 32-bits of insn value before printing into buffer.
1458 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1460 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1461 `max_local_dynindx'.
1462 (mips_elf_sort_hash_table): Handle it.
1463 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1464 symbols bump up `max_local_dynindx' rather than
1465 `max_non_got_dynindx'.
1467 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1469 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1470 `min_got_dynindx', `max_unref_got_dynindx' and
1471 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1472 (mips_elf_sort_hash_table): Adjust accordingly.
1474 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1476 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1477 to access the hash table.
1479 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1481 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1482 non-NULL `htab' to the beginning.
1484 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1486 * elflink.c (elf_gc_sweep): Wrap overlong line.
1488 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1490 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1491 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1492 * elfxx-mips.c (mips_elf_link_hash_table): Add
1493 `ignore_branch_isa' member.
1494 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1495 in branch relocation calculation as an error if
1496 `ignore_branch_isa' has been set.
1497 (_bfd_mips_elf_insn32): Rename to...
1498 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1499 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1500 Handle the new parameter.
1502 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1504 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1505 local variable dynobj.
1508 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1509 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1510 executable from read-only sections into sdynrelro.
1511 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1512 dynamic relocs in sdynrelro.
1513 (elf_backend_want_dynrelro): Define.
1515 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1517 * config.bfd (*-*-rtemsaout*): Mark as removed.
1519 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1521 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1522 (arm-*-rtems*): Move to (arm*-*-eabi*).
1523 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1524 (m68-*-rtems*): Move to (m68*-*-elf*).
1526 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1528 * config.bfd (*-*-rtemscoff*): Mark as removed.
1530 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1533 * elflink.c (bfd_elf_record_link_assignment): Revert last
1534 change and don't ever clear `forced_local'. Set `mark'
1536 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1538 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1539 (bfd_elf_size_dynamic_sections): ... here.
1540 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1541 and set `mark' instead in `__tls_get_addr_opt' processing.
1542 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1544 2017-01-24 Alan Modra <amodra@gmail.com>
1546 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1547 where dynamic relocs are preferable. Allow ifunc too.
1548 (ensure_undefweak_dynamic): New function.
1549 (allocate_dynrelocs): Use it here. Move plt handling last and
1550 don't make symbols dynamic, simplifying loop. Only make undef
1551 weak symbols with GOT entries dynamic. Correct condition
1552 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1553 comments. Remove goto.
1554 (ppc_elf_relocate_section): Correct test for using dynamic
1555 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1556 to suit. Set up explicit tls_index entries and implicit GOT
1557 tls_index entries resolvable at link time for
1558 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1559 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1560 (ensure_undefweak_dynamic): New function.
1561 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1562 with GOT entries dynamic. Remove unnecessary test of
1563 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1564 (ppc64_elf_relocate_section): Correct test for using dynamic
1565 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1566 to suit. Set up explicit tls_index entries and implicit GOT
1567 tls_index entries resolvable at link time for __tls_get_addr_opt.
1568 Simplify expression to clear mem for prelink.
1570 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1572 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1574 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1576 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1577 (elf_backend_hash_symbol): Define.
1579 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1582 * elflink.c (bfd_elf_record_link_assignment): Clear any
1583 `forced_local' marking for DSO symbols that are not being
1586 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1588 * elfnn-riscv.c (riscv_elf_object_p): New function.
1590 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1593 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1595 (elf_x86_64_check_relocs): Create .eh_frame section for the
1597 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1598 .eh_frame section for the .plt.bnd section.
1599 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1600 for the .plt.bnd section.
1602 2017-01-12 Nick Clifton <nickc@redhat.com>
1605 * opncls.c (find_separate_debug_file): Add include_dirs
1606 parameter. Only include the directory part of the bfd's filename
1607 in search paths if include_dirs is true. Add a couple of extra
1608 locations for looking for debug files.
1609 ( bfd_follow_gnu_debuglink): Update invocation of
1610 find_separate_debug_file.
1611 (bfd_follow_gnu_debugaltlink): Likewise.
1612 (get_build_id): New function: Finds the build-id of the given bfd.
1613 (get_build_id_name): New function: Computes the name of the
1614 separate debug info file for a bfd, based upon its build-id.
1615 (check_build_id_file): New function: Checks to see if a separate
1616 debug info file exists at the given location, and that its
1617 build-id matches that of the original bfd.
1618 (bfd_follow_build_id_debuglink): New function: Finds a separate
1619 debug info file for a given bfd by using the build-id method.
1620 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1621 method of locating a separate debug info file before using the
1623 * bfd-in2.h: Regenerate.
1625 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1628 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1629 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1630 elf_x86_64_eh_frame_plt_got.
1631 (elf_x86_64_size_dynamic_sections): Get unwind info from
1632 elf_x86_64_bnd_arch_bed for the BND PLT.
1634 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1636 * config.bfd: Add entries for i686-redox and x86_64-redox.
1638 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1640 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1642 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1643 .eh_frame section to 4 bytes for x32.
1644 (elf_x86_64_check_relocs): Likewise.
1646 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1649 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1650 (PLT_GOT_FDE_LENGTH): Likewise.
1651 (elf_i386_plt_layout): Add eh_frame_plt_got and
1652 eh_frame_plt_got_size.
1653 (elf_i386_plt): Updated.
1654 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1655 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1656 (elf_i386_size_dynamic_sections): Allocate and initialize
1657 .eh_frame section for .plt.got.
1658 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1660 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1661 eh_frame_plt_got_size.
1662 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1663 (PLT_GOT_FDE_LENGTH): Likewise.
1664 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1665 eh_frame_plt_got_size.
1666 (elf_x86_64_arch_bed): Updated.
1667 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1668 eh_frame_plt_got_size.
1669 (elf_x86_64_nacl_arch_bed): Likewise.
1670 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1671 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1672 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1673 .eh_frame section for .plt.got.
1674 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1677 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1679 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1680 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1682 2017-01-09 Nick Clifton <nickc@redhat.com>
1684 * dwarf2.c (lookup_address_in_function_table): Return early if
1685 there are no functions in the given comp unit, or if the high
1686 address of the last function in the comp unit is less than the
1689 2017-01-09 Nick Clifton <nickc@redhat.com>
1692 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1693 message if there are too many symbols to load.
1695 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1697 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1698 if relocs are cached.
1700 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1703 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1704 for R_MICROBLAZE_GOTOFF_64.
1706 2017-01-03 Nick Clifton <nickc@redhat.com>
1708 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1709 warning about using a possibly uninitialised variable.
1711 2017-01-02 Alan Modra <amodra@gmail.com>
1713 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1714 (allocate_plt_static, allocate_dynrelocs): Use it.
1716 2017-01-02 Alan Modra <amodra@gmail.com>
1718 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1719 .PARISC.unwind section.
1721 2017-01-02 Alan Modra <amodra@gmail.com>
1724 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1725 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1726 indirect to GOT pointer relative code edit.
1728 2017-01-02 Alan Modra <amodra@gmail.com>
1730 Update year range in copyright notice of all files.
1732 For older changes see ChangeLog-2016
1734 Copyright (C) 2017 Free Software Foundation, Inc.
1736 Copying and distribution of this file, with or without modification,
1737 are permitted in any medium without royalty provided the copyright
1738 notice and this notice are preserved.
1744 version-control: never