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