Add RESOLVED_LOCALLY_P
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
daf1c414
L
12017-10-06 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf32-i386.c (X86_PCREL_TYPE_P): New.
4 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
5 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
6 (X86_PCREL_TYPE_P): This.
7 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
8 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
9 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
10 X86_PCREL_TYPE_P.
11 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
12
51537393
L
132017-10-06 H.J. Lu <hongjiu.lu@intel.com>
14
15 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
16 * elf32-i386.c (elf_i386_tls_transition): Use it.
17 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
18
0caf6c82
L
192017-10-05 H.J. Lu <hongjiu.lu@intel.com>
20
21 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
22 Dump dynamic relocation in read-only section with minfo if
23 needed.
24 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
25 (maybe_set_textrel): Likewise.
26 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
27 read-only section with minfo.
28
6d5be5d6
JB
292017-10-05 John Baldwin <jhb@FreeBSD.org>
30
31 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
32
007873f5
L
332017-10-05 H.J. Lu <hongjiu.lu@intel.com>
34
35 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
36 in read-only section with minfo.
37 (tilepro_elf_size_dynamic_sections): Likewise.
38 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
39 (tilegx_elf_size_dynamic_sections): Likewise.
40
2ca7de37
PA
412017-10-05 Pedro Alves <palves@redhat.com>
42
43 PR 22245
44 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
45 ellipsis parameter. Split out bfd_error_on_input code to..
46 (bfd_set_input_error): .. New function.
47 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
48 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
49 * bfd-in2.h: Regenerate.
50
8c6716e5
AM
512017-10-05 Alan Modra <amodra@gmail.com>
52
53 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
54 fini_array error value.
55
db4677b8
AM
562017-10-05 Alan Modra <amodra@gmail.com>
57
58 PR 21167
59 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
60 groups.
61 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
62 flag from section.
63 (elf_fake_sections): Adjust calls. Exit immediately on failure.
64 (bfd_elf_set_group_contents): Add associated reloc section indices
65 to group contents.
66
a5259595
AM
672017-10-04 Alan Modra <amodra@gmail.com>
68
69 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
70 classify symbols for ELFv2.
71
9ba5f27c
PK
722017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
73
74 PR 22245
75 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
76 undergoes default promotion.
77 * bfd-in2.h: Regenerate.
78
dcd2b8a0
AM
792017-10-02 Alan Modra <amodra@gmail.com>
80
81 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
82 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
83
20230942
AM
842017-10-01 Alan Modra <amodra@gmail.com>
85
86 PR 21957
87 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
88 (add_line_info): Always put end_sequence last.
89
4b04bba2
AM
902017-10-01 Alan Modra <amodra@gmail.com>
91
92 PR 22047
93 * dwarf2.c (read_section): Allocate buffer with extra byte for
94 bfd_simple_get_relocated_section_contents rather than copying
95 afterwards.
96
f6ac8c52
AM
972017-09-29 Alan Modra <amodra@gmail.com>
98
99 * merge.c (merge_strings): Return FALSE on malloc failure.
100 (_bfd_merge_sections): Return failures from record_section and
101 merge_strings.
102
1a3b5c34
AM
1032017-09-28 Alan Modra <amodra@gmail.com>
104
105 PR 22220
106 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
107 a case where plugin_notice isn't called.
108
cd28e7aa
KLC
1092017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
110
111 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
112 comparison.
113
ac69a0d7
L
1142017-09-26 H.J. Lu <hongjiu.lu@intel.com>
115
116 PR ld/22199
117 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
118 output_bfd to info->callbacks->minfo.
119
262c0a87
NC
1202017-09-26 Nick Clifton <nickc@redhat.com>
121
122 PR 22172
123 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
124 assertion failure if elf_x86_64_rtype_to_howto has already issued
125 an error message.
126
33e0a9a0
AM
1272017-09-26 Alan Modra <amodra@gmail.com>
128
129 PR 22210
130 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
131 read data.
132
30d0157a
NC
1332017-09-26 Nick Clifton <nickc@redhat.com>
134
135 PR 22210
136 * dwarf2.c (read_formatted_entries): Fail early if we know that
137 the loop parsing data entries will overflow the end of the
138 section.
139
1b86808a
AM
1402017-09-26 Alan Modra <amodra@gmail.com>
141
142 PR 22209
143 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
144 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
145 to stash->info_ptr_memory, and check die_ref is within that memory.
146 Set info_ptr_end correctly when another CU is refd. Check die_ref
147 for DW_FORM_ref4 etc. is within CU.
148
a54018b7
AM
1492017-09-26 Alan Modra <amodra@gmail.com>
150
151 PR 22205
152 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
153 (read_formatted_entries): Init "fe".
154 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
155
e338894d
AM
1562017-09-26 Alan Modra <amodra@gmail.com>
157
158 PR 22204
159 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
160 bounds in inner loop.
161
1da5c9a4
AM
1622017-09-25 Alan Modra <amodra@gmail.com>
163
164 PR 22202
165 * dwarf1.c (parse_die): Sanity check pointer against section limit
166 before dereferencing.
167 (parse_line_table): Likewise.
168
11855d8a
AM
1692017-09-25 Alan Modra <amodra@gmail.com>
170
171 PR 22201
172 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
173 has string form.
174 (parse_comp_unit): Likewise.
175
c361faae
AM
1762017-09-25 Alan Modra <amodra@gmail.com>
177
178 PR 22200
179 * dwarf2.c (read_formatted_entries): Error on format_count zero.
180
52b36c51
AM
1812017-09-24 Alan Modra <amodra@gmail.com>
182
183 PR 22197
184 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
185 within section bounds.
186
a26a013f
AM
1872017-09-24 Alan Modra <amodra@gmail.com>
188
189 PR 22191
190 * dwarf2.c (decode_line_info): Properly free line sequences on error.
191
52a93b95
AM
1922017-09-24 Alan Modra <amodra@gmail.com>
193
194 PR 22187
195 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
196 pname param. Return status. Make name const. Don't abort,
197 return an error. Formatting. Exit if current info_ptr matches
198 orig_info_ptr. Update callers.
199 (scan_unit_for_symbols): Start at nesting_level of zero. Make
200 nested_funcs an array of structs for extensibility. Formatting.
201
d8010d3e
AM
2022017-09-24 Alan Modra <amodra@gmail.com>
203
204 PR 22186
205 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
206 rather than dividing by zero.
207
515f23e6
AM
2082017-09-24 Alan Modra <amodra@gmail.com>
209
210 PR 22169
211 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
212
0d76029f
AM
2132017-09-24 Alan Modra <amodra@gmail.com>
214
215 PR 22167
216 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
217
bd61e135
AM
2182017-09-24 Alan Modra <amodra@gmail.com>
219
220 PR 22166
221 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
222 SHT_GNU_verneed section for sanity. Don't zalloc memory for
223 verref.
224
61e3bf5f
L
2252017-09-22 H.J. Lu <hongjiu.lu@intel.com>
226
227 PR binutils/22170
228 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
229 corrupted PLT.
230
b69e9267
L
2312017-09-22 H.J. Lu <hongjiu.lu@intel.com>
232
59ca4c1b 233 PR binutils/22163
b69e9267
L
234 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
235 -1 if bfd_canonicalize_dynamic_reloc returns 0.
236
b877d21f
PA
2372017-09-22 Pedro Alves <palves@redhat.com>
238 Alan Modra <amodra@gmail.com>
239
240 * version.h: Add comment.
241
8fe09d74
AA
2422017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
243
244 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
245 NT_S390_GS_BC, correct the previously swapped invocations of
246 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
247
25516cc5
AM
2482017-09-19 Alan Modra <amodra@gmail.com>
249
250 PR 21441
251 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
252 size.
253
3d13f3e9
AM
2542017-09-19 Alan Modra <amodra@gmail.com>
255
256 PR 22150
257 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
258 symbols before calculating verrefs. Don't renumber dynsyms
259 after gc. Exclude .gnu.version when zero or one dynsym.
260 Localize some vars and reindent.
261
94670f6c
L
2622017-09-18 H.J. Lu <hongjiu.lu@intel.com>
263
264 PR ld/22148
265 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
266 return from bfd_canonicalize_dynamic_reloc.
267
21d0a606
AM
2682017-09-15 Alan Modra <amodra@gmail.com>
269
270 PR 22116
271 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
272 overflows bfd_size_type.
273
5e5e02ae
L
2742017-09-14 H.J. Lu <hongjiu.lu@intel.com>
275
276 PR ld/22135
277 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
278 to indicate if conversion is performed.
279 (elf_i386_check_relocs): Cache section contents and relocations
280 if conversion is performed.
281 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
282 contents and relocations if conversion is performed.
283
4d465c68
NC
2842017-09-14 Nick Clifton <nickc@redhat.com>
285
286 PR binutils/22113
287 * peXXigen.c (pe_print_idata): Extend check for HintName vector
288 entries.
289
f47432d4
L
2902017-09-13 H.J. Lu <hongjiu.lu@intel.com>
291
292 * elfxx-x86.h: Fix a typo in comments.
293
4ec521f2
KLC
2942017-09-09 Kamil Rytarowski <n54@gmx.com>
295
296 * elf32-nds32.c: Rename __BIT() to N32_BIT().
297
2420fff6
AM
2982017-09-09 Alan Modra <amodra@gmail.com>
299
300 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
301 plt_stub_align.
302
c5bce5c6
L
3032017-09-09 H.J. Lu <hongjiu.lu@intel.com>
304
305 * elf32-i386.c (elf_i386_relocate_section): Update usage of
306 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
307 (elf_i386_finish_dynamic_symbol): Likewise.
308 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
309 (elf_x86_64_finish_dynamic_symbol): Likewise.
310 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
311 (_bfd_x86_elf_fixup_symbol): Likewise.
312
8fbf0ba1
L
3132017-09-09 H.J. Lu <hongjiu.lu@intel.com>
314
315 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
316 check has_non_got_reloc.
317
0a27fed7
L
3182017-09-09 H.J. Lu <hongjiu.lu@intel.com>
319
320 PR ld/22115
321 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
322 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
323 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
324 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
325 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
326 and linker_def on __ehdr_start if it is referenced and not
327 defined.
328 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
329 and return TRUE when building executable, if a symbol has
330 non-GOT/non-PLT relocations in text section or there is no
331 dynamic linker.
332 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
333
c7df954f
L
3342017-09-08 H.J. Lu <hongjiu.lu@intel.com>
335
336 * elfxx-x86.h: Update comments.
337
1de031c8
L
3382017-09-08 H.J. Lu <hongjiu.lu@intel.com>
339
340 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
341 elf_x86_plt_layout_table with elf_x86_init_table.
342 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
343 Likewise.
344 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
345 Likewise.
346 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
347 (elf_x86_init_table): This.
348 (_bfd_x86_elf_link_setup_gnu_properties): Replace
349 elf_x86_plt_layout_table with elf_x86_init_table.
350
7a382c1c
L
3512017-09-07 H.J. Lu <hongjiu.lu@intel.com>
352
353 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
354 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
355 * configure: Regenerated.
356 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
357 and r_sym fields of plt_layout.
358 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
359 Likewise.
360 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
361 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
362 r_info nor r_sym fields.
363 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
364 fields of htab.
365 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
366
9eb7b0ac
PD
3672017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
368
369 * (_bfd_riscv_relax_align): Call bfd_set_error and
370 print an error message when unable to relax a .align directive.
371
b1308d2c
PD
3722017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
373
374 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
375 (riscv_record_pcrel_hi_reloc): Add absolute argument.
376 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
377 R_RISCV_PCREL_HI20 relocs, and pass the result to
378 riscv_record_pcrel_hi_reloc.
379
6999821f
L
3802017-09-07 H.J. Lu <hongjiu.lu@intel.com>
381
382 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
383 r_type_p. Remove the converted argument. Replace
384 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
385 the new relocation type via r_type_p.
386 (elf_i386_relocate_section): Likewise.
387 (elf_i386_finish_dynamic_symbol): Likewise.
388 (need_convert_load): Removed.
389 (check_relocs_failed): Updated.
390 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
391 instead of setting need_convert_load.
392 (_bfd_i386_elf_convert_load): Removed.
393 * elf64-x86-64.c (need_convert_load): Removed.
394 (check_relocs_failed): Updated.
395 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
396 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
397 Return the new relocation type via r_type_p.
398 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
399 instead of setting need_convert_load.
400 (elf_x86_64_check_relocs): Don't check PIC if relocation has
401 been converted.
402 (_bfd_x86_64_elf_convert_load): Removed.
403 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
404 with SYMBOL_REFERENCES_LOCAL_P.
405 (elf_x86_64_finish_dynamic_symbol): Likewise.
406 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
407 set convert_load.
408 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
409 (_bfd_x86_elf_link_symbol_references_local): New function.
410 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
411 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
412 SYMBOL_REFERENCES_LOCAL_P.
413 (elf_x86_link_hash_entry): Add local_ref.
414 (elf_x86_link_hash_table): Remove convert_load.
415 (_bfd_i386_elf_convert_load): Removed.
416 (_bfd_x86_64_elf_convert_load): Likewise.
417 (_bfd_x86_elf_link_symbol_references_local): New.
418
78984959
L
4192017-09-06 H.J. Lu <hongjiu.lu@intel.com>
420
421 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
422 (elf_x86_64_info_to_howto): Get the real relocation type by
423 masking out R_X86_64_converted_reloc_bit.
424 (elf_x86_64_check_tls_transition): Get the real relocation type
425 by masking out R_X86_64_converted_reloc_bit.
426 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
427 instead of setting converted_reloc.
428 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
429 instead of converted_reloc. Get the real relocation type by
430 masking out R_X86_64_converted_reloc_bit.
431 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
432 R_X86_64_converted_reloc_bit is valid.
433 * elfxx-x86.h (converted_reloc): Removed.
434
419414ea
L
4352017-09-06 H.J. Lu <hongjiu.lu@intel.com>
436
437 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
438 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
439 to get the relocation type again.
440 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
441 r_type when calling elf_x86_64_tls_transition. Don't use
442 ELF32_R_TYPE to get the relocation type again.
443
dc089072
L
4442017-09-05 H.J. Lu <hongjiu.lu@intel.com>
445
446 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
447 converted_reloc.
448
8b43e456
L
4492017-09-05 H.J. Lu <hongjiu.lu@intel.com>
450
451 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
452 argument. Don't check relocation overflow. Avoid relocation
453 overflow if --no-relax is used. Set converted_reloc on symbol
454 if a GOTPCREL relocation is converted.
455 (elf_x86_64_relocate_section): Issue a fatal error and suggest
456 --no-relax if GOTPCREL relocation conversion leads to relocation
457 overflow.
458 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
459
83eef883
AFB
4602017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
461 Edmar Wienskoski <edmar.wienskoski@nxp.com
462
463 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
464 (ppc_elf_check_relocs): Handle it.
465 (ppc_elf_vle_split20): New function.
466 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
467
0e30d991
L
4682017-09-03 H.J. Lu <hongjiu.lu@intel.com>
469
470 PR ld/22071
471 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
472 for x86-64 if GOT_TLS_GDESC_P is true.
473
1cf58434
AM
4742017-09-03 Alan Modra <amodra@gmail.com>
475
476 PR 22067
477 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
478
f04bdfa7
L
4792017-09-02 H.J. Lu <hongjiu.lu@intel.com>
480
481 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
482 tls_get_addr for x86-64 in one place.
483
2ac3a7f5
L
4842017-09-02 H.J. Lu <hongjiu.lu@intel.com>
485
486 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
487 with elfxx-x86.lo for 64-bit BFD.
488 * configure: Regenerated.
489
d47a8026
L
4902017-09-02 H.J. Lu <hongjiu.lu@intel.com>
491
492 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
493 (_bfd_i386_elf_convert_load): This. Remove static.
494 (elf_i386_size_dynamic_sections): Removed.
495 (elf_backend_size_dynamic_sections): Likewise.
496 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
497 (_bfd_x86_64_elf_convert_load): This. Remove static.
498 (elf_x86_64_size_dynamic_sections): Removed.
499 (elf_backend_size_dynamic_sections): Likewise.
500 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
501 (elf_x86_allocate_dynrelocs): This. Make it static.
502 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
503 (elf_x86_allocate_local_dynreloc): This. Make it static.
504 (elf_i386_is_reloc_section): New function.
505 (elf_x86_64_is_reloc_section): Likewise.
506 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
507 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
508 Rearrange got_entry_size initialization.
509 (_bfd_x86_elf_size_dynamic_sections): New function.
510 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
511 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
512 (_bfd_i386_elf_convert_load): New.
513 (_bfd_x86_64_elf_convert_load): Likewise.
514 (_bfd_x86_elf_size_dynamic_sections): Likewise.
515 (elf_backend_size_dynamic_sections): Likewise.
516 (_bfd_x86_elf_allocate_dynrelocs): Removed.
517 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
518
2926eb2c
L
5192017-09-02 H.J. Lu <hongjiu.lu@intel.com>
520
521 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
522 update comments.
523
92c10f5f
L
5242017-09-02 H.J. Lu <hongjiu.lu@intel.com>
525
526 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
527 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
528
aa595247
L
5292017-09-02 H.J. Lu <hongjiu.lu@intel.com>
530
531 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
532 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
533 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
534 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
535 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
536 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
537
b9ce864c
L
5382017-09-02 H.J. Lu <hongjiu.lu@intel.com>
539
540 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
541 (elf_i386_allocate_local_dynrelocs): Likewise.
542 (elf_i386_size_dynamic_sections): Replace
543 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
544 with _bfd_x86_elf_allocate_dynrelocs and
545 _bfd_x86_elf_allocate_local_dynrelocs.
546 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
547 (elf_x86_64_allocate_local_dynrelocs): Likewise.
548 (elf_x86_64_size_dynamic_sections): Replace
549 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
550 with _bfd_x86_elf_allocate_dynrelocs and
551 _bfd_x86_elf_allocate_local_dynrelocs.
552 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
553 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
554 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
555 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
556
fe53b4a4
L
5572017-09-02 H.J. Lu <hongjiu.lu@intel.com>
558
559 * elf32-i386.c (is_i386_elf): Removed.
560 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
561 (elf_i386_size_dynamic_sections): Likewise.
562 (elf_i386_relocate_section): Likewise.
563 * elf64-x86-64.c (is_x86_64_elf): Removed.
564 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
565 is_x86_elf.
566 (elf_x86_64_size_dynamic_sections): Likewise.
567 (elf_x86_64_relocate_section): Likewise.
568 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
569 target_id.
570 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
571 (is_x86_elf): New.
572
9ff114ca
L
5732017-09-02 H.J. Lu <hongjiu.lu@intel.com>
574
575 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
576 (elf_i386_allocate_dynrelocs): Replace
577 elf_i386_compute_jump_table_size with
578 elf_x86_compute_jump_table_size.
579 (elf_i386_size_dynamic_sections): Likewise.
580 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
581 (elf_x86_64_allocate_dynrelocs): Replace
582 elf_x86_64_compute_jump_table_size with
583 elf_x86_compute_jump_table_size.
584 (elf_x86_64_size_dynamic_sections): Likewise.
585 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
586 got_entry_size.
587 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
588 (elf_x86_compute_jump_table_size): New.
589
503294e7
L
5902017-09-02 H.J. Lu <hongjiu.lu@intel.com>
591
592 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
593 sizeof_reloc.
594 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
595 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
596
9a742a90
L
5972017-09-02 H.J. Lu <hongjiu.lu@intel.com>
598
599 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
600 with htab->is_vxworks.
601 (elf_i386_size_dynamic_sections): Likewise.
602 (elf_i386_relocate_section): Likewise.
603 (elf_i386_finish_dynamic_symbol): Likewise.
604 (elf_i386_finish_dynamic_sections): Likewise.
605
6b9553e2
L
6062017-09-02 H.J. Lu <hongjiu.lu@intel.com>
607
608 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
609 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
610 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
611 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
612 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
613 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
614 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
615 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
616
ad71ce8d
L
6172017-09-01 H.J. Lu <hongjiu.lu@intel.com>
618
619 PR ld/22064
620 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
621 ELF_COMMON_DEF_P for common symbols.
622
96d01d93
AM
6232017-09-02 Alan Modra <amodra@gmail.com>
624
625 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
626 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
627 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
628
4f501a24
L
6292017-09-01 H.J. Lu <hongjiu.lu@intel.com>
630
631 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
632 (elf_backend_gc_mark_hook): Likewise.
633 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
634 (elf_backend_gc_mark_hook): Likewise.
635 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
636 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
637 (elf_backend_gc_mark_hook): Likewise.
638
eeb2f20a
L
6392017-09-01 H.J. Lu <hongjiu.lu@intel.com>
640
641 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
642 (elf_backend_adjust_dynamic_symbol): Likewise.
643 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
644 (elf_backend_adjust_dynamic_symbol): Likewise.
645 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
646 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
647 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
648 (_bfd_x86_elf_adjust_dynamic_symbol): New.
649 (elf_backend_adjust_dynamic_symbol): Likewise.
650
c6295c22
L
6512017-09-01 H.J. Lu <hongjiu.lu@intel.com>
652
653 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
654 comments.
655
39946cc2
L
6562017-09-01 H.J. Lu <hongjiu.lu@intel.com>
657
658 * elf32-i386.c (elf_i386_mkobject): Removed.
659 (bfd_elf32_mkobject): Likewise.
660 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
661 (bfd_elf64_mkobject): Likewise.
662 (bfd_elf32_mkobject): Likewise.
663 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
18da07cd 664 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
39946cc2
L
665 (bfd_elf64_mkobject): Likewise.
666 (bfd_elf32_mkobject): Likewise.
667
a6798bab
L
6682017-09-01 H.J. Lu <hongjiu.lu@intel.com>
669
670 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
671 Call _bfd_x86_elf_link_setup_gnu_properties.
672 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
673 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
674 entries.
675 (elf_x86_64_non_lazy_plt): Likewise.
676 (elf_x86_64_lazy_bnd_plt): Likewise.
677 (elf_x86_64_non_lazy_bnd_plt): Likewise.
678 (elf_x86_64_lazy_ibt_plt): Likewise.
679 (elf_x32_lazy_ibt_plt): Likewise.
680 (elf_x86_64_non_lazy_ibt_plt): Likewise.
681 (elf_x32_non_lazy_ibt_plt): Likewise.
682 (elf_x86_64_nacl_plt): Likewise.
683 (elf_x86_64_link_setup_gnu_properties): Updated. Call
684 _bfd_x86_elf_link_setup_gnu_properties.
685 * elfxx-x86.c: Include elf-vxworks.h".
686 (_bfd_x86_elf_link_setup_gnu_properties): New function.
687 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
688 comments for pic_plt0_entry and pic_plt_entry.
689 (elf_x86_non_lazy_plt_layout): Likewise.
690 (elf_x86_plt_layout_table): New.
691 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
692
e10c9c62
L
6932017-09-01 H.J. Lu <hongjiu.lu@intel.com>
694
695 PR ld/22061
696 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
697 .eh_frame section for the second PLT.
698 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
699 alignment of .eh_frame section for the second PLT.
700
7e8b6008
NC
7012017-09-01 Nick Clifton <nickc@redhat.com>
702
703 PR 22059
704 * dwarf2.c (decode_line_info): Fix test for an overlong line info
705 structure.
706
2a143b99
NC
7072017-09-01 Nick Clifton <nickc@redhat.com>
708
709 PR 22058
710 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
711 attribute buffer is NUL terminated.
712
e4f27230
NC
7132017-08-31 Nick Clifton <nickc@redhat.com>
714
715 PR 22047
716 * dwarf2.c (read_section): If necessary add a terminating NUL byte
717 to dwarf string sections.
718
686335cd
AM
7192017-08-31 Alan Modra <amodra@gmail.com>
720
721 * po/SRC-POTFILES.in: Regenerate.
722
9866ffe2
AM
7232017-08-31 Alan Modra <amodra@gmail.com>
724
725 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
726 for a section containing just a terminator. Allow multiple
727 terminators at end of section.
728 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
729 sections when not adding alignment. Assert on terminator in
730 the middle of FDEs.
731
af471f82
AM
7322017-08-31 Alan Modra <amodra@gmail.com>
733
734 PR 21441
735 PR 22048
736 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
737 terminators.
738
3321e42b
L
7392017-08-30 H.J. Lu <hongjiu.lu@intel.com>
740
741 * configure.ac (bfd_backends): Add elf64.lo together with
742 elfxx-x86.lo for 64-bit BFD.
743 * configure: Regenerated.
744
ef32532f
JB
7452017-08-31 James Bowman <james.bowman@ftdichip.com>
746
747 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
748 for R_FT32_18.
749
e234de6b
AM
7502017-08-31 Alan Modra <amodra@gmail.com>
751
752 PR binutils/22032
753 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
754 before _close_and_cleanup. Call iovec->bclose after.
755 (bfd_close): Remove code common to, and call, bfd_close_all_done.
756
f493882d
L
7572017-08-30 H.J. Lu <hongjiu.lu@intel.com>
758
759 * elf32-i386.c (elf_i386_plt_type): Removed.
760 (elf_i386_plt): Likewise.
761 (elf_i386_get_synthetic_symtab): Updated. Call
762 _bfd_x86_elf_get_synthetic_symtab.
763 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
764 (elf_x86_64_plt): Likewise.
765 (elf_x86_64_get_synthetic_symtab): Updated. Call
766 _bfd_x86_elf_get_synthetic_symtab.
767 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
768 (elf_x86_64_get_plt_got_vma): Likewise.
769 (elf_i386_valid_plt_reloc_p): Likewise.
770 (elf_x86_64_valid_plt_reloc_p): Likewise.
771 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
772 * elfxx-x86.h (elf_x86_plt_type): New.
773 (elf_x86_plt): Likewise.
774 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
775
5b86dbf4
L
7762017-08-30 H.J. Lu <hongjiu.lu@intel.com>
777
778 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
779 target_id instead of elf_machine_code.
780
765e526c
L
7812017-08-30 H.J. Lu <hongjiu.lu@intel.com>
782
783 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
784 (elf_i386_lazy_plt_layout): Likewise.
785 (elf_i386_non_lazy_plt_layout): Likewise.
786 (elf_i386_plt_layout): Likewise.
787 (elf_i386_link_hash_table): Likewise.
788 (elf_i386_next_tls_desc_index): Likewise.
789 (elf_i386_srelplt2): Likewise.
790 (elf_i386_plt): Likewise.
791 (elf_i386_lazy_plt): Likewise.
792 (elf_i386_non_lazy_plt): Likewise.
793 (elf_i386_link_hash_table_create): Likewise.
794 (bfd_elf32_bfd_link_hash_table_create): Likewise.
795 (elf_i386_lazy_plt): Updated.
796 (elf_i386_non_lazy_plt): Likewise.
797 (elf_i386_lazy_ibt_plt): Likewise.
798 (elf_i386_non_lazy_ibt_plt): Likewise.
799 (elf_i386_allocate_dynrelocs): Likewise.
800 (elf_i386_size_dynamic_sections): Likewise.
801 (elf_i386_relocate_section): Likewise.
802 (elf_i386_finish_dynamic_symbol): Likewise.
803 (elf_i386_finish_dynamic_sections): Likewise.
804 (elf_i386_get_synthetic_symtab): Likewise.
805 (elf_i386_link_setup_gnu_properties): Likewise.
806 (elf_i386_nacl_plt): Likewise.
807 * elf64-x86-64.c (ABI_64_P): Removed.
808 (ELF64_DYNAMIC_INTERPRETER): Likewise.
809 (ELF32_DYNAMIC_INTERPRETER): Likewise.
810 (elf_x86_64_lazy_plt_layout): Likewise.
811 (elf_x86_64_non_lazy_plt_layout): Likewise.
812 (elf_x86_64_plt_layout): Likewise.
813 (elf_x86_64_link_hash_table): Likewise.
814 (elf_x86_64_plt): Likewise.
815 (elf_x86_64_lazy_plt): Likewise.
816 (elf_x86_64_non_lazy_plt): Likewise.
817 (elf_x86_64_link_hash_table_create): Likewise.
818 (bfd_elf64_bfd_link_hash_table_create): Likewise.
819 (bfd_elf32_bfd_link_hash_table_create): Likewise.
820 (elf_x86_64_lazy_plt): Updated.
821 (elf_x86_64_non_lazy_plt): Likewise.
822 (elf_x86_64_lazy_bnd_plt): Likewise.
823 (elf_x86_64_non_lazy_bnd_plt): Likewise.
824 (elf_x86_64_lazy_ibt_plt): Likewise.
825 (elf_x32_lazy_ibt_plt): Likewise.
826 (elf_x86_64_non_lazy_ibt_plt): Likewise.
827 (elf_x32_non_lazy_ibt_plt): Likewise.
828 (elf_x86_64_allocate_dynrelocs): Likewise.
829 (elf_x86_64_size_dynamic_sections): Likewise.
830 (elf_x86_64_relocate_section): Likewise.
831 (elf_x86_64_finish_dynamic_symbol): Likewise.
832 (elf_x86_64_finish_dynamic_sections): Likewise.
833 (elf_x86_64_get_synthetic_symtab): Likewise.
834 (elf_x86_64_link_setup_gnu_properties): Likewise.
835 (elf_x86_64_nacl_plt): Likewise.
836 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
837 "elf/x86-64.h".
838 (ELF32_DYNAMIC_INTERPRETER): New.
839 (ELF64_DYNAMIC_INTERPRETER): Likewise.
840 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
841 (_bfd_x86_elf_link_hash_table_create): Likewise.
842 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
843 (elf_x86_link_hash_table_free): This. Make it static.
844 * elfxx-x86.h: Don't include "objalloc.h".
845 (ABI_64_P): New.
846 (elf_x86_lazy_plt_layout): Likewise.
847 (elf_x86_non_lazy_plt_layout): Likewise.
848 (elf_x86_plt_layout): Likewise.
849 (_bfd_x86_elf_link_hash_table_create): Likewise.
850 (bfd_elf64_bfd_link_hash_table_create): Likewise.
851 (bfd_elf32_bfd_link_hash_table_create): Likewise.
852 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
853 srelplt2 and next_tls_desc_index.
854 (_bfd_x86_elf_link_hash_table_free): Removed.
855
70e65ca8
MR
8562017-08-30 Maciej W. Rozycki <macro@imgtec.com>
857
858 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
859 branch offset interpretation.
860
7c0ed396
L
8612017-08-30 H.J. Lu <hongjiu.lu@intel.com>
862
863 PR binutils/22032
864 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
865
0f2425c4
L
8662017-08-30 H.J. Lu <hongjiu.lu@intel.com>
867
868 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
869 (elf_x86_64_srelplt2): Likewise.
870
9a23f96e
AM
8712017-08-30 Alan Modra <amodra@gmail.com>
872
873 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
874 (ppc64_elf_tls_optimize): Set it.
875 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
876 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
877 addis would add zero.
878 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
879 (ppc_elf_tls_optimize): Set it.
880 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
881 insn on TPREL16_LO relocs to use r2 when addis would add zero.
882
b9f04fe0
AM
8832017-08-30 Alan Modra <amodra@gmail.com>
884
885 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
886 __tls_get_addr call sequences to LE, don't move the addi down
887 to the nop. Replace the bl with addi and leave the nop alone.
888
5f0f0847
L
8892017-08-29 H.J. Lu <hongjiu.lu@intel.com>
890
891 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
892 Re-indent.
893 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
894 Likewise.
895 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
896
443701f5
L
8972017-08-29 H.J. Lu <hongjiu.lu@intel.com>
898
899 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
900 (BFD64_BACKENDS): Likewise.
901 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
902 (BFD64_BACKENDS_CFILES): Likewise.
903 * Makefile.in: Regenerated.
904 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
905 elf32-i386.lo and elf64-x86-64.lo.
906 * configure: Regenerated.
907 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
908 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
909 "objalloc.h" and "hashtab.h".
910 (ELIMINATE_COPY_RELOCS): Removed.
911 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
912 (SYMBOL_NO_COPYRELOC): Likewise.
913 (elf_i386_link_hash_entry): Likewise.
914 (GOT_UNKNOWN): Likewise.
915 (GOT_NORMAL): Likewise.
916 (GOT_TLS_GD): Likewise.
917 (elf_i386_hash_entry): Likewise.
918 (elf_i386_obj_tdata): Likewise.
919 (elf_i386_tdata): Likewise.
920 (elf_i386_local_got_tls_type): Likewise.
921 (elf_i386_local_tlsdesc_gotent): Likewise.
922 (elf_i386_hash_table): Likewise.
923 (elf_i386_link_hash_newfunc): Likewise.
924 (elf_i386_local_htab_hash): Likewise.
925 (elf_i386_local_htab_eq): Likewise.
926 (elf_i386_get_local_sym_hash): Likewise.
927 (elf_i386_link_hash_table_free): Likewise.
928 (elf_i386_copy_indirect_symbol): Likewise.
929 (elf_i386_fixup_symbol): Likewise.
930 (elf_i386_readonly_dynrelocs): Likewise.
931 (elf_i386_always_size_sections): Likewise.
932 (elf_i386_set_tls_module_base): Likewise.
933 (elf_i386_dtpoff_base): Likewise.
934 (compare_relocs): Likewise.
935 (elf_i386_hash_symbol): Likewise.
936 (elf_i386_parse_gnu_properties): Likewise.
937 (elf_i386_merge_gnu_properties): Likewise.
938 (elf_i386_link_check_relocs): Likewise.
939 (elf_i386_merge_symbol_attribute): Likewise.
940 (bfd_elf32_bfd_link_check_relocs): Likewise.
941 (elf_backend_copy_indirect_symbol): Likewise.
942 (elf_backend_always_size_sections): Likewise.
943 (elf_backend_omit_section_dynsym): Likewise.
944 (elf_backend_hash_symbol): Likewise.
945 (elf_backend_fixup_symbol): Likewise.
946 (elf_backend_parse_gnu_properties): Likewise.
947 (elf_backend_merge_gnu_properties): Likewise.
948 (elf_backend_merge_symbol_attribute): Likewise.
949 (elf_i386_mkobject): Updated.
950 (elf_i386_link_hash_table_create): Likewise.
951 (elf_i386_check_tls_transition): Likewise.
952 (elf_i386_tls_transition): Likewise.
953 (elf_i386_convert_load_reloc): Likewise.
954 (elf_i386_check_relocs): Likewise.
955 (elf_i386_adjust_dynamic_symbol): Likewise.
956 (elf_i386_allocate_dynrelocs): Likewise.
957 (elf_i386_convert_load): Likewise.
958 (elf_i386_size_dynamic_sections): Likewise.
959 (elf_i386_relocate_section): Likewise.
960 (elf_i386_finish_dynamic_symbol ): Likewise.
961 (elf_i386_finish_dynamic_sections): Likewise.
962 (elf_i386_output_arch_local_syms): Likewise.
963 (elf_i386_get_synthetic_symtab): Likewise.
964 (elf_i386_link_setup_gnu_properties): Likewise.
965 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
966 of elf_link_hash_table, as base.
967 (elf_i386_next_tls_desc_index): New.
968 (elf_i386_srelplt2): Likewise.
969 (elf_i386_plt): Likewise.
970 (elf_i386_lazy_plt): Likewise.
971 (elf_i386_non_lazy_plt): Likewise.
972 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
973 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
974 "objalloc.h" and "hashtab.h".
975 (ELIMINATE_COPY_RELOCS): Removed.
976 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
977 (SYMBOL_NO_COPYRELOC): Likewise.
978 (elf_x86_64_link_hash_entry): Likewise.
979 (GOT_UNKNOWN): Likewise.
980 (GOT_NORMAL): Likewise.
981 (GOT_TLS_GD): Likewise.
982 (elf_x86_64_hash_entry): Likewise.
983 (elf_x86_64_obj_tdata): Likewise.
984 (elf_x86_64_tdata): Likewise.
985 (elf_x86_64_local_got_tls_type): Likewise.
986 (elf_x86_64_local_tlsdesc_gotent): Likewise.
987 (elf_x86_64_hash_table): Likewise.
988 (elf_x86_64_link_hash_newfunc): Likewise.
989 (elf_x86_64_local_htab_hash): Likewise.
990 (elf_x86_64_local_htab_eq): Likewise.
991 (elf_x86_64_get_local_sym_hash): Likewise.
992 (elf_x86_64_link_hash_table_free): Likewise.
993 (elf_x86_64_copy_indirect_symbol): Likewise.
994 (elf_x86_64_fixup_symbol): Likewise.
995 (elf_x86_64_readonly_dynrelocs): Likewise.
996 (elf_x86_64_always_size_sections): Likewise.
997 (elf_x86_64_set_tls_module_base): Likewise.
998 (elf_x86_64_dtpoff_base): Likewise.
999 (compare_relocs): Likewise.
1000 (elf_x86_64_merge_symbol_attribute): Likewise.
1001 (elf_x86_64_hash_symbol): Likewise.
1002 (elf_x86_64_parse_gnu_properties): Likewise.
1003 (elf_x86_64_merge_gnu_properties): Likewise.
1004 (elf_x86_64_link_check_relocs): Likewise.
1005 (elf_backend_copy_indirect_symbol): Likewise.
1006 (elf_backend_always_size_sections): Likewise.
1007 (bfd_elf64_bfd_link_check_relocs): Likewise.
1008 (elf_backend_merge_symbol_attribute): Likewise.
1009 (elf_backend_hash_symbol): Likewise.
1010 (elf_backend_omit_section_dynsym): Likewise.
1011 (elf_backend_fixup_symbol): Likewise.
1012 (elf_backend_parse_gnu_properties): Likewise.
1013 (elf_backend_merge_gnu_properties): Likewise.
1014 (bfd_elf32_bfd_link_check_relocs): Likewise.
1015 (elf_x86_64_mkobject): Updated.
1016 (elf_x86_64_link_hash_table_create): Likewise.
1017 (elf_x86_64_check_tls_transition): Likewise.
1018 (elf_x86_64_tls_transition): Likewise.
1019 (elf_x86_64_convert_load_reloc): Likewise.
1020 (elf_x86_64_check_relocs): Likewise.
1021 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1022 (elf_x86_64_allocate_dynrelocs): Likewise.
1023 (elf_x86_64_convert_load): Likewise.
1024 (elf_x86_64_size_dynamic_sections): Likewise.
1025 (elf_x86_64_relocate_section): Likewise.
1026 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1027 (elf_x86_64_finish_dynamic_sections): Likewise.
1028 (elf_x86_64_output_arch_local_syms): Likewise.
1029 (elf_x86_64_get_synthetic_symtab): Likewise.
1030 (elf_x86_64_link_setup_gnu_properties): Likewise.
1031 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1032 instead of elf_link_hash_table, as base.
1033 (elf_x86_64_next_tls_desc_index): New.
1034 (elf_x86_64_srelplt2): Likewise.
1035 (elf_x86_64_plt): Likewise.
1036 (elf_x86_64_lazy_plt): Likewise.
1037 (elf_x86_64_non_lazy_plt): Likewise.
1038 * elfxx-x86.c: New file.
1039 * elfxx-x86.h: Likewise.
1040
823cb067
L
10412017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1042
1043 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1044 return.
1045 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1046
37c0b6ee
L
10472017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1048
1049 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1050 sections before checking dynamic relocations and free invalid
1051 PLT section contents.
1052 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1053
0fb0a767
L
10542017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1055
1056 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1057 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1058
90efb642
L
10592017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1060
1061 PR binutils/22018
1062 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1063 PLT section size.
1064 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1065
596dc58f
L
10662017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1067
1068 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1069 def_protected.
1070 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1071
a5b4ee94
L
10722017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1073
1074 PR ld/21997
1075 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1076 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1077 Add a has_no_copy_on_protected bitfield.
1078 (elf_has_no_copy_on_protected): New.
1079 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1080 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1081 (elf_merge_gnu_property_list): Likewise.
1082 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1083 to FALSE for elf_has_no_copy_on_protected.
1084 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1085 (elf_i386_link_hash_entry): Add def_protected.
1086 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1087 when checking info->nocopyreloc.
1088 (elf_i386_link_setup_gnu_properties): Don't set
1089 extern_protected_data here.
1090 (elf_i386_merge_symbol_attribute): New function.
1091 (elf_backend_merge_symbol_attribute): New.
1092 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1093 (elf_x86_64_link_hash_entry): Add def_protected.
1094 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1095 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1096 when checking info->nocopyreloc.
1097 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1098 relocation run-time overflow and unresolvable R_X86_64_32S
1099 relocation against protected data symbol defined in shared object
1100 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1101 (elf_x86_64_link_setup_gnu_properties): Don't set
1102 extern_protected_data here.
1103 (elf_x86_64_merge_symbol_attribute): New function.
1104 (elf_backend_merge_symbol_attribute): New.
1105
7c8bbca5
AM
11062017-08-26 Alan Modra <amodra@gmail.com>
1107
1108 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1109 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1110 (ppc_elf_relocate_section): Comment fix.
1111 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1112 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1113 Support dynamic relocs for TPREL16 when non-pic too.
1114 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1115 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1116 when non-pic too.
1117
5fdda9d6
L
11182017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1119
1120 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1121 "symbol" in comments.
1122 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1123
7073b5b9
L
11242017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1125
1126 PR ld/22001
1127 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1128 R_X86_64_PC32 relocation run-time overflow and unresolvable
1129 R_X86_64_32S relocation with -z nocopyreloc.
1130
34bb2571
L
11312017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1132
1133 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1134 Undefined symbols may not have a type.
1135 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1136
aab921ad
L
11372017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1138
1139 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1140 bfd_link_info. Report shared, PIE or PDE object based on
1141 bfd_link_info.
1142 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1143 (elf_x86_64_relocate_section): Likewise.
1144
b1bb697e
L
11452017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1146
1147 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1148 for function symbols.
1149 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1150
73784fa5
L
11512017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1152
1153 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1154 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1155 is set on any input relocatable file.
1156 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1157
46434633
AM
11582017-08-23 Alan Modra <amodra@gmail.com>
1159
1160 PR 21988
1161 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1162 ensure_undefweak_dynamic. Handle undefined too.
1163 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1164 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1165 (allocate_dynrelocs): Discard undefined non-default visibility
1166 relocs first. Make undefined syms dynamic. Tidy goto.
1167
487b6440
AM
11682017-08-21 Alan Modra <amodra@gmail.com>
1169 H.J. Lu <hongjiu.lu@intel.com>
1170
1171 PR ld/21964
1172 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1173 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1174
284d826d
HPN
11752017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1176
1177 PR ld/20125
1178 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1179 undefined weak symbols.
1180
de259397
NC
11812017-08-18 Nick Clifton <nickc@redhat.com>
1182
1183 PR binutils/21962
1184 * tekhex.c (getsym): Fix check for source pointer walking off the
1185 end of the input buffer.
1186
545bc2b3
SN
11872017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1188
1189 PR ld/18808
1190 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1191 relocations in debug sections, change abort to _bfd_error_handler.
1192
0c54f692
NC
11932017-08-14 Nick Clifton <nickc@redhat.com>
1194
1195 PR 21957
1196 * elf.c (setup_group): Check for an empty or very small group
1197 section.
1198 * po/bfd.pot: Regenerate.
1199
79a94a2a
AM
12002017-08-14 Alan Modra <amodra@gmail.com>
1201
1202 PR 21441
1203 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1204 alignment padding here.
1205 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1206 in a reverse pass over sections.
1207
98c5dfc9
L
12082017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1209
1210 PR binutils/21943
1211 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1212 for @plt suffixes first.
1213 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1214
24d3e51b
NC
12152017-08-08 Nick Clifton <nickc@redhat.com>
1216
1217 PR 21916
1218 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1219 small section lengths.
1220 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1221 table.
1222 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1223 there is enough data present in the note.
1224
206c9c79
AM
12252017-08-08 Alan Modra <amodra@gmail.com>
1226
1227 PR 21017
1228 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1229 got.refcount for GOTOFF relocs, just create .got section.
1230
2980ccad
L
12312017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1232
1233 * elflink.c (elf_link_add_object_symbols): Move common symbol
1234 check after bed->common_definition.
1235
b3293efa
AM
12362017-08-07 Alan Modra <amodra@gmail.com>
1237
1238 PR 21910
1239 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1240 needed to define various dynamic tags have been discarded.
1241
b7a18930
NC
12422017-08-07 Nick Clifton <nickc@redhat.com>
1243
1244 PR 21884
1245 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1246 has not been set then use the bfd returned by
1247 _bfd_elf_link_setup_gnu_properties. If that is null then search
1248 through all the input bfds selecting the first normal, ELF format
1249 one.
1250 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1251
1d4af308
L
12522017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1253
1254 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1255 to 1 bit.
1256 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1257 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1258 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1259 (elf_i386_link_check_relocs): New function.
1260 (bfd_elf32_bfd_link_check_relocs): New.
1261 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1262 to 1 bit.
1263 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1264 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1265 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1266 (elf_x86_64_link_check_relocs): New function.
1267 (bfd_elf64_bfd_link_check_relocs): New.
1268 (bfd_elf32_bfd_link_check_relocs): Likewise.
1269
a4819f54
L
12702017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1271
1272 PR ld/21903:
1273 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1274 as undefined for --no-define-common.
1275
55ef6584
AM
12762017-08-05 Alan Modra <amodra@gmail.com>
1277
1278 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1279 hppa_link_hash_table.
1280
d84ed528
MF
12812017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1282
1283 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1284 entries for sysregs with negative indices.
1285
1ef692ea
AK
12862017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1287
1288 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1289 isn't the S/390 specific elf data.
1290 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1291
57593436
KLC
12922017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1293
1294 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1295 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1296 [R_RISCV_ADD16]: Likewise.
1297 [R_RISCV_ADD32]: Likewise.
1298 [R_RISCV_ADD64]: Likewise.
1299 [R_RISCV_SUB6]: Likewise.
1300 [R_RISCV_SUB8]: Likewise.
1301 [R_RISCV_SUB16]: Likewise.
1302 [R_RISCV_SUB32]: Likewise.
1303 [R_RISCV_SUB64]: Likewise.
1304
d44c746a
AM
13052017-07-31 Alan Modra <amodra@gmail.com>
1306
1307 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1308 without ld.so checks.
1309
8b5f1ed8
AM
13102017-07-29 Alan Modra <amodra@gmail.com>
1311
1312 PR 21847
1313 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1314 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1315 (is_elfv2_localentry0): Test non_zero_localentry.
1316 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1317
894dde0b
AK
13182017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1319
1320 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1321 pointer check for htab->elf.irelplt.
1322 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1323
8bdf0be1
NC
13242017-07-27 Nick Clifton <nickc@redhat.com>
1325
1326 PR 21840
1327 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1328 size is -1.
1329 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1330 with error return.
1331 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1332 are NULL.
1333 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1334 of end pointer.
1335 (evax_bfd_print_emh): Check for invalid string lengths.
1336
c26bb067
NC
13372017-07-25 Nick Clifton <nickc@redhat.com>
1338
1339 * po/fr.po: Updated French translation.
1340
cfe7b9bd
BG
13412017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1342
1343 PR 21824
1344 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1345 16-bit absolute branches into 10-bit pc-relative branches on the
1346 MSP430 as well as the MSP430X.
1347
d4aaa2a0
AM
13482017-07-25 Alan Modra <amodra@gmail.com>
1349
1350 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1351 (stub_eh_frame_size): New function.
1352 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1353 (group_sections): Init group tls_get_addr_opt_bctrl.
1354 (ppc64_elf_size_stubs): Update sizing and initialization of
1355 .eh_frame. Iteration over stubs via group list.
1356 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1357 (ppc64_elf_finish_dynamic_sections): Update finalization of
1358 .eh_frame.
1359
ca4cf9b9
NC
13602017-07-24 Nick Clifton <nickc@redhat.com>
1361
1362 PR 21813
1363 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1364 of the relocs to the canonicalize_one_reloc routine.
1365 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1366 for the _bfd_mach_o_canonicalize_one_reloc field.
1367 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1368 res_base parameter. Use to check for corrupt pair relocs.
1369 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1370 Likewise.
1371 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1372 Likewise.
1373 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1374 Likewise.
1375
1376 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1377 enough data in the record before attempting to parse it.
1378 (_bfd_vms_slurp_eeom): Likewise.
1379
1380 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1381 (image_set_ptr): Likewise.
1382 (alpha_vms_slurp_relocs): Likewise.
1383
8a2df5e2
NC
1384 (alpha_vms_object_p): Check for a truncated record.
1385
47aeb64c
NC
13862017-07-24 Nick Clifton <nickc@redhat.com>
1387
1388 PR 21803
1389 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1390 an unrecognized reloc and sets the bfd_error value.
1391 * libbfd.h: Regenerate.
1392 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1393 function.
1394 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1395 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1396 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1397 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1398 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1399
15a3a14f
AM
14002017-07-23 Alan Modra <amodra@gmail.com>
1401
1402 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1403 restore of LR.
1404
f2e6a843
SN
14052017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1406
1407 PR ld/18841
1408 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1409 reloc_class_ifunc for ifunc symbols.
1410
909e4e71
NC
14112017-07-19 Nick Clifton <nickc@redhat.com>
1412
1413 PR 21787
1414 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1415 correct magic bytes at the start, set the error to wrong format
1416 and clear the format selector before returning NULL.
1417
29866fa1
NC
14182017-07-19 Nick Clifton <nickc@redhat.com>
1419
1420 PR 21786
1421 * coff-rs6000.c (_bfd_strntol): New function.
1422 (_bfd_strntoll): New function.
1423 (GET_VALUE_IN_FIELD): New macro.
1424 (EQ_VALUE_IN_FIELD): new macro.
1425 (_bfd_xcoff_slurp_armap): Use new macros.
1426 (_bfd_xcoff_archive_p): Likewise.
1427 (_bfd_xcoff_read_ar_hdr): Likewise.
1428 (_bfd_xcoff_openr_next_archived_file): Likewise.
1429 (_bfd_xcoff_stat_arch_elt): Likewise.
6c4e7b6b
NC
1430 * coff64-rs6000.c (_bfd_strntol): New function.
1431 (_bfd_strntoll): New function.
1432 (GET_VALUE_IN_FIELD): New macro.
1433 (xcoff64_slurp_armap): Use new macros.
29866fa1 1434
684d5a10
JEM
14352017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1436 John Eric Martin <John.Martin@emmicro-us.com>
1437
1438 * bfd-in2.h: Regenerate.
1439 * libbfd.h: Regenerate.
1440 * elf32-arc.c (JLI): Define.
1441 * reloc.c: Add JLI relocations.
1442
de194d85
YC
14432017-07-18 Nick Clifton <nickc@redhat.com>
1444
1445 PR 21775
1446 * coff-sh.c: Fix spelling typos.
1447 * compress.c: Likewise.
1448 * cpu-pdp11.c: Likewise.
1449 * ecofflink.c: Likewise.
1450 * elf-m10300.c: Likewise.
1451 * elf.c: Likewise.
1452 * elf32-arm.c: Likewise.
1453 * elf32-m68k.c: Likewise.
1454 * elf32-nds32.c: Likewise.
1455 * elf32-ppc.c: Likewise.
1456 * elf32-sh.c: Likewise.
1457 * elf32-v850.c: Likewise.
1458 * elf64-ppc.c: Likewise.
1459 * elf64-x86-64.c: Likewise.
1460 * elflink.c: Likewise.
1461 * elfnn-aarch64.c: Likewise.
1462 * elfxx-mips.c: Likewise.
1463 * som.c: Likewise.
1464 * sunos.c: Likewise.
1465 * vms-alpha.c: Likewise.
1466 * xcofflink.c: Likewise.
1467
e4e21d9e
NC
14682017-07-18 Nick Clifton <nickc@redhat.com>
1469
1470 PR binutils/21781
1471 * coffcode.h (handle_COMDAT): Replace abort with an error message
1472 and return.
1473
8e85f840
L
14742017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1475
1476 PR ld/21782
1477 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1478 to shared library.
1479
dd57c19c
L
14802017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1481
1482 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1483
676ee2b5
AM
14842017-07-16 Alan Modra <amodra@gmail.com>
1485
1486 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1487 __tls_index GOT entries when using __tls_get_addr_opt stub.
1488 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1489
429d795d
AM
14902017-07-12 Alan Modra <amodra@gmail.com>
1491
1492 * po/es.po: Update from translationproject.org/latest/bfd/.
1493 * po/fi.po: Likewise.
1494 * po/fr.po: Likewise.
1495 * po/id.po: Likewise.
1496 * po/ja.po: Likewise.
1497 * po/ro.po: Likewise.
1498 * po/ru.po: Likewise.
1499 * po/sr.po: Likewise.
1500 * po/sv.po: Likewise.
1501 * po/tr.po: Likewise.
1502 * po/uk.po: Likewise.
1503 * po/vi.po: Likewise.
1504 * po/zh_CN.po: Likewise.
1505 * po/hr.po: New file from translationproject.org.
1506 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1507 * configure: Regenerate.
1508
0bae9e9e
NC
15092017-07-12 Nick Clifton <nickc@redhat.com>
1510
1511 Fix compile time warnings using gcc 7.1.1.
1512 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1513 plt_name buffer.
1514 (elf_xtensa_get_gotplt_section): Increase length of got_name
1515 buffer.
1516 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1517 default return of FALSE.
1518 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1519 default return of FALSE.
1520
d42c267e
AM
15212017-07-12 Alan Modra <amodra@gmail.com>
1522
1523 * binary.c (binary_set_section_contents): Don't print filepos in
1524 error message.
1525 (coff_write_object_contents): Cast size_t for error message.
1526 (coff_slurp_line_table): Don't use bfd_vma symndx.
1527 (coff_slurp_reloc_table): Remove unneeded cast.
1528 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1529 error message.
1530 (find_abstract_instance_name): Likewise.
1531 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1532 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1533 (elf32_arm_check_relocs): Make r_symndx an int.
1534 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1535 format string.
1536 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1537 message arg.
1538 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1539 error message.
1540 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1541 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1542 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1543 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1544 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1545 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1546 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1547 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1548 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1549 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1550 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1551 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1552 and use %lu for error message.
1553 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1554 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1555 error message.
1556
1557 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1558 in error message.
1559 (elf32_arm_final_link_relocate): Likewise.
1560 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1561 * coffcode.h (styp_to_sec_flags): Likewise.
1562 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1563 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1564 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1565 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1566 (elf32_bfin_merge_private_bfd_data): Likewise.
1567 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1568 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1569 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1570 (i370_elf_relocate_section): Likewise.
1571 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1572 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1573 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1574 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1575 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1576 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1577 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1578 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1579 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1580 * ieee.c (ieee_write_id, read_id): Likewise.
1581 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1582 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1583 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1584 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1585 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1586 * stabs.c (_bfd_link_section_stabs): Likewise.
1587
1588 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1589 format.
1590 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1591 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1592 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1593 * coff-sh.c (sh_relax_section): Likewise.
1594 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1595 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1596 * coffcode.h (coff_slurp_reloc_table): Likewise.
1597 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1598 (_bfd_coff_read_string_table): Likewise.
1599 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1600 * compress.c (bfd_get_full_section_contents): Likewise.
1601 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1602 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1603 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1604 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1605 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1606 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1607 (elf32_arm_write_section): Likewise.
1608 * elf32-bfin.c (bfin_relocate_section): Likewise.
1609 (bfinfdpic_relocate_section): Likewise.
1610 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1611 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1612 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1613 (elf_i386_relocate_section): Likewise.
1614 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1615 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1616 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1617 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1618 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1619 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1620 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1621 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1622 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1623 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1624 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1625 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1626 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1627 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1628 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1629 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1630 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1631 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1632 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1633 * elf32-sh.c (sh_elf_relax_section): Likewise.
1634 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1635 (sh_elf_relocate_section): Likewise.
1636 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1637 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1638 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1639 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1640 * elf32-v850.c (v850_elf_relax_section): Likewise.
1641 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1642 (elf_vax_relocate_section): Likewise.
1643 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1644 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1645 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1646 (do_fix_for_relocatable_link): Likewise.
1647 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1648 (elf64_alpha_relax_with_lituse): Likewise.
1649 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1650 (elf_hppa_final_link_relocate): Likewise.
1651 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1652 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1653 (elf64_vms_link_add_object_symbols): Likewise.
1654 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1655 (mmix_final_link_relocate): Likewise.
1656 * elf64-s390.c (invalid_tls_insn): Likewise.
1657 (elf_s390_relocate_section): Likewise.
1658 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1659 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1660 (elf_x86_64_relocate_section): Likewise.
1661 * elfcode.h (elf_slurp_symbol_table): Likewise.
1662 * elfcore.h (elf_core_file_p): Likewise.
1663 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1664 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1665 (elfNN_aarch64_relocate_section): Likewise.
1666 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1667 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1668 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1669 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1670 (_bfd_mips_elf_relocate_section): Likewise.
1671 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1672 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1673 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1674 * ieee.c (ieee_slurp_external_symbols): Likewise.
1675 * ihex.c (ihex_write_object_content): Likewise.
1676 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1677 * merge.c (_bfd_merged_section_offset): Likewise.
1678 * mmo.c (mmo_write_loc_chunk): Likewise.
1679 (mmo_write_object_contents): Likewise.
1680 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1681 * stabs.c (_bfd_link_section_stabs): Likewise.
1682 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1683
e3fbc3da
AM
16842017-07-11 Alan Modra <amodra@gmail.com>
1685
1686 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1687
2c4d9cbe
AM
16882017-07-11 Alan Modra <amodra@gmail.com>
1689
1690 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1691 instruction" error using _bfd_error_handler, not einfo.
1692
adce5b39
NC
16932017-07-10 Nick Clifton <nickc@redhat.com>
1694
1695 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1696 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1697
e6f3b9c3
JB
16982017-07-07 John Baldwin <jhb@FreeBSD.org>
1699
1700 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1701
532cc313
AM
17022017-07-07 Alan Modra <amodra@gmail.com>
1703
1704 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1705
1cf9552b
AM
17062017-07-07 Alan Modra <amodra@gmail.com>
1707
1708 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1709 as long long. Move code replacing "ll" with "I64", and simplify.
1710
a0b7b105
L
17112017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1712
1713 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1714 to 1.
1715
1d827a72
L
17162017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1717
1718 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1719 xtime.
1720 (line_info_add_file_name): Likewise.
1721 (decode_line_info): Likewise.
1722
0d702cfe
TG
17232017-07-04 Tristan Gingold <gingold@adacore.com>
1724
1725 * version.m4: Bump version to 2.29.51
1726 * configure: Regenerate.
1727
564e46b7
JW
17282017-07-04 Jiong Wang <jiong.wang@arm.com>
1729
1730 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1731 sanity check at the head of this function.
1732
0041f7df
JK
17332017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1734
1735 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1736 dwarf_line_str_size.
1737 (struct attr_abbrev): Add field implicit_const.
1738 (dwarf_debug_sections): Add .debug_line_str.
1739 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1740 (dwarf_debug_section_assert): Add static assertion.
1741 (read_indirect_line_string): New.
1742 (read_abbrevs): Support DW_FORM_implicit_const.
1743 (is_str_attr): Support DW_FORM_line_strp.
1744 (read_attribute_value): Support DW_FORM_line_strp and
1745 DW_FORM_implicit_const.
1746 (read_attribute): Support DW_FORM_implicit_const.
1747 (line_info_add_include_dir, line_info_add_include_dir_stub):
1748 (line_info_add_file_name, read_formatted_entries): New.
1749 (decode_line_info, parse_comp_unit): Support DWARF 5.
1750 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1751
d8cd8c1f
EB
17522017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1753
1754 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1755 abort statement that was put for symbols that are not dynamic.
1756
15e6ed8c
TG
17572017-07-03 Tristan Gingold <gingold@adacore.com>
1758
1759 * po/bfd.pot: Regenerate
1760
76cfced5
AM
17612017-07-03 Alan Modra <amodra@gmail.com>
1762
1763 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1764 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1765 * elf.c (setup_group): Use "Lx" to print sh_size.
1766 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1767 unknown section type in hex.
1768 (copy_special_section_fields): Style fix.
1769 (bfd_section_from_shdr): Correct format for sh_link. Use a
1770 common error message for all the variants of unrecognized
1771 section types.
1772 (assign_file_positions_for_load_sections): Use "Lx" for lma
1773 adjust error message.
1774 (assign_file_positions_for_non_load_sections): Formatting.
1775 (rewrite_elf_program_header): Formatting. Use "Lx" for
1776 bfd_vma values in error messages.
1777 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1778 ELF_R_SYM value to type expected by format.
1779 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1780 in error messages.
1781 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1782 (elf_link_input_bfd): Use "Lx" for r_info.
1783 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1784
ce9116fd
AM
17852017-07-03 Alan Modra <amodra@gmail.com>
1786
1787 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1788 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1789 Microsoft C library variant of long long format specifier.
1790 (PRINT20): Cast value to bfd_uint64_t not long long.
1791 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1792 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1793 long long. Don't cast to bfd_vma.
1794 * elf32-score.c (score3_bfd_getl48): Likewise.
1795 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1796
cd9af601
AM
17972017-07-03 Alan Modra <amodra@gmail.com>
1798
1799 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1800 print d_tag.
1801 (bfd_elf_print_symbol): Don't cast symbol->flags.
1802 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1803 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1804 _bfd_error_handler argument order.
1805 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1806
33c734b2
AM
18072017-07-03 Alan Modra <amodra@gmail.com>
1808
1809 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1810 AC_TYPE_LONG_DOUBLE.
1811 * configure: Regenerate.
1812 * config.in: Regenerate.
1813
3df5cd13
AW
18142017-06-29 Andrew Waterman <andrew@sifive.com>
1815
1816 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1817 relocs.
1818
ec1acaba
EB
18192017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1820
1821 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1822 unless it is undefined weak.
1823 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1824 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1825 relocation.
1826 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1827 is not dynamic in PIC, abort.
1828
ff07562f
JW
18292017-06-29 Jiong Wang <jiong.wang@arm.com>
1830
1831 PR ld/21402
1832 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1833 undefined weak symbols into dynamic.
1834 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1835 relocation for non-dynamic symbols.
1836 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1837
2aff25ba
JW
18382017-06-29 Jiong Wang <jiong.wang@arm.com>
1839
1840 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1841 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1842 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1843 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1844 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1845 support for them.
1846
88ab90e8
AA
18472017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1848
1849 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1850 (elfcore_write_s390_gs_bc): Likewise.
1851 * elf.c (elfcore_grok_s390_gs_cb): New function.
1852 (elfcore_grok_s390_gs_bc): New function.
1853 (elfcore_grok_note): Call them.
1854 (elfcore_write_s390_gs_cb): New function.
1855 (elfcore_write_s390_gs_bc): New function.
1856 (elfcore_write_register_note): Call them.
1857
328ce951
L
18582017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1859
1860 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1861 bfd_get_file_size. Check archive element size.
1862 (_bfd_generic_get_section_contents_in_window): Likewise.
1863
47fdcf63
L
18642017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1865
1866 * bfd-in2.h: Regenerated.
1867 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1868 (bfd_get_file_size): Likewise.
1869
38bf472a
MR
18702017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1871 Matthew Fortune <matthew.fortune@imgtec.com>
1872
1873 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1874 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1875 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1876 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1877 case.
1878 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1879 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1880 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1881 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1882 `bfd_mach_mips_interaptiv_mr2' entries.
1883 * bfd-in2.h: Regenerate.
1884
2d68166e
NC
18852017-06-27 Nick Clifton <nickc@redhat.com>
1886
1887 * tekhex.c (pass_over): Revert accidental conversion of a local
1888 array to a static array.
1889
68063779
SKS
18902017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1891
1892 PR ld/13402
1893 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1894 reloc addend if necessary. Adjust diff only if
1895 shrinked_insn_address < end_address.
1896
ea9aafc4
AM
18972017-06-27 Alan Modra <amodra@gmail.com>
1898
1899 PR binutils/21665
1900 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1901 (_bfd_generic_get_section_contents_in_window): Likewise.
1902
a6cbf936
KLC
19032017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1904
1905 * elfnn-riscv.c (perform_relocation): Support the new
1906 R_RISCV_32_PCREL relocation.
1907 (riscv_elf_relocate_section): Likewise.
1908 * elfxx-riscv.c (howto_table): Likewise.
1909 (riscv_reloc_map): Likewise.
1910 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1911 * libbfd.h: Regenerate.
1912
7211ae50
AM
19132017-06-27 Alan Modra <amodra@gmail.com>
1914
1915 PR binutils/21665
1916 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1917 Use unsigned file pointer type, and remove cast.
1918 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1919 Add "count", not "sz".
1920
ab27f80c
PA
19212017-06-26 Pedro Alves <palves@redhat.com>
1922
1923 PR binutils/21665
1924 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1925 "sz".
1926
1f473e3d
L
19272017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1928
1929 PR binutils/21665
1930 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1931 a missing line.
1932
b417536f
MR
19332017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1934
1935 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1936 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1937 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1938 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1939 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1940
0630b49c
L
19412017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1942
1943 PR binutils/21665
1944 * compress.c (bfd_get_full_section_contents): Don't check the
1945 file size here.
1946 * libbfd.c (_bfd_generic_get_section_contents): Check for and
ea9aafc4 1947 reject a section whose size + offset is greater than the size
0630b49c
L
1948 of the entire file.
1949 (_bfd_generic_get_section_contents_in_window): Likewise.
515a4464 1950
04e15b4a
NC
19512017-06-26 Nick Clifton <nickc@redhat.com>
1952
1953 PR binutils/21670
1954 * tekhex.c (getvalue): Check for the source pointer exceeding the
1955 end pointer before the first byte is read.
1956
cfd14a50
NC
19572017-06-26 Nick Clifton <nickc@redhat.com>
1958
1959 PR binutils/21665
ea9aafc4 1960 * opncls.c (get_build_id): Check that the section is big enough
cfd14a50
NC
1961 to contain the whole note.
1962 * compress.c (bfd_get_full_section_contents): Check for and reject
ea9aafc4 1963 a section whose size is greater than the size of the entire file.
cfd14a50
NC
1964 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1965 contain a notes section.
1966
93ec5e23
AK
19672017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1968
1969 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1970 pointer checks.
1971 (elf_s390_modify_segment_map): Likewise.
1972 (bfd_elf_s390_set_options): Lisewise.
1973
57963c05
AM
19742017-06-26 Alan Modra <amodra@gmail.com>
1975
1976 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1977 a --just-syms bfd.
1978 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1979 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1980 .preinit_array on --just-syms bfds.
1981 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1982 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1983 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1984
5cc4ca83
ST
19852017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1986
1987 * elf.c (find_link): Bounds check "hint".
1988
bff0500d
TP
19892017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1990
1991 * elf32-arm.c (using_thumb_only): Update list of architectures in
1992 BFD_ASSERT for which the logic is valid.
1993 (using_thumb2_bl): Likewise.
1994 (using_thumb2): Likewise and return true for ARMv8-R.
1995 (arch_has_arm_nop): Likewise.
1996 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1997 merging logic. Update commentis for value 15 of v8m_baseline,
1998 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1999 merging of value 15 of Tag_CPU_arch.
2000
4aa57d6a
JW
20012017-06-23 Jiong Wang <jiong.wang@arm.com>
2002
2003 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2004 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2005 * bfd-in2.h: Regenerate.
2006
5d8763a3
L
20072017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2008
2009 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2010 the error_alignment label forward. Properly align program
2011 property note section.
2012
e652757b
EC
20132017-06-22 Eric Christopher <echristo@gmail.com>
2014
2015 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2016 abs to fix a truncation warning.
2017
84da4cf8
L
20182017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2019
2020 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2021 local undefined weak symbol to 0.
2022 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2023
48580982
L
20242017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2025
2026 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2027 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2028 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2029 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2030 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2031 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2032 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2033 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2034
ee2fdd6f
L
20352017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2036
2037 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2038 (elf_i386_lazy_ibt_plt_entry): Likewise.
2039 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2040 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2041 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2042 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2043 (elf_i386_lazy_plt_layout): Likewise.
2044 (elf_i386_non_lazy_plt_layout): Likewise.
2045 (elf_i386_link_hash_entry): Add plt_second.
2046 (elf_i386_link_hash_table): Add plt_second and
2047 plt_second_eh_frame.
2048 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2049 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2050 the second PLT. Check the second PLT.
2051 (elf_i386_relocate_section): Use the second PLT to resolve
2052 PLT reference if needed.
2053 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2054 needed.
2055 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2056 second PLT. Generate unwind info for the second PLT.
2057 (elf_i386_plt_type): Add plt_second.
2058 (elf_i386_get_synthetic_symtab): Support the second PLT.
2059 (elf_i386_parse_gnu_properties): Support
2060 GNU_PROPERTY_X86_FEATURE_1_AND.
2061 (elf_i386_merge_gnu_properties): Support
2062 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2063 on GNU_PROPERTY_X86_FEATURE_1_IBT
2064 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2065 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2066 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2067 is set on all relocatable inputs.
2068 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2069 (elf_x32_lazy_ibt_plt_entry): Likewise.
2070 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2071 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2072 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2073 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2074 (elf_x86_64_lazy_ibt_plt): Likewise.
2075 (elf_x32_lazy_ibt_plt): Likewise.
2076 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2077 (elf_x32_non_lazy_ibt_plt): Likewise.
2078 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2079 (elf_x86_64_parse_gnu_properties): Support
2080 GNU_PROPERTY_X86_FEATURE_1_AND.
2081 (elf_x86_64_merge_gnu_properties): Support
2082 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2083 on GNU_PROPERTY_X86_FEATURE_1_IBT
2084 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2085 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2086 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2087 is set on all relocatable inputs.
2088
d19237d9
NC
20892017-06-22 Nick Clifton <nickc@redhat.com>
2090
2091 PR binutils/21649
2092 * som.c (setup_sections): NUL terminate the space_strings buffer.
2093 Check that the space.name field does not index beyond the end of
2094 the space_strings buffer.
2095
6879f5a9
NC
20962017-06-21 Nick Clifton <nickc@redhat.com>
2097
2098 PR binutils/21646
2099 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2100
7adc0a81
NC
21012017-06-21 Nick Clifton <nickc@redhat.com>
2102
2103 PR binutils/21639
2104 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2105 type of the size parameter.
2106 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2107 length of the counted string.
2108 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2109 (_bfd_vms_save_counted_string): Likewise.
2110 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2111 _bfd_vms_save_counted_string.
2112 (_bfd_vms_slurp_ehdr): Likewise.
2113 (_bfd_vms_slurp_egsd): Likewise.
2114 (Parse_module): Likewise.
2115
6e1816be
AM
21162017-06-21 Alan Modra <amodra@gmail.com>
2117
2118 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2119 calls before tocsave calls.
2120 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2121 following nop.
2122
20bd1b6b
NC
21232017-06-21 Nick Clifton <nickc@redhat.com>
2124
2125 PR binutils/21645
2126 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2127 bfd_get_full_section_contents returns no contents.
2128
3de58d95
NC
21292017-06-21 Nick Clifton <nickc@redhat.com>
2130
2131 PR binutils/21638
2132 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2133 record.
2134
cb06d03a
NC
21352017-06-21 Nick Clifton <nickc@redhat.com>
2136
2137 PR binutils/21637
2138 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2139 list.
2140 (image_set_ptr): Likewise.
2141 (alpha_vms_fix_sec_rel): Likewise.
2142 (alpha_vms_slurp_relocs): Likewise.
2143
c458d007
NC
21442017-06-21 Nick Clifton <nickc@redhat.com>
2145
2146 PR binutils/21633
2147 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2148 read_id.
2149 (ieee_archive_p): Likewise.
2150 (ieee_object_p): Likewise.
2151
ce497010
NC
21522017-06-21 Nick Clifton <nickc@redhat.com>
2153
2154 PR binutils/21640
2155 * elf.c (setup_group): Zero the group section pointer list after
2156 allocation so that loops can be caught. Check for NULL pointers
2157 when processing a group list.
2158
fd52715c
AK
21592017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2160
2161 * elf-s390.h: New file.
2162 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2163 field.
2164 (elf_s390_additional_program_headers): New function.
2165 (elf_s390_modify_segment_map): New function.
2166 (bfd_elf_s390_set_options): New function.
2167 (elf_backend_additional_program_headers)
2168 (elf_backend_modify_segment_map): Add macro definitions.
2169
abfa390d
L
21702017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2171
2172 PR ld/21626
2173 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2174 the DYNAMIC bit instead of bfd_count_sections.
2175
bc21b167
NC
21762017-06-19 Nick Clifton <nickc@redhat.com>
2177
2178 PR binutils/21618
2179 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2180 length.
2181 (evax_bfd_print_eeom): Likewise.
2182 (evax_bfd_print_egsd): Check for an overlarge record length.
2183 (evax_bfd_print_etir): Likewise.
2184
acb56a83
NC
21852017-06-19 Nick Clifton <nickc@redhat.com>
2186
2187 PR binutils/21612
2188 * libieee.h (struct common_header_type): Add end_p field.
2189 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2190 end_p.
2191 (read_id): Check for a length that exceeds the remaining bytes in
2192 the input buffer.
2193 (ieee_seek): Initialise end_p.
2194 (ieee_archive_p): Likewise.
2195 (ieee_object_p): Likewise.
2196
72e84f96
NC
21972017-06-19 Nick Clifton <nickc@redhat.com>
2198
80053e46
NC
2199 PR binutils/21611
2200 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2201 before reading the EIHS structure entries.
2202
22032017-06-19 Nick Clifton <nickc@redhat.com>
2204
2205 PR binutils/21615
72e84f96
NC
2206 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2207 gsd_size. Check that there are enough bytes remaining to read the
2208 type and size of the next egsd. Check that the size of the egsd
2209 does not exceed the size of the record.
2210
875ffa3e
AM
22112017-06-19 Alan Modra <amodra@gmail.com>
2212
2213 * config.bfd: Correct targ_underscore for cris.
2214
bdd32e03
AM
22152017-06-18 Alan Modra <amodra@gmail.com>
2216
2217 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2218 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2219
4b48e2f6
NC
22202017-06-16 Nick Clifton <nickc@redhat.com>
2221
2222 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2223 bucketlist is empty because there are no symbols to add to the
2224 list.
2225
7dba9362
AM
22262017-06-16 Alan Modra <amodra@gmail.com>
2227
2228 PR ld/20022
2229 PR ld/21557
2230 PR ld/21562
2231 PR ld/21571
2232 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2233 (BFD_JUMP_TABLE_LINK): Likewise.
2234 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2235 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2236 (bfd_elf_define_start_stop): New function.
2237 * linker.c (bfd_generic_define_start_stop): New function.
2238 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2239 new field.
2240 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2241 * aout-target.h (MY_bfd_define_start_stop): Define.
2242 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2243 * binary.c (binary_bfd_define_start_stop): Define.
2244 * bout.c (b_out_bfd_define_start_stop): Define.
2245 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2246 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2247 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2248 * coffcode.h (coff_bfd_define_start_stop): Define.
2249 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2250 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2251 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2252 * ieee.c (ieee_bfd_define_start_stop): Define.
2253 * ihex.c (ihex_bfd_define_start_stop): Define.
2254 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2255 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2256 * mmo.c (mmo_bfd_define_start_stop): Define.
2257 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2258 * oasys.c (oasys_bfd_define_start_stop): Define.
2259 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2260 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2261 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2262 * som.c (som_bfd_define_start_stop): Define.
2263 * srec.c (srec_bfd_define_start_stop): Define.
2264 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2265 * versados.c (versados_bfd_define_start_stop): Define.
2266 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2267 (alpha_vms_bfd_define_start_stop): Define.
2268 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2269 * bfd-in2.h: Regenerate.
2270 * libbfd.h: Regenerate.
2271
d68f1976
JW
22722017-06-16 Jiong Wang <jiong.wang@arm.com>
2273
2274 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2275 SYMBOL_REFERENCES_LOCAL.
2276
6353d82b
JW
22772017-06-15 Jiong Wang <jiong.wang@arm.com>
2278
2279 PR ld/21532
2280 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2281 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2282 runtime for if there needs copy relocation elimination.
2283 (need_copy_relocation_p): New function. Return true for symbol with
2284 pc-relative references and if it's against read-only sections.
2285 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2286 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2287 that are related with accessing external objects.
2288 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2289 in elfNN_aarch64_check_relocs.
2290
63634bb4
NC
22912017-06-15 Nick Clifton <nickc@redhat.com>
2292
2293 PR binutils/21582
2294 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2295 bugs.
62b76e4b
NC
2296 PR binutils/21581
2297 (ieee_archive_p): Likewise.
63634bb4 2298
76800cba
NC
22992017-06-15 Nick Clifton <nickc@redhat.com>
2300
2301 PR binutils/21579
2302 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2303
f7e16c2a
MF
23042017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2305
2306 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2307 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2308 keep both windowed and call0 ABI PLT definitions.
2309 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2310 elf_xtensa_*_plt_entry endex.
2311 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2312
f461bbd8
NC
23132017-06-14 Nick Clifton <nickc@redhat.com>
2314
2315 PR binutils/21578
2316 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2317 flag value.
2318
c53d2e6d
NC
23192017-06-14 Nick Clifton <nickc@redhat.com>
2320
2321 PR binutils/21589
2322 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2323 maximum value for the ascic pointer. Check that name processing
2324 does not read beyond this value.
2325 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2326 end of etir record.
2327
04f963fd
NC
23282017-06-14 Nick Clifton <nickc@redhat.com>
2329
2330 PR binutils/21591
2331 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2332 (process_otr): Check for an invalid offset in the otr structure.
2333
319c2dbe
SH
23342017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2335
2336 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2337
cbd0eecf
L
23382017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2339
2340 PR ld/20022
2341 PR ld/21557
2342 PR ld/21562
2343 PR ld/21571
2344 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2345 vtable field to a union.
2346 (_bfd_elf_is_start_stop): Removed.
2347 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2348 __start_SECNAME and __stop_SECNAME symbols.
2349 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2350 * elflink.c (_bfd_elf_is_start_stop): Removed.
2351 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2352 _bfd_elf_is_start_stop.
2353 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2354 __stop_SECNAME symbols. Updated.
2355 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2356 (bfd_elf_gc_record_vtinherit): Likewise.
2357 (bfd_elf_gc_record_vtentry): Likewise.
2358
10bbbc1d
NC
23592017-06-13 Nick Clifton <nickc@redhat.com>
2360
2361 PR ld/21524
2362 * elflink.c (elf_link_adjust_relocs): Generate an error when
2363 encountering a reloc against a symbol removed by garbage
2364 collection.
2365
5c3ce2bc
L
23662017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2367
2368 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2369 to merge_gnu_properties.
2370 * elf-properties.c (elf_merge_gnu_properties): Add struct
2371 bfd_link_info * and pass it to merge_gnu_properties.
2372 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2373 and pass it to elf_merge_gnu_properties.
2374 (_bfd_elf_link_setup_gnu_properties): Pass info to
2375 elf_merge_gnu_property_list.
2376 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2377 bfd_link_info *.
2378 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2379
9b97dfbf
AM
23802017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2381
2382 PR 21564
2383 * binary.c (binary_set_section_contents): Scale lma by octets
2384 per byte to set filepos.
2385
e3d1d408
CM
23862017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2387
2388 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2389 dynamic sections.
2390
64aa8e03
CM
23912017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2392
2393 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2394 require TEXTREL.
2395
a0abe743
CM
23962017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2397
2398 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2399 patched section contents for TLS IE reloc.
2400 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2401
f4e6805f
CM
24022017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2403
2404 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2405 RELOC_FOR_GLOBAL_SYMBOL macro.
2406
cd640291
CM
24072018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2408
2409 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2410 changes.
2411
7ef0acc1
VG
24122017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2413
2414 * config/tc-arc.c (md_undefined_symbol): Changed.
2415 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2416
cc89d0b3
CM
24172017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2418
2419 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2420 symbols.
2421
9d5c718b
CM
24222017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2423
2424 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2425 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2426
be9e3704
CM
24272017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2428
2429 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2430 object is created.
2431
4ec192e6
RE
24322017-06-08 Richard Earnshaw <rearnsha@arm.com>
2433
2434 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2435 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2436 is non-zero. Add clarifying comments.
2437
51fa2693
L
24382017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2439
2440 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2441 name. Use local IFUNC symbol name string to report unsupported
2442 non-PIC call to IFUNC function.
2443 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2444 when generating R_386_IRELATIVE relocation.
2445 (elf_i386_finish_dynamic_symbol): Likewise.
2446 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2447 IFUNC symbol name.
2448 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2449 when generating R_X86_64_IRELATIVE relocation.
2450 (elf_x86_64_finish_dynamic_symbol): Likewise.
2451
78e8a2ff
JM
24522017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2453
2454 * elf.c (setup_group): Make sure BFD sections are created for all
2455 group sections in the input file when processing SHF_GROUP
2456 sections.
2457 (bfd_section_from_shdr): Avoid duplicating logic already
2458 implemented in `setup_group'.
2459
9949827b
DBR
24602017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2461
2462 PR binutils/21546
2463 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2464 if the hint address is zero.
2465
0ee3a6db
JC
24662017-06-06 James Clarke <jrtc27@jrtc27.com>
2467
2468 PR ld/19579
2469 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2470 ELF_COMMON_DEF_P for common symbols.
2471
7bdf4127
AB
24722017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2473
2474 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2475 SEC_GROUP sections as SEC_EXCLUDE.
2476 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2477 (assign_section_numbers): Use resolve_section_groups flag instead
2478 of relocatable link type.
2479 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2480 flag instead of checking the final_link flag for part of the
2481 checks in here. Fix white space as a result.
2482 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2483 instead of relocatable link type.
2484 (bfd_elf_final_link): Likewise.
2485
458ad2b8
JM
24862017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2487
2488 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2489 variable `bed'.
2490 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2491 (s3_bfd_score_elf_check_relocs): Likewise.
2492 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2493 (score_elf_final_link_relocate): Likewise.
2494 (s7_bfd_score_elf_check_relocs): Likewise.
2495
fbebaf4a
JM
24962017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2497
2498 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2499 `bed'.
2500
056bafd4
MR
25012017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2502
2503 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2504 from `reloc_count' rather than decrementing it.
2505 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2506 `reloc_count' by `int_rels_per_ext_rel'.
2507 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2508 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2509 entry determination.
2510 (s3_bfd_score_elf_check_relocs): Likewise.
2511 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2512 (s7_bfd_score_elf_relocate_section): Likewise.
2513 (s7_bfd_score_elf_check_relocs): Likewise.
2514 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2515 prototype and function.
2516 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2517 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2518 triple rather than once the sum of REL and RELA relocation entry
2519 counts.
2520 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2521 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2522 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2523 storage allocation size determination.
2524 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2525 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2526 by `int_rels_per_ext_rel' for last relocation entry
2527 determination.
2528 (bfd_elf_final_link): Do not multiply `reloc_count' by
2529 `int_rels_per_ext_rel' for internal relocation storage
2530 allocation size determination.
2531 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2532 `int_rels_per_ext_rel' for last relocation entry determination.
2533 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2534 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2535 (_bfd_mips_elf_relocate_section): Likewise.
2536
af54f0eb
AM
25372017-06-05 Alan Modra <amodra@gmail.com>
2538
2539 PR 21529
2540 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2541
6cf3bf88 25422017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
2543
2544 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2545 determine structure sizes.
2546 (elfcore_grok_freebsd_prstatus): Likewise.
2547
f378ab09
AM
25482017-06-01 Alan Modra <amodra@gmail.com>
2549
2550 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2551 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2552 dynamic objects.
2553 (is_elfv2_localentry0): New function.
2554 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2555 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2556 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2557 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2558 optimized localentry:0 stubs.
2559 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2560 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2561 localentry:0 stubs.
2562 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2563 DT_PPC64_OPT.
2564 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2565
8c65b54f
CS
25662017-05-30 Casey Smith <clegg89@gmail.com>
2567
2568 PR ld/21523
2569 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2570 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2571
64984c22
AK
25722017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2573
2574 * cpu-arc.c (arc_compatible): New function.
2575
37cd3877
AK
25762017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2577
2578 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2579
8e2f54bc
L
25802017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2581
2582 PR binutils/21519
2583 * bfdio.c (bfd_get_file_size): New function.
2584 * bfd-in2.h: Regenerated.
2585
8e7f04f1 25862017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2587
2588 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2589 comments.
2590
25f94347
L
25912017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2592
2593 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2594 dynobj instead of htab->elf.dynobj.
2595
e5713223
MR
25962017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2597
2598 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2599 and function.
2600 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2601 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2602 actual number of internal relocations retrieved. Adjust
2603 function description.
2604 (bfd_elf64_canonicalize_reloc): Remove macro.
2605 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2606
64517994
JM
26072017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2608
2609 * archures.c (bfd_mach_sparc_v9m8): Define.
2610 (bfd_mach_sparc_v8plusm8): Likewise.
2611 (bfd_mach_sparc_v9_p): Adjust to M8.
2612 (bfd_mach_sparc_64bit_p): Likewise.
2613 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2614 bfd_mach_sparc_v8plusm8.
2615 * bfd-in2.h: Regenerated.
2616 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2617 sparc:v8plusm8.
2618 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2619 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2620 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2621 SHA3.
2622 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2623 bfd_mach_sparc_v8plusm8.
2624
eb026f09
AM
26252017-05-19 Alan Modra <amodra@gmail.com>
2626
2627 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2628 debug and special sections when no non-note alloc sections in an
2629 object are kept.
2630
535b785f
AM
26312017-05-18 Alan Modra <amodra@gmail.com>
2632
2633 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2634 * elf-m10300.c: Likewise.
2635 * elf.c: Likewise.
2636 * elf32-arc.c: Likewise.
2637 * elf32-bfin.c: Likewise.
2638 * elf32-m68k.c: Likewise.
2639 * elf32-nds32.c: Likewise.
2640 * elf32-tilepro.c: Likewise.
2641 * elflink.c: Likewise.
2642 * elfnn-aarch64.c: Likewise.
2643 * elfnn-riscv.c: Likewise.
2644 * elfxx-tilegx.c: Likewise.
2645 * mach-o.c: Likewise.
2646 * peXXigen.c: Likewise.
2647 * vms-alpha.c: Likewise.
2648 * vms-lib.c: Likewise.
2649
b7c871ed
L
26502017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2651
2652 PR ld/20882
2653 * elflink.c (elf_gc_mark_debug_section): New function.
2654 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2655 referenced by kept debug sections.
2656
bc4e12de
AM
26572017-05-16 Alan Modra <amodra@gmail.com>
2658
2659 * elf-m10300.c: Rename occurrences of non_ir_ref.
2660 * elf32-arm.c: Likewise.
2661 * elf32-bfin.c: Likewise.
2662 * elf32-cr16.c: Likewise.
2663 * elf32-cris.c: Likewise.
2664 * elf32-d10v.c: Likewise.
2665 * elf32-dlx.c: Likewise.
2666 * elf32-fr30.c: Likewise.
2667 * elf32-frv.c: Likewise.
2668 * elf32-hppa.c: Likewise.
2669 * elf32-i370.c: Likewise.
2670 * elf32-i386.c: Likewise.
2671 * elf32-iq2000.c: Likewise.
2672 * elf32-lm32.c: Likewise.
2673 * elf32-m32c.c: Likewise.
2674 * elf32-m32r.c: Likewise.
2675 * elf32-m68hc1x.c: Likewise.
2676 * elf32-m68k.c: Likewise.
2677 * elf32-mcore.c: Likewise.
2678 * elf32-metag.c: Likewise.
2679 * elf32-microblaze.c: Likewise.
2680 * elf32-moxie.c: Likewise.
2681 * elf32-msp430.c: Likewise.
2682 * elf32-mt.c: Likewise.
2683 * elf32-nios2.c: Likewise.
2684 * elf32-or1k.c: Likewise.
2685 * elf32-ppc.c: Likewise.
2686 * elf32-rl78.c: Likewise.
2687 * elf32-s390.c: Likewise.
2688 * elf32-score.c: Likewise.
2689 * elf32-score7.c: Likewise.
2690 * elf32-sh.c: Likewise.
2691 * elf32-tic6x.c: Likewise.
2692 * elf32-tilepro.c: Likewise.
2693 * elf32-v850.c: Likewise.
2694 * elf32-vax.c: Likewise.
2695 * elf32-xstormy16.c: Likewise.
2696 * elf32-xtensa.c: Likewise.
2697 * elf64-alpha.c: Likewise.
2698 * elf64-hppa.c: Likewise.
2699 * elf64-ia64-vms.c: Likewise.
2700 * elf64-mmix.c: Likewise.
2701 * elf64-ppc.c: Likewise.
2702 * elf64-s390.c: Likewise.
2703 * elf64-sh64.c: Likewise.
2704 * elf64-x86-64.c: Likewise.
2705 * elflink.c: Likewise.
2706 * elfnn-aarch64.c: Likewise.
2707 * elfnn-ia64.c: Likewise.
2708 * elfnn-riscv.c: Likewise.
2709 * elfxx-mips.c: Likewise.
2710 * elfxx-sparc.c: Likewise.
2711 * elfxx-tilegx.c: Likewise.
2712 * linker.c: Likewise.
2713
4070765b
AM
27142017-05-16 Alan Modra <amodra@gmail.com>
2715
2716 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2717 * elflink.c (elf_link_add_object_symbols): Update to use
2718 non_ir_ref_dynamic.
2719 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2720 non_ir_ref.
2721 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2722
25499ac7
MR
27232017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2724
2725 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2726
73caa85d
L
27272017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2728
2729 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2730 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2731 properties.
2732 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2733
f2c29a16
L
27342017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2735
2736 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2737 to plt_second.
2738 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2739 to plt_second/plt_second_eh_frame.
2740 (elf_x86_64_link_hash_newfunc): Updated.
2741 (elf_x86_64_allocate_dynrelocs): Likewise.
2742 (elf_x86_64_size_dynamic_sections): Likewise.
2743 (elf_x86_64_relocate_section): Likewise.
2744 (elf_x86_64_finish_dynamic_symbol): Likewise.
2745 (elf_x86_64_finish_dynamic_sections): Likewise.
2746 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2747 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2748 .plt.sec section.
2749 (elf_backend_setup_gnu_properties): Updated. Create the
2750 .plt.sec section instead of the .plt.sec section.
2751
dc2be3d2
L
27522017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2753
2754 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2755 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2756 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2757
db84b98a
JM
27582017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2759
2760 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2761 (bfd_elf64_set_reloc): Define.
2762 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2763
23186865
JM
27642017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2765
2766 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2767 (struct bfd_target): New field _bfd_set_reloc.
2768 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2769 * reloc.c (_bfd_generic_set_reloc): New function.
2770 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2771 * nlm-target.h (nlm_set_reloc): Likewise.
2772 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2773 * aout-tic30.c (MY_set_reloc): Likewise.
2774 * aout-target.h (MY_set_reloc): Likewise.
2775 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2776 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2777 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2778 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2779 * aout-adobe.c (aout_32_set_reloc): Likewise.
2780 * bout.c (b_out_set_reloc): Likewise.
2781 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2782 * i386os9k.c (aout_32_set_reloc): Likewise.
2783 * ieee.c (ieee_set_reloc): Likewise.
2784 * oasys.c (oasys_set_reloc): Likewise.
2785 * som.c (som_set_reloc): Likewise.
2786 * versados.c (versados_set_reloc): Likewise.
2787 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2788 _bfd_generic_set_reloc.
2789 (rs6000_xcoff64_aix_vec): LIkewise.
2790 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2791 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2792 * i386msdos.c (msdos_set_reloc): Define to
2793 _bfd_norelocs_set_reloc.
2794 * elfcode.h (elf_set_reloc): Define.
2795 * bfd-in2.h: Regenerated.
2796
aab82f4c
L
27972017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2798
2799 PR ld/21481
2800 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2801 for IFUNC function address.
2802
53a346d8
CZ
28032017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2804
2805 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2806 (CONFLICT_LIST): Likewise.
2807 (opcode/arc-attrs.h): Include.
2808 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2809 (arc_extract_features): New file.
2810 (arc_stralloc): Likewise.
2811 (arc_elf_merge_attributes): Likewise.
2812 (arc_elf_merge_private_bfd_data): Use object attributes.
2813 (bfd_arc_get_mach_from_attributes): New function.
2814 (arc_elf_object_p): Use object attributes.
2815 (arc_elf_final_write_processing): Likewise.
2816 (elf32_arc_obj_attrs_arg_type): New function.
2817 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2818 (elf32_arc_section_from_shdr): Likewise.
2819 (elf_backend_obj_attrs_vendor): Define.
2820 (elf_backend_obj_attrs_section): Likewise.
2821 (elf_backend_obj_attrs_arg_type): Likewise.
2822 (elf_backend_obj_attrs_section_type): Likewise.
2823 (elf_backend_obj_attrs_handle_unknown): Likewise.
2824 (elf_backend_section_from_shdr): Likewise.
2825
e645cf40
AG
28262017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2827
2828 PR ld/21458
2829 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2830 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2831 and the destination is a Thumb symbol.
2832
dd9e66ee
L
28332017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2834
2835 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2836 initializer to silence GCC 4.2.
2837 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2838
38b12349
L
28392017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2840
2841 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2842 (LAZY_PLT_ENTRY_SIZE): This.
2843 (NON_LAZY_PLT_ENTRY_SIZE): New.
2844 (elf_x86_64_plt0_entry): Renamed to ...
2845 (elf_x86_64_lazy_plt0_entry): This.
2846 (elf_x86_64_plt_entry): Renamed to ...
2847 (elf_x86_64_lazy_plt_entry): This.
2848 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2849 (elf_x86_64_lazy_bnd_plt0_entry): This.
2850 (elf_x86_64_legacy_plt_entry): Removed.
2851 (elf_x86_64_bnd_plt_entry): Renamed to ...
2852 (elf_x86_64_lazy_bnd_plt_entry): This.
2853 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2854 (elf_x86_64_non_lazy_plt_entry): This.
2855 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2856 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2857 (elf_x86_64_eh_frame_plt): Renamed to ...
2858 (elf_x86_64_eh_frame_lazy_plt): This.
2859 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2860 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2861 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2862 (elf_x86_64_eh_frame_non_lazy_plt): This.
2863 (elf_x86_64_lazy_plt_layout): New.
2864 (elf_x86_64_non_lazy_plt_layout): Likewise.
2865 (elf_x86_64_plt_layout): Likewise.
2866 (elf_x86_64_backend_data): Remove PLT layout information. Add
2867 os for target system.
2868 (GET_PLT_ENTRY_SIZE): Removed.
2869 (elf_x86_64_lazy_plt): New.
2870 (elf_x86_64_non_lazy_plt): Likewise.
2871 (elf_x86_64_lazy_bnd_plt): Likewise.
2872 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2873 (elf_x86-64_arch_bed): Updated.
2874 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2875 (elf_x86_64_create_dynamic_sections): Removed.
2876 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2877 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2878 (elf_x86-64_adjust_dynamic_symbol): Updated.
2879 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2880 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2881 size for PLT0 if there is no PLT0. Get plt_entry_size from
2882 non_lazy_plt for non-lazy PLT entries.
2883 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2884 from non_lazy_plt for non-lazy PLT entries.
2885 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2886 if there is no PLT0.
2887 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2888 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2889 entries with non-lazy PLT layout. Don't fill the second and third
2890 slots in the PLT entry if there is no PLT0.
2891 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2892 if there is no PLT0. Set sh_entsize on the .plt.got section.
2893 (compare_relocs): New.
2894 (elf_x86_64_plt_type): Likewise.
2895 (elf_x86_64_plt): Likewise.
2896 (elf_x86_64_nacl_plt): New. Forward declaration.
2897 (elf_x86_64_get_plt_sym_val): Removed.
2898 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2899 against all dynamic relocations.
2900 (elf_x86_64_link_setup_gnu_properties): New function.
2901 (elf_backend_create_dynamic_sections): Updated.
2902 (elf_backend_setup_gnu_properties): New.
2903 (elf_x86_64_nacl_plt): New.
2904 (elf_x86_64_nacl_arch_bed): Updated.
2905
f604c2a2
L
29062017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2907
2908 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2909 (LAZY_PLT_ENTRY_SIZE): This.
2910 (NON_LAZY_PLT_ENTRY_SIZE): New.
2911 (elf_i386_plt0_entry): Renamed to ...
2912 (elf_i386_lazy_plt0_entry): This.
2913 (elf_i386_plt_entry): Renamed to ...
2914 (elf_i386_lazy_plt_entry): This.
2915 (elf_i386_pic_plt0_entry): Renamed to ...
2916 (elf_i386_pic_lazy_plt0_entry): This.
2917 (elf_i386_pic_plt_entry): Renamed to ...
2918 (elf_i386_pic_lazy_plt_entry): This.
2919 (elf_i386_got_plt_entry): Renamed to ...
2920 (elf_i386_non_lazy_plt_entry): This.
2921 (elf_i386_pic_got_plt_entry): Renamed to ...
2922 (elf_i386_pic_non_lazy_plt_entry): This.
2923 (elf_i386_eh_frame_plt): Renamed to ...
2924 (elf_i386_eh_frame_lazy_plt): This.
2925 (elf_i386_eh_frame_plt_got): Renamed to ...
2926 (elf_i386_eh_frame_non_lazy_plt): This.
2927 (elf_i386_plt_layout): Renamed to ...
2928 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2929 eh_frame_plt_got_size.
2930 (elf_i386_non_lazy_plt_layout): New.
2931 (elf_i386_plt_layout): Likewise.
2932 (elf_i386_non_lazy_plt): Likewise.
2933 (GET_PLT_ENTRY_SIZE): Removed.
2934 (elf_i386_plt): Renamed to ...
2935 (elf_i386_lazy_plt): This.
2936 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2937 (elf_i386_arch_bed): Updated.
2938 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2939 (elf_i386_create_dynamic_sections): Removed.
2940 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2941 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2942 (elf_i386_adjust_dynamic_symbol): Updated.
2943 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2944 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2945 size for PLT0 if there is no PLT0.
2946 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2947 output section is discarded only if GOT isn't empty.
2948 (elf_i386_relocate_section): Updated. Properly get PLT index
2949 if there is no PLT0.
2950 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2951 second and third slots in the PLT entry if there is no PLT0.
2952 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2953 if there is no PLT0. Set sh_entsize on the .plt.got section.
2954 (elf_i386_nacl_plt): Forward declaration.
2955 (elf_i386_get_plt_sym_val): Removed.
2956 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2957 against all dynamic relocations.
2958 (elf_i386_link_setup_gnu_properties): New function.
2959 (elf_backend_create_dynamic_sections): Updated.
2960 (elf_backend_setup_gnu_properties): New.
2961 (elf_i386_nacl_plt): Updated.
2962 (elf_i386_nacl_arch_bed): Likewise.
2963 (elf_i386_vxworks_arch_bed): Likewise.
2964
046734ff
TP
29652017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2966
2967 * elflink.c (elf_output_implib): Remove executable flag from import
2968 library bfd.
2969 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2970 library is a relocatable object file.
2971
b660e9eb
SKS
29722017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2973
2974 PR ld/21404
2975 * elf32-avr.c (avr_should_move_sym): New function.
2976 (avr_should_reduce_sym_size): Likewise.
2977 (avr_should_increase_sym_size): Likewise.
2978 (elf32_avr_relax_delete_bytes): Adjust symbol values
2979 and sizes by calling new functions.
2980
763a5fa4
PD
29812017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2982
2983 * config.bfd (riscv32-*): Enable rv64.
2984
73ec947d
AM
29852017-05-02 Alan Modra <amodra@gmail.com>
2986
2987 PR 21384
2988 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2989 rather than h->root.type == bfd_link_hash_new.
2990 (bfd_elf_record_link_assignment): Similarly, call
2991 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2992
a941291c
AM
29932017-04-29 Alan Modra <amodra@gmail.com>
2994
2995 PR 21432
2996 * reloc.c (reloc_offset_in_range): New function.
2997 (bfd_perform_relocation, bfd_install_relocation): Use it.
2998 (_bfd_final_link_relocate): Likewise.
2999
750eaa47
L
30002017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3001
3002 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3003 before using .plt.got.
3004 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3005
5b66fac4
L
30062017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3007
3008 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3009 instead of "+=" to update 0.
3010
de9a3c42
L
30112017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3012
3013 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3014 .plt.got section here.
3015 (elf_i386_check_relocs): Don't create the .plt.got section.
3016 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3017 the .plt.got and .plt.bnd sections here.
3018 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3019 .plt.bnd sections.
3020
da3d25af
L
30212017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3022
3023 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3024 has_bnd_reloc.
3025 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3026 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3027 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3028 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3029 has_bnd_reloc.
3030
fba37edd
L
30312017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3032
3033 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3034 to return bfd *.
3035 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3036 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3037 the first relocatable ELF input with GNU properties.
3038
1f78f649
L
30392017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3040
3041 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3042 VxWorks for non-PIC.
3043
76c20d54
AM
30442017-04-27 Alan Modra <amodra@gmail.com>
3045
3046 * elf-bfd.h (struct elf_backend_data): Make asection param of
3047 elf_backend_eh_frame_address_size const.
3048 (_bfd_elf_eh_frame_address_size): Likewise.
3049 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3050 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3051 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3052 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3053 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3054 (next_cie_fde_offset): Constify params.
3055 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3056
d7153c4a
AM
30572017-04-27 Alan Modra <amodra@gmail.com>
3058
3059 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3060 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3061 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3062 aug_data_len.
3063 (offset_adjust): New function.
3064 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3065 (adjust_eh_frame_local_symbols): Likewise.
3066 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3067 after changing anything. Return true if anything changed.
3068 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3069 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3070
641338d8
AM
30712017-04-27 Alan Modra <amodra@gmail.com>
3072
3073 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3074 when force_local.
3075
21d68fcd
AM
30762017-04-27 Alan Modra <amodra@gmail.com>
3077
3078 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3079 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3080 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3081 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3082 for undef and undefweak dyn_relocs.
3083 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3084 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3085 (allocate_got, allocate_dynrelocs): Likewise.
3086 (ppc64_elf_relocate_section): Likewise.
3087
97d343d4
L
30882017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3089
3090 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3091 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3092 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3093 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3094
04b31182
NC
30952017-04-26 Nick Clifton <nickc@redhat.com>
3096
3097 PR binutils/21434
3098 * reloc.c (bfd_perform_relocation): Check for a negative address
3099 in the reloc.
3100
23ec1e32
MR
31012017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3102
3103 PR ld/21334
3104 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3105 member.
3106 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3107 (elf_backend_always_renumber_dynsyms): Define.
3108 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3109 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3110 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3111 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3112 it.
3113 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3114
c46cec3a
MR
31152017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3116
3117 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3118 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3119 sections have been created.
3120
e63d1232
NC
31212017-04-26 Nick Clifton <nickc@redhat.com>
3122
3123 PR binutils/21431
3124 * compress.c (bfd_init_section_compress_status): Check the return
3125 value from bfd_malloc.
3126
9e9821dd
L
31272017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3128
3129 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3130 no_finish_dynamic_symbol.
3131 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3132 0.
3133 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3134 weak symbol, don't make it dynamic.
3135 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3136 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3137 relocation for GOT reference.
3138 (elf_x86_64_finish_dynamic_symbol): Abort if
3139 no_finish_dynamic_symbol isn't 0.
3140
0dc9a308
L
31412017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3142
3143 PR ld/21402
3144 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3145 undefined weak symbol, don't make it dynamic.
3146 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3147 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3148 relocation for R_386_GOT32.
3149
1587442d
L
31502017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3151
3152 PR ld/21425
3153 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3154
7eacd66b
AM
31552017-04-23 Alan Modra <amodra@gmail.com>
3156
3157 PR 21414
3158 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3159 * elf.c (lcomm_sym): New.
3160 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3161 * bfd-in2.h: Regenerate.
3162
bce964aa
AM
31632017-04-23 Alan Modra <amodra@gmail.com>
3164
3165 PR 21412
3166 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3167 parameters and comment.
3168 (_bfd_elf_get_reloc_section): Delete.
3169 (_bfd_elf_plt_get_reloc_section): Declare.
3170 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3171 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3172 Extracted from..
3173 (_bfd_elf_get_reloc_section): ..here. Delete.
3174 (assign_section_numbers): Call elf_get_reloc_section.
3175 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3176 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3177
97e83a10
AM
31782017-04-23 Alan Modra <amodra@gmail.com>
3179
3180 PR 21409
3181 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3182 no symbols.
3183
e133d005
L
31842017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3185
3186 PR ld/21402
3187 * elf32-i386.c (elf_i386_link_hash_entry): Add
3188 no_finish_dynamic_symbol.
3189 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3190 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3191 symbol, don't make it dynamic in PIE.
3192 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3193 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3194 relocation for R_386_GOT32
3195 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3196 isn't 0.
3197
3c5fce9b
L
31982017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3199
3200 PR ld/19617
3201 PR ld/21086
3202 * elflink.c (elf_link_add_object_symbols): Require
3203 --no-dynamic-linker with -E/--dynamic-list when creating
3204 dynamic sections.
3205
0fad2956
MR
32062017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3207
3208 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3209 if forced local.
3210
64575f78
MR
32112017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3212
3213 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3214 dynamic symbol sorting.
3215
59fa66c5
L
32162017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3217
3218 PR ld/21382
3219 * elflink.c (elf_link_add_object_symbols): Preserve
3220 dynamic_ref_after_ir_def when restoring the symbol table for
3221 unneeded dynamic object.
3222
e492d2f8
L
32232017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3224
3225 PR ld/21401
3226 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3227 on on undefined IFUNC symbol in the second PLT.
3228
10169134
WAF
32292017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3230
3231 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3232
954b63d4
AM
32332017-04-19 Alan Modra <amodra@gmail.com>
3234
3235 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3236 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3237 * elf32-ppc.c:Formatting.
3238 (ensure_undefweak_dynamic): Don't make dynamic when
3239 info->dynamic_undefined_weak is zero.
3240 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3241 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3242 not default visibility. Discard undef and undefweak
3243 dyn_relocs earlier.
3244 (ppc_elf_relocate_section): Adjust to suit.
3245 * elf64-ppc.c: Formatting.
3246 (ensure_undefweak_dynamic): Don't make dynamic when
3247 info->dynamic_undefined_weak is zero.
3248 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3249 info->dynamic_undefined_weak. Discard them earlier.
3250
e6699019
L
32512017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3252
3253 PR ld/21389
3254 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3255 before generating the version definition section.
3256
c5d37467
AM
32572017-04-17 Alan Modra <amodra@gmail.com>
3258
3259 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3260 state when a regular object file defines a symbol with
3261 incompatible type to that defined by an earlier shared lib.
3262
63a5468a
AM
32632017-04-13 Alan Modra <amodra@gmail.com>
3264
3265 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3266 * elf.c: Likewise.
3267 * elf32-arm.c: Likewise.
3268 * elf32-i386.c: Likewise.
3269 * elf32-mep.c: Likewise.
3270 * elf64-ia64-vms.c: Likewise.
3271 * elf64-x86-64.c: Likewise.
3272 * elflink.c: Likewise.
3273 * elfnn-ia64.c: Likewise.
3274 * elfxx-mips.c: Likewise.
3275
dae82561
AM
32762017-04-13 Alan Modra <amodra@gmail.com>
3277
3278 * aoutx.h: Use %B and %A in error messages throughout file.
3279 * aout-cris.c: Likewise.
3280 * archive.c: Likewise.
3281 * binary.c: Likewise.
3282 * coff-rs6000.c: Likewise.
3283 * coff-tic4x.c: Likewise.
3284 * coffcode.h: Likewise.
3285 * coffgen.c: Likewise.
3286 * cofflink.c: Likewise.
3287 * coffswap.h: Likewise.
3288 * cpu-arm.c: Likewise.
3289 * elf-eh-frame.c: Likewise.
3290 * elf-m10300.c: Likewise.
3291 * elf.c: Likewise.
3292 * elf32-arc.c: Likewise.
3293 * elf32-arm.c: Likewise.
3294 * elf32-bfin.c: Likewise.
3295 * elf32-frv.c: Likewise.
3296 * elf32-iq2000.c: Likewise.
3297 * elf32-m32c.c: Likewise.
3298 * elf32-microblaze.c: Likewise.
3299 * elf32-nds32.c: Likewise.
3300 * elf32-rl78.c: Likewise.
3301 * elf32-rx.c: Likewise.
3302 * elf32-score.c: Likewise.
3303 * elf32-score7.c: Likewise.
3304 * elf32-sh64.c: Likewise.
3305 * elf32-v850.c: Likewise.
3306 * elf32-vax.c: Likewise.
3307 * elf32-visium.c: Likewise.
3308 * elf64-ia64-vms.c: Likewise.
3309 * elf64-mmix.c: Likewise.
3310 * elf64-sh64.c: Likewise.
3311 * elfcode.h: Likewise.
3312 * elfnn-aarch64.c: Likewise.
3313 * elfnn-ia64.c: Likewise.
3314 * elfxx-mips.c: Likewise.
3315 * hpux-core.c: Likewise.
3316 * ieee.c: Likewise.
3317 * ihex.c: Likewise.
3318 * linker.c: Likewise.
3319 * merge.c: Likewise.
3320 * mmo.c: Likewise.
3321 * oasys.c: Likewise.
3322 * pdp11.c: Likewise.
3323 * peXXigen.c: Likewise.
3324 * rs6000-core.c: Likewise.
3325 * vms-alpha.c: Likewise.
3326 * xcofflink.c: Likewise.
3327
c08bb8dd
AM
33282017-04-13 Alan Modra <amodra@gmail.com>
3329
3330 * bfd.c (PRINT_TYPE): Define.
3331 (_doprnt): New function.
3332 (error_handler_internal): Use _doprnt.
3333 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3334 calls in their natural order, throughout file.
3335 * coff-mcore.c: Likewise.
3336 * coff-ppc.c: Likewise.
3337 * coff-tic80.c: Likewise.
3338 * cofflink.c: Likewise.
3339 * elf-s390-common.c: Likewise.
3340 * elf.c: Likewise.
3341 * elf32-arm.c: Likewise.
3342 * elf32-i386.c: Likewise.
3343 * elf32-m32r.c: Likewise.
3344 * elf32-msp430.c: Likewise.
3345 * elf32-spu.c: Likewise.
3346 * elf64-ia64-vms.c: Likewise.
3347 * elf64-sparc.c: Likewise.
3348 * elf64-x86-64.c: Likewise.
3349 * elflink.c: Likewise.
3350 * elfnn-aarch64.c: Likewise.
3351 * elfnn-ia64.c: Likewise.
3352 * elfxx-mips.c: Likewise.
3353
10463f39
AM
33542017-04-13 Alan Modra <amodra@gmail.com>
3355
3356 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3357 branch veneers" error. Fix double space and format message.
3358 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3359 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3360
4af8774e
AM
33612017-04-13 Alan Modra <amodra@gmail.com>
3362
3363 * bfd-in2.h: Regenerate.
3364
e4097f5e
L
33652017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3366
3367 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3368 extra `\n' in warning/error messages.
3369 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3370 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3371
537616aa
L
33722017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3373
3374 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3375 processor-specific properties with generic ELF target vector.
3376
bb1dd176
QZ
33772017-04-10 Qing Zhao <qing.zhao@oracle.com>
3378
3379 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3380 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3381 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3382 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3383 has_non_got_reloc.
3384 (link_hash_newfunc): Initialize has_got_reloc and
3385 has_non_got_reloc.
3386 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3387 section.
3388 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3389 has_non_got_reloc.
3390 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3391 has_non_got_reloc.
3392 (_bfd_sparc_elf_fixup_symbol): New function.
3393 (allocate_dynrelocs): Don't allocate space for dynamic
3394 relocations and discard relocations against resolved undefined
3395 weak symbols in executable. Don't make resolved undefined weak
3396 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3397 relocation against undefined weak symbols in PIE.
3398 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3399 relocations against resolved undefined weak symbols in PIE
3400 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3401 without ynamic PLT/GOT relocations for resolved undefined weak
3402 symbols.
3403 Don't generate dynamic relocation against resolved undefined
3404 weak symbol in executable.
3405 (pie_finish_undefweak_symbol): New function.
3406 (_bfd_sparc_elf_finish_dynamic_sections): Call
3407 pie_finish_undefweak_symbol on all symbols in PIE.
3408 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3409 (_bfd_sparc_elf_fixup_symbol): New function.
3410
d236cfd4
NC
34112017-04-10 Nick Clifton <nickc@redhat.com>
3412
3413 * config.bfd: Remove ns32k from obsolete list.
3414
6f9dbcd4
AM
34152017-04-10 Alan Modra <amodra@gmail.com>
3416
3417 PR 21287
3418 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3419 (special_sections_i): Likewise for .init_array.
3420 (special_sections_p): Likewise for .preinit_array.
3421
8170f769
L
34222017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3423
3424 PR ld/19579
3425 PR ld/21306
3426 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3427 ELF_COMMON_DEF_P for common symbols.
3428 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3429 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3430 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3431 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3432 07492f668d2173da7a2bda3707ff0985e0f460b6.
3433
49f4617b
PA
34342017-04-07 Pedro Alves <palves@redhat.com>
3435
3436 * opncls.c (bfd_get_debug_link_info): Rename to...
3437 (bfd_get_debug_link_info_1): ... this. Change type of second
3438 parameter to void pointer. Adjust.
3439 (bfd_get_debug_link_info): Reimplement on top of
3440 bfd_get_debug_link_info_1.
3441 (separate_debug_file_exists, separate_alt_debug_file_exists):
3442 Change type of second parameter to void pointer. Adjust.
3443 (get_func_type, check_func_type): Change type of second parameter
3444 to void pointer.
3445 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3446 the callback functions instead of passing the address of a local.
3447 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3448 find_separate_debug_file.
3449 (get_alt_debug_link_info_shim): Change type of second parameter to
3450 void pointer. Adjust.
3451 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3452 find_separate_debug_file.
3453 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3454 of second parameter to void pointer. Adjust.
3455 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3456 pointer local to find_separate_debug_file.
3457
34582017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
3459
3460 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3461 external symbols with a definition.
3462 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3463
86abf93a
AM
34642017-04-07 Alan Modra <amodra@gmail.com>
3465
3466 * po/SRC-POTFILES.in: Regenerate.
3467
8dea77f0
AM
34682017-04-05 Alan Modra <amodra@gmail.com>
3469
3470 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3471 reference counting.
3472
477bdd39
JT
34732017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3474
3475 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3476 numbers for DataDirectory entry indicies passed to
3477 add_data_entry().
3478
a91e1603
L
34792017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3480
3481 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3482 each GNU_MBIND section and align GNU_MBIND section to page size.
3483 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3484 segment for each GNU_MBIND section.
3485 (_bfd_elf_init_private_section_data): Copy sh_info from input
3486 for GNU_MBIND section.
3487
b5292032
PD
34882017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3489
3490 * elfnn-riscv.c (GP_NAME): Delete.
3491 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3492 (_bfd_riscv_relax_lui): Likewise.
3493
ad32986f
NC
34942017-04-04 Nick Clifton <nickc@redhat.com>
3495
3496 PR binutils/21342
3497 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3498 dereference.
3499 (bfd_elf_final_link): Only initialize the extended symbol index
3500 section if there are extended symbol tables to list.
3501
46bed679
L
35022017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3503
3504 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3505 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3506 * configure.ac (elf): Add elf-properties.lo.
3507 * Makefile.in: Regenerated.
3508 * configure: Likewise.
3509 * elf-bfd.h (elf_property_kind): New.
3510 (elf_property): Likewise.
3511 (elf_property_list): Likewise.
3512 (elf_properties): Likewise.
3513 (_bfd_elf_parse_gnu_properties): Likewise.
3514 (_bfd_elf_get_property): Likewise.
3515 (_bfd_elf_link_setup_gnu_properties): Likewise.
3516 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3517 and setup_gnu_properties.
3518 (elf_obj_tdata): Add properties.
3519 * elf-properties.c: New file.
3520 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3521 (elf_i386_merge_gnu_properties): Likewise.
3522 (elf_backend_parse_gnu_properties): Likewise.
3523 (elf_backend_merge_gnu_properties): Likewise.
3524 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3525 (elf_x86_64_merge_gnu_properties): Likewise.
3526 (elf_backend_parse_gnu_properties): Likewise.
3527 (elf_backend_merge_gnu_properties): Likewise.
3528 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3529 (elf_backend_parse_gnu_properties): Likewise.
3530 (elf_backend_setup_gnu_properties): Likewise.
3531 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3532 elf_backend_merge_gnu_properties and
3533 elf_backend_setup_gnu_properties.
3534
f96bd6c2
PC
35352017-03-30 Pip Cet <pipcet@gmail.com>
3536
3537 * elf32-wasm32.c: Add relocation code, two relocs.
3538 * reloc.c: Add wasm32 relocations.
3539 * libbfd.h: Regenerate.
3540 * bfd-in2.h: Regenerate.
3541 * bfd/po/bfd.pot: Regenerate.
3542
e643cb45
NC
35432017-03-29 Nick Clifton <nickc@redhat.com>
3544
3545 PR binutils/18025
3546 * coff-bfd.h (struct coff_section_data): Add new fields:
3547 saved_bias and bias.
3548 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3549 computed for PE binaries.
3550 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3551 missing abbrev.
3552
086554e8
HPN
35532017-03-28 Hans-Peter Nilsson <hp@axis.com>
3554
3555 PR ld/16044
3556 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3557 to handle a local symbol with a hash-symbol-entry; without PLT.
3558 Add BFD_ASSERT for an incidental case with GOT entry present.
3559 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3560 isn't forced-or-set local.
3561
a6be0538
PC
35622017-03-27 Pip Cet <pipcet@gmail.com>
3563
3564 * wasm-module.c: New file to support WebAssembly modules.
3565 * wasm-module.h: New file to support WebAssembly modules.
3566 * doc/webassembly.texi: Start documenting wasm-module.c.
3567 * config.bfd: Add wasm_vec.
3568 * targets.c: Likewise.
3569 * configure.ac: Likewise.
3570 * Makefile.am: Add entries for wasm-module.c.
3571 * Makefile.in: Regenerate.
3572 * configure: Regenerate.
3573 * po/SRC-POTFILES.in: Regenerate.
3574
79b1d3cb
PC
35752017-03-27 Pip Cet <pipcet@gmail.com>
3576
3577 * cpu-wasm32.c: New file to support wasm32 architecture.
3578 * elf32-wasm32.c: New file to support wasm32 architecture.
3579 * Makefile.am: Add wasm32 architecture.
3580 * archures.c: Likewise.
3581 * config.bfd: Likewise.
3582 * configure.ac: Likewise.
3583 * targets.c: Likewise.
3584 * Makefile.in: Regenerate.
3585 * bfd-in2.h: Regenerate.
3586 * configure: Regenerate.
3587 * po/SRC-POTFILES.in: Regenerate.
3588
aaed6f5b
AM
35892017-03-20 Alan Modra <amodra@gmail.com>
3590
3591 PR 21266
3592 * elf64-ppc.c (compare_symbols): Stabilize sort.
3593
82e66161
AM
35942017-03-18 Alan Modra <amodra@gmail.com>
3595
3596 * elf64-ppc.c (struct ppc_link_hash_table): Add
3597 local_ifunc_resolver and maybe_local_ifunc_resolver.
3598 (ppc_build_one_stub): Set flags on emitting dynamic
3599 relocation to ifunc.
3600 (ppc64_elf_relocate_section): Likewise.
3601 (ppc64_elf_finish_dynamic_symbol): Likewise.
3602 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3603 local dynamic relocs to ifuncs.
3604 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3605 local_ifunc_resolver and maybe_local_ifunc_resolver.
3606 (ppc_elf_relocate_section): Set flag on emitting dynamic
3607 relocation to ifuncs.
3608 (ppc_elf_finish_dynamic_symbol): Likewise.
3609 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3610 dynamic relocs to ifuncs.
3611
f955cccf
NC
36122017-03-13 Nick Clifton <nickc@redhat.com>
3613
3614 PR binutils/21202
3615 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3616 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3617 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3618 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3619 * bfd-in2.h: Regenerate.
3620 * libbfd.h: Regenerate.
3621 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3622 names.
3623 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3624 (elfNN_aarch64_howto_table): Likewise.
3625 (aarch64_tls_transition_without_check): Likewise.
3626 (aarch64_reloc_got_type): Likewise.
3627 (elfNN_aarch64_final_link_relocate): Likewise.
3628 (elfNN_aarch64_tls_relax): Likewise.
3629 (elfNN_aarch64_relocate_section): Likewise.
3630 (elfNN_aarch64_gc_sweep_hook): Likewise.
3631 (elfNN_aarch64_check_relocs): Likewise.
3632 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3633 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3634
4aef7643
AM
36352017-03-11 Alan Modra <amodra@gmail.com>
3636
3637 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3638 parameter is in fact used. Whitespace fixes.
3639 * elf64-ppc.c: Likewise.
3640
f03265d9
ST
36412017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3642
3643 * rs6000-core.c (CORE_NEW): Simplify macro when
3644 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3645
b1b07054
AM
36462017-03-07 Alan Modra <amodra@gmail.com>
3647
3648 PR 21224
3649 PR 20519
3650 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3651 dyn_relocs check.
3652
2e0ce1c8
AM
36532017-03-05 Alan Modra <amodra@gmail.com>
3654
3655 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3656 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3657 (next_cie_fde_offset): New function.
3658 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3659 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3660 four bytes. Align CIEs to four or eight bytes depending on
3661 per_encoding_aligned8. Align FDEs according to their encoding.
3662 Pad last FDE to output section alignment.
3663 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3664 assertion.
3665 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3666 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3667 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3668
f98450c6
NC
36692017-03-02 Martin Bickel <binutils@ineranves.de>
3670
3671 PR ld/21212
3672 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 3673 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 3674
673cff9b
AM
36752017-03-02 Alan Modra <amodra@gmail.com>
3676
3677 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3678
3de43e7b
AM
36792017-02-28 Alan Modra <amodra@gmail.com>
3680
3681 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3682 (ppc64_elf_relocate_section): Likewise.
3683
4ef97a1b
AM
36842017-02-28 Alan Modra <amodra@gmail.com>
3685
3686 PR 20995
3687 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3688 rather than elf32_nios2_hash_table or elf_hash_table.
3689 (create_got_section): Likewise.
3690 (nios2_elf32_finish_dynamic_symbol): Likewise.
3691 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3692 (nios2_elf32_size_dynamic_sections): Likewise.
3693 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3694 vars. Use htab equivalents directly instead. Don't create
3695 all dynamic sections on needing just the GOT. Use a goto
3696 rather than a fall-through with reloc test. Ensure
3697 htab->dynobj is set when making dynamic sreloc section.
3698 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3699 equivalent directly instead. Don't segfault on looking for
3700 .dynamic when dynamic sections have not been created. Don't
3701 segfault on .got.plt being discarded.
3702 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3703 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3704 fixme and another not so relevant comment.
3705 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3706 already set, set hash table dynobj on creating .sbss.
3707
7ba71655
AM
37082017-02-28 Alan Modra <amodra@gmail.com>
3709
3710 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3711 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3712 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3713 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3714 (ppc64_elf_relocate_section): Likewise.
3715 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3716 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3717 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3718 * libbfd.h: Regenerate.
3719 * bfd-in2.h: Regenerate.
3720
afbf7e8e
AM
37212017-02-28 Alan Modra <amodra@gmail.com>
3722
3723 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3724 dynamic .data.rel.ro read-only.
3725 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3726 rather than section flags when deciding where copy reloc goes.
3727 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3728 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3729 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3730 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3731 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3732 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3733 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3734 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3735 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3736 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3737 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3738 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3739 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3740 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3741 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3742 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3743 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3744 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3745 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3746
0e392101
MR
37472017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3748
3749 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3750 `jalr $0, $25' instruction encoding.
3751
bd757ca7
NC
37522017-02-27 Nick Clifton <nickc@redhat.com>
3753
3754 PR ld/21180
3755 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3756 generating a seg-fault when encountering a symbol that has been
3757 deleted by garbage collection.
3758
034fed0b
AM
37592017-02-25 Alan Modra <amodra@gmail.com>
3760
3761 * elf32-arc.c (struct dynamic_sections): Delete.
3762 (enum dyn_section_types): Delete.
3763 (dyn_section_names): Delete.
3764 (arc_create_dynamic_sections): Delete.
3765 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3766 segfault on discarded .rela.plt section.
3767 (elf_arc_size_dynamic_sections): Formatting. Don't call
3768 arc_create_dynamic_sections. Don't allocate memory for sections
3769 handled by the generic linker. Correct code finding relocs in
3770 read-only sections. Set SEC_EXCLUDE on zero size .got,
3771 .got.plt, and .dynbss sections. Do set .interp for pies.
3772
d0f744f9
AW
37732017-02-24 Andrew Waterman <andrew@sifive.com>
3774
3775 * elfnn-riscv.c (GP_NAME): New macro.
3776 (riscv_global_pointer_value): Use it.
3777 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3778 output section, consider only that section's alignment.
3779
5d58c733
MR
37802017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3781
3782 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3783 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3784 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3785 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3786
c1556ecd
MR
37872017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3788
3789 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3790 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3791 or misaligned.
3792
5499c7c7
AM
37932017-02-23 Alan Modra <amodra@gmail.com>
3794
3795 PR 20744
3796 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3797 16D relocations.
3798 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3799 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3800 relocs.
3801
902e9fc7
MR
38022017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3803
3804 PR ld/20828
3805 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3806 processing ahead of the call to `elf_gc_sweep_symbol'.
3807
758d96d8
NC
38082017-02-22 Nick Clifton <nickc@redhat.com>
3809
3810 PR binutils/21193
3811 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3812 created section 4-byte alignment.
3813
6528b6eb
AM
38142017-02-22 Alan Modra <amodra@gmail.com>
3815
3816 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3817 on .got or .plt output section being discarded by script.
3818 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3819 vxworks splt temp.
3820
24f1a751
AM
38212017-02-21 Alan Modra <amodra@gmail.com>
3822
3823 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3824 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3825
64487780
AM
38262017-02-20 Alan Modra <amodra@gmail.com>
3827
3828 PR 21181
3829 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3830 if DT_RELSZ/DT_RELASZ is zero.
3831
6438d1be
NC
38322017-02-17 Nick Clifton <nickc@redhat.com>
3833
3834 * compress.c (bfd_get_full_section_contents): Remember to reduce
3835 compressed size by the sizeof the compression header when
3836 decompressing the contents.
3837
4bc26c69
PA
38382017-02-17 Pedro Alves <palves@redhat.com>
3839
3840 * srec.c (Chunk): Rename to ...
3841 (_bfd_srec_len): ... this.
3842 (S3Forced): Rename to ...
3843 (_bfd_srec_forceS3): ... this.
3844 * objcopy.c: Adjust all references.
3845
7ec22e0f
PA
38462017-02-17 Pedro Alves <palves@redhat.com>
3847
3848 * archive.c (bsd_write_armap): Rename to ...
3849 (_bfd_bsd_write_armap): ... this.
3850 (coff_write_armap): Rename to ...
3851 (_bfd_coff_write_armap): ... this.
3852 * libbfd-in.h (bsd_write_armap): Rename to ...
3853 (_bfd_bsd_write_armap): ... this.
3854 (coff_write_armap): Rename to ...
3855 (_bfd_coff_write_armap): ... this.
3856 * aout-target.h, aout-tic30.c: Adjust all users.
3857 * libbfd.h: Regenerate.
3858
8c8402cc
PA
38592017-02-17 Pedro Alves <palves@redhat.com>
3860
3861 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3862 (warn_deprecated): Rename to ...
3863 (_bfd_warn_deprecated): ... this.
3864 * libbfd.c (warn_deprecated): Rename to ...
3865 (_bfd_warn_deprecated): ... this.
3866 * bfd-in2.h: Regenerate.
3867
c7c3d11b
PA
38682017-02-17 Pedro Alves <palves@redhat.com>
3869
3870 * bfdio.c (real_ftell): Rename to ...
3871 (_bfd_real_ftell): ... this.
3872 (real_fseek): Rename to ...
3873 (_bfd_real_fseek): ... this.
3874 (real_fopen): Rename to ...
3875 (_bfd_real_fopen): ... this.
3876 * libbfd-in.h (real_ftell): Rename to ...
3877 (_bfd_real_ftell): ... this.
3878 (real_fseek): Rename to ...
3879 (_bfd_real_fseek): ... this.
3880 (real_fopen): Rename to ...
3881 (_bfd_real_fopen): ... this.
3882 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3883 * libbfd.h: Regenerate.
3884
4265548c
PA
38852017-02-17 Pedro Alves <palves@redhat.com>
3886
3887 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3888 * libbfd.c (read_unsigned_leb128): Rename to ...
3889 (_bfd_read_unsigned_leb128): ... this.
3890 (read_signed_leb128): Rename to ...
3891 (_bfd_read_signed_leb128): ... this.
3892 (safe_read_leb128): Rename to ...
3893 (_bfd_safe_read_leb128): ... this.
3894 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3895 (_bfd_read_unsigned_leb128): ... this.
3896 (read_signed_leb128): Rename to ...
3897 (_bfd_read_signed_leb128): ... this.
3898 (safe_read_leb128): Rename to ...
3899 (_bfd_safe_read_leb128): ... this.
3900 * libbfd.h: Renegerate.
3901
3239a423
AB
39022017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3903
3904 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3905 before trying to fine matching file and line information.
3906
90ed9b8b
AB
39072017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3908
3909 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3910 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3911 not match current bfd, then reload debug information. Record bfd
3912 we're loading debug info for in the stash. If we have debug
3913 informatin in the cache then perform section placement before
3914 returning.
3915
a8c75b76
AM
39162017-02-16 Alan Modra <amodra@gmail.com>
3917
3918 PR 21000
3919 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3920 * elfxx-target.h (elf_backend_no_page_alias): Define.
3921 (elfNN_bed): Init new field.
3922 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3923 ensure PT_LOAD segment starts on a new page.
3924 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3925
247d6c4c
AM
39262017-02-16 Alan Modra <amodra@gmail.com>
3927
3928 PR 21132
3929 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3930 if pic.
3931
90571206
JW
39322017-02-16 Jiong Wang <jiong.wang@arm.com>
3933
3934 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3935 * bfd-in2.h: Regenerated.
3936
2a568401
L
39372017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3938
3939 PR ld/21168
3940 * elf32-i386.c (elf_i386_relocate_section): Allow
3941 "lea foo@GOT, %reg" in PIC.
3942
a5def14f
L
39432017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3944
3945 PR ld/20244
3946 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3947 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3948 error against local IFUNC symbol without a base register for
3949 PIC.
3950
174d0a74
MR
39512017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3952
3953 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3954 `%P: %H:' with `info->callbacks->einfo'.
3955 (ppc_elf_relocate_section): Likewise.
3956 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3957 (ppc64_elf_edit_toc): Likewise.
3958 (ppc64_elf_relocate_section): Likewise.
3959
e278ae05
AM
39602017-02-14 Alan Modra <amodra@gmail.com>
3961
3962 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3963 --gc-keep-exported, and test versioned field of sym rather than
3964 looking for @ in name.
3965
10ddfe62
PD
39662017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3967
3968 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3969 __global_pointer$.
3970
d11135f5
NC
39712017-02-13 Nick Clifton <nickc@redhat.com>
3972
3973 PR binutils/21151
3974 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3975 unit length field.
3976
cc162427
AW
39772017-02-07 Andrew Waterman <andrew@sifive.com>
3978
3979 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3980 entry size if PLT header is written.
3981
3d044c0c
SL
39822017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3983
3984 Fix sparc64 dynamic relocation processing to use the dynamic
3985 symbol count.
3986 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3987 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3988 should be used.
3989
1b7e3d2f
NC
39902017-02-03 Nick Clifton <nickc@redhat.com>
3991
3992 PR 21096
3993 * coffcode.h (coff_write_object_contents): Enlarge size of
3994 s_name_buf in order to avoid compile time warning about possible
3995 integer truncation.
3996 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3997 32-bits of insn value before printing into buffer.
3998
e17b0c35
MR
39992017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4000
4001 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4002 `max_local_dynindx'.
4003 (mips_elf_sort_hash_table): Handle it.
4004 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4005 symbols bump up `max_local_dynindx' rather than
4006 `max_non_got_dynindx'.
4007
55f8b9d2
MR
40082017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4009
4010 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4011 `min_got_dynindx', `max_unref_got_dynindx' and
4012 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4013 (mips_elf_sort_hash_table): Adjust accordingly.
4014
0f8c4b60
MR
40152017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4016
4017 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4018 to access the hash table.
4019
17a80fa8
MR
40202017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4021
4022 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4023 non-NULL `htab' to the beginning.
4024
8f56d4fd
MR
40252017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4026
4027 * elflink.c (elf_gc_sweep): Wrap overlong line.
4028
8b10b0b3
MR
40292017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4030
4031 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4032 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4033 * elfxx-mips.c (mips_elf_link_hash_table): Add
4034 `ignore_branch_isa' member.
4035 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4036 in branch relocation calculation as an error if
4037 `ignore_branch_isa' has been set.
4038 (_bfd_mips_elf_insn32): Rename to...
4039 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4040 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4041 Handle the new parameter.
4042
1fbd05e1
HPN
40432017-01-27 Hans-Peter Nilsson <hp@axis.com>
4044
22d9a0de
HPN
4045 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4046 local variable dynobj.
4047
1fbd05e1
HPN
4048 PR ld/20995
4049 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4050 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4051 executable from read-only sections into sdynrelro.
4052 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4053 dynamic relocs in sdynrelro.
4054 (elf_backend_want_dynrelro): Define.
4055
4a7324e1
SH
40562017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4057
4058 * config.bfd (*-*-rtemsaout*): Mark as removed.
4059
c75b4ebd
SH
40602017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4061
4062 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4063 (arm-*-rtems*): Move to (arm*-*-eabi*).
4064 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4065 (m68-*-rtems*): Move to (m68*-*-elf*).
4066
850d84f6
SH
40672017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4068
4069 * config.bfd (*-*-rtemscoff*): Mark as removed.
4070
b531344c
MR
40712017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4072
4073 PR ld/20828
4074 * elflink.c (bfd_elf_record_link_assignment): Revert last
4075 change and don't ever clear `forced_local'. Set `mark'
4076 unconditionally.
4077 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4078 file.
4079 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4080 (bfd_elf_size_dynamic_sections): ... here.
4081 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4082 and set `mark' instead in `__tls_get_addr_opt' processing.
4083 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4084
f0158f44
AM
40852017-01-24 Alan Modra <amodra@gmail.com>
4086
4087 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4088 where dynamic relocs are preferable. Allow ifunc too.
4089 (ensure_undefweak_dynamic): New function.
4090 (allocate_dynrelocs): Use it here. Move plt handling last and
4091 don't make symbols dynamic, simplifying loop. Only make undef
4092 weak symbols with GOT entries dynamic. Correct condition
4093 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4094 comments. Remove goto.
4095 (ppc_elf_relocate_section): Correct test for using dynamic
4096 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4097 to suit. Set up explicit tls_index entries and implicit GOT
4098 tls_index entries resolvable at link time for
4099 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4100 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4101 (ensure_undefweak_dynamic): New function.
4102 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4103 with GOT entries dynamic. Remove unnecessary test of
4104 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4105 (ppc64_elf_relocate_section): Correct test for using dynamic
4106 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4107 to suit. Set up explicit tls_index entries and implicit GOT
4108 tls_index entries resolvable at link time for __tls_get_addr_opt.
4109 Simplify expression to clear mem for prelink.
4110
2d0ca824
YN
41112017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4112
4113 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4114
7f784814
JW
41152017-01-20 Jiong Wang <jiong.wang@arm.com>
4116
4117 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4118 (elf_backend_hash_symbol): Define.
4119
81ff47b3
MR
41202017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4121
4122 PR ld/20828
4123 * elflink.c (bfd_elf_record_link_assignment): Clear any
4124 `forced_local' marking for DSO symbols that are not being
4125 provided.
4126
640d6bfd
KLC
41272017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4128
4129 * elfnn-riscv.c (riscv_elf_object_p): New function.
4130
8361ed4d
L
41312017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4132
4133 PR ld/21038
4134 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4135 plt_bnd_eh_frame.
4136 (elf_x86_64_check_relocs): Create .eh_frame section for the
4137 .plt.bnd section.
4138 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4139 .eh_frame section for the .plt.bnd section.
4140 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4141 for the .plt.bnd section.
4142
2425a30e
NC
41432017-01-12 Nick Clifton <nickc@redhat.com>
4144
4145 PR binutils/20876
4146 * opncls.c (find_separate_debug_file): Add include_dirs
4147 parameter. Only include the directory part of the bfd's filename
4148 in search paths if include_dirs is true. Add a couple of extra
4149 locations for looking for debug files.
4150 ( bfd_follow_gnu_debuglink): Update invocation of
4151 find_separate_debug_file.
4152 (bfd_follow_gnu_debugaltlink): Likewise.
4153 (get_build_id): New function: Finds the build-id of the given bfd.
4154 (get_build_id_name): New function: Computes the name of the
4155 separate debug info file for a bfd, based upon its build-id.
4156 (check_build_id_file): New function: Checks to see if a separate
4157 debug info file exists at the given location, and that its
4158 build-id matches that of the original bfd.
4159 (bfd_follow_build_id_debuglink): New function: Finds a separate
4160 debug info file for a given bfd by using the build-id method.
4161 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4162 method of locating a separate debug info file before using the
4163 debuglink method.
4164 * bfd-in2.h: Regenerate.
4165
9e659176
L
41662017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4167
4168 PR ld/21038
4169 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4170 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4171 elf_x86_64_eh_frame_plt_got.
4172 (elf_x86_64_size_dynamic_sections): Get unwind info from
4173 elf_x86_64_bnd_arch_bed for the BND PLT.
4174
f2e2d2f5
JS
41752017-01-11 Jeremy Soller <jackpot51@gmail.com>
4176
4177 * config.bfd: Add entries for i686-redox and x86_64-redox.
4178
52b232b3
L
41792017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4180
4181 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4182 to 4 bytes.
4183 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4184 .eh_frame section to 4 bytes for x32.
4185 (elf_x86_64_check_relocs): Likewise.
4186
fff53dae
L
41872017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4188
4189 PR ld/20830
4190 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4191 (PLT_GOT_FDE_LENGTH): Likewise.
4192 (elf_i386_plt_layout): Add eh_frame_plt_got and
4193 eh_frame_plt_got_size.
4194 (elf_i386_plt): Updated.
4195 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4196 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4197 (elf_i386_size_dynamic_sections): Allocate and initialize
4198 .eh_frame section for .plt.got.
4199 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4200 .plt.got.
4201 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4202 eh_frame_plt_got_size.
4203 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4204 (PLT_GOT_FDE_LENGTH): Likewise.
4205 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4206 eh_frame_plt_got_size.
4207 (elf_x86_64_arch_bed): Updated.
4208 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4209 eh_frame_plt_got_size.
4210 (elf_x86_64_nacl_arch_bed): Likewise.
4211 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4212 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4213 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4214 .eh_frame section for .plt.got.
4215 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4216 for .plt.got.
4217
f129e49f
L
42182017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4219
4220 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4221 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4222
cd6581da
NC
42232017-01-09 Nick Clifton <nickc@redhat.com>
4224
4225 * dwarf2.c (lookup_address_in_function_table): Return early if
4226 there are no functions in the given comp unit, or if the high
4227 address of the last function in the comp unit is less than the
4228 desired address.
4229
98f02962
NC
42302017-01-09 Nick Clifton <nickc@redhat.com>
4231
4232 PR binutils/21013
4233 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4234 message if there are too many symbols to load.
4235
ae4fda66
JC
42362017-01-04 James Clarke <jrtc27@jrtc27.com>
4237
4238 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4239 if relocs are cached.
4240
de1010f4
RF
42412017-01-03 Rich Felker <bugdal@aerifal.cx>
4242
4243 PR ld/21017
4244 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4245 for R_MICROBLAZE_GOTOFF_64.
4246
09fe2662
NC
42472017-01-03 Nick Clifton <nickc@redhat.com>
4248
4249 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4250 warning about using a possibly uninitialised variable.
4251
595e0a47
AM
42522017-01-02 Alan Modra <amodra@gmail.com>
4253
4254 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4255 (allocate_plt_static, allocate_dynrelocs): Use it.
4256
7bd9df3b
AM
42572017-01-02 Alan Modra <amodra@gmail.com>
4258
4259 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4260 .PARISC.unwind section.
4261
5b86074c
AM
42622017-01-02 Alan Modra <amodra@gmail.com>
4263
4264 PR ld/20989
4265 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4266 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4267 indirect to GOT pointer relative code edit.
4268
2571583a
AM
42692017-01-02 Alan Modra <amodra@gmail.com>
4270
4271 Update year range in copyright notice of all files.
4272
5c1ad6b5 4273For older changes see ChangeLog-2016
3499769a 4274\f
5c1ad6b5 4275Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
4276
4277Copying and distribution of this file, with or without modification,
4278are permitted in any medium without royalty provided the copyright
4279notice and this notice are preserved.
4280
4281Local Variables:
4282mode: change-log
4283left-margin: 8
4284fill-column: 74
4285version-control: never
4286End:
This page took 0.317189 seconds and 4 git commands to generate.