Miscellaneous format string fixes
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
cd9af601
AM
12017-07-03 Alan Modra <amodra@gmail.com>
2
3 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
4 print d_tag.
5 (bfd_elf_print_symbol): Don't cast symbol->flags.
6 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
7 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
8 _bfd_error_handler argument order.
9 (ppc_elf_merge_private_bfd_data): Don't cast flags.
10
33c734b2
AM
112017-07-03 Alan Modra <amodra@gmail.com>
12
13 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
14 AC_TYPE_LONG_DOUBLE.
15 * configure: Regenerate.
16 * config.in: Regenerate.
17
3df5cd13
AW
182017-06-29 Andrew Waterman <andrew@sifive.com>
19
20 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
21 relocs.
22
ec1acaba
EB
232017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
24
25 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
26 unless it is undefined weak.
27 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
28 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
29 relocation.
30 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
31 is not dynamic in PIC, abort.
32
ff07562f
JW
332017-06-29 Jiong Wang <jiong.wang@arm.com>
34
35 PR ld/21402
36 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
37 undefined weak symbols into dynamic.
38 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
39 relocation for non-dynamic symbols.
40 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
41
2aff25ba
JW
422017-06-29 Jiong Wang <jiong.wang@arm.com>
43
44 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
45 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
46 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
47 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
48 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
49 support for them.
50
88ab90e8
AA
512017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
52
53 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
54 (elfcore_write_s390_gs_bc): Likewise.
55 * elf.c (elfcore_grok_s390_gs_cb): New function.
56 (elfcore_grok_s390_gs_bc): New function.
57 (elfcore_grok_note): Call them.
58 (elfcore_write_s390_gs_cb): New function.
59 (elfcore_write_s390_gs_bc): New function.
60 (elfcore_write_register_note): Call them.
61
328ce951
L
622017-06-28 H.J. Lu <hongjiu.lu@intel.com>
63
64 * libbfd.c (_bfd_generic_get_section_contents): Don't call
65 bfd_get_file_size. Check archive element size.
66 (_bfd_generic_get_section_contents_in_window): Likewise.
67
47fdcf63
L
682017-06-28 H.J. Lu <hongjiu.lu@intel.com>
69
70 * bfd-in2.h: Regenerated.
71 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
72 (bfd_get_file_size): Likewise.
73
38bf472a
MR
742017-06-28 Maciej W. Rozycki <macro@imgtec.com>
75 Matthew Fortune <matthew.fortune@imgtec.com>
76
77 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
78 * cpu-mips.c (I_interaptiv_mr2): New enum value.
79 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
80 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
81 case.
82 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
83 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
84 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
85 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
86 `bfd_mach_mips_interaptiv_mr2' entries.
87 * bfd-in2.h: Regenerate.
88
2d68166e
NC
892017-06-27 Nick Clifton <nickc@redhat.com>
90
91 * tekhex.c (pass_over): Revert accidental conversion of a local
92 array to a static array.
93
68063779
SKS
942017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
95
96 PR ld/13402
97 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
98 reloc addend if necessary. Adjust diff only if
99 shrinked_insn_address < end_address.
100
ea9aafc4
AM
1012017-06-27 Alan Modra <amodra@gmail.com>
102
103 PR binutils/21665
104 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
105 (_bfd_generic_get_section_contents_in_window): Likewise.
106
a6cbf936
KLC
1072017-06-26 Kuan-Lin Chen <rufus@andestech.com>
108
109 * elfnn-riscv.c (perform_relocation): Support the new
110 R_RISCV_32_PCREL relocation.
111 (riscv_elf_relocate_section): Likewise.
112 * elfxx-riscv.c (howto_table): Likewise.
113 (riscv_reloc_map): Likewise.
114 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
115 * libbfd.h: Regenerate.
116
7211ae50
AM
1172017-06-27 Alan Modra <amodra@gmail.com>
118
119 PR binutils/21665
120 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
121 Use unsigned file pointer type, and remove cast.
122 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
123 Add "count", not "sz".
124
ab27f80c
PA
1252017-06-26 Pedro Alves <palves@redhat.com>
126
127 PR binutils/21665
128 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
129 "sz".
130
1f473e3d
L
1312017-06-26 H.J. Lu <hongjiu.lu@intel.com>
132
133 PR binutils/21665
134 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
135 a missing line.
136
b417536f
MR
1372017-06-26 Maciej W. Rozycki <macro@imgtec.com>
138
139 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
140 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
141 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
142 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
143 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
144
0630b49c
L
1452017-06-26 H.J. Lu <hongjiu.lu@intel.com>
146
147 PR binutils/21665
148 * compress.c (bfd_get_full_section_contents): Don't check the
149 file size here.
150 * libbfd.c (_bfd_generic_get_section_contents): Check for and
ea9aafc4 151 reject a section whose size + offset is greater than the size
0630b49c
L
152 of the entire file.
153 (_bfd_generic_get_section_contents_in_window): Likewise.
515a4464 154
04e15b4a
NC
1552017-06-26 Nick Clifton <nickc@redhat.com>
156
157 PR binutils/21670
158 * tekhex.c (getvalue): Check for the source pointer exceeding the
159 end pointer before the first byte is read.
160
cfd14a50
NC
1612017-06-26 Nick Clifton <nickc@redhat.com>
162
163 PR binutils/21665
ea9aafc4 164 * opncls.c (get_build_id): Check that the section is big enough
cfd14a50
NC
165 to contain the whole note.
166 * compress.c (bfd_get_full_section_contents): Check for and reject
ea9aafc4 167 a section whose size is greater than the size of the entire file.
cfd14a50
NC
168 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
169 contain a notes section.
170
93ec5e23
AK
1712017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
172
173 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
174 pointer checks.
175 (elf_s390_modify_segment_map): Likewise.
176 (bfd_elf_s390_set_options): Lisewise.
177
57963c05
AM
1782017-06-26 Alan Modra <amodra@gmail.com>
179
180 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
181 a --just-syms bfd.
182 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
183 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
184 .preinit_array on --just-syms bfds.
185 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
186 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
187 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
188
5cc4ca83
ST
1892017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
190
191 * elf.c (find_link): Bounds check "hint".
192
bff0500d
TP
1932017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
194
195 * elf32-arm.c (using_thumb_only): Update list of architectures in
196 BFD_ASSERT for which the logic is valid.
197 (using_thumb2_bl): Likewise.
198 (using_thumb2): Likewise and return true for ARMv8-R.
199 (arch_has_arm_nop): Likewise.
200 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
201 merging logic. Update commentis for value 15 of v8m_baseline,
202 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
203 merging of value 15 of Tag_CPU_arch.
204
4aa57d6a
JW
2052017-06-23 Jiong Wang <jiong.wang@arm.com>
206
207 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
208 BFD_RELOC_AARCH64_ADR_GOT_PAGE
209 * bfd-in2.h: Regenerate.
210
5d8763a3
L
2112017-06-22 H.J. Lu <hongjiu.lu@intel.com>
212
213 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
214 the error_alignment label forward. Properly align program
215 property note section.
216
e652757b
EC
2172017-06-22 Eric Christopher <echristo@gmail.com>
218
219 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
220 abs to fix a truncation warning.
221
84da4cf8
L
2222017-06-22 H.J. Lu <hongjiu.lu@intel.com>
223
224 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
225 local undefined weak symbol to 0.
226 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
227
48580982
L
2282017-06-22 H.J. Lu <hongjiu.lu@intel.com>
229
230 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
231 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
232 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
233 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
234 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
235 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
236 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
237 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
238
ee2fdd6f
L
2392017-06-22 H.J. Lu <hongjiu.lu@intel.com>
240
241 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
242 (elf_i386_lazy_ibt_plt_entry): Likewise.
243 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
244 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
245 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
246 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
247 (elf_i386_lazy_plt_layout): Likewise.
248 (elf_i386_non_lazy_plt_layout): Likewise.
249 (elf_i386_link_hash_entry): Add plt_second.
250 (elf_i386_link_hash_table): Add plt_second and
251 plt_second_eh_frame.
252 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
253 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
254 the second PLT. Check the second PLT.
255 (elf_i386_relocate_section): Use the second PLT to resolve
256 PLT reference if needed.
257 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
258 needed.
259 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
260 second PLT. Generate unwind info for the second PLT.
261 (elf_i386_plt_type): Add plt_second.
262 (elf_i386_get_synthetic_symtab): Support the second PLT.
263 (elf_i386_parse_gnu_properties): Support
264 GNU_PROPERTY_X86_FEATURE_1_AND.
265 (elf_i386_merge_gnu_properties): Support
266 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
267 on GNU_PROPERTY_X86_FEATURE_1_IBT
268 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
269 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
270 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
271 is set on all relocatable inputs.
272 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
273 (elf_x32_lazy_ibt_plt_entry): Likewise.
274 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
275 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
276 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
277 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
278 (elf_x86_64_lazy_ibt_plt): Likewise.
279 (elf_x32_lazy_ibt_plt): Likewise.
280 (elf_x86_64_non_lazy_ibt_plt): Likewise.
281 (elf_x32_non_lazy_ibt_plt): Likewise.
282 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
283 (elf_x86_64_parse_gnu_properties): Support
284 GNU_PROPERTY_X86_FEATURE_1_AND.
285 (elf_x86_64_merge_gnu_properties): Support
286 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
287 on GNU_PROPERTY_X86_FEATURE_1_IBT
288 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
289 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
290 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
291 is set on all relocatable inputs.
292
d19237d9
NC
2932017-06-22 Nick Clifton <nickc@redhat.com>
294
295 PR binutils/21649
296 * som.c (setup_sections): NUL terminate the space_strings buffer.
297 Check that the space.name field does not index beyond the end of
298 the space_strings buffer.
299
6879f5a9
NC
3002017-06-21 Nick Clifton <nickc@redhat.com>
301
302 PR binutils/21646
303 * coff-sh.c (sh_reloc): Check for an out of range reloc.
304
7adc0a81
NC
3052017-06-21 Nick Clifton <nickc@redhat.com>
306
307 PR binutils/21639
308 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
309 type of the size parameter.
310 (_bfd_vms_save_counted_string): Add second parameter - the maximum
311 length of the counted string.
312 * vms.h (_bfd_vms_save_sized_string): Update prototype.
313 (_bfd_vms_save_counted_string): Likewise.
314 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
315 _bfd_vms_save_counted_string.
316 (_bfd_vms_slurp_ehdr): Likewise.
317 (_bfd_vms_slurp_egsd): Likewise.
318 (Parse_module): Likewise.
319
6e1816be
AM
3202017-06-21 Alan Modra <amodra@gmail.com>
321
322 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
323 calls before tocsave calls.
324 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
325 following nop.
326
20bd1b6b
NC
3272017-06-21 Nick Clifton <nickc@redhat.com>
328
329 PR binutils/21645
330 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
331 bfd_get_full_section_contents returns no contents.
332
3de58d95
NC
3332017-06-21 Nick Clifton <nickc@redhat.com>
334
335 PR binutils/21638
336 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
337 record.
338
cb06d03a
NC
3392017-06-21 Nick Clifton <nickc@redhat.com>
340
341 PR binutils/21637
342 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
343 list.
344 (image_set_ptr): Likewise.
345 (alpha_vms_fix_sec_rel): Likewise.
346 (alpha_vms_slurp_relocs): Likewise.
347
c458d007
NC
3482017-06-21 Nick Clifton <nickc@redhat.com>
349
350 PR binutils/21633
351 * ieee.c (ieee_slurp_sections): Check for a NULL return from
352 read_id.
353 (ieee_archive_p): Likewise.
354 (ieee_object_p): Likewise.
355
ce497010
NC
3562017-06-21 Nick Clifton <nickc@redhat.com>
357
358 PR binutils/21640
359 * elf.c (setup_group): Zero the group section pointer list after
360 allocation so that loops can be caught. Check for NULL pointers
361 when processing a group list.
362
fd52715c
AK
3632017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
364
365 * elf-s390.h: New file.
366 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
367 field.
368 (elf_s390_additional_program_headers): New function.
369 (elf_s390_modify_segment_map): New function.
370 (bfd_elf_s390_set_options): New function.
371 (elf_backend_additional_program_headers)
372 (elf_backend_modify_segment_map): Add macro definitions.
373
abfa390d
L
3742017-06-19 H.J. Lu <hongjiu.lu@intel.com>
375
376 PR ld/21626
377 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
378 the DYNAMIC bit instead of bfd_count_sections.
379
bc21b167
NC
3802017-06-19 Nick Clifton <nickc@redhat.com>
381
382 PR binutils/21618
383 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
384 length.
385 (evax_bfd_print_eeom): Likewise.
386 (evax_bfd_print_egsd): Check for an overlarge record length.
387 (evax_bfd_print_etir): Likewise.
388
acb56a83
NC
3892017-06-19 Nick Clifton <nickc@redhat.com>
390
391 PR binutils/21612
392 * libieee.h (struct common_header_type): Add end_p field.
393 * ieee.c (this_byte_and_next): Do not advance input_p beyond
394 end_p.
395 (read_id): Check for a length that exceeds the remaining bytes in
396 the input buffer.
397 (ieee_seek): Initialise end_p.
398 (ieee_archive_p): Likewise.
399 (ieee_object_p): Likewise.
400
72e84f96
NC
4012017-06-19 Nick Clifton <nickc@redhat.com>
402
80053e46
NC
403 PR binutils/21611
404 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
405 before reading the EIHS structure entries.
406
4072017-06-19 Nick Clifton <nickc@redhat.com>
408
409 PR binutils/21615
72e84f96
NC
410 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
411 gsd_size. Check that there are enough bytes remaining to read the
412 type and size of the next egsd. Check that the size of the egsd
413 does not exceed the size of the record.
414
875ffa3e
AM
4152017-06-19 Alan Modra <amodra@gmail.com>
416
417 * config.bfd: Correct targ_underscore for cris.
418
bdd32e03
AM
4192017-06-18 Alan Modra <amodra@gmail.com>
420
421 * config.bfd: Correct targ_underscore for epiphany, ip2k,
422 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
423
4b48e2f6
NC
4242017-06-16 Nick Clifton <nickc@redhat.com>
425
426 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
427 bucketlist is empty because there are no symbols to add to the
428 list.
429
7dba9362
AM
4302017-06-16 Alan Modra <amodra@gmail.com>
431
432 PR ld/20022
433 PR ld/21557
434 PR ld/21562
435 PR ld/21571
436 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
437 (BFD_JUMP_TABLE_LINK): Likewise.
438 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
439 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
440 (bfd_elf_define_start_stop): New function.
441 * linker.c (bfd_generic_define_start_stop): New function.
442 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
443 new field.
444 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
445 * aout-target.h (MY_bfd_define_start_stop): Define.
446 * aout-tic30.c (MY_bfd_define_start_stop): Define.
447 * binary.c (binary_bfd_define_start_stop): Define.
448 * bout.c (b_out_bfd_define_start_stop): Define.
449 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
450 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
451 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
452 * coffcode.h (coff_bfd_define_start_stop): Define.
453 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
454 * i386msdos.c (msdos_bfd_define_start_stop): Define.
455 * i386os9k.c (os9k_bfd_define_start_stop): Define.
456 * ieee.c (ieee_bfd_define_start_stop): Define.
457 * ihex.c (ihex_bfd_define_start_stop): Define.
458 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
459 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
460 * mmo.c (mmo_bfd_define_start_stop): Define.
461 * nlm-target.h (nlm_bfd_define_start_stop): Define.
462 * oasys.c (oasys_bfd_define_start_stop): Define.
463 * pef.c (bfd_pef_bfd_define_start_stop): Define.
464 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
465 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
466 * som.c (som_bfd_define_start_stop): Define.
467 * srec.c (srec_bfd_define_start_stop): Define.
468 * tekhex.c (tekhex_bfd_define_start_stop): Define.
469 * versados.c (versados_bfd_define_start_stop): Define.
470 * vms-alpha.c (vms_bfd_define_start_stop): Define.
471 (alpha_vms_bfd_define_start_stop): Define.
472 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
473 * bfd-in2.h: Regenerate.
474 * libbfd.h: Regenerate.
475
d68f1976
JW
4762017-06-16 Jiong Wang <jiong.wang@arm.com>
477
478 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
479 SYMBOL_REFERENCES_LOCAL.
480
6353d82b
JW
4812017-06-15 Jiong Wang <jiong.wang@arm.com>
482
483 PR ld/21532
484 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
485 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
486 runtime for if there needs copy relocation elimination.
487 (need_copy_relocation_p): New function. Return true for symbol with
488 pc-relative references and if it's against read-only sections.
489 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
490 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
491 that are related with accessing external objects.
492 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
493 in elfNN_aarch64_check_relocs.
494
63634bb4
NC
4952017-06-15 Nick Clifton <nickc@redhat.com>
496
497 PR binutils/21582
498 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
499 bugs.
62b76e4b
NC
500 PR binutils/21581
501 (ieee_archive_p): Likewise.
63634bb4 502
76800cba
NC
5032017-06-15 Nick Clifton <nickc@redhat.com>
504
505 PR binutils/21579
506 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
507
f7e16c2a
MF
5082017-06-14 Max Filippov <jcmvbkbc@gmail.com>
509
510 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
511 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
512 keep both windowed and call0 ABI PLT definitions.
513 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
514 elf_xtensa_*_plt_entry endex.
515 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
516
f461bbd8
NC
5172017-06-14 Nick Clifton <nickc@redhat.com>
518
519 PR binutils/21578
520 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
521 flag value.
522
c53d2e6d
NC
5232017-06-14 Nick Clifton <nickc@redhat.com>
524
525 PR binutils/21589
526 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
527 maximum value for the ascic pointer. Check that name processing
528 does not read beyond this value.
529 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
530 end of etir record.
531
04f963fd
NC
5322017-06-14 Nick Clifton <nickc@redhat.com>
533
534 PR binutils/21591
535 * versados.c (versados_mkobject): Zero the allocated tdata structure.
536 (process_otr): Check for an invalid offset in the otr structure.
537
319c2dbe
SH
5382017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
539
540 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
541
cbd0eecf
L
5422017-06-13 H.J. Lu <hongjiu.lu@intel.com>
543
544 PR ld/20022
545 PR ld/21557
546 PR ld/21562
547 PR ld/21571
548 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
549 vtable field to a union.
550 (_bfd_elf_is_start_stop): Removed.
551 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
552 __start_SECNAME and __stop_SECNAME symbols.
553 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
554 * elflink.c (_bfd_elf_is_start_stop): Removed.
555 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
556 _bfd_elf_is_start_stop.
557 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
558 __stop_SECNAME symbols. Updated.
559 (elf_gc_smash_unused_vtentry_relocs): Likewise.
560 (bfd_elf_gc_record_vtinherit): Likewise.
561 (bfd_elf_gc_record_vtentry): Likewise.
562
10bbbc1d
NC
5632017-06-13 Nick Clifton <nickc@redhat.com>
564
565 PR ld/21524
566 * elflink.c (elf_link_adjust_relocs): Generate an error when
567 encountering a reloc against a symbol removed by garbage
568 collection.
569
5c3ce2bc
L
5702017-06-12 H.J. Lu <hongjiu.lu@intel.com>
571
572 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
573 to merge_gnu_properties.
574 * elf-properties.c (elf_merge_gnu_properties): Add struct
575 bfd_link_info * and pass it to merge_gnu_properties.
576 (elf_merge_gnu_property_list): Add struct bfd_link_info *
577 and pass it to elf_merge_gnu_properties.
578 (_bfd_elf_link_setup_gnu_properties): Pass info to
579 elf_merge_gnu_property_list.
580 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
581 bfd_link_info *.
582 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
583
9b97dfbf
AM
5842017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
585
586 PR 21564
587 * binary.c (binary_set_section_contents): Scale lma by octets
588 per byte to set filepos.
589
e3d1d408
CM
5902017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
591
592 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
593 dynamic sections.
594
64aa8e03
CM
5952017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
596
597 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
598 require TEXTREL.
599
a0abe743
CM
6002017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
601
602 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
603 patched section contents for TLS IE reloc.
604 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
605
f4e6805f
CM
6062017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
607
608 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
609 RELOC_FOR_GLOBAL_SYMBOL macro.
610
cd640291
CM
6112018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
612
613 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
614 changes.
615
7ef0acc1
VG
6162017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
617
618 * config/tc-arc.c (md_undefined_symbol): Changed.
619 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
620
cc89d0b3
CM
6212017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
622
623 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
624 symbols.
625
9d5c718b
CM
6262017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
627
628 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
629 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
630
be9e3704
CM
6312017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
632
633 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
634 object is created.
635
4ec192e6
RE
6362017-06-08 Richard Earnshaw <rearnsha@arm.com>
637
638 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
639 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
640 is non-zero. Add clarifying comments.
641
51fa2693
L
6422017-06-08 H.J. Lu <hongjiu.lu@intel.com>
643
644 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
645 name. Use local IFUNC symbol name string to report unsupported
646 non-PIC call to IFUNC function.
647 (elf_i386_relocate_section): Dump local IFUNC name with minfo
648 when generating R_386_IRELATIVE relocation.
649 (elf_i386_finish_dynamic_symbol): Likewise.
650 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
651 IFUNC symbol name.
652 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
653 when generating R_X86_64_IRELATIVE relocation.
654 (elf_x86_64_finish_dynamic_symbol): Likewise.
655
78e8a2ff
JM
6562017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
657
658 * elf.c (setup_group): Make sure BFD sections are created for all
659 group sections in the input file when processing SHF_GROUP
660 sections.
661 (bfd_section_from_shdr): Avoid duplicating logic already
662 implemented in `setup_group'.
663
9949827b
DBR
6642017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
665
666 PR binutils/21546
667 * peXXigen.c (pe_print_idata): Use the address of the first thunk
668 if the hint address is zero.
669
0ee3a6db
JC
6702017-06-06 James Clarke <jrtc27@jrtc27.com>
671
672 PR ld/19579
673 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
674 ELF_COMMON_DEF_P for common symbols.
675
7bdf4127
AB
6762017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
677
678 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
679 SEC_GROUP sections as SEC_EXCLUDE.
680 (bfd_elf_set_group_contents): Replace use of abort with an assert.
681 (assign_section_numbers): Use resolve_section_groups flag instead
682 of relocatable link type.
683 (_bfd_elf_init_private_section_data): Use resolve_section_groups
684 flag instead of checking the final_link flag for part of the
685 checks in here. Fix white space as a result.
686 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
687 instead of relocatable link type.
688 (bfd_elf_final_link): Likewise.
689
458ad2b8
JM
6902017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
691
692 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
693 variable `bed'.
694 * elf32-score.c (score_elf_final_link_relocate): Likewise.
695 (s3_bfd_score_elf_check_relocs): Likewise.
696 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
697 (score_elf_final_link_relocate): Likewise.
698 (s7_bfd_score_elf_check_relocs): Likewise.
699
fbebaf4a
JM
7002017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
701
702 * elflink.c (init_reloc_cookie_rels): Remove unused variable
703 `bed'.
704
056bafd4
MR
7052017-06-06 Maciej W. Rozycki <macro@imgtec.com>
706
707 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
708 from `reloc_count' rather than decrementing it.
709 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
710 `reloc_count' by `int_rels_per_ext_rel'.
711 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
712 `reloc_count' by `int_rels_per_ext_rel' for last relocation
713 entry determination.
714 (s3_bfd_score_elf_check_relocs): Likewise.
715 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
716 (s7_bfd_score_elf_relocate_section): Likewise.
717 (s7_bfd_score_elf_check_relocs): Likewise.
718 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
719 prototype and function.
720 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
721 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
722 triple rather than once the sum of REL and RELA relocation entry
723 counts.
724 (bfd_elf64_get_reloc_upper_bound): Remove macro.
725 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
726 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
727 storage allocation size determination.
728 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
729 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
730 by `int_rels_per_ext_rel' for last relocation entry
731 determination.
732 (bfd_elf_final_link): Do not multiply `reloc_count' by
733 `int_rels_per_ext_rel' for internal relocation storage
734 allocation size determination.
735 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
736 `int_rels_per_ext_rel' for last relocation entry determination.
737 (elf_gc_smash_unused_vtentry_relocs): Likewise.
738 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
739 (_bfd_mips_elf_relocate_section): Likewise.
740
af54f0eb
AM
7412017-06-05 Alan Modra <amodra@gmail.com>
742
743 PR 21529
744 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
745
6cf3bf88 7462017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
747
748 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
749 determine structure sizes.
750 (elfcore_grok_freebsd_prstatus): Likewise.
751
f378ab09
AM
7522017-06-01 Alan Modra <amodra@gmail.com>
753
754 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
755 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
756 dynamic objects.
757 (is_elfv2_localentry0): New function.
758 (ppc64_elf_tls_setup): Default params->plt_localentry0.
759 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
760 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
761 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
762 optimized localentry:0 stubs.
763 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
764 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
765 localentry:0 stubs.
766 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
767 DT_PPC64_OPT.
768 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
769
8c65b54f
CS
7702017-05-30 Casey Smith <clegg89@gmail.com>
771
772 PR ld/21523
773 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
774 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
775
64984c22
AK
7762017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
777
778 * cpu-arc.c (arc_compatible): New function.
779
37cd3877
AK
7802017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
781
782 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
783
8e2f54bc
L
7842017-05-30 H.J. Lu <hongjiu.lu@intel.com>
785
786 PR binutils/21519
787 * bfdio.c (bfd_get_file_size): New function.
788 * bfd-in2.h: Regenerated.
789
8e7f04f1 7902017-05-23 Dilian Palauzov <git-dpa@aegee.org>
791
792 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
793 comments.
794
25f94347
L
7952017-05-22 H.J. Lu <hongjiu.lu@intel.com>
796
797 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
798 dynobj instead of htab->elf.dynobj.
799
e5713223
MR
8002017-05-19 Maciej W. Rozycki <macro@imgtec.com>
801
802 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
803 and function.
804 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
805 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
806 actual number of internal relocations retrieved. Adjust
807 function description.
808 (bfd_elf64_canonicalize_reloc): Remove macro.
809 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
810
64517994
JM
8112017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
812
813 * archures.c (bfd_mach_sparc_v9m8): Define.
814 (bfd_mach_sparc_v8plusm8): Likewise.
815 (bfd_mach_sparc_v9_p): Adjust to M8.
816 (bfd_mach_sparc_64bit_p): Likewise.
817 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
818 bfd_mach_sparc_v8plusm8.
819 * bfd-in2.h: Regenerated.
820 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
821 sparc:v8plusm8.
822 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
823 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
824 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
825 SHA3.
826 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
827 bfd_mach_sparc_v8plusm8.
828
eb026f09
AM
8292017-05-19 Alan Modra <amodra@gmail.com>
830
831 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
832 debug and special sections when no non-note alloc sections in an
833 object are kept.
834
535b785f
AM
8352017-05-18 Alan Modra <amodra@gmail.com>
836
837 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
838 * elf-m10300.c: Likewise.
839 * elf.c: Likewise.
840 * elf32-arc.c: Likewise.
841 * elf32-bfin.c: Likewise.
842 * elf32-m68k.c: Likewise.
843 * elf32-nds32.c: Likewise.
844 * elf32-tilepro.c: Likewise.
845 * elflink.c: Likewise.
846 * elfnn-aarch64.c: Likewise.
847 * elfnn-riscv.c: Likewise.
848 * elfxx-tilegx.c: Likewise.
849 * mach-o.c: Likewise.
850 * peXXigen.c: Likewise.
851 * vms-alpha.c: Likewise.
852 * vms-lib.c: Likewise.
853
b7c871ed
L
8542017-05-17 H.J. Lu <hongjiu.lu@intel.com>
855
856 PR ld/20882
857 * elflink.c (elf_gc_mark_debug_section): New function.
858 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
859 referenced by kept debug sections.
860
bc4e12de
AM
8612017-05-16 Alan Modra <amodra@gmail.com>
862
863 * elf-m10300.c: Rename occurrences of non_ir_ref.
864 * elf32-arm.c: Likewise.
865 * elf32-bfin.c: Likewise.
866 * elf32-cr16.c: Likewise.
867 * elf32-cris.c: Likewise.
868 * elf32-d10v.c: Likewise.
869 * elf32-dlx.c: Likewise.
870 * elf32-fr30.c: Likewise.
871 * elf32-frv.c: Likewise.
872 * elf32-hppa.c: Likewise.
873 * elf32-i370.c: Likewise.
874 * elf32-i386.c: Likewise.
875 * elf32-iq2000.c: Likewise.
876 * elf32-lm32.c: Likewise.
877 * elf32-m32c.c: Likewise.
878 * elf32-m32r.c: Likewise.
879 * elf32-m68hc1x.c: Likewise.
880 * elf32-m68k.c: Likewise.
881 * elf32-mcore.c: Likewise.
882 * elf32-metag.c: Likewise.
883 * elf32-microblaze.c: Likewise.
884 * elf32-moxie.c: Likewise.
885 * elf32-msp430.c: Likewise.
886 * elf32-mt.c: Likewise.
887 * elf32-nios2.c: Likewise.
888 * elf32-or1k.c: Likewise.
889 * elf32-ppc.c: Likewise.
890 * elf32-rl78.c: Likewise.
891 * elf32-s390.c: Likewise.
892 * elf32-score.c: Likewise.
893 * elf32-score7.c: Likewise.
894 * elf32-sh.c: Likewise.
895 * elf32-tic6x.c: Likewise.
896 * elf32-tilepro.c: Likewise.
897 * elf32-v850.c: Likewise.
898 * elf32-vax.c: Likewise.
899 * elf32-xstormy16.c: Likewise.
900 * elf32-xtensa.c: Likewise.
901 * elf64-alpha.c: Likewise.
902 * elf64-hppa.c: Likewise.
903 * elf64-ia64-vms.c: Likewise.
904 * elf64-mmix.c: Likewise.
905 * elf64-ppc.c: Likewise.
906 * elf64-s390.c: Likewise.
907 * elf64-sh64.c: Likewise.
908 * elf64-x86-64.c: Likewise.
909 * elflink.c: Likewise.
910 * elfnn-aarch64.c: Likewise.
911 * elfnn-ia64.c: Likewise.
912 * elfnn-riscv.c: Likewise.
913 * elfxx-mips.c: Likewise.
914 * elfxx-sparc.c: Likewise.
915 * elfxx-tilegx.c: Likewise.
916 * linker.c: Likewise.
917
4070765b
AM
9182017-05-16 Alan Modra <amodra@gmail.com>
919
920 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
921 * elflink.c (elf_link_add_object_symbols): Update to use
922 non_ir_ref_dynamic.
923 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
924 non_ir_ref.
925 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
926
25499ac7
MR
9272017-05-15 Maciej W. Rozycki <macro@imgtec.com>
928
929 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
930
73caa85d
L
9312017-05-12 H.J. Lu <hongjiu.lu@intel.com>
932
933 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
934 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
935 properties.
936 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
937
f2c29a16
L
9382017-05-11 H.J. Lu <hongjiu.lu@intel.com>
939
940 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
941 to plt_second.
942 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
943 to plt_second/plt_second_eh_frame.
944 (elf_x86_64_link_hash_newfunc): Updated.
945 (elf_x86_64_allocate_dynrelocs): Likewise.
946 (elf_x86_64_size_dynamic_sections): Likewise.
947 (elf_x86_64_relocate_section): Likewise.
948 (elf_x86_64_finish_dynamic_symbol): Likewise.
949 (elf_x86_64_finish_dynamic_sections): Likewise.
950 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
951 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
952 .plt.sec section.
953 (elf_backend_setup_gnu_properties): Updated. Create the
954 .plt.sec section instead of the .plt.sec section.
955
dc2be3d2
L
9562017-05-11 H.J. Lu <hongjiu.lu@intel.com>
957
958 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
959 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
960 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
961
db84b98a
JM
9622017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
963
964 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
965 (bfd_elf64_set_reloc): Define.
966 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
967
23186865
JM
9682017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
969
970 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
971 (struct bfd_target): New field _bfd_set_reloc.
972 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
973 * reloc.c (_bfd_generic_set_reloc): New function.
974 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
975 * nlm-target.h (nlm_set_reloc): Likewise.
976 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
977 * aout-tic30.c (MY_set_reloc): Likewise.
978 * aout-target.h (MY_set_reloc): Likewise.
979 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
980 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
981 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
982 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
983 * aout-adobe.c (aout_32_set_reloc): Likewise.
984 * bout.c (b_out_set_reloc): Likewise.
985 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
986 * i386os9k.c (aout_32_set_reloc): Likewise.
987 * ieee.c (ieee_set_reloc): Likewise.
988 * oasys.c (oasys_set_reloc): Likewise.
989 * som.c (som_set_reloc): Likewise.
990 * versados.c (versados_set_reloc): Likewise.
991 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
992 _bfd_generic_set_reloc.
993 (rs6000_xcoff64_aix_vec): LIkewise.
994 * libbfd.c (_bfd_norelocs_set_reloc): New function.
995 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
996 * i386msdos.c (msdos_set_reloc): Define to
997 _bfd_norelocs_set_reloc.
998 * elfcode.h (elf_set_reloc): Define.
999 * bfd-in2.h: Regenerated.
1000
aab82f4c
L
10012017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1002
1003 PR ld/21481
1004 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1005 for IFUNC function address.
1006
53a346d8
CZ
10072017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1008
1009 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1010 (CONFLICT_LIST): Likewise.
1011 (opcode/arc-attrs.h): Include.
1012 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1013 (arc_extract_features): New file.
1014 (arc_stralloc): Likewise.
1015 (arc_elf_merge_attributes): Likewise.
1016 (arc_elf_merge_private_bfd_data): Use object attributes.
1017 (bfd_arc_get_mach_from_attributes): New function.
1018 (arc_elf_object_p): Use object attributes.
1019 (arc_elf_final_write_processing): Likewise.
1020 (elf32_arc_obj_attrs_arg_type): New function.
1021 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1022 (elf32_arc_section_from_shdr): Likewise.
1023 (elf_backend_obj_attrs_vendor): Define.
1024 (elf_backend_obj_attrs_section): Likewise.
1025 (elf_backend_obj_attrs_arg_type): Likewise.
1026 (elf_backend_obj_attrs_section_type): Likewise.
1027 (elf_backend_obj_attrs_handle_unknown): Likewise.
1028 (elf_backend_section_from_shdr): Likewise.
1029
e645cf40
AG
10302017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1031
1032 PR ld/21458
1033 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1034 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1035 and the destination is a Thumb symbol.
1036
dd9e66ee
L
10372017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1038
1039 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1040 initializer to silence GCC 4.2.
1041 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1042
38b12349
L
10432017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1044
1045 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1046 (LAZY_PLT_ENTRY_SIZE): This.
1047 (NON_LAZY_PLT_ENTRY_SIZE): New.
1048 (elf_x86_64_plt0_entry): Renamed to ...
1049 (elf_x86_64_lazy_plt0_entry): This.
1050 (elf_x86_64_plt_entry): Renamed to ...
1051 (elf_x86_64_lazy_plt_entry): This.
1052 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1053 (elf_x86_64_lazy_bnd_plt0_entry): This.
1054 (elf_x86_64_legacy_plt_entry): Removed.
1055 (elf_x86_64_bnd_plt_entry): Renamed to ...
1056 (elf_x86_64_lazy_bnd_plt_entry): This.
1057 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1058 (elf_x86_64_non_lazy_plt_entry): This.
1059 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1060 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1061 (elf_x86_64_eh_frame_plt): Renamed to ...
1062 (elf_x86_64_eh_frame_lazy_plt): This.
1063 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1064 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1065 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1066 (elf_x86_64_eh_frame_non_lazy_plt): This.
1067 (elf_x86_64_lazy_plt_layout): New.
1068 (elf_x86_64_non_lazy_plt_layout): Likewise.
1069 (elf_x86_64_plt_layout): Likewise.
1070 (elf_x86_64_backend_data): Remove PLT layout information. Add
1071 os for target system.
1072 (GET_PLT_ENTRY_SIZE): Removed.
1073 (elf_x86_64_lazy_plt): New.
1074 (elf_x86_64_non_lazy_plt): Likewise.
1075 (elf_x86_64_lazy_bnd_plt): Likewise.
1076 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1077 (elf_x86-64_arch_bed): Updated.
1078 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1079 (elf_x86_64_create_dynamic_sections): Removed.
1080 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1081 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1082 (elf_x86-64_adjust_dynamic_symbol): Updated.
1083 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1084 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1085 size for PLT0 if there is no PLT0. Get plt_entry_size from
1086 non_lazy_plt for non-lazy PLT entries.
1087 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1088 from non_lazy_plt for non-lazy PLT entries.
1089 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1090 if there is no PLT0.
1091 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1092 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1093 entries with non-lazy PLT layout. Don't fill the second and third
1094 slots in the PLT entry if there is no PLT0.
1095 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1096 if there is no PLT0. Set sh_entsize on the .plt.got section.
1097 (compare_relocs): New.
1098 (elf_x86_64_plt_type): Likewise.
1099 (elf_x86_64_plt): Likewise.
1100 (elf_x86_64_nacl_plt): New. Forward declaration.
1101 (elf_x86_64_get_plt_sym_val): Removed.
1102 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1103 against all dynamic relocations.
1104 (elf_x86_64_link_setup_gnu_properties): New function.
1105 (elf_backend_create_dynamic_sections): Updated.
1106 (elf_backend_setup_gnu_properties): New.
1107 (elf_x86_64_nacl_plt): New.
1108 (elf_x86_64_nacl_arch_bed): Updated.
1109
f604c2a2
L
11102017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1111
1112 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1113 (LAZY_PLT_ENTRY_SIZE): This.
1114 (NON_LAZY_PLT_ENTRY_SIZE): New.
1115 (elf_i386_plt0_entry): Renamed to ...
1116 (elf_i386_lazy_plt0_entry): This.
1117 (elf_i386_plt_entry): Renamed to ...
1118 (elf_i386_lazy_plt_entry): This.
1119 (elf_i386_pic_plt0_entry): Renamed to ...
1120 (elf_i386_pic_lazy_plt0_entry): This.
1121 (elf_i386_pic_plt_entry): Renamed to ...
1122 (elf_i386_pic_lazy_plt_entry): This.
1123 (elf_i386_got_plt_entry): Renamed to ...
1124 (elf_i386_non_lazy_plt_entry): This.
1125 (elf_i386_pic_got_plt_entry): Renamed to ...
1126 (elf_i386_pic_non_lazy_plt_entry): This.
1127 (elf_i386_eh_frame_plt): Renamed to ...
1128 (elf_i386_eh_frame_lazy_plt): This.
1129 (elf_i386_eh_frame_plt_got): Renamed to ...
1130 (elf_i386_eh_frame_non_lazy_plt): This.
1131 (elf_i386_plt_layout): Renamed to ...
1132 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1133 eh_frame_plt_got_size.
1134 (elf_i386_non_lazy_plt_layout): New.
1135 (elf_i386_plt_layout): Likewise.
1136 (elf_i386_non_lazy_plt): Likewise.
1137 (GET_PLT_ENTRY_SIZE): Removed.
1138 (elf_i386_plt): Renamed to ...
1139 (elf_i386_lazy_plt): This.
1140 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1141 (elf_i386_arch_bed): Updated.
1142 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1143 (elf_i386_create_dynamic_sections): Removed.
1144 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1145 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1146 (elf_i386_adjust_dynamic_symbol): Updated.
1147 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1148 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1149 size for PLT0 if there is no PLT0.
1150 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1151 output section is discarded only if GOT isn't empty.
1152 (elf_i386_relocate_section): Updated. Properly get PLT index
1153 if there is no PLT0.
1154 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1155 second and third slots in the PLT entry if there is no PLT0.
1156 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1157 if there is no PLT0. Set sh_entsize on the .plt.got section.
1158 (elf_i386_nacl_plt): Forward declaration.
1159 (elf_i386_get_plt_sym_val): Removed.
1160 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1161 against all dynamic relocations.
1162 (elf_i386_link_setup_gnu_properties): New function.
1163 (elf_backend_create_dynamic_sections): Updated.
1164 (elf_backend_setup_gnu_properties): New.
1165 (elf_i386_nacl_plt): Updated.
1166 (elf_i386_nacl_arch_bed): Likewise.
1167 (elf_i386_vxworks_arch_bed): Likewise.
1168
046734ff
TP
11692017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1170
1171 * elflink.c (elf_output_implib): Remove executable flag from import
1172 library bfd.
1173 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1174 library is a relocatable object file.
1175
b660e9eb
SKS
11762017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1177
1178 PR ld/21404
1179 * elf32-avr.c (avr_should_move_sym): New function.
1180 (avr_should_reduce_sym_size): Likewise.
1181 (avr_should_increase_sym_size): Likewise.
1182 (elf32_avr_relax_delete_bytes): Adjust symbol values
1183 and sizes by calling new functions.
1184
763a5fa4
PD
11852017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1186
1187 * config.bfd (riscv32-*): Enable rv64.
1188
73ec947d
AM
11892017-05-02 Alan Modra <amodra@gmail.com>
1190
1191 PR 21384
1192 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1193 rather than h->root.type == bfd_link_hash_new.
1194 (bfd_elf_record_link_assignment): Similarly, call
1195 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1196
a941291c
AM
11972017-04-29 Alan Modra <amodra@gmail.com>
1198
1199 PR 21432
1200 * reloc.c (reloc_offset_in_range): New function.
1201 (bfd_perform_relocation, bfd_install_relocation): Use it.
1202 (_bfd_final_link_relocate): Likewise.
1203
750eaa47
L
12042017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1205
1206 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1207 before using .plt.got.
1208 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1209
5b66fac4
L
12102017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1211
1212 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1213 instead of "+=" to update 0.
1214
de9a3c42
L
12152017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1216
1217 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1218 .plt.got section here.
1219 (elf_i386_check_relocs): Don't create the .plt.got section.
1220 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1221 the .plt.got and .plt.bnd sections here.
1222 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1223 .plt.bnd sections.
1224
da3d25af
L
12252017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1226
1227 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1228 has_bnd_reloc.
1229 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1230 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1231 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1232 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1233 has_bnd_reloc.
1234
fba37edd
L
12352017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1236
1237 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1238 to return bfd *.
1239 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1240 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1241 the first relocatable ELF input with GNU properties.
1242
1f78f649
L
12432017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1244
1245 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1246 VxWorks for non-PIC.
1247
76c20d54
AM
12482017-04-27 Alan Modra <amodra@gmail.com>
1249
1250 * elf-bfd.h (struct elf_backend_data): Make asection param of
1251 elf_backend_eh_frame_address_size const.
1252 (_bfd_elf_eh_frame_address_size): Likewise.
1253 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1254 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1255 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1256 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1257 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1258 (next_cie_fde_offset): Constify params.
1259 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1260
d7153c4a
AM
12612017-04-27 Alan Modra <amodra@gmail.com>
1262
1263 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1264 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1265 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1266 aug_data_len.
1267 (offset_adjust): New function.
1268 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1269 (adjust_eh_frame_local_symbols): Likewise.
1270 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1271 after changing anything. Return true if anything changed.
1272 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1273 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1274
641338d8
AM
12752017-04-27 Alan Modra <amodra@gmail.com>
1276
1277 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1278 when force_local.
1279
21d68fcd
AM
12802017-04-27 Alan Modra <amodra@gmail.com>
1281
1282 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1283 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1284 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1285 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1286 for undef and undefweak dyn_relocs.
1287 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1288 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1289 (allocate_got, allocate_dynrelocs): Likewise.
1290 (ppc64_elf_relocate_section): Likewise.
1291
97d343d4
L
12922017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1293
1294 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1295 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1296 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1297 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1298
04b31182
NC
12992017-04-26 Nick Clifton <nickc@redhat.com>
1300
1301 PR binutils/21434
1302 * reloc.c (bfd_perform_relocation): Check for a negative address
1303 in the reloc.
1304
23ec1e32
MR
13052017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1306
1307 PR ld/21334
1308 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1309 member.
1310 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1311 (elf_backend_always_renumber_dynsyms): Define.
1312 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1313 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1314 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1315 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1316 it.
1317 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1318
c46cec3a
MR
13192017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1320
1321 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1322 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1323 sections have been created.
1324
e63d1232
NC
13252017-04-26 Nick Clifton <nickc@redhat.com>
1326
1327 PR binutils/21431
1328 * compress.c (bfd_init_section_compress_status): Check the return
1329 value from bfd_malloc.
1330
9e9821dd
L
13312017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1332
1333 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1334 no_finish_dynamic_symbol.
1335 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1336 0.
1337 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1338 weak symbol, don't make it dynamic.
1339 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1340 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1341 relocation for GOT reference.
1342 (elf_x86_64_finish_dynamic_symbol): Abort if
1343 no_finish_dynamic_symbol isn't 0.
1344
0dc9a308
L
13452017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1346
1347 PR ld/21402
1348 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1349 undefined weak symbol, don't make it dynamic.
1350 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1351 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1352 relocation for R_386_GOT32.
1353
1587442d
L
13542017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1355
1356 PR ld/21425
1357 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1358
7eacd66b
AM
13592017-04-23 Alan Modra <amodra@gmail.com>
1360
1361 PR 21414
1362 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1363 * elf.c (lcomm_sym): New.
1364 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1365 * bfd-in2.h: Regenerate.
1366
bce964aa
AM
13672017-04-23 Alan Modra <amodra@gmail.com>
1368
1369 PR 21412
1370 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1371 parameters and comment.
1372 (_bfd_elf_get_reloc_section): Delete.
1373 (_bfd_elf_plt_get_reloc_section): Declare.
1374 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1375 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1376 Extracted from..
1377 (_bfd_elf_get_reloc_section): ..here. Delete.
1378 (assign_section_numbers): Call elf_get_reloc_section.
1379 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1380 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1381
97e83a10
AM
13822017-04-23 Alan Modra <amodra@gmail.com>
1383
1384 PR 21409
1385 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1386 no symbols.
1387
e133d005
L
13882017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1389
1390 PR ld/21402
1391 * elf32-i386.c (elf_i386_link_hash_entry): Add
1392 no_finish_dynamic_symbol.
1393 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1394 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1395 symbol, don't make it dynamic in PIE.
1396 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1397 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1398 relocation for R_386_GOT32
1399 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1400 isn't 0.
1401
3c5fce9b
L
14022017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1403
1404 PR ld/19617
1405 PR ld/21086
1406 * elflink.c (elf_link_add_object_symbols): Require
1407 --no-dynamic-linker with -E/--dynamic-list when creating
1408 dynamic sections.
1409
0fad2956
MR
14102017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1411
1412 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1413 if forced local.
1414
64575f78
MR
14152017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1416
1417 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1418 dynamic symbol sorting.
1419
59fa66c5
L
14202017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1421
1422 PR ld/21382
1423 * elflink.c (elf_link_add_object_symbols): Preserve
1424 dynamic_ref_after_ir_def when restoring the symbol table for
1425 unneeded dynamic object.
1426
e492d2f8
L
14272017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1428
1429 PR ld/21401
1430 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1431 on on undefined IFUNC symbol in the second PLT.
1432
10169134
WAF
14332017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1434
1435 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1436
954b63d4
AM
14372017-04-19 Alan Modra <amodra@gmail.com>
1438
1439 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1440 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1441 * elf32-ppc.c:Formatting.
1442 (ensure_undefweak_dynamic): Don't make dynamic when
1443 info->dynamic_undefined_weak is zero.
1444 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1445 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1446 not default visibility. Discard undef and undefweak
1447 dyn_relocs earlier.
1448 (ppc_elf_relocate_section): Adjust to suit.
1449 * elf64-ppc.c: Formatting.
1450 (ensure_undefweak_dynamic): Don't make dynamic when
1451 info->dynamic_undefined_weak is zero.
1452 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1453 info->dynamic_undefined_weak. Discard them earlier.
1454
e6699019
L
14552017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1456
1457 PR ld/21389
1458 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1459 before generating the version definition section.
1460
c5d37467
AM
14612017-04-17 Alan Modra <amodra@gmail.com>
1462
1463 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1464 state when a regular object file defines a symbol with
1465 incompatible type to that defined by an earlier shared lib.
1466
63a5468a
AM
14672017-04-13 Alan Modra <amodra@gmail.com>
1468
1469 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1470 * elf.c: Likewise.
1471 * elf32-arm.c: Likewise.
1472 * elf32-i386.c: Likewise.
1473 * elf32-mep.c: Likewise.
1474 * elf64-ia64-vms.c: Likewise.
1475 * elf64-x86-64.c: Likewise.
1476 * elflink.c: Likewise.
1477 * elfnn-ia64.c: Likewise.
1478 * elfxx-mips.c: Likewise.
1479
dae82561
AM
14802017-04-13 Alan Modra <amodra@gmail.com>
1481
1482 * aoutx.h: Use %B and %A in error messages throughout file.
1483 * aout-cris.c: Likewise.
1484 * archive.c: Likewise.
1485 * binary.c: Likewise.
1486 * coff-rs6000.c: Likewise.
1487 * coff-tic4x.c: Likewise.
1488 * coffcode.h: Likewise.
1489 * coffgen.c: Likewise.
1490 * cofflink.c: Likewise.
1491 * coffswap.h: Likewise.
1492 * cpu-arm.c: Likewise.
1493 * elf-eh-frame.c: Likewise.
1494 * elf-m10300.c: Likewise.
1495 * elf.c: Likewise.
1496 * elf32-arc.c: Likewise.
1497 * elf32-arm.c: Likewise.
1498 * elf32-bfin.c: Likewise.
1499 * elf32-frv.c: Likewise.
1500 * elf32-iq2000.c: Likewise.
1501 * elf32-m32c.c: Likewise.
1502 * elf32-microblaze.c: Likewise.
1503 * elf32-nds32.c: Likewise.
1504 * elf32-rl78.c: Likewise.
1505 * elf32-rx.c: Likewise.
1506 * elf32-score.c: Likewise.
1507 * elf32-score7.c: Likewise.
1508 * elf32-sh64.c: Likewise.
1509 * elf32-v850.c: Likewise.
1510 * elf32-vax.c: Likewise.
1511 * elf32-visium.c: Likewise.
1512 * elf64-ia64-vms.c: Likewise.
1513 * elf64-mmix.c: Likewise.
1514 * elf64-sh64.c: Likewise.
1515 * elfcode.h: Likewise.
1516 * elfnn-aarch64.c: Likewise.
1517 * elfnn-ia64.c: Likewise.
1518 * elfxx-mips.c: Likewise.
1519 * hpux-core.c: Likewise.
1520 * ieee.c: Likewise.
1521 * ihex.c: Likewise.
1522 * linker.c: Likewise.
1523 * merge.c: Likewise.
1524 * mmo.c: Likewise.
1525 * oasys.c: Likewise.
1526 * pdp11.c: Likewise.
1527 * peXXigen.c: Likewise.
1528 * rs6000-core.c: Likewise.
1529 * vms-alpha.c: Likewise.
1530 * xcofflink.c: Likewise.
1531
c08bb8dd
AM
15322017-04-13 Alan Modra <amodra@gmail.com>
1533
1534 * bfd.c (PRINT_TYPE): Define.
1535 (_doprnt): New function.
1536 (error_handler_internal): Use _doprnt.
1537 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1538 calls in their natural order, throughout file.
1539 * coff-mcore.c: Likewise.
1540 * coff-ppc.c: Likewise.
1541 * coff-tic80.c: Likewise.
1542 * cofflink.c: Likewise.
1543 * elf-s390-common.c: Likewise.
1544 * elf.c: Likewise.
1545 * elf32-arm.c: Likewise.
1546 * elf32-i386.c: Likewise.
1547 * elf32-m32r.c: Likewise.
1548 * elf32-msp430.c: Likewise.
1549 * elf32-spu.c: Likewise.
1550 * elf64-ia64-vms.c: Likewise.
1551 * elf64-sparc.c: Likewise.
1552 * elf64-x86-64.c: Likewise.
1553 * elflink.c: Likewise.
1554 * elfnn-aarch64.c: Likewise.
1555 * elfnn-ia64.c: Likewise.
1556 * elfxx-mips.c: Likewise.
1557
10463f39
AM
15582017-04-13 Alan Modra <amodra@gmail.com>
1559
1560 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1561 branch veneers" error. Fix double space and format message.
1562 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1563 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1564
4af8774e
AM
15652017-04-13 Alan Modra <amodra@gmail.com>
1566
1567 * bfd-in2.h: Regenerate.
1568
e4097f5e
L
15692017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1570
1571 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1572 extra `\n' in warning/error messages.
1573 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1574 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1575
537616aa
L
15762017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1577
1578 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1579 processor-specific properties with generic ELF target vector.
1580
bb1dd176
QZ
15812017-04-10 Qing Zhao <qing.zhao@oracle.com>
1582
1583 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1584 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1585 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1586 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1587 has_non_got_reloc.
1588 (link_hash_newfunc): Initialize has_got_reloc and
1589 has_non_got_reloc.
1590 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1591 section.
1592 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1593 has_non_got_reloc.
1594 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1595 has_non_got_reloc.
1596 (_bfd_sparc_elf_fixup_symbol): New function.
1597 (allocate_dynrelocs): Don't allocate space for dynamic
1598 relocations and discard relocations against resolved undefined
1599 weak symbols in executable. Don't make resolved undefined weak
1600 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1601 relocation against undefined weak symbols in PIE.
1602 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1603 relocations against resolved undefined weak symbols in PIE
1604 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1605 without ynamic PLT/GOT relocations for resolved undefined weak
1606 symbols.
1607 Don't generate dynamic relocation against resolved undefined
1608 weak symbol in executable.
1609 (pie_finish_undefweak_symbol): New function.
1610 (_bfd_sparc_elf_finish_dynamic_sections): Call
1611 pie_finish_undefweak_symbol on all symbols in PIE.
1612 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1613 (_bfd_sparc_elf_fixup_symbol): New function.
1614
d236cfd4
NC
16152017-04-10 Nick Clifton <nickc@redhat.com>
1616
1617 * config.bfd: Remove ns32k from obsolete list.
1618
6f9dbcd4
AM
16192017-04-10 Alan Modra <amodra@gmail.com>
1620
1621 PR 21287
1622 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1623 (special_sections_i): Likewise for .init_array.
1624 (special_sections_p): Likewise for .preinit_array.
1625
8170f769
L
16262017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1627
1628 PR ld/19579
1629 PR ld/21306
1630 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1631 ELF_COMMON_DEF_P for common symbols.
1632 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1633 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1634 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1635 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1636 07492f668d2173da7a2bda3707ff0985e0f460b6.
1637
49f4617b
PA
16382017-04-07 Pedro Alves <palves@redhat.com>
1639
1640 * opncls.c (bfd_get_debug_link_info): Rename to...
1641 (bfd_get_debug_link_info_1): ... this. Change type of second
1642 parameter to void pointer. Adjust.
1643 (bfd_get_debug_link_info): Reimplement on top of
1644 bfd_get_debug_link_info_1.
1645 (separate_debug_file_exists, separate_alt_debug_file_exists):
1646 Change type of second parameter to void pointer. Adjust.
1647 (get_func_type, check_func_type): Change type of second parameter
1648 to void pointer.
1649 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1650 the callback functions instead of passing the address of a local.
1651 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1652 find_separate_debug_file.
1653 (get_alt_debug_link_info_shim): Change type of second parameter to
1654 void pointer. Adjust.
1655 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1656 find_separate_debug_file.
1657 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1658 of second parameter to void pointer. Adjust.
1659 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1660 pointer local to find_separate_debug_file.
1661
16622017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
1663
1664 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1665 external symbols with a definition.
1666 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1667
86abf93a
AM
16682017-04-07 Alan Modra <amodra@gmail.com>
1669
1670 * po/SRC-POTFILES.in: Regenerate.
1671
8dea77f0
AM
16722017-04-05 Alan Modra <amodra@gmail.com>
1673
1674 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1675 reference counting.
1676
477bdd39
JT
16772017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1678
1679 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1680 numbers for DataDirectory entry indicies passed to
1681 add_data_entry().
1682
a91e1603
L
16832017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1684
1685 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1686 each GNU_MBIND section and align GNU_MBIND section to page size.
1687 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1688 segment for each GNU_MBIND section.
1689 (_bfd_elf_init_private_section_data): Copy sh_info from input
1690 for GNU_MBIND section.
1691
b5292032
PD
16922017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1693
1694 * elfnn-riscv.c (GP_NAME): Delete.
1695 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1696 (_bfd_riscv_relax_lui): Likewise.
1697
ad32986f
NC
16982017-04-04 Nick Clifton <nickc@redhat.com>
1699
1700 PR binutils/21342
1701 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1702 dereference.
1703 (bfd_elf_final_link): Only initialize the extended symbol index
1704 section if there are extended symbol tables to list.
1705
46bed679
L
17062017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1707
1708 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1709 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1710 * configure.ac (elf): Add elf-properties.lo.
1711 * Makefile.in: Regenerated.
1712 * configure: Likewise.
1713 * elf-bfd.h (elf_property_kind): New.
1714 (elf_property): Likewise.
1715 (elf_property_list): Likewise.
1716 (elf_properties): Likewise.
1717 (_bfd_elf_parse_gnu_properties): Likewise.
1718 (_bfd_elf_get_property): Likewise.
1719 (_bfd_elf_link_setup_gnu_properties): Likewise.
1720 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1721 and setup_gnu_properties.
1722 (elf_obj_tdata): Add properties.
1723 * elf-properties.c: New file.
1724 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1725 (elf_i386_merge_gnu_properties): Likewise.
1726 (elf_backend_parse_gnu_properties): Likewise.
1727 (elf_backend_merge_gnu_properties): Likewise.
1728 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1729 (elf_x86_64_merge_gnu_properties): Likewise.
1730 (elf_backend_parse_gnu_properties): Likewise.
1731 (elf_backend_merge_gnu_properties): Likewise.
1732 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1733 (elf_backend_parse_gnu_properties): Likewise.
1734 (elf_backend_setup_gnu_properties): Likewise.
1735 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1736 elf_backend_merge_gnu_properties and
1737 elf_backend_setup_gnu_properties.
1738
f96bd6c2
PC
17392017-03-30 Pip Cet <pipcet@gmail.com>
1740
1741 * elf32-wasm32.c: Add relocation code, two relocs.
1742 * reloc.c: Add wasm32 relocations.
1743 * libbfd.h: Regenerate.
1744 * bfd-in2.h: Regenerate.
1745 * bfd/po/bfd.pot: Regenerate.
1746
e643cb45
NC
17472017-03-29 Nick Clifton <nickc@redhat.com>
1748
1749 PR binutils/18025
1750 * coff-bfd.h (struct coff_section_data): Add new fields:
1751 saved_bias and bias.
1752 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1753 computed for PE binaries.
1754 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1755 missing abbrev.
1756
086554e8
HPN
17572017-03-28 Hans-Peter Nilsson <hp@axis.com>
1758
1759 PR ld/16044
1760 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1761 to handle a local symbol with a hash-symbol-entry; without PLT.
1762 Add BFD_ASSERT for an incidental case with GOT entry present.
1763 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1764 isn't forced-or-set local.
1765
a6be0538
PC
17662017-03-27 Pip Cet <pipcet@gmail.com>
1767
1768 * wasm-module.c: New file to support WebAssembly modules.
1769 * wasm-module.h: New file to support WebAssembly modules.
1770 * doc/webassembly.texi: Start documenting wasm-module.c.
1771 * config.bfd: Add wasm_vec.
1772 * targets.c: Likewise.
1773 * configure.ac: Likewise.
1774 * Makefile.am: Add entries for wasm-module.c.
1775 * Makefile.in: Regenerate.
1776 * configure: Regenerate.
1777 * po/SRC-POTFILES.in: Regenerate.
1778
79b1d3cb
PC
17792017-03-27 Pip Cet <pipcet@gmail.com>
1780
1781 * cpu-wasm32.c: New file to support wasm32 architecture.
1782 * elf32-wasm32.c: New file to support wasm32 architecture.
1783 * Makefile.am: Add wasm32 architecture.
1784 * archures.c: Likewise.
1785 * config.bfd: Likewise.
1786 * configure.ac: Likewise.
1787 * targets.c: Likewise.
1788 * Makefile.in: Regenerate.
1789 * bfd-in2.h: Regenerate.
1790 * configure: Regenerate.
1791 * po/SRC-POTFILES.in: Regenerate.
1792
aaed6f5b
AM
17932017-03-20 Alan Modra <amodra@gmail.com>
1794
1795 PR 21266
1796 * elf64-ppc.c (compare_symbols): Stabilize sort.
1797
82e66161
AM
17982017-03-18 Alan Modra <amodra@gmail.com>
1799
1800 * elf64-ppc.c (struct ppc_link_hash_table): Add
1801 local_ifunc_resolver and maybe_local_ifunc_resolver.
1802 (ppc_build_one_stub): Set flags on emitting dynamic
1803 relocation to ifunc.
1804 (ppc64_elf_relocate_section): Likewise.
1805 (ppc64_elf_finish_dynamic_symbol): Likewise.
1806 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1807 local dynamic relocs to ifuncs.
1808 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1809 local_ifunc_resolver and maybe_local_ifunc_resolver.
1810 (ppc_elf_relocate_section): Set flag on emitting dynamic
1811 relocation to ifuncs.
1812 (ppc_elf_finish_dynamic_symbol): Likewise.
1813 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1814 dynamic relocs to ifuncs.
1815
f955cccf
NC
18162017-03-13 Nick Clifton <nickc@redhat.com>
1817
1818 PR binutils/21202
1819 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1820 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1821 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1822 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1823 * bfd-in2.h: Regenerate.
1824 * libbfd.h: Regenerate.
1825 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1826 names.
1827 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1828 (elfNN_aarch64_howto_table): Likewise.
1829 (aarch64_tls_transition_without_check): Likewise.
1830 (aarch64_reloc_got_type): Likewise.
1831 (elfNN_aarch64_final_link_relocate): Likewise.
1832 (elfNN_aarch64_tls_relax): Likewise.
1833 (elfNN_aarch64_relocate_section): Likewise.
1834 (elfNN_aarch64_gc_sweep_hook): Likewise.
1835 (elfNN_aarch64_check_relocs): Likewise.
1836 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1837 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1838
4aef7643
AM
18392017-03-11 Alan Modra <amodra@gmail.com>
1840
1841 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1842 parameter is in fact used. Whitespace fixes.
1843 * elf64-ppc.c: Likewise.
1844
f03265d9
ST
18452017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1846
1847 * rs6000-core.c (CORE_NEW): Simplify macro when
1848 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1849
b1b07054
AM
18502017-03-07 Alan Modra <amodra@gmail.com>
1851
1852 PR 21224
1853 PR 20519
1854 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1855 dyn_relocs check.
1856
2e0ce1c8
AM
18572017-03-05 Alan Modra <amodra@gmail.com>
1858
1859 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1860 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1861 (next_cie_fde_offset): New function.
1862 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1863 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1864 four bytes. Align CIEs to four or eight bytes depending on
1865 per_encoding_aligned8. Align FDEs according to their encoding.
1866 Pad last FDE to output section alignment.
1867 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1868 assertion.
1869 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1870 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1871 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1872
f98450c6
NC
18732017-03-02 Martin Bickel <binutils@ineranves.de>
1874
1875 PR ld/21212
1876 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 1877 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 1878
673cff9b
AM
18792017-03-02 Alan Modra <amodra@gmail.com>
1880
1881 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1882
3de43e7b
AM
18832017-02-28 Alan Modra <amodra@gmail.com>
1884
1885 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1886 (ppc64_elf_relocate_section): Likewise.
1887
4ef97a1b
AM
18882017-02-28 Alan Modra <amodra@gmail.com>
1889
1890 PR 20995
1891 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1892 rather than elf32_nios2_hash_table or elf_hash_table.
1893 (create_got_section): Likewise.
1894 (nios2_elf32_finish_dynamic_symbol): Likewise.
1895 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1896 (nios2_elf32_size_dynamic_sections): Likewise.
1897 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1898 vars. Use htab equivalents directly instead. Don't create
1899 all dynamic sections on needing just the GOT. Use a goto
1900 rather than a fall-through with reloc test. Ensure
1901 htab->dynobj is set when making dynamic sreloc section.
1902 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1903 equivalent directly instead. Don't segfault on looking for
1904 .dynamic when dynamic sections have not been created. Don't
1905 segfault on .got.plt being discarded.
1906 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1907 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1908 fixme and another not so relevant comment.
1909 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1910 already set, set hash table dynobj on creating .sbss.
1911
7ba71655
AM
19122017-02-28 Alan Modra <amodra@gmail.com>
1913
1914 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1915 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1916 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1917 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1918 (ppc64_elf_relocate_section): Likewise.
1919 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1920 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1921 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1922 * libbfd.h: Regenerate.
1923 * bfd-in2.h: Regenerate.
1924
afbf7e8e
AM
19252017-02-28 Alan Modra <amodra@gmail.com>
1926
1927 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1928 dynamic .data.rel.ro read-only.
1929 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1930 rather than section flags when deciding where copy reloc goes.
1931 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1932 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1933 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1934 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1935 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1936 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1937 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1938 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1939 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1940 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1941 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1942 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1943 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1944 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1945 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1946 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1947 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1948 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1949 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1950
0e392101
MR
19512017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1952
1953 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1954 `jalr $0, $25' instruction encoding.
1955
bd757ca7
NC
19562017-02-27 Nick Clifton <nickc@redhat.com>
1957
1958 PR ld/21180
1959 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1960 generating a seg-fault when encountering a symbol that has been
1961 deleted by garbage collection.
1962
034fed0b
AM
19632017-02-25 Alan Modra <amodra@gmail.com>
1964
1965 * elf32-arc.c (struct dynamic_sections): Delete.
1966 (enum dyn_section_types): Delete.
1967 (dyn_section_names): Delete.
1968 (arc_create_dynamic_sections): Delete.
1969 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1970 segfault on discarded .rela.plt section.
1971 (elf_arc_size_dynamic_sections): Formatting. Don't call
1972 arc_create_dynamic_sections. Don't allocate memory for sections
1973 handled by the generic linker. Correct code finding relocs in
1974 read-only sections. Set SEC_EXCLUDE on zero size .got,
1975 .got.plt, and .dynbss sections. Do set .interp for pies.
1976
d0f744f9
AW
19772017-02-24 Andrew Waterman <andrew@sifive.com>
1978
1979 * elfnn-riscv.c (GP_NAME): New macro.
1980 (riscv_global_pointer_value): Use it.
1981 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1982 output section, consider only that section's alignment.
1983
5d58c733
MR
19842017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1985
1986 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1987 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1988 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1989 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1990
c1556ecd
MR
19912017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1992
1993 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1994 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1995 or misaligned.
1996
5499c7c7
AM
19972017-02-23 Alan Modra <amodra@gmail.com>
1998
1999 PR 20744
2000 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2001 16D relocations.
2002 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2003 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2004 relocs.
2005
902e9fc7
MR
20062017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2007
2008 PR ld/20828
2009 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2010 processing ahead of the call to `elf_gc_sweep_symbol'.
2011
758d96d8
NC
20122017-02-22 Nick Clifton <nickc@redhat.com>
2013
2014 PR binutils/21193
2015 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2016 created section 4-byte alignment.
2017
6528b6eb
AM
20182017-02-22 Alan Modra <amodra@gmail.com>
2019
2020 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2021 on .got or .plt output section being discarded by script.
2022 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2023 vxworks splt temp.
2024
24f1a751
AM
20252017-02-21 Alan Modra <amodra@gmail.com>
2026
2027 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2028 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2029
64487780
AM
20302017-02-20 Alan Modra <amodra@gmail.com>
2031
2032 PR 21181
2033 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2034 if DT_RELSZ/DT_RELASZ is zero.
2035
6438d1be
NC
20362017-02-17 Nick Clifton <nickc@redhat.com>
2037
2038 * compress.c (bfd_get_full_section_contents): Remember to reduce
2039 compressed size by the sizeof the compression header when
2040 decompressing the contents.
2041
4bc26c69
PA
20422017-02-17 Pedro Alves <palves@redhat.com>
2043
2044 * srec.c (Chunk): Rename to ...
2045 (_bfd_srec_len): ... this.
2046 (S3Forced): Rename to ...
2047 (_bfd_srec_forceS3): ... this.
2048 * objcopy.c: Adjust all references.
2049
7ec22e0f
PA
20502017-02-17 Pedro Alves <palves@redhat.com>
2051
2052 * archive.c (bsd_write_armap): Rename to ...
2053 (_bfd_bsd_write_armap): ... this.
2054 (coff_write_armap): Rename to ...
2055 (_bfd_coff_write_armap): ... this.
2056 * libbfd-in.h (bsd_write_armap): Rename to ...
2057 (_bfd_bsd_write_armap): ... this.
2058 (coff_write_armap): Rename to ...
2059 (_bfd_coff_write_armap): ... this.
2060 * aout-target.h, aout-tic30.c: Adjust all users.
2061 * libbfd.h: Regenerate.
2062
8c8402cc
PA
20632017-02-17 Pedro Alves <palves@redhat.com>
2064
2065 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2066 (warn_deprecated): Rename to ...
2067 (_bfd_warn_deprecated): ... this.
2068 * libbfd.c (warn_deprecated): Rename to ...
2069 (_bfd_warn_deprecated): ... this.
2070 * bfd-in2.h: Regenerate.
2071
c7c3d11b
PA
20722017-02-17 Pedro Alves <palves@redhat.com>
2073
2074 * bfdio.c (real_ftell): Rename to ...
2075 (_bfd_real_ftell): ... this.
2076 (real_fseek): Rename to ...
2077 (_bfd_real_fseek): ... this.
2078 (real_fopen): Rename to ...
2079 (_bfd_real_fopen): ... this.
2080 * libbfd-in.h (real_ftell): Rename to ...
2081 (_bfd_real_ftell): ... this.
2082 (real_fseek): Rename to ...
2083 (_bfd_real_fseek): ... this.
2084 (real_fopen): Rename to ...
2085 (_bfd_real_fopen): ... this.
2086 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2087 * libbfd.h: Regenerate.
2088
4265548c
PA
20892017-02-17 Pedro Alves <palves@redhat.com>
2090
2091 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2092 * libbfd.c (read_unsigned_leb128): Rename to ...
2093 (_bfd_read_unsigned_leb128): ... this.
2094 (read_signed_leb128): Rename to ...
2095 (_bfd_read_signed_leb128): ... this.
2096 (safe_read_leb128): Rename to ...
2097 (_bfd_safe_read_leb128): ... this.
2098 * libbfd-in.h (read_unsigned_leb128): Rename to ...
2099 (_bfd_read_unsigned_leb128): ... this.
2100 (read_signed_leb128): Rename to ...
2101 (_bfd_read_signed_leb128): ... this.
2102 (safe_read_leb128): Rename to ...
2103 (_bfd_safe_read_leb128): ... this.
2104 * libbfd.h: Renegerate.
2105
3239a423
AB
21062017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2107
2108 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2109 before trying to fine matching file and line information.
2110
90ed9b8b
AB
21112017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2112
2113 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2114 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2115 not match current bfd, then reload debug information. Record bfd
2116 we're loading debug info for in the stash. If we have debug
2117 informatin in the cache then perform section placement before
2118 returning.
2119
a8c75b76
AM
21202017-02-16 Alan Modra <amodra@gmail.com>
2121
2122 PR 21000
2123 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2124 * elfxx-target.h (elf_backend_no_page_alias): Define.
2125 (elfNN_bed): Init new field.
2126 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2127 ensure PT_LOAD segment starts on a new page.
2128 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2129
247d6c4c
AM
21302017-02-16 Alan Modra <amodra@gmail.com>
2131
2132 PR 21132
2133 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2134 if pic.
2135
90571206
JW
21362017-02-16 Jiong Wang <jiong.wang@arm.com>
2137
2138 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2139 * bfd-in2.h: Regenerated.
2140
2a568401
L
21412017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2142
2143 PR ld/21168
2144 * elf32-i386.c (elf_i386_relocate_section): Allow
2145 "lea foo@GOT, %reg" in PIC.
2146
a5def14f
L
21472017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2148
2149 PR ld/20244
2150 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2151 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2152 error against local IFUNC symbol without a base register for
2153 PIC.
2154
174d0a74
MR
21552017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2156
2157 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2158 `%P: %H:' with `info->callbacks->einfo'.
2159 (ppc_elf_relocate_section): Likewise.
2160 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2161 (ppc64_elf_edit_toc): Likewise.
2162 (ppc64_elf_relocate_section): Likewise.
2163
e278ae05
AM
21642017-02-14 Alan Modra <amodra@gmail.com>
2165
2166 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2167 --gc-keep-exported, and test versioned field of sym rather than
2168 looking for @ in name.
2169
10ddfe62
PD
21702017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2171
2172 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2173 __global_pointer$.
2174
d11135f5
NC
21752017-02-13 Nick Clifton <nickc@redhat.com>
2176
2177 PR binutils/21151
2178 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2179 unit length field.
2180
cc162427
AW
21812017-02-07 Andrew Waterman <andrew@sifive.com>
2182
2183 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2184 entry size if PLT header is written.
2185
3d044c0c
SL
21862017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2187
2188 Fix sparc64 dynamic relocation processing to use the dynamic
2189 symbol count.
2190 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2191 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2192 should be used.
2193
1b7e3d2f
NC
21942017-02-03 Nick Clifton <nickc@redhat.com>
2195
2196 PR 21096
2197 * coffcode.h (coff_write_object_contents): Enlarge size of
2198 s_name_buf in order to avoid compile time warning about possible
2199 integer truncation.
2200 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2201 32-bits of insn value before printing into buffer.
2202
e17b0c35
MR
22032017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2204
2205 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2206 `max_local_dynindx'.
2207 (mips_elf_sort_hash_table): Handle it.
2208 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2209 symbols bump up `max_local_dynindx' rather than
2210 `max_non_got_dynindx'.
2211
55f8b9d2
MR
22122017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2213
2214 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2215 `min_got_dynindx', `max_unref_got_dynindx' and
2216 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2217 (mips_elf_sort_hash_table): Adjust accordingly.
2218
0f8c4b60
MR
22192017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2220
2221 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2222 to access the hash table.
2223
17a80fa8
MR
22242017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2225
2226 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2227 non-NULL `htab' to the beginning.
2228
8f56d4fd
MR
22292017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2230
2231 * elflink.c (elf_gc_sweep): Wrap overlong line.
2232
8b10b0b3
MR
22332017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2234
2235 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2236 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2237 * elfxx-mips.c (mips_elf_link_hash_table): Add
2238 `ignore_branch_isa' member.
2239 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2240 in branch relocation calculation as an error if
2241 `ignore_branch_isa' has been set.
2242 (_bfd_mips_elf_insn32): Rename to...
2243 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2244 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2245 Handle the new parameter.
2246
1fbd05e1
HPN
22472017-01-27 Hans-Peter Nilsson <hp@axis.com>
2248
22d9a0de
HPN
2249 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2250 local variable dynobj.
2251
1fbd05e1
HPN
2252 PR ld/20995
2253 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2254 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2255 executable from read-only sections into sdynrelro.
2256 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2257 dynamic relocs in sdynrelro.
2258 (elf_backend_want_dynrelro): Define.
2259
4a7324e1
SH
22602017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2261
2262 * config.bfd (*-*-rtemsaout*): Mark as removed.
2263
c75b4ebd
SH
22642017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2265
2266 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2267 (arm-*-rtems*): Move to (arm*-*-eabi*).
2268 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2269 (m68-*-rtems*): Move to (m68*-*-elf*).
2270
850d84f6
SH
22712017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2272
2273 * config.bfd (*-*-rtemscoff*): Mark as removed.
2274
b531344c
MR
22752017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2276
2277 PR ld/20828
2278 * elflink.c (bfd_elf_record_link_assignment): Revert last
2279 change and don't ever clear `forced_local'. Set `mark'
2280 unconditionally.
2281 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2282 file.
2283 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2284 (bfd_elf_size_dynamic_sections): ... here.
2285 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2286 and set `mark' instead in `__tls_get_addr_opt' processing.
2287 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2288
f0158f44
AM
22892017-01-24 Alan Modra <amodra@gmail.com>
2290
2291 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2292 where dynamic relocs are preferable. Allow ifunc too.
2293 (ensure_undefweak_dynamic): New function.
2294 (allocate_dynrelocs): Use it here. Move plt handling last and
2295 don't make symbols dynamic, simplifying loop. Only make undef
2296 weak symbols with GOT entries dynamic. Correct condition
2297 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2298 comments. Remove goto.
2299 (ppc_elf_relocate_section): Correct test for using dynamic
2300 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2301 to suit. Set up explicit tls_index entries and implicit GOT
2302 tls_index entries resolvable at link time for
2303 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2304 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2305 (ensure_undefweak_dynamic): New function.
2306 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2307 with GOT entries dynamic. Remove unnecessary test of
2308 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2309 (ppc64_elf_relocate_section): Correct test for using dynamic
2310 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2311 to suit. Set up explicit tls_index entries and implicit GOT
2312 tls_index entries resolvable at link time for __tls_get_addr_opt.
2313 Simplify expression to clear mem for prelink.
2314
2d0ca824
YN
23152017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2316
2317 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2318
7f784814
JW
23192017-01-20 Jiong Wang <jiong.wang@arm.com>
2320
2321 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2322 (elf_backend_hash_symbol): Define.
2323
81ff47b3
MR
23242017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2325
2326 PR ld/20828
2327 * elflink.c (bfd_elf_record_link_assignment): Clear any
2328 `forced_local' marking for DSO symbols that are not being
2329 provided.
2330
640d6bfd
KLC
23312017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2332
2333 * elfnn-riscv.c (riscv_elf_object_p): New function.
2334
8361ed4d
L
23352017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2336
2337 PR ld/21038
2338 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2339 plt_bnd_eh_frame.
2340 (elf_x86_64_check_relocs): Create .eh_frame section for the
2341 .plt.bnd section.
2342 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2343 .eh_frame section for the .plt.bnd section.
2344 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2345 for the .plt.bnd section.
2346
2425a30e
NC
23472017-01-12 Nick Clifton <nickc@redhat.com>
2348
2349 PR binutils/20876
2350 * opncls.c (find_separate_debug_file): Add include_dirs
2351 parameter. Only include the directory part of the bfd's filename
2352 in search paths if include_dirs is true. Add a couple of extra
2353 locations for looking for debug files.
2354 ( bfd_follow_gnu_debuglink): Update invocation of
2355 find_separate_debug_file.
2356 (bfd_follow_gnu_debugaltlink): Likewise.
2357 (get_build_id): New function: Finds the build-id of the given bfd.
2358 (get_build_id_name): New function: Computes the name of the
2359 separate debug info file for a bfd, based upon its build-id.
2360 (check_build_id_file): New function: Checks to see if a separate
2361 debug info file exists at the given location, and that its
2362 build-id matches that of the original bfd.
2363 (bfd_follow_build_id_debuglink): New function: Finds a separate
2364 debug info file for a given bfd by using the build-id method.
2365 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2366 method of locating a separate debug info file before using the
2367 debuglink method.
2368 * bfd-in2.h: Regenerate.
2369
9e659176
L
23702017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2371
2372 PR ld/21038
2373 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2374 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2375 elf_x86_64_eh_frame_plt_got.
2376 (elf_x86_64_size_dynamic_sections): Get unwind info from
2377 elf_x86_64_bnd_arch_bed for the BND PLT.
2378
f2e2d2f5
JS
23792017-01-11 Jeremy Soller <jackpot51@gmail.com>
2380
2381 * config.bfd: Add entries for i686-redox and x86_64-redox.
2382
52b232b3
L
23832017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2384
2385 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2386 to 4 bytes.
2387 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2388 .eh_frame section to 4 bytes for x32.
2389 (elf_x86_64_check_relocs): Likewise.
2390
fff53dae
L
23912017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2392
2393 PR ld/20830
2394 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2395 (PLT_GOT_FDE_LENGTH): Likewise.
2396 (elf_i386_plt_layout): Add eh_frame_plt_got and
2397 eh_frame_plt_got_size.
2398 (elf_i386_plt): Updated.
2399 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2400 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2401 (elf_i386_size_dynamic_sections): Allocate and initialize
2402 .eh_frame section for .plt.got.
2403 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2404 .plt.got.
2405 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2406 eh_frame_plt_got_size.
2407 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2408 (PLT_GOT_FDE_LENGTH): Likewise.
2409 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2410 eh_frame_plt_got_size.
2411 (elf_x86_64_arch_bed): Updated.
2412 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2413 eh_frame_plt_got_size.
2414 (elf_x86_64_nacl_arch_bed): Likewise.
2415 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2416 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2417 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2418 .eh_frame section for .plt.got.
2419 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2420 for .plt.got.
2421
f129e49f
L
24222017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2423
2424 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2425 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2426
cd6581da
NC
24272017-01-09 Nick Clifton <nickc@redhat.com>
2428
2429 * dwarf2.c (lookup_address_in_function_table): Return early if
2430 there are no functions in the given comp unit, or if the high
2431 address of the last function in the comp unit is less than the
2432 desired address.
2433
98f02962
NC
24342017-01-09 Nick Clifton <nickc@redhat.com>
2435
2436 PR binutils/21013
2437 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2438 message if there are too many symbols to load.
2439
ae4fda66
JC
24402017-01-04 James Clarke <jrtc27@jrtc27.com>
2441
2442 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2443 if relocs are cached.
2444
de1010f4
RF
24452017-01-03 Rich Felker <bugdal@aerifal.cx>
2446
2447 PR ld/21017
2448 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2449 for R_MICROBLAZE_GOTOFF_64.
2450
09fe2662
NC
24512017-01-03 Nick Clifton <nickc@redhat.com>
2452
2453 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2454 warning about using a possibly uninitialised variable.
2455
595e0a47
AM
24562017-01-02 Alan Modra <amodra@gmail.com>
2457
2458 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2459 (allocate_plt_static, allocate_dynrelocs): Use it.
2460
7bd9df3b
AM
24612017-01-02 Alan Modra <amodra@gmail.com>
2462
2463 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2464 .PARISC.unwind section.
2465
5b86074c
AM
24662017-01-02 Alan Modra <amodra@gmail.com>
2467
2468 PR ld/20989
2469 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2470 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2471 indirect to GOT pointer relative code edit.
2472
2571583a
AM
24732017-01-02 Alan Modra <amodra@gmail.com>
2474
2475 Update year range in copyright notice of all files.
2476
5c1ad6b5 2477For older changes see ChangeLog-2016
3499769a 2478\f
5c1ad6b5 2479Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
2480
2481Copying and distribution of this file, with or without modification,
2482are permitted in any medium without royalty provided the copyright
2483notice and this notice are preserved.
2484
2485Local Variables:
2486mode: change-log
2487left-margin: 8
2488fill-column: 74
2489version-control: never
2490End:
This page took 0.277458 seconds and 4 git commands to generate.