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