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