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