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