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