Move UNDEFWEAK_NO_DYNAMIC_RELOC to elf-bfd.h
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
62cd30f1
L
12017-10-14 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
4 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
5 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
6
3b4b0a62
JB
72017-10-12 James Bowman <james.bowman@ftdichip.com>
8
9 * bfd-in2.h: Regenerate.
10 * libbfd.h: Regenerate.
11 * elf32-ft32.c: Add HOWTO R_FT32_15.
12 * reloc.c: Add BFD_RELOC_FT32_15.
13
1d75a8e2
NC
142017-10-12 Nick Clifton <nickc@redhat.com>
15
16 * reloc.c (enum bfd_reloc_status): Start values at 2.
17 * bfd-in2.h: Regenerate.
18 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
19 that a TRUE return indicates success. Compare the result of
20 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
21 (build_one_stub): Change sense of tests against aarch64_relocate
22 return value.
23 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
24 than FALSE, when an error is detected.
25 (elfNN_aarch64_final_link_relocate): Likewise.
26
9f857535
L
272017-10-12 H.J. Lu <hongjiu.lu@intel.com>
28
29 * elf32-i386.c (elf_backend_hide_symbol): New.
30 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
31 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
32 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
33
559192d8
AM
342017-10-12 Alan Modra <amodra@gmail.com>
35
36 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
37 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
38 (bfd_elf_define_start_stop): Likewise.
39
f5233a16
AM
402017-10-12 Alan Modra <amodra@gmail.com>
41
42 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
43 when executable rather than non-PIC.
44 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
45 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
46
3c9a7b0d
MR
472017-10-11 Maciej W. Rozycki <macro@imgtec.com>
48
49 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
50 member.
51 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
52 (elf_external_linux_prpsinfo64_ugid32): ... this.
53 (swap_linux_prpsinfo32_out): Rename to...
54 (swap_linux_prpsinfo32_ugid32_out): ... this.
55 (elf_external_linux_prpsinfo64_ugid16): New structure.
56 (swap_linux_prpsinfo64_ugid16_out): New function.
57 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
58 (elf_backend_linux_prpsinfo64_ugid16): Define.
59 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
60 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
61 of the 64-bit Linux core PRPSINFO note.
62 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
63
a2f63b2e
MR
642017-10-11 Maciej W. Rozycki <macro@imgtec.com>
65
66 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
67 member.
68 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
69 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
70 (elf_external_ppc_linux_prpsinfo32)
71 (swap_ppc_linux_prpsinfo32_out): Move to...
72 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
73 (swap_linux_prpsinfo32_ugid32_out): ... these.
74 (elf_external_linux_prpsinfo32): Rename to...
75 (elf_external_linux_prpsinfo32_ugid16): ... this.
76 (swap_linux_prpsinfo32_out): Rename to...
77 (swap_linux_prpsinfo32_ugid16_out): ... this.
78 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
79 (elf_backend_linux_prpsinfo32_ugid16): Define.
80 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
81 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
82 of the 32-bit Linux core PRPSINFO note.
83 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
84 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
85 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
86 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
87 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
88 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
89 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
90 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
91 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
92 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
93
72bc1bb9
MR
942017-10-11 Maciej W. Rozycki <macro@imgtec.com>
95
96 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
97 `gap' member ahead of `pr_flag'.
98
8f314ad5
PA
992017-10-11 Pedro Alves <palves@redhat.com>
100
101 * bfd.c (_doprnt): Rename to ...
102 (_bfd_doprnt): ... this.
103 (error_handler_internal): Adjust.
104
0f09b4d8
L
1052017-10-10 H.J. Lu <hongjiu.lu@intel.com>
106
107 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
108 instead of incrementing it.
109 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
110
6c699715
RL
1112017-10-10 Renlin Li <renlin.li@arm.com>
112
113 PR ld/21402
114 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
115 symbols into dynamic.
116
fc3c5343
L
1172017-10-09 H.J. Lu <hongjiu.lu@intel.com>
118
119 PR ld/22274
120 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
121 (riscv_elf_link_hash_table_create): Initialize max_alignment to
122 (bfd_vma) -1.
123 (_bfd_riscv_relax_section): Cache the max alignment of output
124 sections if possible.
125
b9399fcf
AM
1262017-10-10 Alan Modra <amodra@gmail.com>
127
128 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
129 .opd whenever .opd is present and non-zero size. Move code
130 setting abiversion to/from output file earlier. Only set
131 u.opd.func_sec when --gc-sections. Read relocs and set up
132 u.opd.func_sec values here..
133 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
134 section tests.
135 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
136
478c006f
L
1372017-10-09 H.J. Lu <hongjiu.lu@intel.com>
138
139 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
140 isymbuf.
141
9d45a7de
L
1422017-10-09 H.J. Lu <hongjiu.lu@intel.com>
143
144 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
145 .interp section with "ld --no-dynamic-linker".
146
b55ec8b6
AM
1472017-10-09 Alan Modra <amodra@gmail.com>
148
149 PR 22212
150 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
151 funcinfo_hash_table and varinfo_hash_table.
152
a72f95f7
L
1532017-10-08 H.J. Lu <hongjiu.lu@intel.com>
154
155 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
156 in read-only section with minfo.
157 (sh_elf_size_dynamic_sections): Likewise.
158
f9799aae
L
1592017-10-08 H.J. Lu <hongjiu.lu@intel.com>
160
161 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
162 a strayed comment.
163
4c7236d3
L
1642017-10-08 H.J. Lu <hongjiu.lu@intel.com>
165
166 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
167 this_hdr.sh_entsize only if section size > 0.
168
70090aa5
L
1692017-10-08 H.J. Lu <hongjiu.lu@intel.com>
170
171 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
172
f0f07ad1
L
1732017-10-07 H.J. Lu <hongjiu.lu@intel.com>
174
175 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
176 in read-only section with minfo.
177 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
178
99180bcc
L
1792017-10-06 H.J. Lu <hongjiu.lu@intel.com>
180
181 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
182 comments.
183
544c67cd
JB
1842017-10-06 John Baldwin <jhb@FreeBSD.org>
185
186 * elf-bfd.h (struct elf_backend_data): Add
187 `elf_backend_grok_freebsd_prstatus'.
188 * elf.c (elfcore_grok_freebsd_note): Call
189 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
190 present.
191 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
192 function.
193 (elf_backend_grok_freebsd_prstatus): Define.
194 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
195 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
196
98b273dc
L
1972017-10-06 H.J. Lu <hongjiu.lu@intel.com>
198
199 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
200 and has_non_got_reloc with zero_undefweak.
201 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
202 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
203 zero_undefweak to 1.
204 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
205 has_non_got_reloc with zero_undefweak.
206 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
207 has_got_reloc and has_non_got_reloc with zero_undefweak.
208 (elf_x86_link_hash_entry): Likewise.
209
e0d8f431
L
2102017-10-06 H.J. Lu <hongjiu.lu@intel.com>
211
212 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
213 (VERIFY_COPY_RELOC): Likewise.
214
ff38b4cc
L
2152017-10-06 H.J. Lu <hongjiu.lu@intel.com>
216
217 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
218 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
219 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
220
f3180fa9
L
2212017-10-06 H.J. Lu <hongjiu.lu@intel.com>
222
223 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
224 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
225 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
226
e74399c4
L
2272017-10-06 H.J. Lu <hongjiu.lu@intel.com>
228
229 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
230 * elf32-i386.c (elf_i386_relocate_section): Use it.
231 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
232
aebcc8ff
L
2332017-10-06 H.J. Lu <hongjiu.lu@intel.com>
234
235 * elf32-i386.c (X86_SIZE_TYPE_P): New.
236 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
237 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
238 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
239 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
240
cf1070f1
L
2412017-10-06 H.J. Lu <hongjiu.lu@intel.com>
242
243 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
244 (PLT_LOCAL_IFUNC_P): Likewise.
245 * elf32-i386.c (elf_i386_relocate_section): Use them.
246 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
247
f70656b2
L
2482017-10-06 H.J. Lu <hongjiu.lu@intel.com>
249
250 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
251 * elf32-i386.c (elf_i386_relocate_section): Use it.
252 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
253
1f92404c
L
2542017-10-06 H.J. Lu <hongjiu.lu@intel.com>
255
256 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
257 * elf32-i386.c (elf_i386_relocate_section): Use it.
258 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
259
daf1c414
L
2602017-10-06 H.J. Lu <hongjiu.lu@intel.com>
261
262 * elf32-i386.c (X86_PCREL_TYPE_P): New.
263 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
264 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
265 (X86_PCREL_TYPE_P): This.
266 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
267 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
268 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
269 X86_PCREL_TYPE_P.
270 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
271
51537393
L
2722017-10-06 H.J. Lu <hongjiu.lu@intel.com>
273
274 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
275 * elf32-i386.c (elf_i386_tls_transition): Use it.
276 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
277
0caf6c82
L
2782017-10-05 H.J. Lu <hongjiu.lu@intel.com>
279
280 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
281 Dump dynamic relocation in read-only section with minfo if
282 needed.
283 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
284 (maybe_set_textrel): Likewise.
285 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
286 read-only section with minfo.
287
6d5be5d6
JB
2882017-10-05 John Baldwin <jhb@FreeBSD.org>
289
290 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
291
007873f5
L
2922017-10-05 H.J. Lu <hongjiu.lu@intel.com>
293
294 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
295 in read-only section with minfo.
296 (tilepro_elf_size_dynamic_sections): Likewise.
297 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
298 (tilegx_elf_size_dynamic_sections): Likewise.
299
2ca7de37
PA
3002017-10-05 Pedro Alves <palves@redhat.com>
301
302 PR 22245
303 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
304 ellipsis parameter. Split out bfd_error_on_input code to..
305 (bfd_set_input_error): .. New function.
306 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
307 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
308 * bfd-in2.h: Regenerate.
309
8c6716e5
AM
3102017-10-05 Alan Modra <amodra@gmail.com>
311
312 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
313 fini_array error value.
314
db4677b8
AM
3152017-10-05 Alan Modra <amodra@gmail.com>
316
317 PR 21167
318 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
319 groups.
320 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
321 flag from section.
322 (elf_fake_sections): Adjust calls. Exit immediately on failure.
323 (bfd_elf_set_group_contents): Add associated reloc section indices
324 to group contents.
325
a5259595
AM
3262017-10-04 Alan Modra <amodra@gmail.com>
327
328 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
329 classify symbols for ELFv2.
330
9ba5f27c
PK
3312017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
332
333 PR 22245
334 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
335 undergoes default promotion.
336 * bfd-in2.h: Regenerate.
337
dcd2b8a0
AM
3382017-10-02 Alan Modra <amodra@gmail.com>
339
340 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
341 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
342
20230942
AM
3432017-10-01 Alan Modra <amodra@gmail.com>
344
345 PR 21957
346 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
347 (add_line_info): Always put end_sequence last.
348
4b04bba2
AM
3492017-10-01 Alan Modra <amodra@gmail.com>
350
351 PR 22047
352 * dwarf2.c (read_section): Allocate buffer with extra byte for
353 bfd_simple_get_relocated_section_contents rather than copying
354 afterwards.
355
f6ac8c52
AM
3562017-09-29 Alan Modra <amodra@gmail.com>
357
358 * merge.c (merge_strings): Return FALSE on malloc failure.
359 (_bfd_merge_sections): Return failures from record_section and
360 merge_strings.
361
1a3b5c34
AM
3622017-09-28 Alan Modra <amodra@gmail.com>
363
364 PR 22220
365 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
366 a case where plugin_notice isn't called.
367
cd28e7aa
KLC
3682017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
369
370 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
371 comparison.
372
ac69a0d7
L
3732017-09-26 H.J. Lu <hongjiu.lu@intel.com>
374
375 PR ld/22199
376 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
377 output_bfd to info->callbacks->minfo.
378
262c0a87
NC
3792017-09-26 Nick Clifton <nickc@redhat.com>
380
381 PR 22172
382 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
383 assertion failure if elf_x86_64_rtype_to_howto has already issued
384 an error message.
385
33e0a9a0
AM
3862017-09-26 Alan Modra <amodra@gmail.com>
387
388 PR 22210
389 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
390 read data.
391
30d0157a
NC
3922017-09-26 Nick Clifton <nickc@redhat.com>
393
394 PR 22210
395 * dwarf2.c (read_formatted_entries): Fail early if we know that
396 the loop parsing data entries will overflow the end of the
397 section.
398
1b86808a
AM
3992017-09-26 Alan Modra <amodra@gmail.com>
400
401 PR 22209
402 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
403 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
404 to stash->info_ptr_memory, and check die_ref is within that memory.
405 Set info_ptr_end correctly when another CU is refd. Check die_ref
406 for DW_FORM_ref4 etc. is within CU.
407
a54018b7
AM
4082017-09-26 Alan Modra <amodra@gmail.com>
409
410 PR 22205
411 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
412 (read_formatted_entries): Init "fe".
413 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
414
e338894d
AM
4152017-09-26 Alan Modra <amodra@gmail.com>
416
417 PR 22204
418 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
419 bounds in inner loop.
420
1da5c9a4
AM
4212017-09-25 Alan Modra <amodra@gmail.com>
422
423 PR 22202
424 * dwarf1.c (parse_die): Sanity check pointer against section limit
425 before dereferencing.
426 (parse_line_table): Likewise.
427
11855d8a
AM
4282017-09-25 Alan Modra <amodra@gmail.com>
429
430 PR 22201
431 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
432 has string form.
433 (parse_comp_unit): Likewise.
434
c361faae
AM
4352017-09-25 Alan Modra <amodra@gmail.com>
436
437 PR 22200
438 * dwarf2.c (read_formatted_entries): Error on format_count zero.
439
52b36c51
AM
4402017-09-24 Alan Modra <amodra@gmail.com>
441
442 PR 22197
443 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
444 within section bounds.
445
a26a013f
AM
4462017-09-24 Alan Modra <amodra@gmail.com>
447
448 PR 22191
449 * dwarf2.c (decode_line_info): Properly free line sequences on error.
450
52a93b95
AM
4512017-09-24 Alan Modra <amodra@gmail.com>
452
453 PR 22187
454 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
455 pname param. Return status. Make name const. Don't abort,
456 return an error. Formatting. Exit if current info_ptr matches
457 orig_info_ptr. Update callers.
458 (scan_unit_for_symbols): Start at nesting_level of zero. Make
459 nested_funcs an array of structs for extensibility. Formatting.
460
d8010d3e
AM
4612017-09-24 Alan Modra <amodra@gmail.com>
462
463 PR 22186
464 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
465 rather than dividing by zero.
466
515f23e6
AM
4672017-09-24 Alan Modra <amodra@gmail.com>
468
469 PR 22169
470 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
471
0d76029f
AM
4722017-09-24 Alan Modra <amodra@gmail.com>
473
474 PR 22167
475 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
476
bd61e135
AM
4772017-09-24 Alan Modra <amodra@gmail.com>
478
479 PR 22166
480 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
481 SHT_GNU_verneed section for sanity. Don't zalloc memory for
482 verref.
483
61e3bf5f
L
4842017-09-22 H.J. Lu <hongjiu.lu@intel.com>
485
486 PR binutils/22170
487 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
488 corrupted PLT.
489
b69e9267
L
4902017-09-22 H.J. Lu <hongjiu.lu@intel.com>
491
59ca4c1b 492 PR binutils/22163
b69e9267
L
493 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
494 -1 if bfd_canonicalize_dynamic_reloc returns 0.
495
b877d21f
PA
4962017-09-22 Pedro Alves <palves@redhat.com>
497 Alan Modra <amodra@gmail.com>
498
499 * version.h: Add comment.
500
8fe09d74
AA
5012017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
502
503 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
504 NT_S390_GS_BC, correct the previously swapped invocations of
505 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
506
25516cc5
AM
5072017-09-19 Alan Modra <amodra@gmail.com>
508
509 PR 21441
510 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
511 size.
512
3d13f3e9
AM
5132017-09-19 Alan Modra <amodra@gmail.com>
514
515 PR 22150
516 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
517 symbols before calculating verrefs. Don't renumber dynsyms
518 after gc. Exclude .gnu.version when zero or one dynsym.
519 Localize some vars and reindent.
520
94670f6c
L
5212017-09-18 H.J. Lu <hongjiu.lu@intel.com>
522
523 PR ld/22148
524 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
525 return from bfd_canonicalize_dynamic_reloc.
526
21d0a606
AM
5272017-09-15 Alan Modra <amodra@gmail.com>
528
529 PR 22116
530 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
531 overflows bfd_size_type.
532
5e5e02ae
L
5332017-09-14 H.J. Lu <hongjiu.lu@intel.com>
534
535 PR ld/22135
536 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
537 to indicate if conversion is performed.
538 (elf_i386_check_relocs): Cache section contents and relocations
539 if conversion is performed.
540 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
541 contents and relocations if conversion is performed.
542
4d465c68
NC
5432017-09-14 Nick Clifton <nickc@redhat.com>
544
545 PR binutils/22113
546 * peXXigen.c (pe_print_idata): Extend check for HintName vector
547 entries.
548
f47432d4
L
5492017-09-13 H.J. Lu <hongjiu.lu@intel.com>
550
551 * elfxx-x86.h: Fix a typo in comments.
552
4ec521f2
KLC
5532017-09-09 Kamil Rytarowski <n54@gmx.com>
554
555 * elf32-nds32.c: Rename __BIT() to N32_BIT().
556
2420fff6
AM
5572017-09-09 Alan Modra <amodra@gmail.com>
558
559 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
560 plt_stub_align.
561
c5bce5c6
L
5622017-09-09 H.J. Lu <hongjiu.lu@intel.com>
563
564 * elf32-i386.c (elf_i386_relocate_section): Update usage of
565 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
566 (elf_i386_finish_dynamic_symbol): Likewise.
567 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
568 (elf_x86_64_finish_dynamic_symbol): Likewise.
569 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
570 (_bfd_x86_elf_fixup_symbol): Likewise.
571
8fbf0ba1
L
5722017-09-09 H.J. Lu <hongjiu.lu@intel.com>
573
574 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
575 check has_non_got_reloc.
576
0a27fed7
L
5772017-09-09 H.J. Lu <hongjiu.lu@intel.com>
578
579 PR ld/22115
580 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
581 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
582 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
583 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
584 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
585 and linker_def on __ehdr_start if it is referenced and not
586 defined.
587 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
588 and return TRUE when building executable, if a symbol has
589 non-GOT/non-PLT relocations in text section or there is no
590 dynamic linker.
591 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
592
c7df954f
L
5932017-09-08 H.J. Lu <hongjiu.lu@intel.com>
594
595 * elfxx-x86.h: Update comments.
596
1de031c8
L
5972017-09-08 H.J. Lu <hongjiu.lu@intel.com>
598
599 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
600 elf_x86_plt_layout_table with elf_x86_init_table.
601 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
602 Likewise.
603 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
604 Likewise.
605 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
606 (elf_x86_init_table): This.
607 (_bfd_x86_elf_link_setup_gnu_properties): Replace
608 elf_x86_plt_layout_table with elf_x86_init_table.
609
7a382c1c
L
6102017-09-07 H.J. Lu <hongjiu.lu@intel.com>
611
612 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
613 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
614 * configure: Regenerated.
615 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
616 and r_sym fields of plt_layout.
617 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
618 Likewise.
619 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
620 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
621 r_info nor r_sym fields.
622 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
623 fields of htab.
624 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
625
9eb7b0ac
PD
6262017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
627
628 * (_bfd_riscv_relax_align): Call bfd_set_error and
629 print an error message when unable to relax a .align directive.
630
b1308d2c
PD
6312017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
632
633 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
634 (riscv_record_pcrel_hi_reloc): Add absolute argument.
635 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
636 R_RISCV_PCREL_HI20 relocs, and pass the result to
637 riscv_record_pcrel_hi_reloc.
638
6999821f
L
6392017-09-07 H.J. Lu <hongjiu.lu@intel.com>
640
641 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
642 r_type_p. Remove the converted argument. Replace
643 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
644 the new relocation type via r_type_p.
645 (elf_i386_relocate_section): Likewise.
646 (elf_i386_finish_dynamic_symbol): Likewise.
647 (need_convert_load): Removed.
648 (check_relocs_failed): Updated.
649 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
650 instead of setting need_convert_load.
651 (_bfd_i386_elf_convert_load): Removed.
652 * elf64-x86-64.c (need_convert_load): Removed.
653 (check_relocs_failed): Updated.
654 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
655 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
656 Return the new relocation type via r_type_p.
657 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
658 instead of setting need_convert_load.
659 (elf_x86_64_check_relocs): Don't check PIC if relocation has
660 been converted.
661 (_bfd_x86_64_elf_convert_load): Removed.
662 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
663 with SYMBOL_REFERENCES_LOCAL_P.
664 (elf_x86_64_finish_dynamic_symbol): Likewise.
665 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
666 set convert_load.
667 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
668 (_bfd_x86_elf_link_symbol_references_local): New function.
669 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
670 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
671 SYMBOL_REFERENCES_LOCAL_P.
672 (elf_x86_link_hash_entry): Add local_ref.
673 (elf_x86_link_hash_table): Remove convert_load.
674 (_bfd_i386_elf_convert_load): Removed.
675 (_bfd_x86_64_elf_convert_load): Likewise.
676 (_bfd_x86_elf_link_symbol_references_local): New.
677
78984959
L
6782017-09-06 H.J. Lu <hongjiu.lu@intel.com>
679
680 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
681 (elf_x86_64_info_to_howto): Get the real relocation type by
682 masking out R_X86_64_converted_reloc_bit.
683 (elf_x86_64_check_tls_transition): Get the real relocation type
684 by masking out R_X86_64_converted_reloc_bit.
685 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
686 instead of setting converted_reloc.
687 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
688 instead of converted_reloc. Get the real relocation type by
689 masking out R_X86_64_converted_reloc_bit.
690 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
691 R_X86_64_converted_reloc_bit is valid.
692 * elfxx-x86.h (converted_reloc): Removed.
693
419414ea
L
6942017-09-06 H.J. Lu <hongjiu.lu@intel.com>
695
696 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
697 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
698 to get the relocation type again.
699 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
700 r_type when calling elf_x86_64_tls_transition. Don't use
701 ELF32_R_TYPE to get the relocation type again.
702
dc089072
L
7032017-09-05 H.J. Lu <hongjiu.lu@intel.com>
704
705 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
706 converted_reloc.
707
8b43e456
L
7082017-09-05 H.J. Lu <hongjiu.lu@intel.com>
709
710 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
711 argument. Don't check relocation overflow. Avoid relocation
712 overflow if --no-relax is used. Set converted_reloc on symbol
713 if a GOTPCREL relocation is converted.
714 (elf_x86_64_relocate_section): Issue a fatal error and suggest
715 --no-relax if GOTPCREL relocation conversion leads to relocation
716 overflow.
717 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
718
83eef883
AFB
7192017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
720 Edmar Wienskoski <edmar.wienskoski@nxp.com
721
722 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
723 (ppc_elf_check_relocs): Handle it.
724 (ppc_elf_vle_split20): New function.
725 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
726
0e30d991
L
7272017-09-03 H.J. Lu <hongjiu.lu@intel.com>
728
729 PR ld/22071
730 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
731 for x86-64 if GOT_TLS_GDESC_P is true.
732
1cf58434
AM
7332017-09-03 Alan Modra <amodra@gmail.com>
734
735 PR 22067
736 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
737
f04bdfa7
L
7382017-09-02 H.J. Lu <hongjiu.lu@intel.com>
739
740 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
741 tls_get_addr for x86-64 in one place.
742
2ac3a7f5
L
7432017-09-02 H.J. Lu <hongjiu.lu@intel.com>
744
745 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
746 with elfxx-x86.lo for 64-bit BFD.
747 * configure: Regenerated.
748
d47a8026
L
7492017-09-02 H.J. Lu <hongjiu.lu@intel.com>
750
751 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
752 (_bfd_i386_elf_convert_load): This. Remove static.
753 (elf_i386_size_dynamic_sections): Removed.
754 (elf_backend_size_dynamic_sections): Likewise.
755 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
756 (_bfd_x86_64_elf_convert_load): This. Remove static.
757 (elf_x86_64_size_dynamic_sections): Removed.
758 (elf_backend_size_dynamic_sections): Likewise.
759 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
760 (elf_x86_allocate_dynrelocs): This. Make it static.
761 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
762 (elf_x86_allocate_local_dynreloc): This. Make it static.
763 (elf_i386_is_reloc_section): New function.
764 (elf_x86_64_is_reloc_section): Likewise.
765 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
766 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
767 Rearrange got_entry_size initialization.
768 (_bfd_x86_elf_size_dynamic_sections): New function.
769 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
770 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
771 (_bfd_i386_elf_convert_load): New.
772 (_bfd_x86_64_elf_convert_load): Likewise.
773 (_bfd_x86_elf_size_dynamic_sections): Likewise.
774 (elf_backend_size_dynamic_sections): Likewise.
775 (_bfd_x86_elf_allocate_dynrelocs): Removed.
776 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
777
2926eb2c
L
7782017-09-02 H.J. Lu <hongjiu.lu@intel.com>
779
780 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
781 update comments.
782
92c10f5f
L
7832017-09-02 H.J. Lu <hongjiu.lu@intel.com>
784
785 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
786 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
787
aa595247
L
7882017-09-02 H.J. Lu <hongjiu.lu@intel.com>
789
790 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
791 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
792 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
793 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
794 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
795 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
796
b9ce864c
L
7972017-09-02 H.J. Lu <hongjiu.lu@intel.com>
798
799 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
800 (elf_i386_allocate_local_dynrelocs): Likewise.
801 (elf_i386_size_dynamic_sections): Replace
802 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
803 with _bfd_x86_elf_allocate_dynrelocs and
804 _bfd_x86_elf_allocate_local_dynrelocs.
805 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
806 (elf_x86_64_allocate_local_dynrelocs): Likewise.
807 (elf_x86_64_size_dynamic_sections): Replace
808 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
809 with _bfd_x86_elf_allocate_dynrelocs and
810 _bfd_x86_elf_allocate_local_dynrelocs.
811 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
812 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
813 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
814 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
815
fe53b4a4
L
8162017-09-02 H.J. Lu <hongjiu.lu@intel.com>
817
818 * elf32-i386.c (is_i386_elf): Removed.
819 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
820 (elf_i386_size_dynamic_sections): Likewise.
821 (elf_i386_relocate_section): Likewise.
822 * elf64-x86-64.c (is_x86_64_elf): Removed.
823 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
824 is_x86_elf.
825 (elf_x86_64_size_dynamic_sections): Likewise.
826 (elf_x86_64_relocate_section): Likewise.
827 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
828 target_id.
829 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
830 (is_x86_elf): New.
831
9ff114ca
L
8322017-09-02 H.J. Lu <hongjiu.lu@intel.com>
833
834 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
835 (elf_i386_allocate_dynrelocs): Replace
836 elf_i386_compute_jump_table_size with
837 elf_x86_compute_jump_table_size.
838 (elf_i386_size_dynamic_sections): Likewise.
839 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
840 (elf_x86_64_allocate_dynrelocs): Replace
841 elf_x86_64_compute_jump_table_size with
842 elf_x86_compute_jump_table_size.
843 (elf_x86_64_size_dynamic_sections): Likewise.
844 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
845 got_entry_size.
846 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
847 (elf_x86_compute_jump_table_size): New.
848
503294e7
L
8492017-09-02 H.J. Lu <hongjiu.lu@intel.com>
850
851 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
852 sizeof_reloc.
853 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
854 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
855
9a742a90
L
8562017-09-02 H.J. Lu <hongjiu.lu@intel.com>
857
858 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
859 with htab->is_vxworks.
860 (elf_i386_size_dynamic_sections): Likewise.
861 (elf_i386_relocate_section): Likewise.
862 (elf_i386_finish_dynamic_symbol): Likewise.
863 (elf_i386_finish_dynamic_sections): Likewise.
864
6b9553e2
L
8652017-09-02 H.J. Lu <hongjiu.lu@intel.com>
866
867 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
868 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
869 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
870 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
871 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
872 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
873 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
874 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
875
ad71ce8d
L
8762017-09-01 H.J. Lu <hongjiu.lu@intel.com>
877
878 PR ld/22064
879 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
880 ELF_COMMON_DEF_P for common symbols.
881
96d01d93
AM
8822017-09-02 Alan Modra <amodra@gmail.com>
883
884 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
885 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
886 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
887
4f501a24
L
8882017-09-01 H.J. Lu <hongjiu.lu@intel.com>
889
890 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
891 (elf_backend_gc_mark_hook): Likewise.
892 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
893 (elf_backend_gc_mark_hook): Likewise.
894 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
895 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
896 (elf_backend_gc_mark_hook): Likewise.
897
eeb2f20a
L
8982017-09-01 H.J. Lu <hongjiu.lu@intel.com>
899
900 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
901 (elf_backend_adjust_dynamic_symbol): Likewise.
902 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
903 (elf_backend_adjust_dynamic_symbol): Likewise.
904 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
905 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
906 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
907 (_bfd_x86_elf_adjust_dynamic_symbol): New.
908 (elf_backend_adjust_dynamic_symbol): Likewise.
909
c6295c22
L
9102017-09-01 H.J. Lu <hongjiu.lu@intel.com>
911
912 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
913 comments.
914
39946cc2
L
9152017-09-01 H.J. Lu <hongjiu.lu@intel.com>
916
917 * elf32-i386.c (elf_i386_mkobject): Removed.
918 (bfd_elf32_mkobject): Likewise.
919 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
920 (bfd_elf64_mkobject): Likewise.
921 (bfd_elf32_mkobject): Likewise.
922 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
18da07cd 923 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
39946cc2
L
924 (bfd_elf64_mkobject): Likewise.
925 (bfd_elf32_mkobject): Likewise.
926
a6798bab
L
9272017-09-01 H.J. Lu <hongjiu.lu@intel.com>
928
929 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
930 Call _bfd_x86_elf_link_setup_gnu_properties.
931 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
932 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
933 entries.
934 (elf_x86_64_non_lazy_plt): Likewise.
935 (elf_x86_64_lazy_bnd_plt): Likewise.
936 (elf_x86_64_non_lazy_bnd_plt): Likewise.
937 (elf_x86_64_lazy_ibt_plt): Likewise.
938 (elf_x32_lazy_ibt_plt): Likewise.
939 (elf_x86_64_non_lazy_ibt_plt): Likewise.
940 (elf_x32_non_lazy_ibt_plt): Likewise.
941 (elf_x86_64_nacl_plt): Likewise.
942 (elf_x86_64_link_setup_gnu_properties): Updated. Call
943 _bfd_x86_elf_link_setup_gnu_properties.
944 * elfxx-x86.c: Include elf-vxworks.h".
945 (_bfd_x86_elf_link_setup_gnu_properties): New function.
946 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
947 comments for pic_plt0_entry and pic_plt_entry.
948 (elf_x86_non_lazy_plt_layout): Likewise.
949 (elf_x86_plt_layout_table): New.
950 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
951
e10c9c62
L
9522017-09-01 H.J. Lu <hongjiu.lu@intel.com>
953
954 PR ld/22061
955 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
956 .eh_frame section for the second PLT.
957 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
958 alignment of .eh_frame section for the second PLT.
959
7e8b6008
NC
9602017-09-01 Nick Clifton <nickc@redhat.com>
961
962 PR 22059
963 * dwarf2.c (decode_line_info): Fix test for an overlong line info
964 structure.
965
2a143b99
NC
9662017-09-01 Nick Clifton <nickc@redhat.com>
967
968 PR 22058
969 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
970 attribute buffer is NUL terminated.
971
e4f27230
NC
9722017-08-31 Nick Clifton <nickc@redhat.com>
973
974 PR 22047
975 * dwarf2.c (read_section): If necessary add a terminating NUL byte
976 to dwarf string sections.
977
686335cd
AM
9782017-08-31 Alan Modra <amodra@gmail.com>
979
980 * po/SRC-POTFILES.in: Regenerate.
981
9866ffe2
AM
9822017-08-31 Alan Modra <amodra@gmail.com>
983
984 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
985 for a section containing just a terminator. Allow multiple
986 terminators at end of section.
987 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
988 sections when not adding alignment. Assert on terminator in
989 the middle of FDEs.
990
af471f82
AM
9912017-08-31 Alan Modra <amodra@gmail.com>
992
993 PR 21441
994 PR 22048
995 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
996 terminators.
997
3321e42b
L
9982017-08-30 H.J. Lu <hongjiu.lu@intel.com>
999
1000 * configure.ac (bfd_backends): Add elf64.lo together with
1001 elfxx-x86.lo for 64-bit BFD.
1002 * configure: Regenerated.
1003
ef32532f
JB
10042017-08-31 James Bowman <james.bowman@ftdichip.com>
1005
1006 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1007 for R_FT32_18.
1008
e234de6b
AM
10092017-08-31 Alan Modra <amodra@gmail.com>
1010
1011 PR binutils/22032
1012 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1013 before _close_and_cleanup. Call iovec->bclose after.
1014 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1015
f493882d
L
10162017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1017
1018 * elf32-i386.c (elf_i386_plt_type): Removed.
1019 (elf_i386_plt): Likewise.
1020 (elf_i386_get_synthetic_symtab): Updated. Call
1021 _bfd_x86_elf_get_synthetic_symtab.
1022 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1023 (elf_x86_64_plt): Likewise.
1024 (elf_x86_64_get_synthetic_symtab): Updated. Call
1025 _bfd_x86_elf_get_synthetic_symtab.
1026 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1027 (elf_x86_64_get_plt_got_vma): Likewise.
1028 (elf_i386_valid_plt_reloc_p): Likewise.
1029 (elf_x86_64_valid_plt_reloc_p): Likewise.
1030 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1031 * elfxx-x86.h (elf_x86_plt_type): New.
1032 (elf_x86_plt): Likewise.
1033 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1034
5b86dbf4
L
10352017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1036
1037 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1038 target_id instead of elf_machine_code.
1039
765e526c
L
10402017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1041
1042 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1043 (elf_i386_lazy_plt_layout): Likewise.
1044 (elf_i386_non_lazy_plt_layout): Likewise.
1045 (elf_i386_plt_layout): Likewise.
1046 (elf_i386_link_hash_table): Likewise.
1047 (elf_i386_next_tls_desc_index): Likewise.
1048 (elf_i386_srelplt2): Likewise.
1049 (elf_i386_plt): Likewise.
1050 (elf_i386_lazy_plt): Likewise.
1051 (elf_i386_non_lazy_plt): Likewise.
1052 (elf_i386_link_hash_table_create): Likewise.
1053 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1054 (elf_i386_lazy_plt): Updated.
1055 (elf_i386_non_lazy_plt): Likewise.
1056 (elf_i386_lazy_ibt_plt): Likewise.
1057 (elf_i386_non_lazy_ibt_plt): Likewise.
1058 (elf_i386_allocate_dynrelocs): Likewise.
1059 (elf_i386_size_dynamic_sections): Likewise.
1060 (elf_i386_relocate_section): Likewise.
1061 (elf_i386_finish_dynamic_symbol): Likewise.
1062 (elf_i386_finish_dynamic_sections): Likewise.
1063 (elf_i386_get_synthetic_symtab): Likewise.
1064 (elf_i386_link_setup_gnu_properties): Likewise.
1065 (elf_i386_nacl_plt): Likewise.
1066 * elf64-x86-64.c (ABI_64_P): Removed.
1067 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1068 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1069 (elf_x86_64_lazy_plt_layout): Likewise.
1070 (elf_x86_64_non_lazy_plt_layout): Likewise.
1071 (elf_x86_64_plt_layout): Likewise.
1072 (elf_x86_64_link_hash_table): Likewise.
1073 (elf_x86_64_plt): Likewise.
1074 (elf_x86_64_lazy_plt): Likewise.
1075 (elf_x86_64_non_lazy_plt): Likewise.
1076 (elf_x86_64_link_hash_table_create): Likewise.
1077 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1078 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1079 (elf_x86_64_lazy_plt): Updated.
1080 (elf_x86_64_non_lazy_plt): Likewise.
1081 (elf_x86_64_lazy_bnd_plt): Likewise.
1082 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1083 (elf_x86_64_lazy_ibt_plt): Likewise.
1084 (elf_x32_lazy_ibt_plt): Likewise.
1085 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1086 (elf_x32_non_lazy_ibt_plt): Likewise.
1087 (elf_x86_64_allocate_dynrelocs): Likewise.
1088 (elf_x86_64_size_dynamic_sections): Likewise.
1089 (elf_x86_64_relocate_section): Likewise.
1090 (elf_x86_64_finish_dynamic_symbol): Likewise.
1091 (elf_x86_64_finish_dynamic_sections): Likewise.
1092 (elf_x86_64_get_synthetic_symtab): Likewise.
1093 (elf_x86_64_link_setup_gnu_properties): Likewise.
1094 (elf_x86_64_nacl_plt): Likewise.
1095 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1096 "elf/x86-64.h".
1097 (ELF32_DYNAMIC_INTERPRETER): New.
1098 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1099 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1100 (_bfd_x86_elf_link_hash_table_create): Likewise.
1101 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1102 (elf_x86_link_hash_table_free): This. Make it static.
1103 * elfxx-x86.h: Don't include "objalloc.h".
1104 (ABI_64_P): New.
1105 (elf_x86_lazy_plt_layout): Likewise.
1106 (elf_x86_non_lazy_plt_layout): Likewise.
1107 (elf_x86_plt_layout): Likewise.
1108 (_bfd_x86_elf_link_hash_table_create): Likewise.
1109 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1110 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1111 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1112 srelplt2 and next_tls_desc_index.
1113 (_bfd_x86_elf_link_hash_table_free): Removed.
1114
70e65ca8
MR
11152017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1116
1117 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1118 branch offset interpretation.
1119
7c0ed396
L
11202017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1121
1122 PR binutils/22032
1123 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1124
0f2425c4
L
11252017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1126
1127 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1128 (elf_x86_64_srelplt2): Likewise.
1129
9a23f96e
AM
11302017-08-30 Alan Modra <amodra@gmail.com>
1131
1132 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1133 (ppc64_elf_tls_optimize): Set it.
1134 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1135 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1136 addis would add zero.
1137 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1138 (ppc_elf_tls_optimize): Set it.
1139 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1140 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1141
b9f04fe0
AM
11422017-08-30 Alan Modra <amodra@gmail.com>
1143
1144 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1145 __tls_get_addr call sequences to LE, don't move the addi down
1146 to the nop. Replace the bl with addi and leave the nop alone.
1147
5f0f0847
L
11482017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1149
1150 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1151 Re-indent.
1152 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1153 Likewise.
1154 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1155
443701f5
L
11562017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1157
1158 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1159 (BFD64_BACKENDS): Likewise.
1160 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1161 (BFD64_BACKENDS_CFILES): Likewise.
1162 * Makefile.in: Regenerated.
1163 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1164 elf32-i386.lo and elf64-x86-64.lo.
1165 * configure: Regenerated.
1166 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1167 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1168 "objalloc.h" and "hashtab.h".
1169 (ELIMINATE_COPY_RELOCS): Removed.
1170 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1171 (SYMBOL_NO_COPYRELOC): Likewise.
1172 (elf_i386_link_hash_entry): Likewise.
1173 (GOT_UNKNOWN): Likewise.
1174 (GOT_NORMAL): Likewise.
1175 (GOT_TLS_GD): Likewise.
1176 (elf_i386_hash_entry): Likewise.
1177 (elf_i386_obj_tdata): Likewise.
1178 (elf_i386_tdata): Likewise.
1179 (elf_i386_local_got_tls_type): Likewise.
1180 (elf_i386_local_tlsdesc_gotent): Likewise.
1181 (elf_i386_hash_table): Likewise.
1182 (elf_i386_link_hash_newfunc): Likewise.
1183 (elf_i386_local_htab_hash): Likewise.
1184 (elf_i386_local_htab_eq): Likewise.
1185 (elf_i386_get_local_sym_hash): Likewise.
1186 (elf_i386_link_hash_table_free): Likewise.
1187 (elf_i386_copy_indirect_symbol): Likewise.
1188 (elf_i386_fixup_symbol): Likewise.
1189 (elf_i386_readonly_dynrelocs): Likewise.
1190 (elf_i386_always_size_sections): Likewise.
1191 (elf_i386_set_tls_module_base): Likewise.
1192 (elf_i386_dtpoff_base): Likewise.
1193 (compare_relocs): Likewise.
1194 (elf_i386_hash_symbol): Likewise.
1195 (elf_i386_parse_gnu_properties): Likewise.
1196 (elf_i386_merge_gnu_properties): Likewise.
1197 (elf_i386_link_check_relocs): Likewise.
1198 (elf_i386_merge_symbol_attribute): Likewise.
1199 (bfd_elf32_bfd_link_check_relocs): Likewise.
1200 (elf_backend_copy_indirect_symbol): Likewise.
1201 (elf_backend_always_size_sections): Likewise.
1202 (elf_backend_omit_section_dynsym): Likewise.
1203 (elf_backend_hash_symbol): Likewise.
1204 (elf_backend_fixup_symbol): Likewise.
1205 (elf_backend_parse_gnu_properties): Likewise.
1206 (elf_backend_merge_gnu_properties): Likewise.
1207 (elf_backend_merge_symbol_attribute): Likewise.
1208 (elf_i386_mkobject): Updated.
1209 (elf_i386_link_hash_table_create): Likewise.
1210 (elf_i386_check_tls_transition): Likewise.
1211 (elf_i386_tls_transition): Likewise.
1212 (elf_i386_convert_load_reloc): Likewise.
1213 (elf_i386_check_relocs): Likewise.
1214 (elf_i386_adjust_dynamic_symbol): Likewise.
1215 (elf_i386_allocate_dynrelocs): Likewise.
1216 (elf_i386_convert_load): Likewise.
1217 (elf_i386_size_dynamic_sections): Likewise.
1218 (elf_i386_relocate_section): Likewise.
1219 (elf_i386_finish_dynamic_symbol ): Likewise.
1220 (elf_i386_finish_dynamic_sections): Likewise.
1221 (elf_i386_output_arch_local_syms): Likewise.
1222 (elf_i386_get_synthetic_symtab): Likewise.
1223 (elf_i386_link_setup_gnu_properties): Likewise.
1224 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1225 of elf_link_hash_table, as base.
1226 (elf_i386_next_tls_desc_index): New.
1227 (elf_i386_srelplt2): Likewise.
1228 (elf_i386_plt): Likewise.
1229 (elf_i386_lazy_plt): Likewise.
1230 (elf_i386_non_lazy_plt): Likewise.
1231 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1232 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1233 "objalloc.h" and "hashtab.h".
1234 (ELIMINATE_COPY_RELOCS): Removed.
1235 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1236 (SYMBOL_NO_COPYRELOC): Likewise.
1237 (elf_x86_64_link_hash_entry): Likewise.
1238 (GOT_UNKNOWN): Likewise.
1239 (GOT_NORMAL): Likewise.
1240 (GOT_TLS_GD): Likewise.
1241 (elf_x86_64_hash_entry): Likewise.
1242 (elf_x86_64_obj_tdata): Likewise.
1243 (elf_x86_64_tdata): Likewise.
1244 (elf_x86_64_local_got_tls_type): Likewise.
1245 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1246 (elf_x86_64_hash_table): Likewise.
1247 (elf_x86_64_link_hash_newfunc): Likewise.
1248 (elf_x86_64_local_htab_hash): Likewise.
1249 (elf_x86_64_local_htab_eq): Likewise.
1250 (elf_x86_64_get_local_sym_hash): Likewise.
1251 (elf_x86_64_link_hash_table_free): Likewise.
1252 (elf_x86_64_copy_indirect_symbol): Likewise.
1253 (elf_x86_64_fixup_symbol): Likewise.
1254 (elf_x86_64_readonly_dynrelocs): Likewise.
1255 (elf_x86_64_always_size_sections): Likewise.
1256 (elf_x86_64_set_tls_module_base): Likewise.
1257 (elf_x86_64_dtpoff_base): Likewise.
1258 (compare_relocs): Likewise.
1259 (elf_x86_64_merge_symbol_attribute): Likewise.
1260 (elf_x86_64_hash_symbol): Likewise.
1261 (elf_x86_64_parse_gnu_properties): Likewise.
1262 (elf_x86_64_merge_gnu_properties): Likewise.
1263 (elf_x86_64_link_check_relocs): Likewise.
1264 (elf_backend_copy_indirect_symbol): Likewise.
1265 (elf_backend_always_size_sections): Likewise.
1266 (bfd_elf64_bfd_link_check_relocs): Likewise.
1267 (elf_backend_merge_symbol_attribute): Likewise.
1268 (elf_backend_hash_symbol): Likewise.
1269 (elf_backend_omit_section_dynsym): Likewise.
1270 (elf_backend_fixup_symbol): Likewise.
1271 (elf_backend_parse_gnu_properties): Likewise.
1272 (elf_backend_merge_gnu_properties): Likewise.
1273 (bfd_elf32_bfd_link_check_relocs): Likewise.
1274 (elf_x86_64_mkobject): Updated.
1275 (elf_x86_64_link_hash_table_create): Likewise.
1276 (elf_x86_64_check_tls_transition): Likewise.
1277 (elf_x86_64_tls_transition): Likewise.
1278 (elf_x86_64_convert_load_reloc): Likewise.
1279 (elf_x86_64_check_relocs): Likewise.
1280 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1281 (elf_x86_64_allocate_dynrelocs): Likewise.
1282 (elf_x86_64_convert_load): Likewise.
1283 (elf_x86_64_size_dynamic_sections): Likewise.
1284 (elf_x86_64_relocate_section): Likewise.
1285 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1286 (elf_x86_64_finish_dynamic_sections): Likewise.
1287 (elf_x86_64_output_arch_local_syms): Likewise.
1288 (elf_x86_64_get_synthetic_symtab): Likewise.
1289 (elf_x86_64_link_setup_gnu_properties): Likewise.
1290 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1291 instead of elf_link_hash_table, as base.
1292 (elf_x86_64_next_tls_desc_index): New.
1293 (elf_x86_64_srelplt2): Likewise.
1294 (elf_x86_64_plt): Likewise.
1295 (elf_x86_64_lazy_plt): Likewise.
1296 (elf_x86_64_non_lazy_plt): Likewise.
1297 * elfxx-x86.c: New file.
1298 * elfxx-x86.h: Likewise.
1299
823cb067
L
13002017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1301
1302 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1303 return.
1304 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1305
37c0b6ee
L
13062017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1307
1308 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1309 sections before checking dynamic relocations and free invalid
1310 PLT section contents.
1311 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1312
0fb0a767
L
13132017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1314
1315 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1316 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1317
90efb642
L
13182017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1319
1320 PR binutils/22018
1321 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1322 PLT section size.
1323 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1324
596dc58f
L
13252017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1326
1327 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1328 def_protected.
1329 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1330
a5b4ee94
L
13312017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1332
1333 PR ld/21997
1334 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1335 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1336 Add a has_no_copy_on_protected bitfield.
1337 (elf_has_no_copy_on_protected): New.
1338 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1339 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1340 (elf_merge_gnu_property_list): Likewise.
1341 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1342 to FALSE for elf_has_no_copy_on_protected.
1343 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1344 (elf_i386_link_hash_entry): Add def_protected.
1345 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1346 when checking info->nocopyreloc.
1347 (elf_i386_link_setup_gnu_properties): Don't set
1348 extern_protected_data here.
1349 (elf_i386_merge_symbol_attribute): New function.
1350 (elf_backend_merge_symbol_attribute): New.
1351 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1352 (elf_x86_64_link_hash_entry): Add def_protected.
1353 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1354 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1355 when checking info->nocopyreloc.
1356 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1357 relocation run-time overflow and unresolvable R_X86_64_32S
1358 relocation against protected data symbol defined in shared object
1359 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1360 (elf_x86_64_link_setup_gnu_properties): Don't set
1361 extern_protected_data here.
1362 (elf_x86_64_merge_symbol_attribute): New function.
1363 (elf_backend_merge_symbol_attribute): New.
1364
7c8bbca5
AM
13652017-08-26 Alan Modra <amodra@gmail.com>
1366
1367 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1368 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1369 (ppc_elf_relocate_section): Comment fix.
1370 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1371 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1372 Support dynamic relocs for TPREL16 when non-pic too.
1373 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1374 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1375 when non-pic too.
1376
5fdda9d6
L
13772017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1378
1379 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1380 "symbol" in comments.
1381 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1382
7073b5b9
L
13832017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1384
1385 PR ld/22001
1386 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1387 R_X86_64_PC32 relocation run-time overflow and unresolvable
1388 R_X86_64_32S relocation with -z nocopyreloc.
1389
34bb2571
L
13902017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1391
1392 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1393 Undefined symbols may not have a type.
1394 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1395
aab921ad
L
13962017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1397
1398 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1399 bfd_link_info. Report shared, PIE or PDE object based on
1400 bfd_link_info.
1401 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1402 (elf_x86_64_relocate_section): Likewise.
1403
b1bb697e
L
14042017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1405
1406 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1407 for function symbols.
1408 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1409
73784fa5
L
14102017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1411
1412 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1413 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1414 is set on any input relocatable file.
1415 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1416
46434633
AM
14172017-08-23 Alan Modra <amodra@gmail.com>
1418
1419 PR 21988
1420 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1421 ensure_undefweak_dynamic. Handle undefined too.
1422 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1423 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1424 (allocate_dynrelocs): Discard undefined non-default visibility
1425 relocs first. Make undefined syms dynamic. Tidy goto.
1426
487b6440
AM
14272017-08-21 Alan Modra <amodra@gmail.com>
1428 H.J. Lu <hongjiu.lu@intel.com>
1429
1430 PR ld/21964
1431 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1432 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1433
284d826d
HPN
14342017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1435
1436 PR ld/20125
1437 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1438 undefined weak symbols.
1439
de259397
NC
14402017-08-18 Nick Clifton <nickc@redhat.com>
1441
1442 PR binutils/21962
1443 * tekhex.c (getsym): Fix check for source pointer walking off the
1444 end of the input buffer.
1445
545bc2b3
SN
14462017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1447
1448 PR ld/18808
1449 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1450 relocations in debug sections, change abort to _bfd_error_handler.
1451
0c54f692
NC
14522017-08-14 Nick Clifton <nickc@redhat.com>
1453
1454 PR 21957
1455 * elf.c (setup_group): Check for an empty or very small group
1456 section.
1457 * po/bfd.pot: Regenerate.
1458
79a94a2a
AM
14592017-08-14 Alan Modra <amodra@gmail.com>
1460
1461 PR 21441
1462 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1463 alignment padding here.
1464 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1465 in a reverse pass over sections.
1466
98c5dfc9
L
14672017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1468
1469 PR binutils/21943
1470 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1471 for @plt suffixes first.
1472 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1473
24d3e51b
NC
14742017-08-08 Nick Clifton <nickc@redhat.com>
1475
1476 PR 21916
1477 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1478 small section lengths.
1479 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1480 table.
1481 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1482 there is enough data present in the note.
1483
206c9c79
AM
14842017-08-08 Alan Modra <amodra@gmail.com>
1485
1486 PR 21017
1487 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1488 got.refcount for GOTOFF relocs, just create .got section.
1489
2980ccad
L
14902017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1491
1492 * elflink.c (elf_link_add_object_symbols): Move common symbol
1493 check after bed->common_definition.
1494
b3293efa
AM
14952017-08-07 Alan Modra <amodra@gmail.com>
1496
1497 PR 21910
1498 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1499 needed to define various dynamic tags have been discarded.
1500
b7a18930
NC
15012017-08-07 Nick Clifton <nickc@redhat.com>
1502
1503 PR 21884
1504 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1505 has not been set then use the bfd returned by
1506 _bfd_elf_link_setup_gnu_properties. If that is null then search
1507 through all the input bfds selecting the first normal, ELF format
1508 one.
1509 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1510
1d4af308
L
15112017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1512
1513 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1514 to 1 bit.
1515 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1516 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1517 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1518 (elf_i386_link_check_relocs): New function.
1519 (bfd_elf32_bfd_link_check_relocs): New.
1520 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1521 to 1 bit.
1522 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1523 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1524 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1525 (elf_x86_64_link_check_relocs): New function.
1526 (bfd_elf64_bfd_link_check_relocs): New.
1527 (bfd_elf32_bfd_link_check_relocs): Likewise.
1528
a4819f54
L
15292017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1530
1531 PR ld/21903:
1532 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1533 as undefined for --no-define-common.
1534
55ef6584
AM
15352017-08-05 Alan Modra <amodra@gmail.com>
1536
1537 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1538 hppa_link_hash_table.
1539
d84ed528
MF
15402017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1541
1542 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1543 entries for sysregs with negative indices.
1544
1ef692ea
AK
15452017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1546
1547 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1548 isn't the S/390 specific elf data.
1549 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1550
57593436
KLC
15512017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1552
1553 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1554 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1555 [R_RISCV_ADD16]: Likewise.
1556 [R_RISCV_ADD32]: Likewise.
1557 [R_RISCV_ADD64]: Likewise.
1558 [R_RISCV_SUB6]: Likewise.
1559 [R_RISCV_SUB8]: Likewise.
1560 [R_RISCV_SUB16]: Likewise.
1561 [R_RISCV_SUB32]: Likewise.
1562 [R_RISCV_SUB64]: Likewise.
1563
d44c746a
AM
15642017-07-31 Alan Modra <amodra@gmail.com>
1565
1566 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1567 without ld.so checks.
1568
8b5f1ed8
AM
15692017-07-29 Alan Modra <amodra@gmail.com>
1570
1571 PR 21847
1572 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1573 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1574 (is_elfv2_localentry0): Test non_zero_localentry.
1575 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1576
894dde0b
AK
15772017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1578
1579 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1580 pointer check for htab->elf.irelplt.
1581 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1582
8bdf0be1
NC
15832017-07-27 Nick Clifton <nickc@redhat.com>
1584
1585 PR 21840
1586 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1587 size is -1.
1588 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1589 with error return.
1590 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1591 are NULL.
1592 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1593 of end pointer.
1594 (evax_bfd_print_emh): Check for invalid string lengths.
1595
c26bb067
NC
15962017-07-25 Nick Clifton <nickc@redhat.com>
1597
1598 * po/fr.po: Updated French translation.
1599
cfe7b9bd
BG
16002017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1601
1602 PR 21824
1603 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1604 16-bit absolute branches into 10-bit pc-relative branches on the
1605 MSP430 as well as the MSP430X.
1606
d4aaa2a0
AM
16072017-07-25 Alan Modra <amodra@gmail.com>
1608
1609 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1610 (stub_eh_frame_size): New function.
1611 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1612 (group_sections): Init group tls_get_addr_opt_bctrl.
1613 (ppc64_elf_size_stubs): Update sizing and initialization of
1614 .eh_frame. Iteration over stubs via group list.
1615 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1616 (ppc64_elf_finish_dynamic_sections): Update finalization of
1617 .eh_frame.
1618
ca4cf9b9
NC
16192017-07-24 Nick Clifton <nickc@redhat.com>
1620
1621 PR 21813
1622 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1623 of the relocs to the canonicalize_one_reloc routine.
1624 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1625 for the _bfd_mach_o_canonicalize_one_reloc field.
1626 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1627 res_base parameter. Use to check for corrupt pair relocs.
1628 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1629 Likewise.
1630 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1631 Likewise.
1632 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1633 Likewise.
1634
1635 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1636 enough data in the record before attempting to parse it.
1637 (_bfd_vms_slurp_eeom): Likewise.
1638
1639 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1640 (image_set_ptr): Likewise.
1641 (alpha_vms_slurp_relocs): Likewise.
1642
8a2df5e2
NC
1643 (alpha_vms_object_p): Check for a truncated record.
1644
47aeb64c
NC
16452017-07-24 Nick Clifton <nickc@redhat.com>
1646
1647 PR 21803
1648 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1649 an unrecognized reloc and sets the bfd_error value.
1650 * libbfd.h: Regenerate.
1651 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1652 function.
1653 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1654 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1655 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1656 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1657 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1658
15a3a14f
AM
16592017-07-23 Alan Modra <amodra@gmail.com>
1660
1661 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1662 restore of LR.
1663
f2e6a843
SN
16642017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1665
1666 PR ld/18841
1667 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1668 reloc_class_ifunc for ifunc symbols.
1669
909e4e71
NC
16702017-07-19 Nick Clifton <nickc@redhat.com>
1671
1672 PR 21787
1673 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1674 correct magic bytes at the start, set the error to wrong format
1675 and clear the format selector before returning NULL.
1676
29866fa1
NC
16772017-07-19 Nick Clifton <nickc@redhat.com>
1678
1679 PR 21786
1680 * coff-rs6000.c (_bfd_strntol): New function.
1681 (_bfd_strntoll): New function.
1682 (GET_VALUE_IN_FIELD): New macro.
1683 (EQ_VALUE_IN_FIELD): new macro.
1684 (_bfd_xcoff_slurp_armap): Use new macros.
1685 (_bfd_xcoff_archive_p): Likewise.
1686 (_bfd_xcoff_read_ar_hdr): Likewise.
1687 (_bfd_xcoff_openr_next_archived_file): Likewise.
1688 (_bfd_xcoff_stat_arch_elt): Likewise.
6c4e7b6b
NC
1689 * coff64-rs6000.c (_bfd_strntol): New function.
1690 (_bfd_strntoll): New function.
1691 (GET_VALUE_IN_FIELD): New macro.
1692 (xcoff64_slurp_armap): Use new macros.
29866fa1 1693
684d5a10
JEM
16942017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1695 John Eric Martin <John.Martin@emmicro-us.com>
1696
1697 * bfd-in2.h: Regenerate.
1698 * libbfd.h: Regenerate.
1699 * elf32-arc.c (JLI): Define.
1700 * reloc.c: Add JLI relocations.
1701
de194d85
YC
17022017-07-18 Nick Clifton <nickc@redhat.com>
1703
1704 PR 21775
1705 * coff-sh.c: Fix spelling typos.
1706 * compress.c: Likewise.
1707 * cpu-pdp11.c: Likewise.
1708 * ecofflink.c: Likewise.
1709 * elf-m10300.c: Likewise.
1710 * elf.c: Likewise.
1711 * elf32-arm.c: Likewise.
1712 * elf32-m68k.c: Likewise.
1713 * elf32-nds32.c: Likewise.
1714 * elf32-ppc.c: Likewise.
1715 * elf32-sh.c: Likewise.
1716 * elf32-v850.c: Likewise.
1717 * elf64-ppc.c: Likewise.
1718 * elf64-x86-64.c: Likewise.
1719 * elflink.c: Likewise.
1720 * elfnn-aarch64.c: Likewise.
1721 * elfxx-mips.c: Likewise.
1722 * som.c: Likewise.
1723 * sunos.c: Likewise.
1724 * vms-alpha.c: Likewise.
1725 * xcofflink.c: Likewise.
1726
e4e21d9e
NC
17272017-07-18 Nick Clifton <nickc@redhat.com>
1728
1729 PR binutils/21781
1730 * coffcode.h (handle_COMDAT): Replace abort with an error message
1731 and return.
1732
8e85f840
L
17332017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1734
1735 PR ld/21782
1736 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1737 to shared library.
1738
dd57c19c
L
17392017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1740
1741 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1742
676ee2b5
AM
17432017-07-16 Alan Modra <amodra@gmail.com>
1744
1745 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1746 __tls_index GOT entries when using __tls_get_addr_opt stub.
1747 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1748
429d795d
AM
17492017-07-12 Alan Modra <amodra@gmail.com>
1750
1751 * po/es.po: Update from translationproject.org/latest/bfd/.
1752 * po/fi.po: Likewise.
1753 * po/fr.po: Likewise.
1754 * po/id.po: Likewise.
1755 * po/ja.po: Likewise.
1756 * po/ro.po: Likewise.
1757 * po/ru.po: Likewise.
1758 * po/sr.po: Likewise.
1759 * po/sv.po: Likewise.
1760 * po/tr.po: Likewise.
1761 * po/uk.po: Likewise.
1762 * po/vi.po: Likewise.
1763 * po/zh_CN.po: Likewise.
1764 * po/hr.po: New file from translationproject.org.
1765 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1766 * configure: Regenerate.
1767
0bae9e9e
NC
17682017-07-12 Nick Clifton <nickc@redhat.com>
1769
1770 Fix compile time warnings using gcc 7.1.1.
1771 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1772 plt_name buffer.
1773 (elf_xtensa_get_gotplt_section): Increase length of got_name
1774 buffer.
1775 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1776 default return of FALSE.
1777 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1778 default return of FALSE.
1779
d42c267e
AM
17802017-07-12 Alan Modra <amodra@gmail.com>
1781
1782 * binary.c (binary_set_section_contents): Don't print filepos in
1783 error message.
1784 (coff_write_object_contents): Cast size_t for error message.
1785 (coff_slurp_line_table): Don't use bfd_vma symndx.
1786 (coff_slurp_reloc_table): Remove unneeded cast.
1787 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1788 error message.
1789 (find_abstract_instance_name): Likewise.
1790 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1791 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1792 (elf32_arm_check_relocs): Make r_symndx an int.
1793 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1794 format string.
1795 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1796 message arg.
1797 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1798 error message.
1799 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1800 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1801 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1802 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1803 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1804 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1805 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1806 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1807 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1808 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1809 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1810 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1811 and use %lu for error message.
1812 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1813 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1814 error message.
1815
1816 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1817 in error message.
1818 (elf32_arm_final_link_relocate): Likewise.
1819 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1820 * coffcode.h (styp_to_sec_flags): Likewise.
1821 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1822 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1823 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1824 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1825 (elf32_bfin_merge_private_bfd_data): Likewise.
1826 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1827 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1828 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1829 (i370_elf_relocate_section): Likewise.
1830 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1831 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1832 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1833 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1834 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1835 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1836 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1837 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1838 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1839 * ieee.c (ieee_write_id, read_id): Likewise.
1840 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1841 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1842 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1843 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1844 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1845 * stabs.c (_bfd_link_section_stabs): Likewise.
1846
1847 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1848 format.
1849 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1850 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1851 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1852 * coff-sh.c (sh_relax_section): Likewise.
1853 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1854 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1855 * coffcode.h (coff_slurp_reloc_table): Likewise.
1856 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1857 (_bfd_coff_read_string_table): Likewise.
1858 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1859 * compress.c (bfd_get_full_section_contents): Likewise.
1860 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1861 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1862 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1863 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1864 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1865 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1866 (elf32_arm_write_section): Likewise.
1867 * elf32-bfin.c (bfin_relocate_section): Likewise.
1868 (bfinfdpic_relocate_section): Likewise.
1869 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1870 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1871 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1872 (elf_i386_relocate_section): Likewise.
1873 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1874 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1875 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1876 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1877 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1878 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1879 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1880 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1881 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1882 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1883 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1884 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1885 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1886 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1887 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1888 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1889 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1890 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1891 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1892 * elf32-sh.c (sh_elf_relax_section): Likewise.
1893 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1894 (sh_elf_relocate_section): Likewise.
1895 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1896 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1897 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1898 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1899 * elf32-v850.c (v850_elf_relax_section): Likewise.
1900 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1901 (elf_vax_relocate_section): Likewise.
1902 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1903 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1904 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1905 (do_fix_for_relocatable_link): Likewise.
1906 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1907 (elf64_alpha_relax_with_lituse): Likewise.
1908 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1909 (elf_hppa_final_link_relocate): Likewise.
1910 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1911 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1912 (elf64_vms_link_add_object_symbols): Likewise.
1913 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1914 (mmix_final_link_relocate): Likewise.
1915 * elf64-s390.c (invalid_tls_insn): Likewise.
1916 (elf_s390_relocate_section): Likewise.
1917 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1918 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1919 (elf_x86_64_relocate_section): Likewise.
1920 * elfcode.h (elf_slurp_symbol_table): Likewise.
1921 * elfcore.h (elf_core_file_p): Likewise.
1922 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1923 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1924 (elfNN_aarch64_relocate_section): Likewise.
1925 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1926 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1927 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1928 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1929 (_bfd_mips_elf_relocate_section): Likewise.
1930 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1931 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1932 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1933 * ieee.c (ieee_slurp_external_symbols): Likewise.
1934 * ihex.c (ihex_write_object_content): Likewise.
1935 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1936 * merge.c (_bfd_merged_section_offset): Likewise.
1937 * mmo.c (mmo_write_loc_chunk): Likewise.
1938 (mmo_write_object_contents): Likewise.
1939 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1940 * stabs.c (_bfd_link_section_stabs): Likewise.
1941 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1942
e3fbc3da
AM
19432017-07-11 Alan Modra <amodra@gmail.com>
1944
1945 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1946
2c4d9cbe
AM
19472017-07-11 Alan Modra <amodra@gmail.com>
1948
1949 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1950 instruction" error using _bfd_error_handler, not einfo.
1951
adce5b39
NC
19522017-07-10 Nick Clifton <nickc@redhat.com>
1953
1954 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1955 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1956
e6f3b9c3
JB
19572017-07-07 John Baldwin <jhb@FreeBSD.org>
1958
1959 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1960
532cc313
AM
19612017-07-07 Alan Modra <amodra@gmail.com>
1962
1963 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1964
1cf9552b
AM
19652017-07-07 Alan Modra <amodra@gmail.com>
1966
1967 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1968 as long long. Move code replacing "ll" with "I64", and simplify.
1969
a0b7b105
L
19702017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1971
1972 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1973 to 1.
1974
1d827a72
L
19752017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1976
1977 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1978 xtime.
1979 (line_info_add_file_name): Likewise.
1980 (decode_line_info): Likewise.
1981
0d702cfe
TG
19822017-07-04 Tristan Gingold <gingold@adacore.com>
1983
1984 * version.m4: Bump version to 2.29.51
1985 * configure: Regenerate.
1986
564e46b7
JW
19872017-07-04 Jiong Wang <jiong.wang@arm.com>
1988
1989 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1990 sanity check at the head of this function.
1991
0041f7df
JK
19922017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1993
1994 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1995 dwarf_line_str_size.
1996 (struct attr_abbrev): Add field implicit_const.
1997 (dwarf_debug_sections): Add .debug_line_str.
1998 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1999 (dwarf_debug_section_assert): Add static assertion.
2000 (read_indirect_line_string): New.
2001 (read_abbrevs): Support DW_FORM_implicit_const.
2002 (is_str_attr): Support DW_FORM_line_strp.
2003 (read_attribute_value): Support DW_FORM_line_strp and
2004 DW_FORM_implicit_const.
2005 (read_attribute): Support DW_FORM_implicit_const.
2006 (line_info_add_include_dir, line_info_add_include_dir_stub):
2007 (line_info_add_file_name, read_formatted_entries): New.
2008 (decode_line_info, parse_comp_unit): Support DWARF 5.
2009 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2010
d8cd8c1f
EB
20112017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2012
2013 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2014 abort statement that was put for symbols that are not dynamic.
2015
15e6ed8c
TG
20162017-07-03 Tristan Gingold <gingold@adacore.com>
2017
2018 * po/bfd.pot: Regenerate
2019
76cfced5
AM
20202017-07-03 Alan Modra <amodra@gmail.com>
2021
2022 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2023 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2024 * elf.c (setup_group): Use "Lx" to print sh_size.
2025 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2026 unknown section type in hex.
2027 (copy_special_section_fields): Style fix.
2028 (bfd_section_from_shdr): Correct format for sh_link. Use a
2029 common error message for all the variants of unrecognized
2030 section types.
2031 (assign_file_positions_for_load_sections): Use "Lx" for lma
2032 adjust error message.
2033 (assign_file_positions_for_non_load_sections): Formatting.
2034 (rewrite_elf_program_header): Formatting. Use "Lx" for
2035 bfd_vma values in error messages.
2036 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2037 ELF_R_SYM value to type expected by format.
2038 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2039 in error messages.
2040 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2041 (elf_link_input_bfd): Use "Lx" for r_info.
2042 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2043
ce9116fd
AM
20442017-07-03 Alan Modra <amodra@gmail.com>
2045
2046 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2047 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2048 Microsoft C library variant of long long format specifier.
2049 (PRINT20): Cast value to bfd_uint64_t not long long.
2050 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2051 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2052 long long. Don't cast to bfd_vma.
2053 * elf32-score.c (score3_bfd_getl48): Likewise.
2054 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2055
cd9af601
AM
20562017-07-03 Alan Modra <amodra@gmail.com>
2057
2058 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2059 print d_tag.
2060 (bfd_elf_print_symbol): Don't cast symbol->flags.
2061 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2062 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2063 _bfd_error_handler argument order.
2064 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2065
33c734b2
AM
20662017-07-03 Alan Modra <amodra@gmail.com>
2067
2068 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2069 AC_TYPE_LONG_DOUBLE.
2070 * configure: Regenerate.
2071 * config.in: Regenerate.
2072
3df5cd13
AW
20732017-06-29 Andrew Waterman <andrew@sifive.com>
2074
2075 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2076 relocs.
2077
ec1acaba
EB
20782017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2079
2080 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2081 unless it is undefined weak.
2082 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2083 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2084 relocation.
2085 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2086 is not dynamic in PIC, abort.
2087
ff07562f
JW
20882017-06-29 Jiong Wang <jiong.wang@arm.com>
2089
2090 PR ld/21402
2091 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2092 undefined weak symbols into dynamic.
2093 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2094 relocation for non-dynamic symbols.
2095 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2096
2aff25ba
JW
20972017-06-29 Jiong Wang <jiong.wang@arm.com>
2098
2099 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2100 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2101 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2102 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2103 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2104 support for them.
2105
88ab90e8
AA
21062017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2107
2108 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2109 (elfcore_write_s390_gs_bc): Likewise.
2110 * elf.c (elfcore_grok_s390_gs_cb): New function.
2111 (elfcore_grok_s390_gs_bc): New function.
2112 (elfcore_grok_note): Call them.
2113 (elfcore_write_s390_gs_cb): New function.
2114 (elfcore_write_s390_gs_bc): New function.
2115 (elfcore_write_register_note): Call them.
2116
328ce951
L
21172017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2118
2119 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2120 bfd_get_file_size. Check archive element size.
2121 (_bfd_generic_get_section_contents_in_window): Likewise.
2122
47fdcf63
L
21232017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2124
2125 * bfd-in2.h: Regenerated.
2126 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2127 (bfd_get_file_size): Likewise.
2128
38bf472a
MR
21292017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2130 Matthew Fortune <matthew.fortune@imgtec.com>
2131
2132 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2133 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2134 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2135 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2136 case.
2137 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2138 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2139 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2140 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2141 `bfd_mach_mips_interaptiv_mr2' entries.
2142 * bfd-in2.h: Regenerate.
2143
2d68166e
NC
21442017-06-27 Nick Clifton <nickc@redhat.com>
2145
2146 * tekhex.c (pass_over): Revert accidental conversion of a local
2147 array to a static array.
2148
68063779
SKS
21492017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2150
2151 PR ld/13402
2152 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2153 reloc addend if necessary. Adjust diff only if
2154 shrinked_insn_address < end_address.
2155
ea9aafc4
AM
21562017-06-27 Alan Modra <amodra@gmail.com>
2157
2158 PR binutils/21665
2159 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2160 (_bfd_generic_get_section_contents_in_window): Likewise.
2161
a6cbf936
KLC
21622017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2163
2164 * elfnn-riscv.c (perform_relocation): Support the new
2165 R_RISCV_32_PCREL relocation.
2166 (riscv_elf_relocate_section): Likewise.
2167 * elfxx-riscv.c (howto_table): Likewise.
2168 (riscv_reloc_map): Likewise.
2169 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2170 * libbfd.h: Regenerate.
2171
7211ae50
AM
21722017-06-27 Alan Modra <amodra@gmail.com>
2173
2174 PR binutils/21665
2175 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2176 Use unsigned file pointer type, and remove cast.
2177 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2178 Add "count", not "sz".
2179
ab27f80c
PA
21802017-06-26 Pedro Alves <palves@redhat.com>
2181
2182 PR binutils/21665
2183 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2184 "sz".
2185
1f473e3d
L
21862017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2187
2188 PR binutils/21665
2189 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2190 a missing line.
2191
b417536f
MR
21922017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2193
2194 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2195 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2196 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2197 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2198 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2199
0630b49c
L
22002017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2201
2202 PR binutils/21665
2203 * compress.c (bfd_get_full_section_contents): Don't check the
2204 file size here.
2205 * libbfd.c (_bfd_generic_get_section_contents): Check for and
ea9aafc4 2206 reject a section whose size + offset is greater than the size
0630b49c
L
2207 of the entire file.
2208 (_bfd_generic_get_section_contents_in_window): Likewise.
515a4464 2209
04e15b4a
NC
22102017-06-26 Nick Clifton <nickc@redhat.com>
2211
2212 PR binutils/21670
2213 * tekhex.c (getvalue): Check for the source pointer exceeding the
2214 end pointer before the first byte is read.
2215
cfd14a50
NC
22162017-06-26 Nick Clifton <nickc@redhat.com>
2217
2218 PR binutils/21665
ea9aafc4 2219 * opncls.c (get_build_id): Check that the section is big enough
cfd14a50
NC
2220 to contain the whole note.
2221 * compress.c (bfd_get_full_section_contents): Check for and reject
ea9aafc4 2222 a section whose size is greater than the size of the entire file.
cfd14a50
NC
2223 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2224 contain a notes section.
2225
93ec5e23
AK
22262017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2227
2228 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2229 pointer checks.
2230 (elf_s390_modify_segment_map): Likewise.
2231 (bfd_elf_s390_set_options): Lisewise.
2232
57963c05
AM
22332017-06-26 Alan Modra <amodra@gmail.com>
2234
2235 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2236 a --just-syms bfd.
2237 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2238 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2239 .preinit_array on --just-syms bfds.
2240 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2241 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2242 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2243
5cc4ca83
ST
22442017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2245
2246 * elf.c (find_link): Bounds check "hint".
2247
bff0500d
TP
22482017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2249
2250 * elf32-arm.c (using_thumb_only): Update list of architectures in
2251 BFD_ASSERT for which the logic is valid.
2252 (using_thumb2_bl): Likewise.
2253 (using_thumb2): Likewise and return true for ARMv8-R.
2254 (arch_has_arm_nop): Likewise.
2255 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2256 merging logic. Update commentis for value 15 of v8m_baseline,
2257 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2258 merging of value 15 of Tag_CPU_arch.
2259
4aa57d6a
JW
22602017-06-23 Jiong Wang <jiong.wang@arm.com>
2261
2262 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2263 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2264 * bfd-in2.h: Regenerate.
2265
5d8763a3
L
22662017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2267
2268 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2269 the error_alignment label forward. Properly align program
2270 property note section.
2271
e652757b
EC
22722017-06-22 Eric Christopher <echristo@gmail.com>
2273
2274 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2275 abs to fix a truncation warning.
2276
84da4cf8
L
22772017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2278
2279 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2280 local undefined weak symbol to 0.
2281 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2282
48580982
L
22832017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2284
2285 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2286 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2287 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2288 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2289 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2290 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2291 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2292 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2293
ee2fdd6f
L
22942017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2295
2296 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2297 (elf_i386_lazy_ibt_plt_entry): Likewise.
2298 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2299 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2300 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2301 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2302 (elf_i386_lazy_plt_layout): Likewise.
2303 (elf_i386_non_lazy_plt_layout): Likewise.
2304 (elf_i386_link_hash_entry): Add plt_second.
2305 (elf_i386_link_hash_table): Add plt_second and
2306 plt_second_eh_frame.
2307 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2308 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2309 the second PLT. Check the second PLT.
2310 (elf_i386_relocate_section): Use the second PLT to resolve
2311 PLT reference if needed.
2312 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2313 needed.
2314 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2315 second PLT. Generate unwind info for the second PLT.
2316 (elf_i386_plt_type): Add plt_second.
2317 (elf_i386_get_synthetic_symtab): Support the second PLT.
2318 (elf_i386_parse_gnu_properties): Support
2319 GNU_PROPERTY_X86_FEATURE_1_AND.
2320 (elf_i386_merge_gnu_properties): Support
2321 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2322 on GNU_PROPERTY_X86_FEATURE_1_IBT
2323 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2324 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2325 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2326 is set on all relocatable inputs.
2327 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2328 (elf_x32_lazy_ibt_plt_entry): Likewise.
2329 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2330 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2331 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2332 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2333 (elf_x86_64_lazy_ibt_plt): Likewise.
2334 (elf_x32_lazy_ibt_plt): Likewise.
2335 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2336 (elf_x32_non_lazy_ibt_plt): Likewise.
2337 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2338 (elf_x86_64_parse_gnu_properties): Support
2339 GNU_PROPERTY_X86_FEATURE_1_AND.
2340 (elf_x86_64_merge_gnu_properties): Support
2341 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2342 on GNU_PROPERTY_X86_FEATURE_1_IBT
2343 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2344 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2345 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2346 is set on all relocatable inputs.
2347
d19237d9
NC
23482017-06-22 Nick Clifton <nickc@redhat.com>
2349
2350 PR binutils/21649
2351 * som.c (setup_sections): NUL terminate the space_strings buffer.
2352 Check that the space.name field does not index beyond the end of
2353 the space_strings buffer.
2354
6879f5a9
NC
23552017-06-21 Nick Clifton <nickc@redhat.com>
2356
2357 PR binutils/21646
2358 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2359
7adc0a81
NC
23602017-06-21 Nick Clifton <nickc@redhat.com>
2361
2362 PR binutils/21639
2363 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2364 type of the size parameter.
2365 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2366 length of the counted string.
2367 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2368 (_bfd_vms_save_counted_string): Likewise.
2369 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2370 _bfd_vms_save_counted_string.
2371 (_bfd_vms_slurp_ehdr): Likewise.
2372 (_bfd_vms_slurp_egsd): Likewise.
2373 (Parse_module): Likewise.
2374
6e1816be
AM
23752017-06-21 Alan Modra <amodra@gmail.com>
2376
2377 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2378 calls before tocsave calls.
2379 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2380 following nop.
2381
20bd1b6b
NC
23822017-06-21 Nick Clifton <nickc@redhat.com>
2383
2384 PR binutils/21645
2385 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2386 bfd_get_full_section_contents returns no contents.
2387
3de58d95
NC
23882017-06-21 Nick Clifton <nickc@redhat.com>
2389
2390 PR binutils/21638
2391 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2392 record.
2393
cb06d03a
NC
23942017-06-21 Nick Clifton <nickc@redhat.com>
2395
2396 PR binutils/21637
2397 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2398 list.
2399 (image_set_ptr): Likewise.
2400 (alpha_vms_fix_sec_rel): Likewise.
2401 (alpha_vms_slurp_relocs): Likewise.
2402
c458d007
NC
24032017-06-21 Nick Clifton <nickc@redhat.com>
2404
2405 PR binutils/21633
2406 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2407 read_id.
2408 (ieee_archive_p): Likewise.
2409 (ieee_object_p): Likewise.
2410
ce497010
NC
24112017-06-21 Nick Clifton <nickc@redhat.com>
2412
2413 PR binutils/21640
2414 * elf.c (setup_group): Zero the group section pointer list after
2415 allocation so that loops can be caught. Check for NULL pointers
2416 when processing a group list.
2417
fd52715c
AK
24182017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2419
2420 * elf-s390.h: New file.
2421 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2422 field.
2423 (elf_s390_additional_program_headers): New function.
2424 (elf_s390_modify_segment_map): New function.
2425 (bfd_elf_s390_set_options): New function.
2426 (elf_backend_additional_program_headers)
2427 (elf_backend_modify_segment_map): Add macro definitions.
2428
abfa390d
L
24292017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2430
2431 PR ld/21626
2432 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2433 the DYNAMIC bit instead of bfd_count_sections.
2434
bc21b167
NC
24352017-06-19 Nick Clifton <nickc@redhat.com>
2436
2437 PR binutils/21618
2438 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2439 length.
2440 (evax_bfd_print_eeom): Likewise.
2441 (evax_bfd_print_egsd): Check for an overlarge record length.
2442 (evax_bfd_print_etir): Likewise.
2443
acb56a83
NC
24442017-06-19 Nick Clifton <nickc@redhat.com>
2445
2446 PR binutils/21612
2447 * libieee.h (struct common_header_type): Add end_p field.
2448 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2449 end_p.
2450 (read_id): Check for a length that exceeds the remaining bytes in
2451 the input buffer.
2452 (ieee_seek): Initialise end_p.
2453 (ieee_archive_p): Likewise.
2454 (ieee_object_p): Likewise.
2455
72e84f96
NC
24562017-06-19 Nick Clifton <nickc@redhat.com>
2457
80053e46
NC
2458 PR binutils/21611
2459 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2460 before reading the EIHS structure entries.
2461
24622017-06-19 Nick Clifton <nickc@redhat.com>
2463
2464 PR binutils/21615
72e84f96
NC
2465 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2466 gsd_size. Check that there are enough bytes remaining to read the
2467 type and size of the next egsd. Check that the size of the egsd
2468 does not exceed the size of the record.
2469
875ffa3e
AM
24702017-06-19 Alan Modra <amodra@gmail.com>
2471
2472 * config.bfd: Correct targ_underscore for cris.
2473
bdd32e03
AM
24742017-06-18 Alan Modra <amodra@gmail.com>
2475
2476 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2477 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2478
4b48e2f6
NC
24792017-06-16 Nick Clifton <nickc@redhat.com>
2480
2481 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2482 bucketlist is empty because there are no symbols to add to the
2483 list.
2484
7dba9362
AM
24852017-06-16 Alan Modra <amodra@gmail.com>
2486
2487 PR ld/20022
2488 PR ld/21557
2489 PR ld/21562
2490 PR ld/21571
2491 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2492 (BFD_JUMP_TABLE_LINK): Likewise.
2493 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2494 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2495 (bfd_elf_define_start_stop): New function.
2496 * linker.c (bfd_generic_define_start_stop): New function.
2497 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2498 new field.
2499 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2500 * aout-target.h (MY_bfd_define_start_stop): Define.
2501 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2502 * binary.c (binary_bfd_define_start_stop): Define.
2503 * bout.c (b_out_bfd_define_start_stop): Define.
2504 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2505 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2506 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2507 * coffcode.h (coff_bfd_define_start_stop): Define.
2508 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2509 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2510 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2511 * ieee.c (ieee_bfd_define_start_stop): Define.
2512 * ihex.c (ihex_bfd_define_start_stop): Define.
2513 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2514 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2515 * mmo.c (mmo_bfd_define_start_stop): Define.
2516 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2517 * oasys.c (oasys_bfd_define_start_stop): Define.
2518 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2519 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2520 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2521 * som.c (som_bfd_define_start_stop): Define.
2522 * srec.c (srec_bfd_define_start_stop): Define.
2523 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2524 * versados.c (versados_bfd_define_start_stop): Define.
2525 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2526 (alpha_vms_bfd_define_start_stop): Define.
2527 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2528 * bfd-in2.h: Regenerate.
2529 * libbfd.h: Regenerate.
2530
d68f1976
JW
25312017-06-16 Jiong Wang <jiong.wang@arm.com>
2532
2533 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2534 SYMBOL_REFERENCES_LOCAL.
2535
6353d82b
JW
25362017-06-15 Jiong Wang <jiong.wang@arm.com>
2537
2538 PR ld/21532
2539 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2540 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2541 runtime for if there needs copy relocation elimination.
2542 (need_copy_relocation_p): New function. Return true for symbol with
2543 pc-relative references and if it's against read-only sections.
2544 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2545 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2546 that are related with accessing external objects.
2547 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2548 in elfNN_aarch64_check_relocs.
2549
63634bb4
NC
25502017-06-15 Nick Clifton <nickc@redhat.com>
2551
2552 PR binutils/21582
2553 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2554 bugs.
62b76e4b
NC
2555 PR binutils/21581
2556 (ieee_archive_p): Likewise.
63634bb4 2557
76800cba
NC
25582017-06-15 Nick Clifton <nickc@redhat.com>
2559
2560 PR binutils/21579
2561 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2562
f7e16c2a
MF
25632017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2564
2565 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2566 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2567 keep both windowed and call0 ABI PLT definitions.
2568 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2569 elf_xtensa_*_plt_entry endex.
2570 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2571
f461bbd8
NC
25722017-06-14 Nick Clifton <nickc@redhat.com>
2573
2574 PR binutils/21578
2575 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2576 flag value.
2577
c53d2e6d
NC
25782017-06-14 Nick Clifton <nickc@redhat.com>
2579
2580 PR binutils/21589
2581 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2582 maximum value for the ascic pointer. Check that name processing
2583 does not read beyond this value.
2584 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2585 end of etir record.
2586
04f963fd
NC
25872017-06-14 Nick Clifton <nickc@redhat.com>
2588
2589 PR binutils/21591
2590 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2591 (process_otr): Check for an invalid offset in the otr structure.
2592
319c2dbe
SH
25932017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2594
2595 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2596
cbd0eecf
L
25972017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2598
2599 PR ld/20022
2600 PR ld/21557
2601 PR ld/21562
2602 PR ld/21571
2603 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2604 vtable field to a union.
2605 (_bfd_elf_is_start_stop): Removed.
2606 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2607 __start_SECNAME and __stop_SECNAME symbols.
2608 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2609 * elflink.c (_bfd_elf_is_start_stop): Removed.
2610 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2611 _bfd_elf_is_start_stop.
2612 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2613 __stop_SECNAME symbols. Updated.
2614 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2615 (bfd_elf_gc_record_vtinherit): Likewise.
2616 (bfd_elf_gc_record_vtentry): Likewise.
2617
10bbbc1d
NC
26182017-06-13 Nick Clifton <nickc@redhat.com>
2619
2620 PR ld/21524
2621 * elflink.c (elf_link_adjust_relocs): Generate an error when
2622 encountering a reloc against a symbol removed by garbage
2623 collection.
2624
5c3ce2bc
L
26252017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2626
2627 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2628 to merge_gnu_properties.
2629 * elf-properties.c (elf_merge_gnu_properties): Add struct
2630 bfd_link_info * and pass it to merge_gnu_properties.
2631 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2632 and pass it to elf_merge_gnu_properties.
2633 (_bfd_elf_link_setup_gnu_properties): Pass info to
2634 elf_merge_gnu_property_list.
2635 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2636 bfd_link_info *.
2637 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2638
9b97dfbf
AM
26392017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2640
2641 PR 21564
2642 * binary.c (binary_set_section_contents): Scale lma by octets
2643 per byte to set filepos.
2644
e3d1d408
CM
26452017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2646
2647 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2648 dynamic sections.
2649
64aa8e03
CM
26502017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2651
2652 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2653 require TEXTREL.
2654
a0abe743
CM
26552017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2656
2657 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2658 patched section contents for TLS IE reloc.
2659 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2660
f4e6805f
CM
26612017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2662
2663 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2664 RELOC_FOR_GLOBAL_SYMBOL macro.
2665
cd640291
CM
26662018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2667
2668 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2669 changes.
2670
7ef0acc1
VG
26712017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2672
2673 * config/tc-arc.c (md_undefined_symbol): Changed.
2674 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2675
cc89d0b3
CM
26762017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2677
2678 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2679 symbols.
2680
9d5c718b
CM
26812017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2682
2683 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2684 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2685
be9e3704
CM
26862017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2687
2688 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2689 object is created.
2690
4ec192e6
RE
26912017-06-08 Richard Earnshaw <rearnsha@arm.com>
2692
2693 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2694 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2695 is non-zero. Add clarifying comments.
2696
51fa2693
L
26972017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2698
2699 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2700 name. Use local IFUNC symbol name string to report unsupported
2701 non-PIC call to IFUNC function.
2702 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2703 when generating R_386_IRELATIVE relocation.
2704 (elf_i386_finish_dynamic_symbol): Likewise.
2705 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2706 IFUNC symbol name.
2707 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2708 when generating R_X86_64_IRELATIVE relocation.
2709 (elf_x86_64_finish_dynamic_symbol): Likewise.
2710
78e8a2ff
JM
27112017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2712
2713 * elf.c (setup_group): Make sure BFD sections are created for all
2714 group sections in the input file when processing SHF_GROUP
2715 sections.
2716 (bfd_section_from_shdr): Avoid duplicating logic already
2717 implemented in `setup_group'.
2718
9949827b
DBR
27192017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2720
2721 PR binutils/21546
2722 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2723 if the hint address is zero.
2724
0ee3a6db
JC
27252017-06-06 James Clarke <jrtc27@jrtc27.com>
2726
2727 PR ld/19579
2728 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2729 ELF_COMMON_DEF_P for common symbols.
2730
7bdf4127
AB
27312017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2732
2733 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2734 SEC_GROUP sections as SEC_EXCLUDE.
2735 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2736 (assign_section_numbers): Use resolve_section_groups flag instead
2737 of relocatable link type.
2738 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2739 flag instead of checking the final_link flag for part of the
2740 checks in here. Fix white space as a result.
2741 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2742 instead of relocatable link type.
2743 (bfd_elf_final_link): Likewise.
2744
458ad2b8
JM
27452017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2746
2747 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2748 variable `bed'.
2749 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2750 (s3_bfd_score_elf_check_relocs): Likewise.
2751 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2752 (score_elf_final_link_relocate): Likewise.
2753 (s7_bfd_score_elf_check_relocs): Likewise.
2754
fbebaf4a
JM
27552017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2756
2757 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2758 `bed'.
2759
056bafd4
MR
27602017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2761
2762 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2763 from `reloc_count' rather than decrementing it.
2764 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2765 `reloc_count' by `int_rels_per_ext_rel'.
2766 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2767 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2768 entry determination.
2769 (s3_bfd_score_elf_check_relocs): Likewise.
2770 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2771 (s7_bfd_score_elf_relocate_section): Likewise.
2772 (s7_bfd_score_elf_check_relocs): Likewise.
2773 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2774 prototype and function.
2775 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2776 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2777 triple rather than once the sum of REL and RELA relocation entry
2778 counts.
2779 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2780 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2781 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2782 storage allocation size determination.
2783 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2784 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2785 by `int_rels_per_ext_rel' for last relocation entry
2786 determination.
2787 (bfd_elf_final_link): Do not multiply `reloc_count' by
2788 `int_rels_per_ext_rel' for internal relocation storage
2789 allocation size determination.
2790 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2791 `int_rels_per_ext_rel' for last relocation entry determination.
2792 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2793 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2794 (_bfd_mips_elf_relocate_section): Likewise.
2795
af54f0eb
AM
27962017-06-05 Alan Modra <amodra@gmail.com>
2797
2798 PR 21529
2799 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2800
6cf3bf88 28012017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
2802
2803 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2804 determine structure sizes.
2805 (elfcore_grok_freebsd_prstatus): Likewise.
2806
f378ab09
AM
28072017-06-01 Alan Modra <amodra@gmail.com>
2808
2809 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2810 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2811 dynamic objects.
2812 (is_elfv2_localentry0): New function.
2813 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2814 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2815 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2816 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2817 optimized localentry:0 stubs.
2818 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2819 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2820 localentry:0 stubs.
2821 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2822 DT_PPC64_OPT.
2823 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2824
8c65b54f
CS
28252017-05-30 Casey Smith <clegg89@gmail.com>
2826
2827 PR ld/21523
2828 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2829 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2830
64984c22
AK
28312017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2832
2833 * cpu-arc.c (arc_compatible): New function.
2834
37cd3877
AK
28352017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2836
2837 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2838
8e2f54bc
L
28392017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2840
2841 PR binutils/21519
2842 * bfdio.c (bfd_get_file_size): New function.
2843 * bfd-in2.h: Regenerated.
2844
8e7f04f1 28452017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2846
2847 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2848 comments.
2849
25f94347
L
28502017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2851
2852 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2853 dynobj instead of htab->elf.dynobj.
2854
e5713223
MR
28552017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2856
2857 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2858 and function.
2859 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2860 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2861 actual number of internal relocations retrieved. Adjust
2862 function description.
2863 (bfd_elf64_canonicalize_reloc): Remove macro.
2864 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2865
64517994
JM
28662017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2867
2868 * archures.c (bfd_mach_sparc_v9m8): Define.
2869 (bfd_mach_sparc_v8plusm8): Likewise.
2870 (bfd_mach_sparc_v9_p): Adjust to M8.
2871 (bfd_mach_sparc_64bit_p): Likewise.
2872 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2873 bfd_mach_sparc_v8plusm8.
2874 * bfd-in2.h: Regenerated.
2875 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2876 sparc:v8plusm8.
2877 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2878 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2879 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2880 SHA3.
2881 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2882 bfd_mach_sparc_v8plusm8.
2883
eb026f09
AM
28842017-05-19 Alan Modra <amodra@gmail.com>
2885
2886 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2887 debug and special sections when no non-note alloc sections in an
2888 object are kept.
2889
535b785f
AM
28902017-05-18 Alan Modra <amodra@gmail.com>
2891
2892 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2893 * elf-m10300.c: Likewise.
2894 * elf.c: Likewise.
2895 * elf32-arc.c: Likewise.
2896 * elf32-bfin.c: Likewise.
2897 * elf32-m68k.c: Likewise.
2898 * elf32-nds32.c: Likewise.
2899 * elf32-tilepro.c: Likewise.
2900 * elflink.c: Likewise.
2901 * elfnn-aarch64.c: Likewise.
2902 * elfnn-riscv.c: Likewise.
2903 * elfxx-tilegx.c: Likewise.
2904 * mach-o.c: Likewise.
2905 * peXXigen.c: Likewise.
2906 * vms-alpha.c: Likewise.
2907 * vms-lib.c: Likewise.
2908
b7c871ed
L
29092017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2910
2911 PR ld/20882
2912 * elflink.c (elf_gc_mark_debug_section): New function.
2913 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2914 referenced by kept debug sections.
2915
bc4e12de
AM
29162017-05-16 Alan Modra <amodra@gmail.com>
2917
2918 * elf-m10300.c: Rename occurrences of non_ir_ref.
2919 * elf32-arm.c: Likewise.
2920 * elf32-bfin.c: Likewise.
2921 * elf32-cr16.c: Likewise.
2922 * elf32-cris.c: Likewise.
2923 * elf32-d10v.c: Likewise.
2924 * elf32-dlx.c: Likewise.
2925 * elf32-fr30.c: Likewise.
2926 * elf32-frv.c: Likewise.
2927 * elf32-hppa.c: Likewise.
2928 * elf32-i370.c: Likewise.
2929 * elf32-i386.c: Likewise.
2930 * elf32-iq2000.c: Likewise.
2931 * elf32-lm32.c: Likewise.
2932 * elf32-m32c.c: Likewise.
2933 * elf32-m32r.c: Likewise.
2934 * elf32-m68hc1x.c: Likewise.
2935 * elf32-m68k.c: Likewise.
2936 * elf32-mcore.c: Likewise.
2937 * elf32-metag.c: Likewise.
2938 * elf32-microblaze.c: Likewise.
2939 * elf32-moxie.c: Likewise.
2940 * elf32-msp430.c: Likewise.
2941 * elf32-mt.c: Likewise.
2942 * elf32-nios2.c: Likewise.
2943 * elf32-or1k.c: Likewise.
2944 * elf32-ppc.c: Likewise.
2945 * elf32-rl78.c: Likewise.
2946 * elf32-s390.c: Likewise.
2947 * elf32-score.c: Likewise.
2948 * elf32-score7.c: Likewise.
2949 * elf32-sh.c: Likewise.
2950 * elf32-tic6x.c: Likewise.
2951 * elf32-tilepro.c: Likewise.
2952 * elf32-v850.c: Likewise.
2953 * elf32-vax.c: Likewise.
2954 * elf32-xstormy16.c: Likewise.
2955 * elf32-xtensa.c: Likewise.
2956 * elf64-alpha.c: Likewise.
2957 * elf64-hppa.c: Likewise.
2958 * elf64-ia64-vms.c: Likewise.
2959 * elf64-mmix.c: Likewise.
2960 * elf64-ppc.c: Likewise.
2961 * elf64-s390.c: Likewise.
2962 * elf64-sh64.c: Likewise.
2963 * elf64-x86-64.c: Likewise.
2964 * elflink.c: Likewise.
2965 * elfnn-aarch64.c: Likewise.
2966 * elfnn-ia64.c: Likewise.
2967 * elfnn-riscv.c: Likewise.
2968 * elfxx-mips.c: Likewise.
2969 * elfxx-sparc.c: Likewise.
2970 * elfxx-tilegx.c: Likewise.
2971 * linker.c: Likewise.
2972
4070765b
AM
29732017-05-16 Alan Modra <amodra@gmail.com>
2974
2975 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2976 * elflink.c (elf_link_add_object_symbols): Update to use
2977 non_ir_ref_dynamic.
2978 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2979 non_ir_ref.
2980 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2981
25499ac7
MR
29822017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2983
2984 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2985
73caa85d
L
29862017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2987
2988 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2989 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2990 properties.
2991 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2992
f2c29a16
L
29932017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2994
2995 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2996 to plt_second.
2997 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2998 to plt_second/plt_second_eh_frame.
2999 (elf_x86_64_link_hash_newfunc): Updated.
3000 (elf_x86_64_allocate_dynrelocs): Likewise.
3001 (elf_x86_64_size_dynamic_sections): Likewise.
3002 (elf_x86_64_relocate_section): Likewise.
3003 (elf_x86_64_finish_dynamic_symbol): Likewise.
3004 (elf_x86_64_finish_dynamic_sections): Likewise.
3005 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3006 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3007 .plt.sec section.
3008 (elf_backend_setup_gnu_properties): Updated. Create the
3009 .plt.sec section instead of the .plt.sec section.
3010
dc2be3d2
L
30112017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3012
3013 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3014 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3015 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3016
db84b98a
JM
30172017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3018
3019 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3020 (bfd_elf64_set_reloc): Define.
3021 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3022
23186865
JM
30232017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3024
3025 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3026 (struct bfd_target): New field _bfd_set_reloc.
3027 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3028 * reloc.c (_bfd_generic_set_reloc): New function.
3029 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3030 * nlm-target.h (nlm_set_reloc): Likewise.
3031 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3032 * aout-tic30.c (MY_set_reloc): Likewise.
3033 * aout-target.h (MY_set_reloc): Likewise.
3034 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3035 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3036 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3037 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3038 * aout-adobe.c (aout_32_set_reloc): Likewise.
3039 * bout.c (b_out_set_reloc): Likewise.
3040 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3041 * i386os9k.c (aout_32_set_reloc): Likewise.
3042 * ieee.c (ieee_set_reloc): Likewise.
3043 * oasys.c (oasys_set_reloc): Likewise.
3044 * som.c (som_set_reloc): Likewise.
3045 * versados.c (versados_set_reloc): Likewise.
3046 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3047 _bfd_generic_set_reloc.
3048 (rs6000_xcoff64_aix_vec): LIkewise.
3049 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3050 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3051 * i386msdos.c (msdos_set_reloc): Define to
3052 _bfd_norelocs_set_reloc.
3053 * elfcode.h (elf_set_reloc): Define.
3054 * bfd-in2.h: Regenerated.
3055
aab82f4c
L
30562017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3057
3058 PR ld/21481
3059 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3060 for IFUNC function address.
3061
53a346d8
CZ
30622017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3063
3064 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3065 (CONFLICT_LIST): Likewise.
3066 (opcode/arc-attrs.h): Include.
3067 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3068 (arc_extract_features): New file.
3069 (arc_stralloc): Likewise.
3070 (arc_elf_merge_attributes): Likewise.
3071 (arc_elf_merge_private_bfd_data): Use object attributes.
3072 (bfd_arc_get_mach_from_attributes): New function.
3073 (arc_elf_object_p): Use object attributes.
3074 (arc_elf_final_write_processing): Likewise.
3075 (elf32_arc_obj_attrs_arg_type): New function.
3076 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3077 (elf32_arc_section_from_shdr): Likewise.
3078 (elf_backend_obj_attrs_vendor): Define.
3079 (elf_backend_obj_attrs_section): Likewise.
3080 (elf_backend_obj_attrs_arg_type): Likewise.
3081 (elf_backend_obj_attrs_section_type): Likewise.
3082 (elf_backend_obj_attrs_handle_unknown): Likewise.
3083 (elf_backend_section_from_shdr): Likewise.
3084
e645cf40
AG
30852017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3086
3087 PR ld/21458
3088 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3089 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3090 and the destination is a Thumb symbol.
3091
dd9e66ee
L
30922017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3093
3094 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3095 initializer to silence GCC 4.2.
3096 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3097
38b12349
L
30982017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3099
3100 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3101 (LAZY_PLT_ENTRY_SIZE): This.
3102 (NON_LAZY_PLT_ENTRY_SIZE): New.
3103 (elf_x86_64_plt0_entry): Renamed to ...
3104 (elf_x86_64_lazy_plt0_entry): This.
3105 (elf_x86_64_plt_entry): Renamed to ...
3106 (elf_x86_64_lazy_plt_entry): This.
3107 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3108 (elf_x86_64_lazy_bnd_plt0_entry): This.
3109 (elf_x86_64_legacy_plt_entry): Removed.
3110 (elf_x86_64_bnd_plt_entry): Renamed to ...
3111 (elf_x86_64_lazy_bnd_plt_entry): This.
3112 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3113 (elf_x86_64_non_lazy_plt_entry): This.
3114 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3115 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3116 (elf_x86_64_eh_frame_plt): Renamed to ...
3117 (elf_x86_64_eh_frame_lazy_plt): This.
3118 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3119 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3120 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3121 (elf_x86_64_eh_frame_non_lazy_plt): This.
3122 (elf_x86_64_lazy_plt_layout): New.
3123 (elf_x86_64_non_lazy_plt_layout): Likewise.
3124 (elf_x86_64_plt_layout): Likewise.
3125 (elf_x86_64_backend_data): Remove PLT layout information. Add
3126 os for target system.
3127 (GET_PLT_ENTRY_SIZE): Removed.
3128 (elf_x86_64_lazy_plt): New.
3129 (elf_x86_64_non_lazy_plt): Likewise.
3130 (elf_x86_64_lazy_bnd_plt): Likewise.
3131 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3132 (elf_x86-64_arch_bed): Updated.
3133 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3134 (elf_x86_64_create_dynamic_sections): Removed.
3135 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3136 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3137 (elf_x86-64_adjust_dynamic_symbol): Updated.
3138 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3139 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3140 size for PLT0 if there is no PLT0. Get plt_entry_size from
3141 non_lazy_plt for non-lazy PLT entries.
3142 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3143 from non_lazy_plt for non-lazy PLT entries.
3144 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3145 if there is no PLT0.
3146 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3147 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3148 entries with non-lazy PLT layout. Don't fill the second and third
3149 slots in the PLT entry if there is no PLT0.
3150 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3151 if there is no PLT0. Set sh_entsize on the .plt.got section.
3152 (compare_relocs): New.
3153 (elf_x86_64_plt_type): Likewise.
3154 (elf_x86_64_plt): Likewise.
3155 (elf_x86_64_nacl_plt): New. Forward declaration.
3156 (elf_x86_64_get_plt_sym_val): Removed.
3157 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3158 against all dynamic relocations.
3159 (elf_x86_64_link_setup_gnu_properties): New function.
3160 (elf_backend_create_dynamic_sections): Updated.
3161 (elf_backend_setup_gnu_properties): New.
3162 (elf_x86_64_nacl_plt): New.
3163 (elf_x86_64_nacl_arch_bed): Updated.
3164
f604c2a2
L
31652017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3166
3167 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3168 (LAZY_PLT_ENTRY_SIZE): This.
3169 (NON_LAZY_PLT_ENTRY_SIZE): New.
3170 (elf_i386_plt0_entry): Renamed to ...
3171 (elf_i386_lazy_plt0_entry): This.
3172 (elf_i386_plt_entry): Renamed to ...
3173 (elf_i386_lazy_plt_entry): This.
3174 (elf_i386_pic_plt0_entry): Renamed to ...
3175 (elf_i386_pic_lazy_plt0_entry): This.
3176 (elf_i386_pic_plt_entry): Renamed to ...
3177 (elf_i386_pic_lazy_plt_entry): This.
3178 (elf_i386_got_plt_entry): Renamed to ...
3179 (elf_i386_non_lazy_plt_entry): This.
3180 (elf_i386_pic_got_plt_entry): Renamed to ...
3181 (elf_i386_pic_non_lazy_plt_entry): This.
3182 (elf_i386_eh_frame_plt): Renamed to ...
3183 (elf_i386_eh_frame_lazy_plt): This.
3184 (elf_i386_eh_frame_plt_got): Renamed to ...
3185 (elf_i386_eh_frame_non_lazy_plt): This.
3186 (elf_i386_plt_layout): Renamed to ...
3187 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3188 eh_frame_plt_got_size.
3189 (elf_i386_non_lazy_plt_layout): New.
3190 (elf_i386_plt_layout): Likewise.
3191 (elf_i386_non_lazy_plt): Likewise.
3192 (GET_PLT_ENTRY_SIZE): Removed.
3193 (elf_i386_plt): Renamed to ...
3194 (elf_i386_lazy_plt): This.
3195 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3196 (elf_i386_arch_bed): Updated.
3197 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3198 (elf_i386_create_dynamic_sections): Removed.
3199 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3200 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3201 (elf_i386_adjust_dynamic_symbol): Updated.
3202 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3203 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3204 size for PLT0 if there is no PLT0.
3205 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3206 output section is discarded only if GOT isn't empty.
3207 (elf_i386_relocate_section): Updated. Properly get PLT index
3208 if there is no PLT0.
3209 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3210 second and third slots in the PLT entry if there is no PLT0.
3211 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3212 if there is no PLT0. Set sh_entsize on the .plt.got section.
3213 (elf_i386_nacl_plt): Forward declaration.
3214 (elf_i386_get_plt_sym_val): Removed.
3215 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3216 against all dynamic relocations.
3217 (elf_i386_link_setup_gnu_properties): New function.
3218 (elf_backend_create_dynamic_sections): Updated.
3219 (elf_backend_setup_gnu_properties): New.
3220 (elf_i386_nacl_plt): Updated.
3221 (elf_i386_nacl_arch_bed): Likewise.
3222 (elf_i386_vxworks_arch_bed): Likewise.
3223
046734ff
TP
32242017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3225
3226 * elflink.c (elf_output_implib): Remove executable flag from import
3227 library bfd.
3228 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3229 library is a relocatable object file.
3230
b660e9eb
SKS
32312017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3232
3233 PR ld/21404
3234 * elf32-avr.c (avr_should_move_sym): New function.
3235 (avr_should_reduce_sym_size): Likewise.
3236 (avr_should_increase_sym_size): Likewise.
3237 (elf32_avr_relax_delete_bytes): Adjust symbol values
3238 and sizes by calling new functions.
3239
763a5fa4
PD
32402017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3241
3242 * config.bfd (riscv32-*): Enable rv64.
3243
73ec947d
AM
32442017-05-02 Alan Modra <amodra@gmail.com>
3245
3246 PR 21384
3247 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3248 rather than h->root.type == bfd_link_hash_new.
3249 (bfd_elf_record_link_assignment): Similarly, call
3250 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3251
a941291c
AM
32522017-04-29 Alan Modra <amodra@gmail.com>
3253
3254 PR 21432
3255 * reloc.c (reloc_offset_in_range): New function.
3256 (bfd_perform_relocation, bfd_install_relocation): Use it.
3257 (_bfd_final_link_relocate): Likewise.
3258
750eaa47
L
32592017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3260
3261 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3262 before using .plt.got.
3263 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3264
5b66fac4
L
32652017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3266
3267 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3268 instead of "+=" to update 0.
3269
de9a3c42
L
32702017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3271
3272 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3273 .plt.got section here.
3274 (elf_i386_check_relocs): Don't create the .plt.got section.
3275 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3276 the .plt.got and .plt.bnd sections here.
3277 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3278 .plt.bnd sections.
3279
da3d25af
L
32802017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3281
3282 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3283 has_bnd_reloc.
3284 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3285 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3286 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3287 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3288 has_bnd_reloc.
3289
fba37edd
L
32902017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3291
3292 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3293 to return bfd *.
3294 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3295 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3296 the first relocatable ELF input with GNU properties.
3297
1f78f649
L
32982017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3299
3300 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3301 VxWorks for non-PIC.
3302
76c20d54
AM
33032017-04-27 Alan Modra <amodra@gmail.com>
3304
3305 * elf-bfd.h (struct elf_backend_data): Make asection param of
3306 elf_backend_eh_frame_address_size const.
3307 (_bfd_elf_eh_frame_address_size): Likewise.
3308 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3309 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3310 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3311 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3312 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3313 (next_cie_fde_offset): Constify params.
3314 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3315
d7153c4a
AM
33162017-04-27 Alan Modra <amodra@gmail.com>
3317
3318 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3319 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3320 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3321 aug_data_len.
3322 (offset_adjust): New function.
3323 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3324 (adjust_eh_frame_local_symbols): Likewise.
3325 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3326 after changing anything. Return true if anything changed.
3327 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3328 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3329
641338d8
AM
33302017-04-27 Alan Modra <amodra@gmail.com>
3331
3332 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3333 when force_local.
3334
21d68fcd
AM
33352017-04-27 Alan Modra <amodra@gmail.com>
3336
3337 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3338 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3339 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3340 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3341 for undef and undefweak dyn_relocs.
3342 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3343 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3344 (allocate_got, allocate_dynrelocs): Likewise.
3345 (ppc64_elf_relocate_section): Likewise.
3346
97d343d4
L
33472017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3348
3349 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3350 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3351 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3352 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3353
04b31182
NC
33542017-04-26 Nick Clifton <nickc@redhat.com>
3355
3356 PR binutils/21434
3357 * reloc.c (bfd_perform_relocation): Check for a negative address
3358 in the reloc.
3359
23ec1e32
MR
33602017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3361
3362 PR ld/21334
3363 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3364 member.
3365 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3366 (elf_backend_always_renumber_dynsyms): Define.
3367 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3368 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3369 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3370 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3371 it.
3372 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3373
c46cec3a
MR
33742017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3375
3376 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3377 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3378 sections have been created.
3379
e63d1232
NC
33802017-04-26 Nick Clifton <nickc@redhat.com>
3381
3382 PR binutils/21431
3383 * compress.c (bfd_init_section_compress_status): Check the return
3384 value from bfd_malloc.
3385
9e9821dd
L
33862017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3387
3388 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3389 no_finish_dynamic_symbol.
3390 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3391 0.
3392 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3393 weak symbol, don't make it dynamic.
3394 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3395 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3396 relocation for GOT reference.
3397 (elf_x86_64_finish_dynamic_symbol): Abort if
3398 no_finish_dynamic_symbol isn't 0.
3399
0dc9a308
L
34002017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3401
3402 PR ld/21402
3403 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3404 undefined weak symbol, don't make it dynamic.
3405 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3406 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3407 relocation for R_386_GOT32.
3408
1587442d
L
34092017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3410
3411 PR ld/21425
3412 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3413
7eacd66b
AM
34142017-04-23 Alan Modra <amodra@gmail.com>
3415
3416 PR 21414
3417 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3418 * elf.c (lcomm_sym): New.
3419 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3420 * bfd-in2.h: Regenerate.
3421
bce964aa
AM
34222017-04-23 Alan Modra <amodra@gmail.com>
3423
3424 PR 21412
3425 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3426 parameters and comment.
3427 (_bfd_elf_get_reloc_section): Delete.
3428 (_bfd_elf_plt_get_reloc_section): Declare.
3429 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3430 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3431 Extracted from..
3432 (_bfd_elf_get_reloc_section): ..here. Delete.
3433 (assign_section_numbers): Call elf_get_reloc_section.
3434 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3435 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3436
97e83a10
AM
34372017-04-23 Alan Modra <amodra@gmail.com>
3438
3439 PR 21409
3440 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3441 no symbols.
3442
e133d005
L
34432017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3444
3445 PR ld/21402
3446 * elf32-i386.c (elf_i386_link_hash_entry): Add
3447 no_finish_dynamic_symbol.
3448 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3449 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3450 symbol, don't make it dynamic in PIE.
3451 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3452 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3453 relocation for R_386_GOT32
3454 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3455 isn't 0.
3456
3c5fce9b
L
34572017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3458
3459 PR ld/19617
3460 PR ld/21086
3461 * elflink.c (elf_link_add_object_symbols): Require
3462 --no-dynamic-linker with -E/--dynamic-list when creating
3463 dynamic sections.
3464
0fad2956
MR
34652017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3466
3467 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3468 if forced local.
3469
64575f78
MR
34702017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3471
3472 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3473 dynamic symbol sorting.
3474
59fa66c5
L
34752017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3476
3477 PR ld/21382
3478 * elflink.c (elf_link_add_object_symbols): Preserve
3479 dynamic_ref_after_ir_def when restoring the symbol table for
3480 unneeded dynamic object.
3481
e492d2f8
L
34822017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3483
3484 PR ld/21401
3485 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3486 on on undefined IFUNC symbol in the second PLT.
3487
10169134
WAF
34882017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3489
3490 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3491
954b63d4
AM
34922017-04-19 Alan Modra <amodra@gmail.com>
3493
3494 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3495 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3496 * elf32-ppc.c:Formatting.
3497 (ensure_undefweak_dynamic): Don't make dynamic when
3498 info->dynamic_undefined_weak is zero.
3499 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3500 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3501 not default visibility. Discard undef and undefweak
3502 dyn_relocs earlier.
3503 (ppc_elf_relocate_section): Adjust to suit.
3504 * elf64-ppc.c: Formatting.
3505 (ensure_undefweak_dynamic): Don't make dynamic when
3506 info->dynamic_undefined_weak is zero.
3507 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3508 info->dynamic_undefined_weak. Discard them earlier.
3509
e6699019
L
35102017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3511
3512 PR ld/21389
3513 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3514 before generating the version definition section.
3515
c5d37467
AM
35162017-04-17 Alan Modra <amodra@gmail.com>
3517
3518 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3519 state when a regular object file defines a symbol with
3520 incompatible type to that defined by an earlier shared lib.
3521
63a5468a
AM
35222017-04-13 Alan Modra <amodra@gmail.com>
3523
3524 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3525 * elf.c: Likewise.
3526 * elf32-arm.c: Likewise.
3527 * elf32-i386.c: Likewise.
3528 * elf32-mep.c: Likewise.
3529 * elf64-ia64-vms.c: Likewise.
3530 * elf64-x86-64.c: Likewise.
3531 * elflink.c: Likewise.
3532 * elfnn-ia64.c: Likewise.
3533 * elfxx-mips.c: Likewise.
3534
dae82561
AM
35352017-04-13 Alan Modra <amodra@gmail.com>
3536
3537 * aoutx.h: Use %B and %A in error messages throughout file.
3538 * aout-cris.c: Likewise.
3539 * archive.c: Likewise.
3540 * binary.c: Likewise.
3541 * coff-rs6000.c: Likewise.
3542 * coff-tic4x.c: Likewise.
3543 * coffcode.h: Likewise.
3544 * coffgen.c: Likewise.
3545 * cofflink.c: Likewise.
3546 * coffswap.h: Likewise.
3547 * cpu-arm.c: Likewise.
3548 * elf-eh-frame.c: Likewise.
3549 * elf-m10300.c: Likewise.
3550 * elf.c: Likewise.
3551 * elf32-arc.c: Likewise.
3552 * elf32-arm.c: Likewise.
3553 * elf32-bfin.c: Likewise.
3554 * elf32-frv.c: Likewise.
3555 * elf32-iq2000.c: Likewise.
3556 * elf32-m32c.c: Likewise.
3557 * elf32-microblaze.c: Likewise.
3558 * elf32-nds32.c: Likewise.
3559 * elf32-rl78.c: Likewise.
3560 * elf32-rx.c: Likewise.
3561 * elf32-score.c: Likewise.
3562 * elf32-score7.c: Likewise.
3563 * elf32-sh64.c: Likewise.
3564 * elf32-v850.c: Likewise.
3565 * elf32-vax.c: Likewise.
3566 * elf32-visium.c: Likewise.
3567 * elf64-ia64-vms.c: Likewise.
3568 * elf64-mmix.c: Likewise.
3569 * elf64-sh64.c: Likewise.
3570 * elfcode.h: Likewise.
3571 * elfnn-aarch64.c: Likewise.
3572 * elfnn-ia64.c: Likewise.
3573 * elfxx-mips.c: Likewise.
3574 * hpux-core.c: Likewise.
3575 * ieee.c: Likewise.
3576 * ihex.c: Likewise.
3577 * linker.c: Likewise.
3578 * merge.c: Likewise.
3579 * mmo.c: Likewise.
3580 * oasys.c: Likewise.
3581 * pdp11.c: Likewise.
3582 * peXXigen.c: Likewise.
3583 * rs6000-core.c: Likewise.
3584 * vms-alpha.c: Likewise.
3585 * xcofflink.c: Likewise.
3586
c08bb8dd
AM
35872017-04-13 Alan Modra <amodra@gmail.com>
3588
3589 * bfd.c (PRINT_TYPE): Define.
3590 (_doprnt): New function.
3591 (error_handler_internal): Use _doprnt.
3592 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3593 calls in their natural order, throughout file.
3594 * coff-mcore.c: Likewise.
3595 * coff-ppc.c: Likewise.
3596 * coff-tic80.c: Likewise.
3597 * cofflink.c: Likewise.
3598 * elf-s390-common.c: Likewise.
3599 * elf.c: Likewise.
3600 * elf32-arm.c: Likewise.
3601 * elf32-i386.c: Likewise.
3602 * elf32-m32r.c: Likewise.
3603 * elf32-msp430.c: Likewise.
3604 * elf32-spu.c: Likewise.
3605 * elf64-ia64-vms.c: Likewise.
3606 * elf64-sparc.c: Likewise.
3607 * elf64-x86-64.c: Likewise.
3608 * elflink.c: Likewise.
3609 * elfnn-aarch64.c: Likewise.
3610 * elfnn-ia64.c: Likewise.
3611 * elfxx-mips.c: Likewise.
3612
10463f39
AM
36132017-04-13 Alan Modra <amodra@gmail.com>
3614
3615 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3616 branch veneers" error. Fix double space and format message.
3617 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3618 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3619
4af8774e
AM
36202017-04-13 Alan Modra <amodra@gmail.com>
3621
3622 * bfd-in2.h: Regenerate.
3623
e4097f5e
L
36242017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3625
3626 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3627 extra `\n' in warning/error messages.
3628 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3629 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3630
537616aa
L
36312017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3632
3633 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3634 processor-specific properties with generic ELF target vector.
3635
bb1dd176
QZ
36362017-04-10 Qing Zhao <qing.zhao@oracle.com>
3637
3638 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3639 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3640 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3641 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3642 has_non_got_reloc.
3643 (link_hash_newfunc): Initialize has_got_reloc and
3644 has_non_got_reloc.
3645 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3646 section.
3647 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3648 has_non_got_reloc.
3649 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3650 has_non_got_reloc.
3651 (_bfd_sparc_elf_fixup_symbol): New function.
3652 (allocate_dynrelocs): Don't allocate space for dynamic
3653 relocations and discard relocations against resolved undefined
3654 weak symbols in executable. Don't make resolved undefined weak
3655 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3656 relocation against undefined weak symbols in PIE.
3657 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3658 relocations against resolved undefined weak symbols in PIE
3659 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3660 without ynamic PLT/GOT relocations for resolved undefined weak
3661 symbols.
3662 Don't generate dynamic relocation against resolved undefined
3663 weak symbol in executable.
3664 (pie_finish_undefweak_symbol): New function.
3665 (_bfd_sparc_elf_finish_dynamic_sections): Call
3666 pie_finish_undefweak_symbol on all symbols in PIE.
3667 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3668 (_bfd_sparc_elf_fixup_symbol): New function.
3669
d236cfd4
NC
36702017-04-10 Nick Clifton <nickc@redhat.com>
3671
3672 * config.bfd: Remove ns32k from obsolete list.
3673
6f9dbcd4
AM
36742017-04-10 Alan Modra <amodra@gmail.com>
3675
3676 PR 21287
3677 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3678 (special_sections_i): Likewise for .init_array.
3679 (special_sections_p): Likewise for .preinit_array.
3680
8170f769
L
36812017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3682
3683 PR ld/19579
3684 PR ld/21306
3685 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3686 ELF_COMMON_DEF_P for common symbols.
3687 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3688 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3689 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3690 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3691 07492f668d2173da7a2bda3707ff0985e0f460b6.
3692
49f4617b
PA
36932017-04-07 Pedro Alves <palves@redhat.com>
3694
3695 * opncls.c (bfd_get_debug_link_info): Rename to...
3696 (bfd_get_debug_link_info_1): ... this. Change type of second
3697 parameter to void pointer. Adjust.
3698 (bfd_get_debug_link_info): Reimplement on top of
3699 bfd_get_debug_link_info_1.
3700 (separate_debug_file_exists, separate_alt_debug_file_exists):
3701 Change type of second parameter to void pointer. Adjust.
3702 (get_func_type, check_func_type): Change type of second parameter
3703 to void pointer.
3704 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3705 the callback functions instead of passing the address of a local.
3706 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3707 find_separate_debug_file.
3708 (get_alt_debug_link_info_shim): Change type of second parameter to
3709 void pointer. Adjust.
3710 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3711 find_separate_debug_file.
3712 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3713 of second parameter to void pointer. Adjust.
3714 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3715 pointer local to find_separate_debug_file.
3716
37172017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
3718
3719 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3720 external symbols with a definition.
3721 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3722
86abf93a
AM
37232017-04-07 Alan Modra <amodra@gmail.com>
3724
3725 * po/SRC-POTFILES.in: Regenerate.
3726
8dea77f0
AM
37272017-04-05 Alan Modra <amodra@gmail.com>
3728
3729 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3730 reference counting.
3731
477bdd39
JT
37322017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3733
3734 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3735 numbers for DataDirectory entry indicies passed to
3736 add_data_entry().
3737
a91e1603
L
37382017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3739
3740 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3741 each GNU_MBIND section and align GNU_MBIND section to page size.
3742 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3743 segment for each GNU_MBIND section.
3744 (_bfd_elf_init_private_section_data): Copy sh_info from input
3745 for GNU_MBIND section.
3746
b5292032
PD
37472017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3748
3749 * elfnn-riscv.c (GP_NAME): Delete.
3750 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3751 (_bfd_riscv_relax_lui): Likewise.
3752
ad32986f
NC
37532017-04-04 Nick Clifton <nickc@redhat.com>
3754
3755 PR binutils/21342
3756 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3757 dereference.
3758 (bfd_elf_final_link): Only initialize the extended symbol index
3759 section if there are extended symbol tables to list.
3760
46bed679
L
37612017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3762
3763 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3764 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3765 * configure.ac (elf): Add elf-properties.lo.
3766 * Makefile.in: Regenerated.
3767 * configure: Likewise.
3768 * elf-bfd.h (elf_property_kind): New.
3769 (elf_property): Likewise.
3770 (elf_property_list): Likewise.
3771 (elf_properties): Likewise.
3772 (_bfd_elf_parse_gnu_properties): Likewise.
3773 (_bfd_elf_get_property): Likewise.
3774 (_bfd_elf_link_setup_gnu_properties): Likewise.
3775 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3776 and setup_gnu_properties.
3777 (elf_obj_tdata): Add properties.
3778 * elf-properties.c: New file.
3779 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3780 (elf_i386_merge_gnu_properties): Likewise.
3781 (elf_backend_parse_gnu_properties): Likewise.
3782 (elf_backend_merge_gnu_properties): Likewise.
3783 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3784 (elf_x86_64_merge_gnu_properties): Likewise.
3785 (elf_backend_parse_gnu_properties): Likewise.
3786 (elf_backend_merge_gnu_properties): Likewise.
3787 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3788 (elf_backend_parse_gnu_properties): Likewise.
3789 (elf_backend_setup_gnu_properties): Likewise.
3790 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3791 elf_backend_merge_gnu_properties and
3792 elf_backend_setup_gnu_properties.
3793
f96bd6c2
PC
37942017-03-30 Pip Cet <pipcet@gmail.com>
3795
3796 * elf32-wasm32.c: Add relocation code, two relocs.
3797 * reloc.c: Add wasm32 relocations.
3798 * libbfd.h: Regenerate.
3799 * bfd-in2.h: Regenerate.
3800 * bfd/po/bfd.pot: Regenerate.
3801
e643cb45
NC
38022017-03-29 Nick Clifton <nickc@redhat.com>
3803
3804 PR binutils/18025
3805 * coff-bfd.h (struct coff_section_data): Add new fields:
3806 saved_bias and bias.
3807 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3808 computed for PE binaries.
3809 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3810 missing abbrev.
3811
086554e8
HPN
38122017-03-28 Hans-Peter Nilsson <hp@axis.com>
3813
3814 PR ld/16044
3815 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3816 to handle a local symbol with a hash-symbol-entry; without PLT.
3817 Add BFD_ASSERT for an incidental case with GOT entry present.
3818 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3819 isn't forced-or-set local.
3820
a6be0538
PC
38212017-03-27 Pip Cet <pipcet@gmail.com>
3822
3823 * wasm-module.c: New file to support WebAssembly modules.
3824 * wasm-module.h: New file to support WebAssembly modules.
3825 * doc/webassembly.texi: Start documenting wasm-module.c.
3826 * config.bfd: Add wasm_vec.
3827 * targets.c: Likewise.
3828 * configure.ac: Likewise.
3829 * Makefile.am: Add entries for wasm-module.c.
3830 * Makefile.in: Regenerate.
3831 * configure: Regenerate.
3832 * po/SRC-POTFILES.in: Regenerate.
3833
79b1d3cb
PC
38342017-03-27 Pip Cet <pipcet@gmail.com>
3835
3836 * cpu-wasm32.c: New file to support wasm32 architecture.
3837 * elf32-wasm32.c: New file to support wasm32 architecture.
3838 * Makefile.am: Add wasm32 architecture.
3839 * archures.c: Likewise.
3840 * config.bfd: Likewise.
3841 * configure.ac: Likewise.
3842 * targets.c: Likewise.
3843 * Makefile.in: Regenerate.
3844 * bfd-in2.h: Regenerate.
3845 * configure: Regenerate.
3846 * po/SRC-POTFILES.in: Regenerate.
3847
aaed6f5b
AM
38482017-03-20 Alan Modra <amodra@gmail.com>
3849
3850 PR 21266
3851 * elf64-ppc.c (compare_symbols): Stabilize sort.
3852
82e66161
AM
38532017-03-18 Alan Modra <amodra@gmail.com>
3854
3855 * elf64-ppc.c (struct ppc_link_hash_table): Add
3856 local_ifunc_resolver and maybe_local_ifunc_resolver.
3857 (ppc_build_one_stub): Set flags on emitting dynamic
3858 relocation to ifunc.
3859 (ppc64_elf_relocate_section): Likewise.
3860 (ppc64_elf_finish_dynamic_symbol): Likewise.
3861 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3862 local dynamic relocs to ifuncs.
3863 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3864 local_ifunc_resolver and maybe_local_ifunc_resolver.
3865 (ppc_elf_relocate_section): Set flag on emitting dynamic
3866 relocation to ifuncs.
3867 (ppc_elf_finish_dynamic_symbol): Likewise.
3868 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3869 dynamic relocs to ifuncs.
3870
f955cccf
NC
38712017-03-13 Nick Clifton <nickc@redhat.com>
3872
3873 PR binutils/21202
3874 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3875 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3876 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3877 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3878 * bfd-in2.h: Regenerate.
3879 * libbfd.h: Regenerate.
3880 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3881 names.
3882 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3883 (elfNN_aarch64_howto_table): Likewise.
3884 (aarch64_tls_transition_without_check): Likewise.
3885 (aarch64_reloc_got_type): Likewise.
3886 (elfNN_aarch64_final_link_relocate): Likewise.
3887 (elfNN_aarch64_tls_relax): Likewise.
3888 (elfNN_aarch64_relocate_section): Likewise.
3889 (elfNN_aarch64_gc_sweep_hook): Likewise.
3890 (elfNN_aarch64_check_relocs): Likewise.
3891 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3892 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3893
4aef7643
AM
38942017-03-11 Alan Modra <amodra@gmail.com>
3895
3896 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3897 parameter is in fact used. Whitespace fixes.
3898 * elf64-ppc.c: Likewise.
3899
f03265d9
ST
39002017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3901
3902 * rs6000-core.c (CORE_NEW): Simplify macro when
3903 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3904
b1b07054
AM
39052017-03-07 Alan Modra <amodra@gmail.com>
3906
3907 PR 21224
3908 PR 20519
3909 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3910 dyn_relocs check.
3911
2e0ce1c8
AM
39122017-03-05 Alan Modra <amodra@gmail.com>
3913
3914 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3915 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3916 (next_cie_fde_offset): New function.
3917 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3918 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3919 four bytes. Align CIEs to four or eight bytes depending on
3920 per_encoding_aligned8. Align FDEs according to their encoding.
3921 Pad last FDE to output section alignment.
3922 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3923 assertion.
3924 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3925 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3926 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3927
f98450c6
NC
39282017-03-02 Martin Bickel <binutils@ineranves.de>
3929
3930 PR ld/21212
3931 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 3932 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 3933
673cff9b
AM
39342017-03-02 Alan Modra <amodra@gmail.com>
3935
3936 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3937
3de43e7b
AM
39382017-02-28 Alan Modra <amodra@gmail.com>
3939
3940 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3941 (ppc64_elf_relocate_section): Likewise.
3942
4ef97a1b
AM
39432017-02-28 Alan Modra <amodra@gmail.com>
3944
3945 PR 20995
3946 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3947 rather than elf32_nios2_hash_table or elf_hash_table.
3948 (create_got_section): Likewise.
3949 (nios2_elf32_finish_dynamic_symbol): Likewise.
3950 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3951 (nios2_elf32_size_dynamic_sections): Likewise.
3952 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3953 vars. Use htab equivalents directly instead. Don't create
3954 all dynamic sections on needing just the GOT. Use a goto
3955 rather than a fall-through with reloc test. Ensure
3956 htab->dynobj is set when making dynamic sreloc section.
3957 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3958 equivalent directly instead. Don't segfault on looking for
3959 .dynamic when dynamic sections have not been created. Don't
3960 segfault on .got.plt being discarded.
3961 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3962 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3963 fixme and another not so relevant comment.
3964 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3965 already set, set hash table dynobj on creating .sbss.
3966
7ba71655
AM
39672017-02-28 Alan Modra <amodra@gmail.com>
3968
3969 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3970 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3971 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3972 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3973 (ppc64_elf_relocate_section): Likewise.
3974 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3975 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3976 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3977 * libbfd.h: Regenerate.
3978 * bfd-in2.h: Regenerate.
3979
afbf7e8e
AM
39802017-02-28 Alan Modra <amodra@gmail.com>
3981
3982 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3983 dynamic .data.rel.ro read-only.
3984 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3985 rather than section flags when deciding where copy reloc goes.
3986 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3987 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3988 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3989 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3990 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3991 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3992 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3993 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3994 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3995 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3996 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3997 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3998 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3999 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4000 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4001 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4002 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4003 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4004 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4005
0e392101
MR
40062017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4007
4008 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4009 `jalr $0, $25' instruction encoding.
4010
bd757ca7
NC
40112017-02-27 Nick Clifton <nickc@redhat.com>
4012
4013 PR ld/21180
4014 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4015 generating a seg-fault when encountering a symbol that has been
4016 deleted by garbage collection.
4017
034fed0b
AM
40182017-02-25 Alan Modra <amodra@gmail.com>
4019
4020 * elf32-arc.c (struct dynamic_sections): Delete.
4021 (enum dyn_section_types): Delete.
4022 (dyn_section_names): Delete.
4023 (arc_create_dynamic_sections): Delete.
4024 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4025 segfault on discarded .rela.plt section.
4026 (elf_arc_size_dynamic_sections): Formatting. Don't call
4027 arc_create_dynamic_sections. Don't allocate memory for sections
4028 handled by the generic linker. Correct code finding relocs in
4029 read-only sections. Set SEC_EXCLUDE on zero size .got,
4030 .got.plt, and .dynbss sections. Do set .interp for pies.
4031
d0f744f9
AW
40322017-02-24 Andrew Waterman <andrew@sifive.com>
4033
4034 * elfnn-riscv.c (GP_NAME): New macro.
4035 (riscv_global_pointer_value): Use it.
4036 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4037 output section, consider only that section's alignment.
4038
5d58c733
MR
40392017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4040
4041 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4042 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4043 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4044 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4045
c1556ecd
MR
40462017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4047
4048 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4049 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4050 or misaligned.
4051
5499c7c7
AM
40522017-02-23 Alan Modra <amodra@gmail.com>
4053
4054 PR 20744
4055 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4056 16D relocations.
4057 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4058 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4059 relocs.
4060
902e9fc7
MR
40612017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4062
4063 PR ld/20828
4064 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4065 processing ahead of the call to `elf_gc_sweep_symbol'.
4066
758d96d8
NC
40672017-02-22 Nick Clifton <nickc@redhat.com>
4068
4069 PR binutils/21193
4070 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4071 created section 4-byte alignment.
4072
6528b6eb
AM
40732017-02-22 Alan Modra <amodra@gmail.com>
4074
4075 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4076 on .got or .plt output section being discarded by script.
4077 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4078 vxworks splt temp.
4079
24f1a751
AM
40802017-02-21 Alan Modra <amodra@gmail.com>
4081
4082 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4083 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4084
64487780
AM
40852017-02-20 Alan Modra <amodra@gmail.com>
4086
4087 PR 21181
4088 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4089 if DT_RELSZ/DT_RELASZ is zero.
4090
6438d1be
NC
40912017-02-17 Nick Clifton <nickc@redhat.com>
4092
4093 * compress.c (bfd_get_full_section_contents): Remember to reduce
4094 compressed size by the sizeof the compression header when
4095 decompressing the contents.
4096
4bc26c69
PA
40972017-02-17 Pedro Alves <palves@redhat.com>
4098
4099 * srec.c (Chunk): Rename to ...
4100 (_bfd_srec_len): ... this.
4101 (S3Forced): Rename to ...
4102 (_bfd_srec_forceS3): ... this.
4103 * objcopy.c: Adjust all references.
4104
7ec22e0f
PA
41052017-02-17 Pedro Alves <palves@redhat.com>
4106
4107 * archive.c (bsd_write_armap): Rename to ...
4108 (_bfd_bsd_write_armap): ... this.
4109 (coff_write_armap): Rename to ...
4110 (_bfd_coff_write_armap): ... this.
4111 * libbfd-in.h (bsd_write_armap): Rename to ...
4112 (_bfd_bsd_write_armap): ... this.
4113 (coff_write_armap): Rename to ...
4114 (_bfd_coff_write_armap): ... this.
4115 * aout-target.h, aout-tic30.c: Adjust all users.
4116 * libbfd.h: Regenerate.
4117
8c8402cc
PA
41182017-02-17 Pedro Alves <palves@redhat.com>
4119
4120 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4121 (warn_deprecated): Rename to ...
4122 (_bfd_warn_deprecated): ... this.
4123 * libbfd.c (warn_deprecated): Rename to ...
4124 (_bfd_warn_deprecated): ... this.
4125 * bfd-in2.h: Regenerate.
4126
c7c3d11b
PA
41272017-02-17 Pedro Alves <palves@redhat.com>
4128
4129 * bfdio.c (real_ftell): Rename to ...
4130 (_bfd_real_ftell): ... this.
4131 (real_fseek): Rename to ...
4132 (_bfd_real_fseek): ... this.
4133 (real_fopen): Rename to ...
4134 (_bfd_real_fopen): ... this.
4135 * libbfd-in.h (real_ftell): Rename to ...
4136 (_bfd_real_ftell): ... this.
4137 (real_fseek): Rename to ...
4138 (_bfd_real_fseek): ... this.
4139 (real_fopen): Rename to ...
4140 (_bfd_real_fopen): ... this.
4141 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4142 * libbfd.h: Regenerate.
4143
4265548c
PA
41442017-02-17 Pedro Alves <palves@redhat.com>
4145
4146 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4147 * libbfd.c (read_unsigned_leb128): Rename to ...
4148 (_bfd_read_unsigned_leb128): ... this.
4149 (read_signed_leb128): Rename to ...
4150 (_bfd_read_signed_leb128): ... this.
4151 (safe_read_leb128): Rename to ...
4152 (_bfd_safe_read_leb128): ... this.
4153 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4154 (_bfd_read_unsigned_leb128): ... this.
4155 (read_signed_leb128): Rename to ...
4156 (_bfd_read_signed_leb128): ... this.
4157 (safe_read_leb128): Rename to ...
4158 (_bfd_safe_read_leb128): ... this.
4159 * libbfd.h: Renegerate.
4160
3239a423
AB
41612017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4162
4163 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4164 before trying to fine matching file and line information.
4165
90ed9b8b
AB
41662017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4167
4168 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4169 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4170 not match current bfd, then reload debug information. Record bfd
4171 we're loading debug info for in the stash. If we have debug
4172 informatin in the cache then perform section placement before
4173 returning.
4174
a8c75b76
AM
41752017-02-16 Alan Modra <amodra@gmail.com>
4176
4177 PR 21000
4178 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4179 * elfxx-target.h (elf_backend_no_page_alias): Define.
4180 (elfNN_bed): Init new field.
4181 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4182 ensure PT_LOAD segment starts on a new page.
4183 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4184
247d6c4c
AM
41852017-02-16 Alan Modra <amodra@gmail.com>
4186
4187 PR 21132
4188 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4189 if pic.
4190
90571206
JW
41912017-02-16 Jiong Wang <jiong.wang@arm.com>
4192
4193 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4194 * bfd-in2.h: Regenerated.
4195
2a568401
L
41962017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4197
4198 PR ld/21168
4199 * elf32-i386.c (elf_i386_relocate_section): Allow
4200 "lea foo@GOT, %reg" in PIC.
4201
a5def14f
L
42022017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4203
4204 PR ld/20244
4205 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4206 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4207 error against local IFUNC symbol without a base register for
4208 PIC.
4209
174d0a74
MR
42102017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4211
4212 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4213 `%P: %H:' with `info->callbacks->einfo'.
4214 (ppc_elf_relocate_section): Likewise.
4215 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4216 (ppc64_elf_edit_toc): Likewise.
4217 (ppc64_elf_relocate_section): Likewise.
4218
e278ae05
AM
42192017-02-14 Alan Modra <amodra@gmail.com>
4220
4221 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4222 --gc-keep-exported, and test versioned field of sym rather than
4223 looking for @ in name.
4224
10ddfe62
PD
42252017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4226
4227 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4228 __global_pointer$.
4229
d11135f5
NC
42302017-02-13 Nick Clifton <nickc@redhat.com>
4231
4232 PR binutils/21151
4233 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4234 unit length field.
4235
cc162427
AW
42362017-02-07 Andrew Waterman <andrew@sifive.com>
4237
4238 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4239 entry size if PLT header is written.
4240
3d044c0c
SL
42412017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4242
4243 Fix sparc64 dynamic relocation processing to use the dynamic
4244 symbol count.
4245 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4246 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4247 should be used.
4248
1b7e3d2f
NC
42492017-02-03 Nick Clifton <nickc@redhat.com>
4250
4251 PR 21096
4252 * coffcode.h (coff_write_object_contents): Enlarge size of
4253 s_name_buf in order to avoid compile time warning about possible
4254 integer truncation.
4255 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4256 32-bits of insn value before printing into buffer.
4257
e17b0c35
MR
42582017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4259
4260 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4261 `max_local_dynindx'.
4262 (mips_elf_sort_hash_table): Handle it.
4263 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4264 symbols bump up `max_local_dynindx' rather than
4265 `max_non_got_dynindx'.
4266
55f8b9d2
MR
42672017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4268
4269 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4270 `min_got_dynindx', `max_unref_got_dynindx' and
4271 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4272 (mips_elf_sort_hash_table): Adjust accordingly.
4273
0f8c4b60
MR
42742017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4275
4276 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4277 to access the hash table.
4278
17a80fa8
MR
42792017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4280
4281 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4282 non-NULL `htab' to the beginning.
4283
8f56d4fd
MR
42842017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4285
4286 * elflink.c (elf_gc_sweep): Wrap overlong line.
4287
8b10b0b3
MR
42882017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4289
4290 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4291 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4292 * elfxx-mips.c (mips_elf_link_hash_table): Add
4293 `ignore_branch_isa' member.
4294 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4295 in branch relocation calculation as an error if
4296 `ignore_branch_isa' has been set.
4297 (_bfd_mips_elf_insn32): Rename to...
4298 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4299 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4300 Handle the new parameter.
4301
1fbd05e1
HPN
43022017-01-27 Hans-Peter Nilsson <hp@axis.com>
4303
22d9a0de
HPN
4304 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4305 local variable dynobj.
4306
1fbd05e1
HPN
4307 PR ld/20995
4308 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4309 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4310 executable from read-only sections into sdynrelro.
4311 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4312 dynamic relocs in sdynrelro.
4313 (elf_backend_want_dynrelro): Define.
4314
4a7324e1
SH
43152017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4316
4317 * config.bfd (*-*-rtemsaout*): Mark as removed.
4318
c75b4ebd
SH
43192017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4320
4321 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4322 (arm-*-rtems*): Move to (arm*-*-eabi*).
4323 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4324 (m68-*-rtems*): Move to (m68*-*-elf*).
4325
850d84f6
SH
43262017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4327
4328 * config.bfd (*-*-rtemscoff*): Mark as removed.
4329
b531344c
MR
43302017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4331
4332 PR ld/20828
4333 * elflink.c (bfd_elf_record_link_assignment): Revert last
4334 change and don't ever clear `forced_local'. Set `mark'
4335 unconditionally.
4336 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4337 file.
4338 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4339 (bfd_elf_size_dynamic_sections): ... here.
4340 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4341 and set `mark' instead in `__tls_get_addr_opt' processing.
4342 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4343
f0158f44
AM
43442017-01-24 Alan Modra <amodra@gmail.com>
4345
4346 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4347 where dynamic relocs are preferable. Allow ifunc too.
4348 (ensure_undefweak_dynamic): New function.
4349 (allocate_dynrelocs): Use it here. Move plt handling last and
4350 don't make symbols dynamic, simplifying loop. Only make undef
4351 weak symbols with GOT entries dynamic. Correct condition
4352 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4353 comments. Remove goto.
4354 (ppc_elf_relocate_section): Correct test for using dynamic
4355 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4356 to suit. Set up explicit tls_index entries and implicit GOT
4357 tls_index entries resolvable at link time for
4358 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4359 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4360 (ensure_undefweak_dynamic): New function.
4361 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4362 with GOT entries dynamic. Remove unnecessary test of
4363 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4364 (ppc64_elf_relocate_section): Correct test for using dynamic
4365 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4366 to suit. Set up explicit tls_index entries and implicit GOT
4367 tls_index entries resolvable at link time for __tls_get_addr_opt.
4368 Simplify expression to clear mem for prelink.
4369
2d0ca824
YN
43702017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4371
4372 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4373
7f784814
JW
43742017-01-20 Jiong Wang <jiong.wang@arm.com>
4375
4376 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4377 (elf_backend_hash_symbol): Define.
4378
81ff47b3
MR
43792017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4380
4381 PR ld/20828
4382 * elflink.c (bfd_elf_record_link_assignment): Clear any
4383 `forced_local' marking for DSO symbols that are not being
4384 provided.
4385
640d6bfd
KLC
43862017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4387
4388 * elfnn-riscv.c (riscv_elf_object_p): New function.
4389
8361ed4d
L
43902017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4391
4392 PR ld/21038
4393 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4394 plt_bnd_eh_frame.
4395 (elf_x86_64_check_relocs): Create .eh_frame section for the
4396 .plt.bnd section.
4397 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4398 .eh_frame section for the .plt.bnd section.
4399 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4400 for the .plt.bnd section.
4401
2425a30e
NC
44022017-01-12 Nick Clifton <nickc@redhat.com>
4403
4404 PR binutils/20876
4405 * opncls.c (find_separate_debug_file): Add include_dirs
4406 parameter. Only include the directory part of the bfd's filename
4407 in search paths if include_dirs is true. Add a couple of extra
4408 locations for looking for debug files.
4409 ( bfd_follow_gnu_debuglink): Update invocation of
4410 find_separate_debug_file.
4411 (bfd_follow_gnu_debugaltlink): Likewise.
4412 (get_build_id): New function: Finds the build-id of the given bfd.
4413 (get_build_id_name): New function: Computes the name of the
4414 separate debug info file for a bfd, based upon its build-id.
4415 (check_build_id_file): New function: Checks to see if a separate
4416 debug info file exists at the given location, and that its
4417 build-id matches that of the original bfd.
4418 (bfd_follow_build_id_debuglink): New function: Finds a separate
4419 debug info file for a given bfd by using the build-id method.
4420 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4421 method of locating a separate debug info file before using the
4422 debuglink method.
4423 * bfd-in2.h: Regenerate.
4424
9e659176
L
44252017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4426
4427 PR ld/21038
4428 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4429 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4430 elf_x86_64_eh_frame_plt_got.
4431 (elf_x86_64_size_dynamic_sections): Get unwind info from
4432 elf_x86_64_bnd_arch_bed for the BND PLT.
4433
f2e2d2f5
JS
44342017-01-11 Jeremy Soller <jackpot51@gmail.com>
4435
4436 * config.bfd: Add entries for i686-redox and x86_64-redox.
4437
52b232b3
L
44382017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4439
4440 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4441 to 4 bytes.
4442 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4443 .eh_frame section to 4 bytes for x32.
4444 (elf_x86_64_check_relocs): Likewise.
4445
fff53dae
L
44462017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4447
4448 PR ld/20830
4449 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4450 (PLT_GOT_FDE_LENGTH): Likewise.
4451 (elf_i386_plt_layout): Add eh_frame_plt_got and
4452 eh_frame_plt_got_size.
4453 (elf_i386_plt): Updated.
4454 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4455 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4456 (elf_i386_size_dynamic_sections): Allocate and initialize
4457 .eh_frame section for .plt.got.
4458 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4459 .plt.got.
4460 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4461 eh_frame_plt_got_size.
4462 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4463 (PLT_GOT_FDE_LENGTH): Likewise.
4464 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4465 eh_frame_plt_got_size.
4466 (elf_x86_64_arch_bed): Updated.
4467 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4468 eh_frame_plt_got_size.
4469 (elf_x86_64_nacl_arch_bed): Likewise.
4470 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4471 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4472 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4473 .eh_frame section for .plt.got.
4474 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4475 for .plt.got.
4476
f129e49f
L
44772017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4478
4479 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4480 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4481
cd6581da
NC
44822017-01-09 Nick Clifton <nickc@redhat.com>
4483
4484 * dwarf2.c (lookup_address_in_function_table): Return early if
4485 there are no functions in the given comp unit, or if the high
4486 address of the last function in the comp unit is less than the
4487 desired address.
4488
98f02962
NC
44892017-01-09 Nick Clifton <nickc@redhat.com>
4490
4491 PR binutils/21013
4492 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4493 message if there are too many symbols to load.
4494
ae4fda66
JC
44952017-01-04 James Clarke <jrtc27@jrtc27.com>
4496
4497 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4498 if relocs are cached.
4499
de1010f4
RF
45002017-01-03 Rich Felker <bugdal@aerifal.cx>
4501
4502 PR ld/21017
4503 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4504 for R_MICROBLAZE_GOTOFF_64.
4505
09fe2662
NC
45062017-01-03 Nick Clifton <nickc@redhat.com>
4507
4508 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4509 warning about using a possibly uninitialised variable.
4510
595e0a47
AM
45112017-01-02 Alan Modra <amodra@gmail.com>
4512
4513 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4514 (allocate_plt_static, allocate_dynrelocs): Use it.
4515
7bd9df3b
AM
45162017-01-02 Alan Modra <amodra@gmail.com>
4517
4518 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4519 .PARISC.unwind section.
4520
5b86074c
AM
45212017-01-02 Alan Modra <amodra@gmail.com>
4522
4523 PR ld/20989
4524 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4525 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4526 indirect to GOT pointer relative code edit.
4527
2571583a
AM
45282017-01-02 Alan Modra <amodra@gmail.com>
4529
4530 Update year range in copyright notice of all files.
4531
5c1ad6b5 4532For older changes see ChangeLog-2016
3499769a 4533\f
5c1ad6b5 4534Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
4535
4536Copying and distribution of this file, with or without modification,
4537are permitted in any medium without royalty provided the copyright
4538notice and this notice are preserved.
4539
4540Local Variables:
4541mode: change-log
4542left-margin: 8
4543fill-column: 74
4544version-control: never
4545End:
This page took 0.343699 seconds and 4 git commands to generate.