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