1 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3 * cpu-arc.c (arc_compatible): New function.
5 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
7 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
9 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
12 * bfdio.c (bfd_get_file_size): New function.
13 * bfd-in2.h: Regenerated.
15 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
17 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
20 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
22 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
23 dynobj instead of htab->elf.dynobj.
25 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
27 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
29 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
30 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
31 actual number of internal relocations retrieved. Adjust
33 (bfd_elf64_canonicalize_reloc): Remove macro.
34 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
36 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
38 * archures.c (bfd_mach_sparc_v9m8): Define.
39 (bfd_mach_sparc_v8plusm8): Likewise.
40 (bfd_mach_sparc_v9_p): Adjust to M8.
41 (bfd_mach_sparc_64bit_p): Likewise.
42 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
43 bfd_mach_sparc_v8plusm8.
44 * bfd-in2.h: Regenerated.
45 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
47 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
48 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
49 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
51 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
52 bfd_mach_sparc_v8plusm8.
54 2017-05-19 Alan Modra <amodra@gmail.com>
56 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
57 debug and special sections when no non-note alloc sections in an
60 2017-05-18 Alan Modra <amodra@gmail.com>
62 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
63 * elf-m10300.c: Likewise.
65 * elf32-arc.c: Likewise.
66 * elf32-bfin.c: Likewise.
67 * elf32-m68k.c: Likewise.
68 * elf32-nds32.c: Likewise.
69 * elf32-tilepro.c: Likewise.
70 * elflink.c: Likewise.
71 * elfnn-aarch64.c: Likewise.
72 * elfnn-riscv.c: Likewise.
73 * elfxx-tilegx.c: Likewise.
75 * peXXigen.c: Likewise.
76 * vms-alpha.c: Likewise.
77 * vms-lib.c: Likewise.
79 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
82 * elflink.c (elf_gc_mark_debug_section): New function.
83 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
84 referenced by kept debug sections.
86 2017-05-16 Alan Modra <amodra@gmail.com>
88 * elf-m10300.c: Rename occurrences of non_ir_ref.
89 * elf32-arm.c: Likewise.
90 * elf32-bfin.c: Likewise.
91 * elf32-cr16.c: Likewise.
92 * elf32-cris.c: Likewise.
93 * elf32-d10v.c: Likewise.
94 * elf32-dlx.c: Likewise.
95 * elf32-fr30.c: Likewise.
96 * elf32-frv.c: Likewise.
97 * elf32-hppa.c: Likewise.
98 * elf32-i370.c: Likewise.
99 * elf32-i386.c: Likewise.
100 * elf32-iq2000.c: Likewise.
101 * elf32-lm32.c: Likewise.
102 * elf32-m32c.c: Likewise.
103 * elf32-m32r.c: Likewise.
104 * elf32-m68hc1x.c: Likewise.
105 * elf32-m68k.c: Likewise.
106 * elf32-mcore.c: Likewise.
107 * elf32-metag.c: Likewise.
108 * elf32-microblaze.c: Likewise.
109 * elf32-moxie.c: Likewise.
110 * elf32-msp430.c: Likewise.
111 * elf32-mt.c: Likewise.
112 * elf32-nios2.c: Likewise.
113 * elf32-or1k.c: Likewise.
114 * elf32-ppc.c: Likewise.
115 * elf32-rl78.c: Likewise.
116 * elf32-s390.c: Likewise.
117 * elf32-score.c: Likewise.
118 * elf32-score7.c: Likewise.
119 * elf32-sh.c: Likewise.
120 * elf32-tic6x.c: Likewise.
121 * elf32-tilepro.c: Likewise.
122 * elf32-v850.c: Likewise.
123 * elf32-vax.c: Likewise.
124 * elf32-xstormy16.c: Likewise.
125 * elf32-xtensa.c: Likewise.
126 * elf64-alpha.c: Likewise.
127 * elf64-hppa.c: Likewise.
128 * elf64-ia64-vms.c: Likewise.
129 * elf64-mmix.c: Likewise.
130 * elf64-ppc.c: Likewise.
131 * elf64-s390.c: Likewise.
132 * elf64-sh64.c: Likewise.
133 * elf64-x86-64.c: Likewise.
134 * elflink.c: Likewise.
135 * elfnn-aarch64.c: Likewise.
136 * elfnn-ia64.c: Likewise.
137 * elfnn-riscv.c: Likewise.
138 * elfxx-mips.c: Likewise.
139 * elfxx-sparc.c: Likewise.
140 * elfxx-tilegx.c: Likewise.
141 * linker.c: Likewise.
143 2017-05-16 Alan Modra <amodra@gmail.com>
145 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
146 * elflink.c (elf_link_add_object_symbols): Update to use
148 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
150 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
152 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
154 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
156 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
158 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
159 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
161 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
163 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
165 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
167 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
168 to plt_second/plt_second_eh_frame.
169 (elf_x86_64_link_hash_newfunc): Updated.
170 (elf_x86_64_allocate_dynrelocs): Likewise.
171 (elf_x86_64_size_dynamic_sections): Likewise.
172 (elf_x86_64_relocate_section): Likewise.
173 (elf_x86_64_finish_dynamic_symbol): Likewise.
174 (elf_x86_64_finish_dynamic_sections): Likewise.
175 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
176 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
178 (elf_backend_setup_gnu_properties): Updated. Create the
179 .plt.sec section instead of the .plt.sec section.
181 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
183 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
184 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
185 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
187 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
189 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
190 (bfd_elf64_set_reloc): Define.
191 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
193 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
195 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
196 (struct bfd_target): New field _bfd_set_reloc.
197 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
198 * reloc.c (_bfd_generic_set_reloc): New function.
199 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
200 * nlm-target.h (nlm_set_reloc): Likewise.
201 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
202 * aout-tic30.c (MY_set_reloc): Likewise.
203 * aout-target.h (MY_set_reloc): Likewise.
204 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
205 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
206 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
207 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
208 * aout-adobe.c (aout_32_set_reloc): Likewise.
209 * bout.c (b_out_set_reloc): Likewise.
210 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
211 * i386os9k.c (aout_32_set_reloc): Likewise.
212 * ieee.c (ieee_set_reloc): Likewise.
213 * oasys.c (oasys_set_reloc): Likewise.
214 * som.c (som_set_reloc): Likewise.
215 * versados.c (versados_set_reloc): Likewise.
216 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
217 _bfd_generic_set_reloc.
218 (rs6000_xcoff64_aix_vec): LIkewise.
219 * libbfd.c (_bfd_norelocs_set_reloc): New function.
220 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
221 * i386msdos.c (msdos_set_reloc): Define to
222 _bfd_norelocs_set_reloc.
223 * elfcode.h (elf_set_reloc): Define.
224 * bfd-in2.h: Regenerated.
226 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
229 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
230 for IFUNC function address.
232 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
234 * elf32-arc.c (FEATURE_LIST_NAME): Define.
235 (CONFLICT_LIST): Likewise.
236 (opcode/arc-attrs.h): Include.
237 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
238 (arc_extract_features): New file.
239 (arc_stralloc): Likewise.
240 (arc_elf_merge_attributes): Likewise.
241 (arc_elf_merge_private_bfd_data): Use object attributes.
242 (bfd_arc_get_mach_from_attributes): New function.
243 (arc_elf_object_p): Use object attributes.
244 (arc_elf_final_write_processing): Likewise.
245 (elf32_arc_obj_attrs_arg_type): New function.
246 (elf32_arc_obj_attrs_handle_unknown): Likewise.
247 (elf32_arc_section_from_shdr): Likewise.
248 (elf_backend_obj_attrs_vendor): Define.
249 (elf_backend_obj_attrs_section): Likewise.
250 (elf_backend_obj_attrs_arg_type): Likewise.
251 (elf_backend_obj_attrs_section_type): Likewise.
252 (elf_backend_obj_attrs_handle_unknown): Likewise.
253 (elf_backend_section_from_shdr): Likewise.
255 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
258 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
259 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
260 and the destination is a Thumb symbol.
262 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
264 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
265 initializer to silence GCC 4.2.
266 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
268 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
270 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
271 (LAZY_PLT_ENTRY_SIZE): This.
272 (NON_LAZY_PLT_ENTRY_SIZE): New.
273 (elf_x86_64_plt0_entry): Renamed to ...
274 (elf_x86_64_lazy_plt0_entry): This.
275 (elf_x86_64_plt_entry): Renamed to ...
276 (elf_x86_64_lazy_plt_entry): This.
277 (elf_x86_64_bnd_plt0_entry): Renamed to ...
278 (elf_x86_64_lazy_bnd_plt0_entry): This.
279 (elf_x86_64_legacy_plt_entry): Removed.
280 (elf_x86_64_bnd_plt_entry): Renamed to ...
281 (elf_x86_64_lazy_bnd_plt_entry): This.
282 (elf_x86_64_legacy_plt2_entry): Renamed to ...
283 (elf_x86_64_non_lazy_plt_entry): This.
284 (elf_x86_64_bnd_plt2_entry): Renamed to ...
285 (elf_x86_64_non_lazy_bnd_plt_entry): This.
286 (elf_x86_64_eh_frame_plt): Renamed to ...
287 (elf_x86_64_eh_frame_lazy_plt): This.
288 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
289 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
290 (elf_x86_64_eh_frame_plt_got): Renamed to ...
291 (elf_x86_64_eh_frame_non_lazy_plt): This.
292 (elf_x86_64_lazy_plt_layout): New.
293 (elf_x86_64_non_lazy_plt_layout): Likewise.
294 (elf_x86_64_plt_layout): Likewise.
295 (elf_x86_64_backend_data): Remove PLT layout information. Add
296 os for target system.
297 (GET_PLT_ENTRY_SIZE): Removed.
298 (elf_x86_64_lazy_plt): New.
299 (elf_x86_64_non_lazy_plt): Likewise.
300 (elf_x86_64_lazy_bnd_plt): Likewise.
301 (elf_x86_64_non_lazy_bnd_plt): Likewise.
302 (elf_x86-64_arch_bed): Updated.
303 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
304 (elf_x86_64_create_dynamic_sections): Removed.
305 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
306 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
307 (elf_x86-64_adjust_dynamic_symbol): Updated.
308 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
309 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
310 size for PLT0 if there is no PLT0. Get plt_entry_size from
311 non_lazy_plt for non-lazy PLT entries.
312 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
313 from non_lazy_plt for non-lazy PLT entries.
314 (elf_x86-64_relocate_section): Updated. Properly get PLT index
316 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
317 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
318 entries with non-lazy PLT layout. Don't fill the second and third
319 slots in the PLT entry if there is no PLT0.
320 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
321 if there is no PLT0. Set sh_entsize on the .plt.got section.
322 (compare_relocs): New.
323 (elf_x86_64_plt_type): Likewise.
324 (elf_x86_64_plt): Likewise.
325 (elf_x86_64_nacl_plt): New. Forward declaration.
326 (elf_x86_64_get_plt_sym_val): Removed.
327 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
328 against all dynamic relocations.
329 (elf_x86_64_link_setup_gnu_properties): New function.
330 (elf_backend_create_dynamic_sections): Updated.
331 (elf_backend_setup_gnu_properties): New.
332 (elf_x86_64_nacl_plt): New.
333 (elf_x86_64_nacl_arch_bed): Updated.
335 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
337 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
338 (LAZY_PLT_ENTRY_SIZE): This.
339 (NON_LAZY_PLT_ENTRY_SIZE): New.
340 (elf_i386_plt0_entry): Renamed to ...
341 (elf_i386_lazy_plt0_entry): This.
342 (elf_i386_plt_entry): Renamed to ...
343 (elf_i386_lazy_plt_entry): This.
344 (elf_i386_pic_plt0_entry): Renamed to ...
345 (elf_i386_pic_lazy_plt0_entry): This.
346 (elf_i386_pic_plt_entry): Renamed to ...
347 (elf_i386_pic_lazy_plt_entry): This.
348 (elf_i386_got_plt_entry): Renamed to ...
349 (elf_i386_non_lazy_plt_entry): This.
350 (elf_i386_pic_got_plt_entry): Renamed to ...
351 (elf_i386_pic_non_lazy_plt_entry): This.
352 (elf_i386_eh_frame_plt): Renamed to ...
353 (elf_i386_eh_frame_lazy_plt): This.
354 (elf_i386_eh_frame_plt_got): Renamed to ...
355 (elf_i386_eh_frame_non_lazy_plt): This.
356 (elf_i386_plt_layout): Renamed to ...
357 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
358 eh_frame_plt_got_size.
359 (elf_i386_non_lazy_plt_layout): New.
360 (elf_i386_plt_layout): Likewise.
361 (elf_i386_non_lazy_plt): Likewise.
362 (GET_PLT_ENTRY_SIZE): Removed.
363 (elf_i386_plt): Renamed to ...
364 (elf_i386_lazy_plt): This.
365 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
366 (elf_i386_arch_bed): Updated.
367 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
368 (elf_i386_create_dynamic_sections): Removed.
369 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
370 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
371 (elf_i386_adjust_dynamic_symbol): Updated.
372 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
373 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
374 size for PLT0 if there is no PLT0.
375 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
376 output section is discarded only if GOT isn't empty.
377 (elf_i386_relocate_section): Updated. Properly get PLT index
379 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
380 second and third slots in the PLT entry if there is no PLT0.
381 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
382 if there is no PLT0. Set sh_entsize on the .plt.got section.
383 (elf_i386_nacl_plt): Forward declaration.
384 (elf_i386_get_plt_sym_val): Removed.
385 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
386 against all dynamic relocations.
387 (elf_i386_link_setup_gnu_properties): New function.
388 (elf_backend_create_dynamic_sections): Updated.
389 (elf_backend_setup_gnu_properties): New.
390 (elf_i386_nacl_plt): Updated.
391 (elf_i386_nacl_arch_bed): Likewise.
392 (elf_i386_vxworks_arch_bed): Likewise.
394 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
396 * elflink.c (elf_output_implib): Remove executable flag from import
398 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
399 library is a relocatable object file.
401 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
404 * elf32-avr.c (avr_should_move_sym): New function.
405 (avr_should_reduce_sym_size): Likewise.
406 (avr_should_increase_sym_size): Likewise.
407 (elf32_avr_relax_delete_bytes): Adjust symbol values
408 and sizes by calling new functions.
410 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
412 * config.bfd (riscv32-*): Enable rv64.
414 2017-05-02 Alan Modra <amodra@gmail.com>
417 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
418 rather than h->root.type == bfd_link_hash_new.
419 (bfd_elf_record_link_assignment): Similarly, call
420 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
422 2017-04-29 Alan Modra <amodra@gmail.com>
425 * reloc.c (reloc_offset_in_range): New function.
426 (bfd_perform_relocation, bfd_install_relocation): Use it.
427 (_bfd_final_link_relocate): Likewise.
429 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
431 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
432 before using .plt.got.
433 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
435 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
437 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
438 instead of "+=" to update 0.
440 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
442 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
443 .plt.got section here.
444 (elf_i386_check_relocs): Don't create the .plt.got section.
445 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
446 the .plt.got and .plt.bnd sections here.
447 (elf_x86_64_check_relocs): Don't create the .plt.got nor
450 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
452 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
454 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
455 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
456 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
457 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
460 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
462 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
464 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
465 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
466 the first relocatable ELF input with GNU properties.
468 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
470 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
473 2017-04-27 Alan Modra <amodra@gmail.com>
475 * elf-bfd.h (struct elf_backend_data): Make asection param of
476 elf_backend_eh_frame_address_size const.
477 (_bfd_elf_eh_frame_address_size): Likewise.
478 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
479 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
480 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
481 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
482 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
483 (next_cie_fde_offset): Constify params.
484 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
486 2017-04-27 Alan Modra <amodra@gmail.com>
488 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
489 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
490 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
492 (offset_adjust): New function.
493 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
494 (adjust_eh_frame_local_symbols): Likewise.
495 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
496 after changing anything. Return true if anything changed.
497 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
498 _bfd_elf_adjust_eh_frame_global_symbol for globals.
500 2017-04-27 Alan Modra <amodra@gmail.com>
502 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
505 2017-04-27 Alan Modra <amodra@gmail.com>
507 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
508 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
509 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
510 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
511 for undef and undefweak dyn_relocs.
512 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
513 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
514 (allocate_got, allocate_dynrelocs): Likewise.
515 (ppc64_elf_relocate_section): Likewise.
517 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
519 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
520 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
521 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
522 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
524 2017-04-26 Nick Clifton <nickc@redhat.com>
527 * reloc.c (bfd_perform_relocation): Check for a negative address
530 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
533 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
535 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
536 (elf_backend_always_renumber_dynsyms): Define.
537 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
538 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
539 * elflink.c (bfd_elf_size_dynamic_sections): Also call
540 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
542 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
544 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
546 * elflink.c (bfd_elf_size_dynamic_sections): Only call
547 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
548 sections have been created.
550 2017-04-26 Nick Clifton <nickc@redhat.com>
553 * compress.c (bfd_init_section_compress_status): Check the return
554 value from bfd_malloc.
556 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
558 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
559 no_finish_dynamic_symbol.
560 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
562 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
563 weak symbol, don't make it dynamic.
564 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
565 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
566 relocation for GOT reference.
567 (elf_x86_64_finish_dynamic_symbol): Abort if
568 no_finish_dynamic_symbol isn't 0.
570 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
573 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
574 undefined weak symbol, don't make it dynamic.
575 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
576 set no_finish_dynamic_symbol and generate R_386_RELATIVE
577 relocation for R_386_GOT32.
579 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
582 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
584 2017-04-23 Alan Modra <amodra@gmail.com>
587 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
588 * elf.c (lcomm_sym): New.
589 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
590 * bfd-in2.h: Regenerate.
592 2017-04-23 Alan Modra <amodra@gmail.com>
595 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
596 parameters and comment.
597 (_bfd_elf_get_reloc_section): Delete.
598 (_bfd_elf_plt_get_reloc_section): Declare.
599 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
600 New functions. Don't blindly skip over assumed .rel/.rela prefix.
602 (_bfd_elf_get_reloc_section): ..here. Delete.
603 (assign_section_numbers): Call elf_get_reloc_section.
604 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
605 * elfxx-target.h (elf_backend_get_reloc_section): Update.
607 2017-04-23 Alan Modra <amodra@gmail.com>
610 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
613 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
616 * elf32-i386.c (elf_i386_link_hash_entry): Add
617 no_finish_dynamic_symbol.
618 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
619 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
620 symbol, don't make it dynamic in PIE.
621 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
622 set no_finish_dynamic_symbol and generate R_386_RELATIVE
623 relocation for R_386_GOT32
624 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
627 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
631 * elflink.c (elf_link_add_object_symbols): Require
632 --no-dynamic-linker with -E/--dynamic-list when creating
635 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
637 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
640 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
642 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
643 dynamic symbol sorting.
645 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
648 * elflink.c (elf_link_add_object_symbols): Preserve
649 dynamic_ref_after_ir_def when restoring the symbol table for
650 unneeded dynamic object.
652 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
655 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
656 on on undefined IFUNC symbol in the second PLT.
658 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
660 * peXXigen.c (pe_print_reloc): Correct chunk_end.
662 2017-04-19 Alan Modra <amodra@gmail.com>
664 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
665 or make dynamic for info->dynamic_undefined_weak 0 and 1.
666 * elf32-ppc.c:Formatting.
667 (ensure_undefweak_dynamic): Don't make dynamic when
668 info->dynamic_undefined_weak is zero.
669 (allocate_dynrelocs): Discard undefweak dyn_relocs for
670 info->dynamic_undefined_weak. Discard undef dyn_relocs when
671 not default visibility. Discard undef and undefweak
673 (ppc_elf_relocate_section): Adjust to suit.
674 * elf64-ppc.c: Formatting.
675 (ensure_undefweak_dynamic): Don't make dynamic when
676 info->dynamic_undefined_weak is zero.
677 (allocate_dynrelocs): Discard undefweak dyn_relocs for
678 info->dynamic_undefined_weak. Discard them earlier.
680 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
683 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
684 before generating the version definition section.
686 2017-04-17 Alan Modra <amodra@gmail.com>
688 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
689 state when a regular object file defines a symbol with
690 incompatible type to that defined by an earlier shared lib.
692 2017-04-13 Alan Modra <amodra@gmail.com>
694 * coffcode.h: Wrap some overly long _bfd_error_handler args.
696 * elf32-arm.c: Likewise.
697 * elf32-i386.c: Likewise.
698 * elf32-mep.c: Likewise.
699 * elf64-ia64-vms.c: Likewise.
700 * elf64-x86-64.c: Likewise.
701 * elflink.c: Likewise.
702 * elfnn-ia64.c: Likewise.
703 * elfxx-mips.c: Likewise.
705 2017-04-13 Alan Modra <amodra@gmail.com>
707 * aoutx.h: Use %B and %A in error messages throughout file.
708 * aout-cris.c: Likewise.
709 * archive.c: Likewise.
710 * binary.c: Likewise.
711 * coff-rs6000.c: Likewise.
712 * coff-tic4x.c: Likewise.
713 * coffcode.h: Likewise.
714 * coffgen.c: Likewise.
715 * cofflink.c: Likewise.
716 * coffswap.h: Likewise.
717 * cpu-arm.c: Likewise.
718 * elf-eh-frame.c: Likewise.
719 * elf-m10300.c: Likewise.
721 * elf32-arc.c: Likewise.
722 * elf32-arm.c: Likewise.
723 * elf32-bfin.c: Likewise.
724 * elf32-frv.c: Likewise.
725 * elf32-iq2000.c: Likewise.
726 * elf32-m32c.c: Likewise.
727 * elf32-microblaze.c: Likewise.
728 * elf32-nds32.c: Likewise.
729 * elf32-rl78.c: Likewise.
730 * elf32-rx.c: Likewise.
731 * elf32-score.c: Likewise.
732 * elf32-score7.c: Likewise.
733 * elf32-sh64.c: Likewise.
734 * elf32-v850.c: Likewise.
735 * elf32-vax.c: Likewise.
736 * elf32-visium.c: Likewise.
737 * elf64-ia64-vms.c: Likewise.
738 * elf64-mmix.c: Likewise.
739 * elf64-sh64.c: Likewise.
740 * elfcode.h: Likewise.
741 * elfnn-aarch64.c: Likewise.
742 * elfnn-ia64.c: Likewise.
743 * elfxx-mips.c: Likewise.
744 * hpux-core.c: Likewise.
747 * linker.c: Likewise.
752 * peXXigen.c: Likewise.
753 * rs6000-core.c: Likewise.
754 * vms-alpha.c: Likewise.
755 * xcofflink.c: Likewise.
757 2017-04-13 Alan Modra <amodra@gmail.com>
759 * bfd.c (PRINT_TYPE): Define.
760 (_doprnt): New function.
761 (error_handler_internal): Use _doprnt.
762 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
763 calls in their natural order, throughout file.
764 * coff-mcore.c: Likewise.
765 * coff-ppc.c: Likewise.
766 * coff-tic80.c: Likewise.
767 * cofflink.c: Likewise.
768 * elf-s390-common.c: Likewise.
770 * elf32-arm.c: Likewise.
771 * elf32-i386.c: Likewise.
772 * elf32-m32r.c: Likewise.
773 * elf32-msp430.c: Likewise.
774 * elf32-spu.c: Likewise.
775 * elf64-ia64-vms.c: Likewise.
776 * elf64-sparc.c: Likewise.
777 * elf64-x86-64.c: Likewise.
778 * elflink.c: Likewise.
779 * elfnn-aarch64.c: Likewise.
780 * elfnn-ia64.c: Likewise.
781 * elfxx-mips.c: Likewise.
783 2017-04-13 Alan Modra <amodra@gmail.com>
785 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
786 branch veneers" error. Fix double space and format message.
787 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
788 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
790 2017-04-13 Alan Modra <amodra@gmail.com>
792 * bfd-in2.h: Regenerate.
794 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
796 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
797 extra `\n' in warning/error messages.
798 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
799 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
801 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
803 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
804 processor-specific properties with generic ELF target vector.
806 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
808 * elf32-sparc.c (elf_backend_fixup_symbol): New.
809 * elf64-sparc.c (elf_backend_fixup_symbol): New.
810 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
811 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
813 (link_hash_newfunc): Initialize has_got_reloc and
815 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
817 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
819 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
821 (_bfd_sparc_elf_fixup_symbol): New function.
822 (allocate_dynrelocs): Don't allocate space for dynamic
823 relocations and discard relocations against resolved undefined
824 weak symbols in executable. Don't make resolved undefined weak
825 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
826 relocation against undefined weak symbols in PIE.
827 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
828 relocations against resolved undefined weak symbols in PIE
829 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
830 without ynamic PLT/GOT relocations for resolved undefined weak
832 Don't generate dynamic relocation against resolved undefined
833 weak symbol in executable.
834 (pie_finish_undefweak_symbol): New function.
835 (_bfd_sparc_elf_finish_dynamic_sections): Call
836 pie_finish_undefweak_symbol on all symbols in PIE.
837 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
838 (_bfd_sparc_elf_fixup_symbol): New function.
840 2017-04-10 Nick Clifton <nickc@redhat.com>
842 * config.bfd: Remove ns32k from obsolete list.
844 2017-04-10 Alan Modra <amodra@gmail.com>
847 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
848 (special_sections_i): Likewise for .init_array.
849 (special_sections_p): Likewise for .preinit_array.
851 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
855 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
856 ELF_COMMON_DEF_P for common symbols.
857 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
858 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
859 * elflink.c (_bfd_elf_merge_symbol): Revert commits
860 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
861 07492f668d2173da7a2bda3707ff0985e0f460b6.
863 2017-04-07 Pedro Alves <palves@redhat.com>
865 * opncls.c (bfd_get_debug_link_info): Rename to...
866 (bfd_get_debug_link_info_1): ... this. Change type of second
867 parameter to void pointer. Adjust.
868 (bfd_get_debug_link_info): Reimplement on top of
869 bfd_get_debug_link_info_1.
870 (separate_debug_file_exists, separate_alt_debug_file_exists):
871 Change type of second parameter to void pointer. Adjust.
872 (get_func_type, check_func_type): Change type of second parameter
874 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
875 the callback functions instead of passing the address of a local.
876 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
877 find_separate_debug_file.
878 (get_alt_debug_link_info_shim): Change type of second parameter to
879 void pointer. Adjust.
880 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
881 find_separate_debug_file.
882 (get_build_id_name, bfd_boolean check_build_id_file): Change type
883 of second parameter to void pointer. Adjust.
884 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
885 pointer local to find_separate_debug_file.
887 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
889 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
890 external symbols with a definition.
891 (_bfd_coff_gc_mark_extra_sections): Fix typo.
893 2017-04-07 Alan Modra <amodra@gmail.com>
895 * po/SRC-POTFILES.in: Regenerate.
897 2017-04-05 Alan Modra <amodra@gmail.com>
899 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
902 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
904 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
905 numbers for DataDirectory entry indicies passed to
908 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
910 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
911 each GNU_MBIND section and align GNU_MBIND section to page size.
912 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
913 segment for each GNU_MBIND section.
914 (_bfd_elf_init_private_section_data): Copy sh_info from input
915 for GNU_MBIND section.
917 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
919 * elfnn-riscv.c (GP_NAME): Delete.
920 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
921 (_bfd_riscv_relax_lui): Likewise.
923 2017-04-04 Nick Clifton <nickc@redhat.com>
926 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
928 (bfd_elf_final_link): Only initialize the extended symbol index
929 section if there are extended symbol tables to list.
931 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
933 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
934 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
935 * configure.ac (elf): Add elf-properties.lo.
936 * Makefile.in: Regenerated.
937 * configure: Likewise.
938 * elf-bfd.h (elf_property_kind): New.
939 (elf_property): Likewise.
940 (elf_property_list): Likewise.
941 (elf_properties): Likewise.
942 (_bfd_elf_parse_gnu_properties): Likewise.
943 (_bfd_elf_get_property): Likewise.
944 (_bfd_elf_link_setup_gnu_properties): Likewise.
945 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
946 and setup_gnu_properties.
947 (elf_obj_tdata): Add properties.
948 * elf-properties.c: New file.
949 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
950 (elf_i386_merge_gnu_properties): Likewise.
951 (elf_backend_parse_gnu_properties): Likewise.
952 (elf_backend_merge_gnu_properties): Likewise.
953 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
954 (elf_x86_64_merge_gnu_properties): Likewise.
955 (elf_backend_parse_gnu_properties): Likewise.
956 (elf_backend_merge_gnu_properties): Likewise.
957 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
958 (elf_backend_parse_gnu_properties): Likewise.
959 (elf_backend_setup_gnu_properties): Likewise.
960 (elfNN_bed): Add elf_backend_parse_gnu_properties,
961 elf_backend_merge_gnu_properties and
962 elf_backend_setup_gnu_properties.
964 2017-03-30 Pip Cet <pipcet@gmail.com>
966 * elf32-wasm32.c: Add relocation code, two relocs.
967 * reloc.c: Add wasm32 relocations.
968 * libbfd.h: Regenerate.
969 * bfd-in2.h: Regenerate.
970 * bfd/po/bfd.pot: Regenerate.
972 2017-03-29 Nick Clifton <nickc@redhat.com>
975 * coff-bfd.h (struct coff_section_data): Add new fields:
977 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
978 computed for PE binaries.
979 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
982 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
985 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
986 to handle a local symbol with a hash-symbol-entry; without PLT.
987 Add BFD_ASSERT for an incidental case with GOT entry present.
988 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
989 isn't forced-or-set local.
991 2017-03-27 Pip Cet <pipcet@gmail.com>
993 * wasm-module.c: New file to support WebAssembly modules.
994 * wasm-module.h: New file to support WebAssembly modules.
995 * doc/webassembly.texi: Start documenting wasm-module.c.
996 * config.bfd: Add wasm_vec.
997 * targets.c: Likewise.
998 * configure.ac: Likewise.
999 * Makefile.am: Add entries for wasm-module.c.
1000 * Makefile.in: Regenerate.
1001 * configure: Regenerate.
1002 * po/SRC-POTFILES.in: Regenerate.
1004 2017-03-27 Pip Cet <pipcet@gmail.com>
1006 * cpu-wasm32.c: New file to support wasm32 architecture.
1007 * elf32-wasm32.c: New file to support wasm32 architecture.
1008 * Makefile.am: Add wasm32 architecture.
1009 * archures.c: Likewise.
1010 * config.bfd: Likewise.
1011 * configure.ac: Likewise.
1012 * targets.c: Likewise.
1013 * Makefile.in: Regenerate.
1014 * bfd-in2.h: Regenerate.
1015 * configure: Regenerate.
1016 * po/SRC-POTFILES.in: Regenerate.
1018 2017-03-20 Alan Modra <amodra@gmail.com>
1021 * elf64-ppc.c (compare_symbols): Stabilize sort.
1023 2017-03-18 Alan Modra <amodra@gmail.com>
1025 * elf64-ppc.c (struct ppc_link_hash_table): Add
1026 local_ifunc_resolver and maybe_local_ifunc_resolver.
1027 (ppc_build_one_stub): Set flags on emitting dynamic
1028 relocation to ifunc.
1029 (ppc64_elf_relocate_section): Likewise.
1030 (ppc64_elf_finish_dynamic_symbol): Likewise.
1031 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1032 local dynamic relocs to ifuncs.
1033 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1034 local_ifunc_resolver and maybe_local_ifunc_resolver.
1035 (ppc_elf_relocate_section): Set flag on emitting dynamic
1036 relocation to ifuncs.
1037 (ppc_elf_finish_dynamic_symbol): Likewise.
1038 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1039 dynamic relocs to ifuncs.
1041 2017-03-13 Nick Clifton <nickc@redhat.com>
1044 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1045 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1046 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1047 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1048 * bfd-in2.h: Regenerate.
1049 * libbfd.h: Regenerate.
1050 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1052 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1053 (elfNN_aarch64_howto_table): Likewise.
1054 (aarch64_tls_transition_without_check): Likewise.
1055 (aarch64_reloc_got_type): Likewise.
1056 (elfNN_aarch64_final_link_relocate): Likewise.
1057 (elfNN_aarch64_tls_relax): Likewise.
1058 (elfNN_aarch64_relocate_section): Likewise.
1059 (elfNN_aarch64_gc_sweep_hook): Likewise.
1060 (elfNN_aarch64_check_relocs): Likewise.
1061 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1062 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1064 2017-03-11 Alan Modra <amodra@gmail.com>
1066 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1067 parameter is in fact used. Whitespace fixes.
1068 * elf64-ppc.c: Likewise.
1070 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1072 * rs6000-core.c (CORE_NEW): Simplify macro when
1073 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1075 2017-03-07 Alan Modra <amodra@gmail.com>
1079 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1082 2017-03-05 Alan Modra <amodra@gmail.com>
1084 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1085 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1086 (next_cie_fde_offset): New function.
1087 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1088 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1089 four bytes. Align CIEs to four or eight bytes depending on
1090 per_encoding_aligned8. Align FDEs according to their encoding.
1091 Pad last FDE to output section alignment.
1092 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1094 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1095 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1096 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1098 2017-03-02 Martin Bickel <binutils@ineranves.de>
1101 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1102 empty segments which have a zero filesz, but a non-zero memsz.
1104 2017-03-02 Alan Modra <amodra@gmail.com>
1106 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1108 2017-02-28 Alan Modra <amodra@gmail.com>
1110 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1111 (ppc64_elf_relocate_section): Likewise.
1113 2017-02-28 Alan Modra <amodra@gmail.com>
1116 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1117 rather than elf32_nios2_hash_table or elf_hash_table.
1118 (create_got_section): Likewise.
1119 (nios2_elf32_finish_dynamic_symbol): Likewise.
1120 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1121 (nios2_elf32_size_dynamic_sections): Likewise.
1122 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1123 vars. Use htab equivalents directly instead. Don't create
1124 all dynamic sections on needing just the GOT. Use a goto
1125 rather than a fall-through with reloc test. Ensure
1126 htab->dynobj is set when making dynamic sreloc section.
1127 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1128 equivalent directly instead. Don't segfault on looking for
1129 .dynamic when dynamic sections have not been created. Don't
1130 segfault on .got.plt being discarded.
1131 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1132 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1133 fixme and another not so relevant comment.
1134 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1135 already set, set hash table dynobj on creating .sbss.
1137 2017-02-28 Alan Modra <amodra@gmail.com>
1139 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1140 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1141 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1142 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1143 (ppc64_elf_relocate_section): Likewise.
1144 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1145 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1146 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1147 * libbfd.h: Regenerate.
1148 * bfd-in2.h: Regenerate.
1150 2017-02-28 Alan Modra <amodra@gmail.com>
1152 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1153 dynamic .data.rel.ro read-only.
1154 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1155 rather than section flags when deciding where copy reloc goes.
1156 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1157 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1158 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1159 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1160 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1161 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1162 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1163 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1164 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1165 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1166 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1167 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1168 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1169 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1170 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1171 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1172 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1173 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1174 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1176 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1178 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1179 `jalr $0, $25' instruction encoding.
1181 2017-02-27 Nick Clifton <nickc@redhat.com>
1184 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1185 generating a seg-fault when encountering a symbol that has been
1186 deleted by garbage collection.
1188 2017-02-25 Alan Modra <amodra@gmail.com>
1190 * elf32-arc.c (struct dynamic_sections): Delete.
1191 (enum dyn_section_types): Delete.
1192 (dyn_section_names): Delete.
1193 (arc_create_dynamic_sections): Delete.
1194 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1195 segfault on discarded .rela.plt section.
1196 (elf_arc_size_dynamic_sections): Formatting. Don't call
1197 arc_create_dynamic_sections. Don't allocate memory for sections
1198 handled by the generic linker. Correct code finding relocs in
1199 read-only sections. Set SEC_EXCLUDE on zero size .got,
1200 .got.plt, and .dynbss sections. Do set .interp for pies.
1202 2017-02-24 Andrew Waterman <andrew@sifive.com>
1204 * elfnn-riscv.c (GP_NAME): New macro.
1205 (riscv_global_pointer_value): Use it.
1206 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1207 output section, consider only that section's alignment.
1209 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1211 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1212 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1213 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1214 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1216 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1218 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1219 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1222 2017-02-23 Alan Modra <amodra@gmail.com>
1225 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1227 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1228 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1231 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1234 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1235 processing ahead of the call to `elf_gc_sweep_symbol'.
1237 2017-02-22 Nick Clifton <nickc@redhat.com>
1240 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1241 created section 4-byte alignment.
1243 2017-02-22 Alan Modra <amodra@gmail.com>
1245 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1246 on .got or .plt output section being discarded by script.
1247 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1250 2017-02-21 Alan Modra <amodra@gmail.com>
1252 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1253 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1255 2017-02-20 Alan Modra <amodra@gmail.com>
1258 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1259 if DT_RELSZ/DT_RELASZ is zero.
1261 2017-02-17 Nick Clifton <nickc@redhat.com>
1263 * compress.c (bfd_get_full_section_contents): Remember to reduce
1264 compressed size by the sizeof the compression header when
1265 decompressing the contents.
1267 2017-02-17 Pedro Alves <palves@redhat.com>
1269 * srec.c (Chunk): Rename to ...
1270 (_bfd_srec_len): ... this.
1271 (S3Forced): Rename to ...
1272 (_bfd_srec_forceS3): ... this.
1273 * objcopy.c: Adjust all references.
1275 2017-02-17 Pedro Alves <palves@redhat.com>
1277 * archive.c (bsd_write_armap): Rename to ...
1278 (_bfd_bsd_write_armap): ... this.
1279 (coff_write_armap): Rename to ...
1280 (_bfd_coff_write_armap): ... this.
1281 * libbfd-in.h (bsd_write_armap): Rename to ...
1282 (_bfd_bsd_write_armap): ... this.
1283 (coff_write_armap): Rename to ...
1284 (_bfd_coff_write_armap): ... this.
1285 * aout-target.h, aout-tic30.c: Adjust all users.
1286 * libbfd.h: Regenerate.
1288 2017-02-17 Pedro Alves <palves@redhat.com>
1290 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1291 (warn_deprecated): Rename to ...
1292 (_bfd_warn_deprecated): ... this.
1293 * libbfd.c (warn_deprecated): Rename to ...
1294 (_bfd_warn_deprecated): ... this.
1295 * bfd-in2.h: Regenerate.
1297 2017-02-17 Pedro Alves <palves@redhat.com>
1299 * bfdio.c (real_ftell): Rename to ...
1300 (_bfd_real_ftell): ... this.
1301 (real_fseek): Rename to ...
1302 (_bfd_real_fseek): ... this.
1303 (real_fopen): Rename to ...
1304 (_bfd_real_fopen): ... this.
1305 * libbfd-in.h (real_ftell): Rename to ...
1306 (_bfd_real_ftell): ... this.
1307 (real_fseek): Rename to ...
1308 (_bfd_real_fseek): ... this.
1309 (real_fopen): Rename to ...
1310 (_bfd_real_fopen): ... this.
1311 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1312 * libbfd.h: Regenerate.
1314 2017-02-17 Pedro Alves <palves@redhat.com>
1316 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1317 * libbfd.c (read_unsigned_leb128): Rename to ...
1318 (_bfd_read_unsigned_leb128): ... this.
1319 (read_signed_leb128): Rename to ...
1320 (_bfd_read_signed_leb128): ... this.
1321 (safe_read_leb128): Rename to ...
1322 (_bfd_safe_read_leb128): ... this.
1323 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1324 (_bfd_read_unsigned_leb128): ... this.
1325 (read_signed_leb128): Rename to ...
1326 (_bfd_read_signed_leb128): ... this.
1327 (safe_read_leb128): Rename to ...
1328 (_bfd_safe_read_leb128): ... this.
1329 * libbfd.h: Renegerate.
1331 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1333 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1334 before trying to fine matching file and line information.
1336 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1338 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1339 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1340 not match current bfd, then reload debug information. Record bfd
1341 we're loading debug info for in the stash. If we have debug
1342 informatin in the cache then perform section placement before
1345 2017-02-16 Alan Modra <amodra@gmail.com>
1348 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1349 * elfxx-target.h (elf_backend_no_page_alias): Define.
1350 (elfNN_bed): Init new field.
1351 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1352 ensure PT_LOAD segment starts on a new page.
1353 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1355 2017-02-16 Alan Modra <amodra@gmail.com>
1358 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1361 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1363 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1364 * bfd-in2.h: Regenerated.
1366 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1369 * elf32-i386.c (elf_i386_relocate_section): Allow
1370 "lea foo@GOT, %reg" in PIC.
1372 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1375 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1376 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1377 error against local IFUNC symbol without a base register for
1380 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1382 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1383 `%P: %H:' with `info->callbacks->einfo'.
1384 (ppc_elf_relocate_section): Likewise.
1385 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1386 (ppc64_elf_edit_toc): Likewise.
1387 (ppc64_elf_relocate_section): Likewise.
1389 2017-02-14 Alan Modra <amodra@gmail.com>
1391 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1392 --gc-keep-exported, and test versioned field of sym rather than
1393 looking for @ in name.
1395 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1397 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1400 2017-02-13 Nick Clifton <nickc@redhat.com>
1403 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1406 2017-02-07 Andrew Waterman <andrew@sifive.com>
1408 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1409 entry size if PLT header is written.
1411 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1413 Fix sparc64 dynamic relocation processing to use the dynamic
1415 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1416 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1419 2017-02-03 Nick Clifton <nickc@redhat.com>
1422 * coffcode.h (coff_write_object_contents): Enlarge size of
1423 s_name_buf in order to avoid compile time warning about possible
1425 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1426 32-bits of insn value before printing into buffer.
1428 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1430 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1431 `max_local_dynindx'.
1432 (mips_elf_sort_hash_table): Handle it.
1433 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1434 symbols bump up `max_local_dynindx' rather than
1435 `max_non_got_dynindx'.
1437 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1439 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1440 `min_got_dynindx', `max_unref_got_dynindx' and
1441 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1442 (mips_elf_sort_hash_table): Adjust accordingly.
1444 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1446 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1447 to access the hash table.
1449 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1451 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1452 non-NULL `htab' to the beginning.
1454 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1456 * elflink.c (elf_gc_sweep): Wrap overlong line.
1458 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1460 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1461 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1462 * elfxx-mips.c (mips_elf_link_hash_table): Add
1463 `ignore_branch_isa' member.
1464 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1465 in branch relocation calculation as an error if
1466 `ignore_branch_isa' has been set.
1467 (_bfd_mips_elf_insn32): Rename to...
1468 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1469 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1470 Handle the new parameter.
1472 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1474 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1475 local variable dynobj.
1478 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1479 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1480 executable from read-only sections into sdynrelro.
1481 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1482 dynamic relocs in sdynrelro.
1483 (elf_backend_want_dynrelro): Define.
1485 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1487 * config.bfd (*-*-rtemsaout*): Mark as removed.
1489 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1491 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1492 (arm-*-rtems*): Move to (arm*-*-eabi*).
1493 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1494 (m68-*-rtems*): Move to (m68*-*-elf*).
1496 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1498 * config.bfd (*-*-rtemscoff*): Mark as removed.
1500 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1503 * elflink.c (bfd_elf_record_link_assignment): Revert last
1504 change and don't ever clear `forced_local'. Set `mark'
1506 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1508 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1509 (bfd_elf_size_dynamic_sections): ... here.
1510 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1511 and set `mark' instead in `__tls_get_addr_opt' processing.
1512 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1514 2017-01-24 Alan Modra <amodra@gmail.com>
1516 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1517 where dynamic relocs are preferable. Allow ifunc too.
1518 (ensure_undefweak_dynamic): New function.
1519 (allocate_dynrelocs): Use it here. Move plt handling last and
1520 don't make symbols dynamic, simplifying loop. Only make undef
1521 weak symbols with GOT entries dynamic. Correct condition
1522 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1523 comments. Remove goto.
1524 (ppc_elf_relocate_section): Correct test for using dynamic
1525 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1526 to suit. Set up explicit tls_index entries and implicit GOT
1527 tls_index entries resolvable at link time for
1528 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1529 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1530 (ensure_undefweak_dynamic): New function.
1531 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1532 with GOT entries dynamic. Remove unnecessary test of
1533 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1534 (ppc64_elf_relocate_section): Correct test for using dynamic
1535 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1536 to suit. Set up explicit tls_index entries and implicit GOT
1537 tls_index entries resolvable at link time for __tls_get_addr_opt.
1538 Simplify expression to clear mem for prelink.
1540 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1542 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1544 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1546 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1547 (elf_backend_hash_symbol): Define.
1549 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1552 * elflink.c (bfd_elf_record_link_assignment): Clear any
1553 `forced_local' marking for DSO symbols that are not being
1556 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1558 * elfnn-riscv.c (riscv_elf_object_p): New function.
1560 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1563 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1565 (elf_x86_64_check_relocs): Create .eh_frame section for the
1567 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1568 .eh_frame section for the .plt.bnd section.
1569 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1570 for the .plt.bnd section.
1572 2017-01-12 Nick Clifton <nickc@redhat.com>
1575 * opncls.c (find_separate_debug_file): Add include_dirs
1576 parameter. Only include the directory part of the bfd's filename
1577 in search paths if include_dirs is true. Add a couple of extra
1578 locations for looking for debug files.
1579 ( bfd_follow_gnu_debuglink): Update invocation of
1580 find_separate_debug_file.
1581 (bfd_follow_gnu_debugaltlink): Likewise.
1582 (get_build_id): New function: Finds the build-id of the given bfd.
1583 (get_build_id_name): New function: Computes the name of the
1584 separate debug info file for a bfd, based upon its build-id.
1585 (check_build_id_file): New function: Checks to see if a separate
1586 debug info file exists at the given location, and that its
1587 build-id matches that of the original bfd.
1588 (bfd_follow_build_id_debuglink): New function: Finds a separate
1589 debug info file for a given bfd by using the build-id method.
1590 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1591 method of locating a separate debug info file before using the
1593 * bfd-in2.h: Regenerate.
1595 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1598 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1599 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1600 elf_x86_64_eh_frame_plt_got.
1601 (elf_x86_64_size_dynamic_sections): Get unwind info from
1602 elf_x86_64_bnd_arch_bed for the BND PLT.
1604 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1606 * config.bfd: Add entries for i686-redox and x86_64-redox.
1608 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1610 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1612 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1613 .eh_frame section to 4 bytes for x32.
1614 (elf_x86_64_check_relocs): Likewise.
1616 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1619 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1620 (PLT_GOT_FDE_LENGTH): Likewise.
1621 (elf_i386_plt_layout): Add eh_frame_plt_got and
1622 eh_frame_plt_got_size.
1623 (elf_i386_plt): Updated.
1624 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1625 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1626 (elf_i386_size_dynamic_sections): Allocate and initialize
1627 .eh_frame section for .plt.got.
1628 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1630 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1631 eh_frame_plt_got_size.
1632 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1633 (PLT_GOT_FDE_LENGTH): Likewise.
1634 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1635 eh_frame_plt_got_size.
1636 (elf_x86_64_arch_bed): Updated.
1637 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1638 eh_frame_plt_got_size.
1639 (elf_x86_64_nacl_arch_bed): Likewise.
1640 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1641 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1642 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1643 .eh_frame section for .plt.got.
1644 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1647 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1649 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1650 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1652 2017-01-09 Nick Clifton <nickc@redhat.com>
1654 * dwarf2.c (lookup_address_in_function_table): Return early if
1655 there are no functions in the given comp unit, or if the high
1656 address of the last function in the comp unit is less than the
1659 2017-01-09 Nick Clifton <nickc@redhat.com>
1662 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1663 message if there are too many symbols to load.
1665 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1667 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1668 if relocs are cached.
1670 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1673 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1674 for R_MICROBLAZE_GOTOFF_64.
1676 2017-01-03 Nick Clifton <nickc@redhat.com>
1678 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1679 warning about using a possibly uninitialised variable.
1681 2017-01-02 Alan Modra <amodra@gmail.com>
1683 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1684 (allocate_plt_static, allocate_dynrelocs): Use it.
1686 2017-01-02 Alan Modra <amodra@gmail.com>
1688 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1689 .PARISC.unwind section.
1691 2017-01-02 Alan Modra <amodra@gmail.com>
1694 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1695 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1696 indirect to GOT pointer relative code edit.
1698 2017-01-02 Alan Modra <amodra@gmail.com>
1700 Update year range in copyright notice of all files.
1702 For older changes see ChangeLog-2016
1704 Copyright (C) 2017 Free Software Foundation, Inc.
1706 Copying and distribution of this file, with or without modification,
1707 are permitted in any medium without royalty provided the copyright
1708 notice and this notice are preserved.
1714 version-control: never