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