x86: Add _bfd_x86_elf_gc_mark_hook
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
4f501a24
L
12017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
4 (elf_backend_gc_mark_hook): Likewise.
5 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
6 (elf_backend_gc_mark_hook): Likewise.
7 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
8 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
9 (elf_backend_gc_mark_hook): Likewise.
10
eeb2f20a
L
112017-09-01 H.J. Lu <hongjiu.lu@intel.com>
12
13 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
14 (elf_backend_adjust_dynamic_symbol): Likewise.
15 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
16 (elf_backend_adjust_dynamic_symbol): Likewise.
17 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
18 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
19 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
20 (_bfd_x86_elf_adjust_dynamic_symbol): New.
21 (elf_backend_adjust_dynamic_symbol): Likewise.
22
c6295c22
L
232017-09-01 H.J. Lu <hongjiu.lu@intel.com>
24
25 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
26 comments.
27
39946cc2
L
282017-09-01 H.J. Lu <hongjiu.lu@intel.com>
29
30 * elf32-i386.c (elf_i386_mkobject): Removed.
31 (bfd_elf32_mkobject): Likewise.
32 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
33 (bfd_elf64_mkobject): Likewise.
34 (bfd_elf32_mkobject): Likewise.
35 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
18da07cd 36 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
39946cc2
L
37 (bfd_elf64_mkobject): Likewise.
38 (bfd_elf32_mkobject): Likewise.
39
a6798bab
L
402017-09-01 H.J. Lu <hongjiu.lu@intel.com>
41
42 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
43 Call _bfd_x86_elf_link_setup_gnu_properties.
44 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
45 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
46 entries.
47 (elf_x86_64_non_lazy_plt): Likewise.
48 (elf_x86_64_lazy_bnd_plt): Likewise.
49 (elf_x86_64_non_lazy_bnd_plt): Likewise.
50 (elf_x86_64_lazy_ibt_plt): Likewise.
51 (elf_x32_lazy_ibt_plt): Likewise.
52 (elf_x86_64_non_lazy_ibt_plt): Likewise.
53 (elf_x32_non_lazy_ibt_plt): Likewise.
54 (elf_x86_64_nacl_plt): Likewise.
55 (elf_x86_64_link_setup_gnu_properties): Updated. Call
56 _bfd_x86_elf_link_setup_gnu_properties.
57 * elfxx-x86.c: Include elf-vxworks.h".
58 (_bfd_x86_elf_link_setup_gnu_properties): New function.
59 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
60 comments for pic_plt0_entry and pic_plt_entry.
61 (elf_x86_non_lazy_plt_layout): Likewise.
62 (elf_x86_plt_layout_table): New.
63 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
64
e10c9c62
L
652017-09-01 H.J. Lu <hongjiu.lu@intel.com>
66
67 PR ld/22061
68 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
69 .eh_frame section for the second PLT.
70 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
71 alignment of .eh_frame section for the second PLT.
72
7e8b6008
NC
732017-09-01 Nick Clifton <nickc@redhat.com>
74
75 PR 22059
76 * dwarf2.c (decode_line_info): Fix test for an overlong line info
77 structure.
78
2a143b99
NC
792017-09-01 Nick Clifton <nickc@redhat.com>
80
81 PR 22058
82 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
83 attribute buffer is NUL terminated.
84
e4f27230
NC
852017-08-31 Nick Clifton <nickc@redhat.com>
86
87 PR 22047
88 * dwarf2.c (read_section): If necessary add a terminating NUL byte
89 to dwarf string sections.
90
686335cd
AM
912017-08-31 Alan Modra <amodra@gmail.com>
92
93 * po/SRC-POTFILES.in: Regenerate.
94
9866ffe2
AM
952017-08-31 Alan Modra <amodra@gmail.com>
96
97 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
98 for a section containing just a terminator. Allow multiple
99 terminators at end of section.
100 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
101 sections when not adding alignment. Assert on terminator in
102 the middle of FDEs.
103
af471f82
AM
1042017-08-31 Alan Modra <amodra@gmail.com>
105
106 PR 21441
107 PR 22048
108 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
109 terminators.
110
3321e42b
L
1112017-08-30 H.J. Lu <hongjiu.lu@intel.com>
112
113 * configure.ac (bfd_backends): Add elf64.lo together with
114 elfxx-x86.lo for 64-bit BFD.
115 * configure: Regenerated.
116
ef32532f
JB
1172017-08-31 James Bowman <james.bowman@ftdichip.com>
118
119 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
120 for R_FT32_18.
121
e234de6b
AM
1222017-08-31 Alan Modra <amodra@gmail.com>
123
124 PR binutils/22032
125 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
126 before _close_and_cleanup. Call iovec->bclose after.
127 (bfd_close): Remove code common to, and call, bfd_close_all_done.
128
f493882d
L
1292017-08-30 H.J. Lu <hongjiu.lu@intel.com>
130
131 * elf32-i386.c (elf_i386_plt_type): Removed.
132 (elf_i386_plt): Likewise.
133 (elf_i386_get_synthetic_symtab): Updated. Call
134 _bfd_x86_elf_get_synthetic_symtab.
135 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
136 (elf_x86_64_plt): Likewise.
137 (elf_x86_64_get_synthetic_symtab): Updated. Call
138 _bfd_x86_elf_get_synthetic_symtab.
139 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
140 (elf_x86_64_get_plt_got_vma): Likewise.
141 (elf_i386_valid_plt_reloc_p): Likewise.
142 (elf_x86_64_valid_plt_reloc_p): Likewise.
143 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
144 * elfxx-x86.h (elf_x86_plt_type): New.
145 (elf_x86_plt): Likewise.
146 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
147
5b86dbf4
L
1482017-08-30 H.J. Lu <hongjiu.lu@intel.com>
149
150 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
151 target_id instead of elf_machine_code.
152
765e526c
L
1532017-08-30 H.J. Lu <hongjiu.lu@intel.com>
154
155 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
156 (elf_i386_lazy_plt_layout): Likewise.
157 (elf_i386_non_lazy_plt_layout): Likewise.
158 (elf_i386_plt_layout): Likewise.
159 (elf_i386_link_hash_table): Likewise.
160 (elf_i386_next_tls_desc_index): Likewise.
161 (elf_i386_srelplt2): Likewise.
162 (elf_i386_plt): Likewise.
163 (elf_i386_lazy_plt): Likewise.
164 (elf_i386_non_lazy_plt): Likewise.
165 (elf_i386_link_hash_table_create): Likewise.
166 (bfd_elf32_bfd_link_hash_table_create): Likewise.
167 (elf_i386_lazy_plt): Updated.
168 (elf_i386_non_lazy_plt): Likewise.
169 (elf_i386_lazy_ibt_plt): Likewise.
170 (elf_i386_non_lazy_ibt_plt): Likewise.
171 (elf_i386_allocate_dynrelocs): Likewise.
172 (elf_i386_size_dynamic_sections): Likewise.
173 (elf_i386_relocate_section): Likewise.
174 (elf_i386_finish_dynamic_symbol): Likewise.
175 (elf_i386_finish_dynamic_sections): Likewise.
176 (elf_i386_get_synthetic_symtab): Likewise.
177 (elf_i386_link_setup_gnu_properties): Likewise.
178 (elf_i386_nacl_plt): Likewise.
179 * elf64-x86-64.c (ABI_64_P): Removed.
180 (ELF64_DYNAMIC_INTERPRETER): Likewise.
181 (ELF32_DYNAMIC_INTERPRETER): Likewise.
182 (elf_x86_64_lazy_plt_layout): Likewise.
183 (elf_x86_64_non_lazy_plt_layout): Likewise.
184 (elf_x86_64_plt_layout): Likewise.
185 (elf_x86_64_link_hash_table): Likewise.
186 (elf_x86_64_plt): Likewise.
187 (elf_x86_64_lazy_plt): Likewise.
188 (elf_x86_64_non_lazy_plt): Likewise.
189 (elf_x86_64_link_hash_table_create): Likewise.
190 (bfd_elf64_bfd_link_hash_table_create): Likewise.
191 (bfd_elf32_bfd_link_hash_table_create): Likewise.
192 (elf_x86_64_lazy_plt): Updated.
193 (elf_x86_64_non_lazy_plt): Likewise.
194 (elf_x86_64_lazy_bnd_plt): Likewise.
195 (elf_x86_64_non_lazy_bnd_plt): Likewise.
196 (elf_x86_64_lazy_ibt_plt): Likewise.
197 (elf_x32_lazy_ibt_plt): Likewise.
198 (elf_x86_64_non_lazy_ibt_plt): Likewise.
199 (elf_x32_non_lazy_ibt_plt): Likewise.
200 (elf_x86_64_allocate_dynrelocs): Likewise.
201 (elf_x86_64_size_dynamic_sections): Likewise.
202 (elf_x86_64_relocate_section): Likewise.
203 (elf_x86_64_finish_dynamic_symbol): Likewise.
204 (elf_x86_64_finish_dynamic_sections): Likewise.
205 (elf_x86_64_get_synthetic_symtab): Likewise.
206 (elf_x86_64_link_setup_gnu_properties): Likewise.
207 (elf_x86_64_nacl_plt): Likewise.
208 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
209 "elf/x86-64.h".
210 (ELF32_DYNAMIC_INTERPRETER): New.
211 (ELF64_DYNAMIC_INTERPRETER): Likewise.
212 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
213 (_bfd_x86_elf_link_hash_table_create): Likewise.
214 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
215 (elf_x86_link_hash_table_free): This. Make it static.
216 * elfxx-x86.h: Don't include "objalloc.h".
217 (ABI_64_P): New.
218 (elf_x86_lazy_plt_layout): Likewise.
219 (elf_x86_non_lazy_plt_layout): Likewise.
220 (elf_x86_plt_layout): Likewise.
221 (_bfd_x86_elf_link_hash_table_create): Likewise.
222 (bfd_elf64_bfd_link_hash_table_create): Likewise.
223 (bfd_elf32_bfd_link_hash_table_create): Likewise.
224 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
225 srelplt2 and next_tls_desc_index.
226 (_bfd_x86_elf_link_hash_table_free): Removed.
227
70e65ca8
MR
2282017-08-30 Maciej W. Rozycki <macro@imgtec.com>
229
230 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
231 branch offset interpretation.
232
7c0ed396
L
2332017-08-30 H.J. Lu <hongjiu.lu@intel.com>
234
235 PR binutils/22032
236 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
237
0f2425c4
L
2382017-08-30 H.J. Lu <hongjiu.lu@intel.com>
239
240 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
241 (elf_x86_64_srelplt2): Likewise.
242
9a23f96e
AM
2432017-08-30 Alan Modra <amodra@gmail.com>
244
245 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
246 (ppc64_elf_tls_optimize): Set it.
247 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
248 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
249 addis would add zero.
250 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
251 (ppc_elf_tls_optimize): Set it.
252 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
253 insn on TPREL16_LO relocs to use r2 when addis would add zero.
254
b9f04fe0
AM
2552017-08-30 Alan Modra <amodra@gmail.com>
256
257 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
258 __tls_get_addr call sequences to LE, don't move the addi down
259 to the nop. Replace the bl with addi and leave the nop alone.
260
5f0f0847
L
2612017-08-29 H.J. Lu <hongjiu.lu@intel.com>
262
263 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
264 Re-indent.
265 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
266 Likewise.
267 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
268
443701f5
L
2692017-08-29 H.J. Lu <hongjiu.lu@intel.com>
270
271 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
272 (BFD64_BACKENDS): Likewise.
273 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
274 (BFD64_BACKENDS_CFILES): Likewise.
275 * Makefile.in: Regenerated.
276 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
277 elf32-i386.lo and elf64-x86-64.lo.
278 * configure: Regenerated.
279 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
280 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
281 "objalloc.h" and "hashtab.h".
282 (ELIMINATE_COPY_RELOCS): Removed.
283 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
284 (SYMBOL_NO_COPYRELOC): Likewise.
285 (elf_i386_link_hash_entry): Likewise.
286 (GOT_UNKNOWN): Likewise.
287 (GOT_NORMAL): Likewise.
288 (GOT_TLS_GD): Likewise.
289 (elf_i386_hash_entry): Likewise.
290 (elf_i386_obj_tdata): Likewise.
291 (elf_i386_tdata): Likewise.
292 (elf_i386_local_got_tls_type): Likewise.
293 (elf_i386_local_tlsdesc_gotent): Likewise.
294 (elf_i386_hash_table): Likewise.
295 (elf_i386_link_hash_newfunc): Likewise.
296 (elf_i386_local_htab_hash): Likewise.
297 (elf_i386_local_htab_eq): Likewise.
298 (elf_i386_get_local_sym_hash): Likewise.
299 (elf_i386_link_hash_table_free): Likewise.
300 (elf_i386_copy_indirect_symbol): Likewise.
301 (elf_i386_fixup_symbol): Likewise.
302 (elf_i386_readonly_dynrelocs): Likewise.
303 (elf_i386_always_size_sections): Likewise.
304 (elf_i386_set_tls_module_base): Likewise.
305 (elf_i386_dtpoff_base): Likewise.
306 (compare_relocs): Likewise.
307 (elf_i386_hash_symbol): Likewise.
308 (elf_i386_parse_gnu_properties): Likewise.
309 (elf_i386_merge_gnu_properties): Likewise.
310 (elf_i386_link_check_relocs): Likewise.
311 (elf_i386_merge_symbol_attribute): Likewise.
312 (bfd_elf32_bfd_link_check_relocs): Likewise.
313 (elf_backend_copy_indirect_symbol): Likewise.
314 (elf_backend_always_size_sections): Likewise.
315 (elf_backend_omit_section_dynsym): Likewise.
316 (elf_backend_hash_symbol): Likewise.
317 (elf_backend_fixup_symbol): Likewise.
318 (elf_backend_parse_gnu_properties): Likewise.
319 (elf_backend_merge_gnu_properties): Likewise.
320 (elf_backend_merge_symbol_attribute): Likewise.
321 (elf_i386_mkobject): Updated.
322 (elf_i386_link_hash_table_create): Likewise.
323 (elf_i386_check_tls_transition): Likewise.
324 (elf_i386_tls_transition): Likewise.
325 (elf_i386_convert_load_reloc): Likewise.
326 (elf_i386_check_relocs): Likewise.
327 (elf_i386_adjust_dynamic_symbol): Likewise.
328 (elf_i386_allocate_dynrelocs): Likewise.
329 (elf_i386_convert_load): Likewise.
330 (elf_i386_size_dynamic_sections): Likewise.
331 (elf_i386_relocate_section): Likewise.
332 (elf_i386_finish_dynamic_symbol ): Likewise.
333 (elf_i386_finish_dynamic_sections): Likewise.
334 (elf_i386_output_arch_local_syms): Likewise.
335 (elf_i386_get_synthetic_symtab): Likewise.
336 (elf_i386_link_setup_gnu_properties): Likewise.
337 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
338 of elf_link_hash_table, as base.
339 (elf_i386_next_tls_desc_index): New.
340 (elf_i386_srelplt2): Likewise.
341 (elf_i386_plt): Likewise.
342 (elf_i386_lazy_plt): Likewise.
343 (elf_i386_non_lazy_plt): Likewise.
344 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
345 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
346 "objalloc.h" and "hashtab.h".
347 (ELIMINATE_COPY_RELOCS): Removed.
348 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
349 (SYMBOL_NO_COPYRELOC): Likewise.
350 (elf_x86_64_link_hash_entry): Likewise.
351 (GOT_UNKNOWN): Likewise.
352 (GOT_NORMAL): Likewise.
353 (GOT_TLS_GD): Likewise.
354 (elf_x86_64_hash_entry): Likewise.
355 (elf_x86_64_obj_tdata): Likewise.
356 (elf_x86_64_tdata): Likewise.
357 (elf_x86_64_local_got_tls_type): Likewise.
358 (elf_x86_64_local_tlsdesc_gotent): Likewise.
359 (elf_x86_64_hash_table): Likewise.
360 (elf_x86_64_link_hash_newfunc): Likewise.
361 (elf_x86_64_local_htab_hash): Likewise.
362 (elf_x86_64_local_htab_eq): Likewise.
363 (elf_x86_64_get_local_sym_hash): Likewise.
364 (elf_x86_64_link_hash_table_free): Likewise.
365 (elf_x86_64_copy_indirect_symbol): Likewise.
366 (elf_x86_64_fixup_symbol): Likewise.
367 (elf_x86_64_readonly_dynrelocs): Likewise.
368 (elf_x86_64_always_size_sections): Likewise.
369 (elf_x86_64_set_tls_module_base): Likewise.
370 (elf_x86_64_dtpoff_base): Likewise.
371 (compare_relocs): Likewise.
372 (elf_x86_64_merge_symbol_attribute): Likewise.
373 (elf_x86_64_hash_symbol): Likewise.
374 (elf_x86_64_parse_gnu_properties): Likewise.
375 (elf_x86_64_merge_gnu_properties): Likewise.
376 (elf_x86_64_link_check_relocs): Likewise.
377 (elf_backend_copy_indirect_symbol): Likewise.
378 (elf_backend_always_size_sections): Likewise.
379 (bfd_elf64_bfd_link_check_relocs): Likewise.
380 (elf_backend_merge_symbol_attribute): Likewise.
381 (elf_backend_hash_symbol): Likewise.
382 (elf_backend_omit_section_dynsym): Likewise.
383 (elf_backend_fixup_symbol): Likewise.
384 (elf_backend_parse_gnu_properties): Likewise.
385 (elf_backend_merge_gnu_properties): Likewise.
386 (bfd_elf32_bfd_link_check_relocs): Likewise.
387 (elf_x86_64_mkobject): Updated.
388 (elf_x86_64_link_hash_table_create): Likewise.
389 (elf_x86_64_check_tls_transition): Likewise.
390 (elf_x86_64_tls_transition): Likewise.
391 (elf_x86_64_convert_load_reloc): Likewise.
392 (elf_x86_64_check_relocs): Likewise.
393 (elf_x86_64_adjust_dynamic_symbol): Likewise.
394 (elf_x86_64_allocate_dynrelocs): Likewise.
395 (elf_x86_64_convert_load): Likewise.
396 (elf_x86_64_size_dynamic_sections): Likewise.
397 (elf_x86_64_relocate_section): Likewise.
398 (elf_x86_64_finish_dynamic_symbol ): Likewise.
399 (elf_x86_64_finish_dynamic_sections): Likewise.
400 (elf_x86_64_output_arch_local_syms): Likewise.
401 (elf_x86_64_get_synthetic_symtab): Likewise.
402 (elf_x86_64_link_setup_gnu_properties): Likewise.
403 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
404 instead of elf_link_hash_table, as base.
405 (elf_x86_64_next_tls_desc_index): New.
406 (elf_x86_64_srelplt2): Likewise.
407 (elf_x86_64_plt): Likewise.
408 (elf_x86_64_lazy_plt): Likewise.
409 (elf_x86_64_non_lazy_plt): Likewise.
410 * elfxx-x86.c: New file.
411 * elfxx-x86.h: Likewise.
412
823cb067
L
4132017-08-29 H.J. Lu <hongjiu.lu@intel.com>
414
415 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
416 return.
417 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
418
37c0b6ee
L
4192017-08-29 H.J. Lu <hongjiu.lu@intel.com>
420
421 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
422 sections before checking dynamic relocations and free invalid
423 PLT section contents.
424 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
425
0fb0a767
L
4262017-08-28 H.J. Lu <hongjiu.lu@intel.com>
427
428 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
429 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
430
90efb642
L
4312017-08-28 H.J. Lu <hongjiu.lu@intel.com>
432
433 PR binutils/22018
434 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
435 PLT section size.
436 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
437
596dc58f
L
4382017-08-27 H.J. Lu <hongjiu.lu@intel.com>
439
440 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
441 def_protected.
442 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
443
a5b4ee94
L
4442017-08-26 H.J. Lu <hongjiu.lu@intel.com>
445
446 PR ld/21997
447 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
448 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
449 Add a has_no_copy_on_protected bitfield.
450 (elf_has_no_copy_on_protected): New.
451 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
452 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
453 (elf_merge_gnu_property_list): Likewise.
454 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
455 to FALSE for elf_has_no_copy_on_protected.
456 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
457 (elf_i386_link_hash_entry): Add def_protected.
458 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
459 when checking info->nocopyreloc.
460 (elf_i386_link_setup_gnu_properties): Don't set
461 extern_protected_data here.
462 (elf_i386_merge_symbol_attribute): New function.
463 (elf_backend_merge_symbol_attribute): New.
464 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
465 (elf_x86_64_link_hash_entry): Add def_protected.
466 (elf_x86_64_need_pic): Report protected symbol for def_protected.
467 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
468 when checking info->nocopyreloc.
469 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
470 relocation run-time overflow and unresolvable R_X86_64_32S
471 relocation against protected data symbol defined in shared object
472 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
473 (elf_x86_64_link_setup_gnu_properties): Don't set
474 extern_protected_data here.
475 (elf_x86_64_merge_symbol_attribute): New function.
476 (elf_backend_merge_symbol_attribute): New.
477
7c8bbca5
AM
4782017-08-26 Alan Modra <amodra@gmail.com>
479
480 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
481 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
482 (ppc_elf_relocate_section): Comment fix.
483 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
484 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
485 Support dynamic relocs for TPREL16 when non-pic too.
486 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
487 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
488 when non-pic too.
489
5fdda9d6
L
4902017-08-25 H.J. Lu <hongjiu.lu@intel.com>
491
492 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
493 "symbol" in comments.
494 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
495
7073b5b9
L
4962017-08-24 H.J. Lu <hongjiu.lu@intel.com>
497
498 PR ld/22001
499 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
500 R_X86_64_PC32 relocation run-time overflow and unresolvable
501 R_X86_64_32S relocation with -z nocopyreloc.
502
34bb2571
L
5032017-08-24 H.J. Lu <hongjiu.lu@intel.com>
504
505 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
506 Undefined symbols may not have a type.
507 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
508
aab921ad
L
5092017-08-23 H.J. Lu <hongjiu.lu@intel.com>
510
511 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
512 bfd_link_info. Report shared, PIE or PDE object based on
513 bfd_link_info.
514 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
515 (elf_x86_64_relocate_section): Likewise.
516
b1bb697e
L
5172017-08-23 H.J. Lu <hongjiu.lu@intel.com>
518
519 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
520 for function symbols.
521 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
522
73784fa5
L
5232017-08-23 H.J. Lu <hongjiu.lu@intel.com>
524
525 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
526 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
527 is set on any input relocatable file.
528 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
529
46434633
AM
5302017-08-23 Alan Modra <amodra@gmail.com>
531
532 PR 21988
533 * elf64-ppc.c (ensure_undef_dynamic): Rename from
534 ensure_undefweak_dynamic. Handle undefined too.
535 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
536 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
537 (allocate_dynrelocs): Discard undefined non-default visibility
538 relocs first. Make undefined syms dynamic. Tidy goto.
539
487b6440
AM
5402017-08-21 Alan Modra <amodra@gmail.com>
541 H.J. Lu <hongjiu.lu@intel.com>
542
543 PR ld/21964
544 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
545 * elflink.c (bfd_elf_define_start_stop): Rewrite.
546
284d826d
HPN
5472017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
548
549 PR ld/20125
550 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
551 undefined weak symbols.
552
de259397
NC
5532017-08-18 Nick Clifton <nickc@redhat.com>
554
555 PR binutils/21962
556 * tekhex.c (getsym): Fix check for source pointer walking off the
557 end of the input buffer.
558
545bc2b3
SN
5592017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
560
561 PR ld/18808
562 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
563 relocations in debug sections, change abort to _bfd_error_handler.
564
0c54f692
NC
5652017-08-14 Nick Clifton <nickc@redhat.com>
566
567 PR 21957
568 * elf.c (setup_group): Check for an empty or very small group
569 section.
570 * po/bfd.pot: Regenerate.
571
79a94a2a
AM
5722017-08-14 Alan Modra <amodra@gmail.com>
573
574 PR 21441
575 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
576 alignment padding here.
577 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
578 in a reverse pass over sections.
579
98c5dfc9
L
5802017-08-11 H.J. Lu <hongjiu.lu@intel.com>
581
582 PR binutils/21943
583 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
584 for @plt suffixes first.
585 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
586
24d3e51b
NC
5872017-08-08 Nick Clifton <nickc@redhat.com>
588
589 PR 21916
590 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
591 small section lengths.
592 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
593 table.
594 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
595 there is enough data present in the note.
596
206c9c79
AM
5972017-08-08 Alan Modra <amodra@gmail.com>
598
599 PR 21017
600 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
601 got.refcount for GOTOFF relocs, just create .got section.
602
2980ccad
L
6032017-08-07 H.J. Lu <hongjiu.lu@intel.com>
604
605 * elflink.c (elf_link_add_object_symbols): Move common symbol
606 check after bed->common_definition.
607
b3293efa
AM
6082017-08-07 Alan Modra <amodra@gmail.com>
609
610 PR 21910
611 * elflink.c (bfd_elf_final_link): Don't segfault when sections
612 needed to define various dynamic tags have been discarded.
613
b7a18930
NC
6142017-08-07 Nick Clifton <nickc@redhat.com>
615
616 PR 21884
617 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
618 has not been set then use the bfd returned by
619 _bfd_elf_link_setup_gnu_properties. If that is null then search
620 through all the input bfds selecting the first normal, ELF format
621 one.
622 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
623
1d4af308
L
6242017-08-06 H.J. Lu <hongjiu.lu@intel.com>
625
626 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
627 to 1 bit.
628 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
629 (elf_i386_check_tls_transition): Check tls_get_addr directly.
630 (elf_i386_convert_load_reloc): Update tls_get_addr check.
631 (elf_i386_link_check_relocs): New function.
632 (bfd_elf32_bfd_link_check_relocs): New.
633 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
634 to 1 bit.
635 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
636 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
637 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
638 (elf_x86_64_link_check_relocs): New function.
639 (bfd_elf64_bfd_link_check_relocs): New.
640 (bfd_elf32_bfd_link_check_relocs): Likewise.
641
a4819f54
L
6422017-08-06 H.J. Lu <hongjiu.lu@intel.com>
643
644 PR ld/21903:
645 * elflink.c (elf_link_add_object_symbols): Treat common symbol
646 as undefined for --no-define-common.
647
55ef6584
AM
6482017-08-05 Alan Modra <amodra@gmail.com>
649
650 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
651 hppa_link_hash_table.
652
d84ed528
MF
6532017-08-02 Max Filippov <jcmvbkbc@gmail.com>
654
655 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
656 entries for sysregs with negative indices.
657
1ef692ea
AK
6582017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
659
660 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
661 isn't the S/390 specific elf data.
662 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
663
57593436
KLC
6642017-07-31 Kuan-Lin Chen <rufus@andestech.com>
665
666 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
667 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
668 [R_RISCV_ADD16]: Likewise.
669 [R_RISCV_ADD32]: Likewise.
670 [R_RISCV_ADD64]: Likewise.
671 [R_RISCV_SUB6]: Likewise.
672 [R_RISCV_SUB8]: Likewise.
673 [R_RISCV_SUB16]: Likewise.
674 [R_RISCV_SUB32]: Likewise.
675 [R_RISCV_SUB64]: Likewise.
676
d44c746a
AM
6772017-07-31 Alan Modra <amodra@gmail.com>
678
679 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
680 without ld.so checks.
681
8b5f1ed8
AM
6822017-07-29 Alan Modra <amodra@gmail.com>
683
684 PR 21847
685 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
686 (ppc64_elf_merge_symbol): Set non_zero_localentry.
687 (is_elfv2_localentry0): Test non_zero_localentry.
688 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
689
894dde0b
AK
6902017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
691
692 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
693 pointer check for htab->elf.irelplt.
694 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
695
8bdf0be1
NC
6962017-07-27 Nick Clifton <nickc@redhat.com>
697
698 PR 21840
699 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
700 size is -1.
701 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
702 with error return.
703 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
704 are NULL.
705 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
706 of end pointer.
707 (evax_bfd_print_emh): Check for invalid string lengths.
708
c26bb067
NC
7092017-07-25 Nick Clifton <nickc@redhat.com>
710
711 * po/fr.po: Updated French translation.
712
cfe7b9bd
BG
7132017-07-25 Benjamin Green <bengreen5mx@gmail.com>
714
715 PR 21824
716 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
717 16-bit absolute branches into 10-bit pc-relative branches on the
718 MSP430 as well as the MSP430X.
719
d4aaa2a0
AM
7202017-07-25 Alan Modra <amodra@gmail.com>
721
722 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
723 (stub_eh_frame_size): New function.
724 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
725 (group_sections): Init group tls_get_addr_opt_bctrl.
726 (ppc64_elf_size_stubs): Update sizing and initialization of
727 .eh_frame. Iteration over stubs via group list.
728 (ppc64_elf_build_stubs): Iterate over stubs via group list.
729 (ppc64_elf_finish_dynamic_sections): Update finalization of
730 .eh_frame.
731
ca4cf9b9
NC
7322017-07-24 Nick Clifton <nickc@redhat.com>
733
734 PR 21813
735 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
736 of the relocs to the canonicalize_one_reloc routine.
737 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
738 for the _bfd_mach_o_canonicalize_one_reloc field.
739 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
740 res_base parameter. Use to check for corrupt pair relocs.
741 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
742 Likewise.
743 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
744 Likewise.
745 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
746 Likewise.
747
748 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
749 enough data in the record before attempting to parse it.
750 (_bfd_vms_slurp_eeom): Likewise.
751
752 (_bfd_vms_slurp_egsd): Check for an invalid section index.
753 (image_set_ptr): Likewise.
754 (alpha_vms_slurp_relocs): Likewise.
755
8a2df5e2
NC
756 (alpha_vms_object_p): Check for a truncated record.
757
47aeb64c
NC
7582017-07-24 Nick Clifton <nickc@redhat.com>
759
760 PR 21803
761 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
762 an unrecognized reloc and sets the bfd_error value.
763 * libbfd.h: Regenerate.
764 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
765 function.
766 * elf32-i386.c (elf_i386_relocate_section): Likewise.
767 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
768 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
769 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
770 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
771
15a3a14f
AM
7722017-07-23 Alan Modra <amodra@gmail.com>
773
774 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
775 restore of LR.
776
f2e6a843
SN
7772017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
778
779 PR ld/18841
780 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
781 reloc_class_ifunc for ifunc symbols.
782
909e4e71
NC
7832017-07-19 Nick Clifton <nickc@redhat.com>
784
785 PR 21787
786 * archive.c (bfd_generic_archive_p): If the bfd does not have the
787 correct magic bytes at the start, set the error to wrong format
788 and clear the format selector before returning NULL.
789
29866fa1
NC
7902017-07-19 Nick Clifton <nickc@redhat.com>
791
792 PR 21786
793 * coff-rs6000.c (_bfd_strntol): New function.
794 (_bfd_strntoll): New function.
795 (GET_VALUE_IN_FIELD): New macro.
796 (EQ_VALUE_IN_FIELD): new macro.
797 (_bfd_xcoff_slurp_armap): Use new macros.
798 (_bfd_xcoff_archive_p): Likewise.
799 (_bfd_xcoff_read_ar_hdr): Likewise.
800 (_bfd_xcoff_openr_next_archived_file): Likewise.
801 (_bfd_xcoff_stat_arch_elt): Likewise.
6c4e7b6b
NC
802 * coff64-rs6000.c (_bfd_strntol): New function.
803 (_bfd_strntoll): New function.
804 (GET_VALUE_IN_FIELD): New macro.
805 (xcoff64_slurp_armap): Use new macros.
29866fa1 806
684d5a10
JEM
8072017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
808 John Eric Martin <John.Martin@emmicro-us.com>
809
810 * bfd-in2.h: Regenerate.
811 * libbfd.h: Regenerate.
812 * elf32-arc.c (JLI): Define.
813 * reloc.c: Add JLI relocations.
814
de194d85
YC
8152017-07-18 Nick Clifton <nickc@redhat.com>
816
817 PR 21775
818 * coff-sh.c: Fix spelling typos.
819 * compress.c: Likewise.
820 * cpu-pdp11.c: Likewise.
821 * ecofflink.c: Likewise.
822 * elf-m10300.c: Likewise.
823 * elf.c: Likewise.
824 * elf32-arm.c: Likewise.
825 * elf32-m68k.c: Likewise.
826 * elf32-nds32.c: Likewise.
827 * elf32-ppc.c: Likewise.
828 * elf32-sh.c: Likewise.
829 * elf32-v850.c: Likewise.
830 * elf64-ppc.c: Likewise.
831 * elf64-x86-64.c: Likewise.
832 * elflink.c: Likewise.
833 * elfnn-aarch64.c: Likewise.
834 * elfxx-mips.c: Likewise.
835 * som.c: Likewise.
836 * sunos.c: Likewise.
837 * vms-alpha.c: Likewise.
838 * xcofflink.c: Likewise.
839
e4e21d9e
NC
8402017-07-18 Nick Clifton <nickc@redhat.com>
841
842 PR binutils/21781
843 * coffcode.h (handle_COMDAT): Replace abort with an error message
844 and return.
845
8e85f840
L
8462017-07-17 H.J. Lu <hongjiu.lu@intel.com>
847
848 PR ld/21782
849 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
850 to shared library.
851
dd57c19c
L
8522017-07-17 H.J. Lu <hongjiu.lu@intel.com>
853
854 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
855
676ee2b5
AM
8562017-07-16 Alan Modra <amodra@gmail.com>
857
858 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
859 __tls_index GOT entries when using __tls_get_addr_opt stub.
860 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
861
429d795d
AM
8622017-07-12 Alan Modra <amodra@gmail.com>
863
864 * po/es.po: Update from translationproject.org/latest/bfd/.
865 * po/fi.po: Likewise.
866 * po/fr.po: Likewise.
867 * po/id.po: Likewise.
868 * po/ja.po: Likewise.
869 * po/ro.po: Likewise.
870 * po/ru.po: Likewise.
871 * po/sr.po: Likewise.
872 * po/sv.po: Likewise.
873 * po/tr.po: Likewise.
874 * po/uk.po: Likewise.
875 * po/vi.po: Likewise.
876 * po/zh_CN.po: Likewise.
877 * po/hr.po: New file from translationproject.org.
878 * configure.ac (ALL_LINGUAS): Add hr. Sort.
879 * configure: Regenerate.
880
0bae9e9e
NC
8812017-07-12 Nick Clifton <nickc@redhat.com>
882
883 Fix compile time warnings using gcc 7.1.1.
884 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
885 plt_name buffer.
886 (elf_xtensa_get_gotplt_section): Increase length of got_name
887 buffer.
888 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
889 default return of FALSE.
890 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
891 default return of FALSE.
892
d42c267e
AM
8932017-07-12 Alan Modra <amodra@gmail.com>
894
895 * binary.c (binary_set_section_contents): Don't print filepos in
896 error message.
897 (coff_write_object_contents): Cast size_t for error message.
898 (coff_slurp_line_table): Don't use bfd_vma symndx.
899 (coff_slurp_reloc_table): Remove unneeded cast.
900 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
901 error message.
902 (find_abstract_instance_name): Likewise.
903 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
904 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
905 (elf32_arm_check_relocs): Make r_symndx an int.
906 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
907 format string.
908 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
909 message arg.
910 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
911 error message.
912 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
913 * elf32-s390.c (elf_s390_check_relocs): Likewise.
914 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
915 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
916 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
917 * elf64-s390.c (elf_s390_check_relocs): Likewise.
918 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
919 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
920 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
921 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
922 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
923 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
924 and use %lu for error message.
925 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
926 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
927 error message.
928
929 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
930 in error message.
931 (elf32_arm_final_link_relocate): Likewise.
932 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
933 * coffcode.h (styp_to_sec_flags): Likewise.
934 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
935 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
936 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
937 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
938 (elf32_bfin_merge_private_bfd_data): Likewise.
939 * elf32-cris.c (cris_elf_relocate_section): Likewise.
940 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
941 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
942 (i370_elf_relocate_section): Likewise.
943 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
944 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
945 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
946 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
947 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
948 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
949 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
950 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
951 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
952 * ieee.c (ieee_write_id, read_id): Likewise.
953 * mach-o.c (bfd_mach_o_write_contents): Likewise.
954 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
955 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
956 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
957 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
958 * stabs.c (_bfd_link_section_stabs): Likewise.
959
960 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
961 format.
962 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
963 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
964 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
965 * coff-sh.c (sh_relax_section): Likewise.
966 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
967 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
968 * coffcode.h (coff_slurp_reloc_table): Likewise.
969 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
970 (_bfd_coff_read_string_table): Likewise.
971 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
972 * compress.c (bfd_get_full_section_contents): Likewise.
973 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
974 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
975 * elf.c (bfd_elf_string_from_elf_section): Likewise.
976 * elf32-arc.c (arc_special_overflow_checks): Likewise.
977 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
978 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
979 (elf32_arm_write_section): Likewise.
980 * elf32-bfin.c (bfin_relocate_section): Likewise.
981 (bfinfdpic_relocate_section): Likewise.
982 * elf32-hppa.c (hppa_build_one_stub): Likewise.
983 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
984 * elf32-i386.c (elf_i386_tls_transition): Likewise.
985 (elf_i386_relocate_section): Likewise.
986 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
987 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
988 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
989 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
990 * elf32-metag.c (elf_metag_relocate_section): Likewise.
991 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
992 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
993 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
994 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
995 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
996 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
997 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
998 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
999 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1000 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1001 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1002 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1003 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1004 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1005 * elf32-sh.c (sh_elf_relax_section): Likewise.
1006 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1007 (sh_elf_relocate_section): Likewise.
1008 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1009 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1010 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1011 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1012 * elf32-v850.c (v850_elf_relax_section): Likewise.
1013 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1014 (elf_vax_relocate_section): Likewise.
1015 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1016 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1017 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1018 (do_fix_for_relocatable_link): Likewise.
1019 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1020 (elf64_alpha_relax_with_lituse): Likewise.
1021 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1022 (elf_hppa_final_link_relocate): Likewise.
1023 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1024 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1025 (elf64_vms_link_add_object_symbols): Likewise.
1026 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1027 (mmix_final_link_relocate): Likewise.
1028 * elf64-s390.c (invalid_tls_insn): Likewise.
1029 (elf_s390_relocate_section): Likewise.
1030 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1031 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1032 (elf_x86_64_relocate_section): Likewise.
1033 * elfcode.h (elf_slurp_symbol_table): Likewise.
1034 * elfcore.h (elf_core_file_p): Likewise.
1035 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1036 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1037 (elfNN_aarch64_relocate_section): Likewise.
1038 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1039 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1040 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1041 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1042 (_bfd_mips_elf_relocate_section): Likewise.
1043 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1044 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1045 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1046 * ieee.c (ieee_slurp_external_symbols): Likewise.
1047 * ihex.c (ihex_write_object_content): Likewise.
1048 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1049 * merge.c (_bfd_merged_section_offset): Likewise.
1050 * mmo.c (mmo_write_loc_chunk): Likewise.
1051 (mmo_write_object_contents): Likewise.
1052 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1053 * stabs.c (_bfd_link_section_stabs): Likewise.
1054 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1055
e3fbc3da
AM
10562017-07-11 Alan Modra <amodra@gmail.com>
1057
1058 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1059
2c4d9cbe
AM
10602017-07-11 Alan Modra <amodra@gmail.com>
1061
1062 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1063 instruction" error using _bfd_error_handler, not einfo.
1064
adce5b39
NC
10652017-07-10 Nick Clifton <nickc@redhat.com>
1066
1067 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1068 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1069
e6f3b9c3
JB
10702017-07-07 John Baldwin <jhb@FreeBSD.org>
1071
1072 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1073
532cc313
AM
10742017-07-07 Alan Modra <amodra@gmail.com>
1075
1076 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1077
1cf9552b
AM
10782017-07-07 Alan Modra <amodra@gmail.com>
1079
1080 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1081 as long long. Move code replacing "ll" with "I64", and simplify.
1082
a0b7b105
L
10832017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1084
1085 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1086 to 1.
1087
1d827a72
L
10882017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1089
1090 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1091 xtime.
1092 (line_info_add_file_name): Likewise.
1093 (decode_line_info): Likewise.
1094
0d702cfe
TG
10952017-07-04 Tristan Gingold <gingold@adacore.com>
1096
1097 * version.m4: Bump version to 2.29.51
1098 * configure: Regenerate.
1099
564e46b7
JW
11002017-07-04 Jiong Wang <jiong.wang@arm.com>
1101
1102 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1103 sanity check at the head of this function.
1104
0041f7df
JK
11052017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1106
1107 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1108 dwarf_line_str_size.
1109 (struct attr_abbrev): Add field implicit_const.
1110 (dwarf_debug_sections): Add .debug_line_str.
1111 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1112 (dwarf_debug_section_assert): Add static assertion.
1113 (read_indirect_line_string): New.
1114 (read_abbrevs): Support DW_FORM_implicit_const.
1115 (is_str_attr): Support DW_FORM_line_strp.
1116 (read_attribute_value): Support DW_FORM_line_strp and
1117 DW_FORM_implicit_const.
1118 (read_attribute): Support DW_FORM_implicit_const.
1119 (line_info_add_include_dir, line_info_add_include_dir_stub):
1120 (line_info_add_file_name, read_formatted_entries): New.
1121 (decode_line_info, parse_comp_unit): Support DWARF 5.
1122 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1123
d8cd8c1f
EB
11242017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1125
1126 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1127 abort statement that was put for symbols that are not dynamic.
1128
15e6ed8c
TG
11292017-07-03 Tristan Gingold <gingold@adacore.com>
1130
1131 * po/bfd.pot: Regenerate
1132
76cfced5
AM
11332017-07-03 Alan Modra <amodra@gmail.com>
1134
1135 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1136 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1137 * elf.c (setup_group): Use "Lx" to print sh_size.
1138 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1139 unknown section type in hex.
1140 (copy_special_section_fields): Style fix.
1141 (bfd_section_from_shdr): Correct format for sh_link. Use a
1142 common error message for all the variants of unrecognized
1143 section types.
1144 (assign_file_positions_for_load_sections): Use "Lx" for lma
1145 adjust error message.
1146 (assign_file_positions_for_non_load_sections): Formatting.
1147 (rewrite_elf_program_header): Formatting. Use "Lx" for
1148 bfd_vma values in error messages.
1149 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1150 ELF_R_SYM value to type expected by format.
1151 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1152 in error messages.
1153 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1154 (elf_link_input_bfd): Use "Lx" for r_info.
1155 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1156
ce9116fd
AM
11572017-07-03 Alan Modra <amodra@gmail.com>
1158
1159 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1160 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1161 Microsoft C library variant of long long format specifier.
1162 (PRINT20): Cast value to bfd_uint64_t not long long.
1163 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1164 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1165 long long. Don't cast to bfd_vma.
1166 * elf32-score.c (score3_bfd_getl48): Likewise.
1167 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1168
cd9af601
AM
11692017-07-03 Alan Modra <amodra@gmail.com>
1170
1171 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1172 print d_tag.
1173 (bfd_elf_print_symbol): Don't cast symbol->flags.
1174 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1175 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1176 _bfd_error_handler argument order.
1177 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1178
33c734b2
AM
11792017-07-03 Alan Modra <amodra@gmail.com>
1180
1181 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1182 AC_TYPE_LONG_DOUBLE.
1183 * configure: Regenerate.
1184 * config.in: Regenerate.
1185
3df5cd13
AW
11862017-06-29 Andrew Waterman <andrew@sifive.com>
1187
1188 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1189 relocs.
1190
ec1acaba
EB
11912017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1192
1193 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1194 unless it is undefined weak.
1195 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1196 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1197 relocation.
1198 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1199 is not dynamic in PIC, abort.
1200
ff07562f
JW
12012017-06-29 Jiong Wang <jiong.wang@arm.com>
1202
1203 PR ld/21402
1204 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1205 undefined weak symbols into dynamic.
1206 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1207 relocation for non-dynamic symbols.
1208 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1209
2aff25ba
JW
12102017-06-29 Jiong Wang <jiong.wang@arm.com>
1211
1212 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1213 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1214 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1215 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1216 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1217 support for them.
1218
88ab90e8
AA
12192017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1220
1221 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1222 (elfcore_write_s390_gs_bc): Likewise.
1223 * elf.c (elfcore_grok_s390_gs_cb): New function.
1224 (elfcore_grok_s390_gs_bc): New function.
1225 (elfcore_grok_note): Call them.
1226 (elfcore_write_s390_gs_cb): New function.
1227 (elfcore_write_s390_gs_bc): New function.
1228 (elfcore_write_register_note): Call them.
1229
328ce951
L
12302017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1231
1232 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1233 bfd_get_file_size. Check archive element size.
1234 (_bfd_generic_get_section_contents_in_window): Likewise.
1235
47fdcf63
L
12362017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1237
1238 * bfd-in2.h: Regenerated.
1239 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1240 (bfd_get_file_size): Likewise.
1241
38bf472a
MR
12422017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1243 Matthew Fortune <matthew.fortune@imgtec.com>
1244
1245 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1246 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1247 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1248 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1249 case.
1250 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1251 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1252 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1253 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1254 `bfd_mach_mips_interaptiv_mr2' entries.
1255 * bfd-in2.h: Regenerate.
1256
2d68166e
NC
12572017-06-27 Nick Clifton <nickc@redhat.com>
1258
1259 * tekhex.c (pass_over): Revert accidental conversion of a local
1260 array to a static array.
1261
68063779
SKS
12622017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1263
1264 PR ld/13402
1265 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1266 reloc addend if necessary. Adjust diff only if
1267 shrinked_insn_address < end_address.
1268
ea9aafc4
AM
12692017-06-27 Alan Modra <amodra@gmail.com>
1270
1271 PR binutils/21665
1272 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1273 (_bfd_generic_get_section_contents_in_window): Likewise.
1274
a6cbf936
KLC
12752017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1276
1277 * elfnn-riscv.c (perform_relocation): Support the new
1278 R_RISCV_32_PCREL relocation.
1279 (riscv_elf_relocate_section): Likewise.
1280 * elfxx-riscv.c (howto_table): Likewise.
1281 (riscv_reloc_map): Likewise.
1282 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1283 * libbfd.h: Regenerate.
1284
7211ae50
AM
12852017-06-27 Alan Modra <amodra@gmail.com>
1286
1287 PR binutils/21665
1288 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1289 Use unsigned file pointer type, and remove cast.
1290 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1291 Add "count", not "sz".
1292
ab27f80c
PA
12932017-06-26 Pedro Alves <palves@redhat.com>
1294
1295 PR binutils/21665
1296 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1297 "sz".
1298
1f473e3d
L
12992017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1300
1301 PR binutils/21665
1302 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1303 a missing line.
1304
b417536f
MR
13052017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1306
1307 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1308 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1309 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1310 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1311 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1312
0630b49c
L
13132017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1314
1315 PR binutils/21665
1316 * compress.c (bfd_get_full_section_contents): Don't check the
1317 file size here.
1318 * libbfd.c (_bfd_generic_get_section_contents): Check for and
ea9aafc4 1319 reject a section whose size + offset is greater than the size
0630b49c
L
1320 of the entire file.
1321 (_bfd_generic_get_section_contents_in_window): Likewise.
515a4464 1322
04e15b4a
NC
13232017-06-26 Nick Clifton <nickc@redhat.com>
1324
1325 PR binutils/21670
1326 * tekhex.c (getvalue): Check for the source pointer exceeding the
1327 end pointer before the first byte is read.
1328
cfd14a50
NC
13292017-06-26 Nick Clifton <nickc@redhat.com>
1330
1331 PR binutils/21665
ea9aafc4 1332 * opncls.c (get_build_id): Check that the section is big enough
cfd14a50
NC
1333 to contain the whole note.
1334 * compress.c (bfd_get_full_section_contents): Check for and reject
ea9aafc4 1335 a section whose size is greater than the size of the entire file.
cfd14a50
NC
1336 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1337 contain a notes section.
1338
93ec5e23
AK
13392017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1340
1341 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1342 pointer checks.
1343 (elf_s390_modify_segment_map): Likewise.
1344 (bfd_elf_s390_set_options): Lisewise.
1345
57963c05
AM
13462017-06-26 Alan Modra <amodra@gmail.com>
1347
1348 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1349 a --just-syms bfd.
1350 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1351 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1352 .preinit_array on --just-syms bfds.
1353 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1354 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1355 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1356
5cc4ca83
ST
13572017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1358
1359 * elf.c (find_link): Bounds check "hint".
1360
bff0500d
TP
13612017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1362
1363 * elf32-arm.c (using_thumb_only): Update list of architectures in
1364 BFD_ASSERT for which the logic is valid.
1365 (using_thumb2_bl): Likewise.
1366 (using_thumb2): Likewise and return true for ARMv8-R.
1367 (arch_has_arm_nop): Likewise.
1368 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1369 merging logic. Update commentis for value 15 of v8m_baseline,
1370 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1371 merging of value 15 of Tag_CPU_arch.
1372
4aa57d6a
JW
13732017-06-23 Jiong Wang <jiong.wang@arm.com>
1374
1375 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1376 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1377 * bfd-in2.h: Regenerate.
1378
5d8763a3
L
13792017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1380
1381 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1382 the error_alignment label forward. Properly align program
1383 property note section.
1384
e652757b
EC
13852017-06-22 Eric Christopher <echristo@gmail.com>
1386
1387 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1388 abs to fix a truncation warning.
1389
84da4cf8
L
13902017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1391
1392 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1393 local undefined weak symbol to 0.
1394 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1395
48580982
L
13962017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1397
1398 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1399 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1400 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1401 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1402 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1403 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1404 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1405 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1406
ee2fdd6f
L
14072017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1408
1409 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1410 (elf_i386_lazy_ibt_plt_entry): Likewise.
1411 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1412 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1413 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1414 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1415 (elf_i386_lazy_plt_layout): Likewise.
1416 (elf_i386_non_lazy_plt_layout): Likewise.
1417 (elf_i386_link_hash_entry): Add plt_second.
1418 (elf_i386_link_hash_table): Add plt_second and
1419 plt_second_eh_frame.
1420 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1421 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1422 the second PLT. Check the second PLT.
1423 (elf_i386_relocate_section): Use the second PLT to resolve
1424 PLT reference if needed.
1425 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1426 needed.
1427 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1428 second PLT. Generate unwind info for the second PLT.
1429 (elf_i386_plt_type): Add plt_second.
1430 (elf_i386_get_synthetic_symtab): Support the second PLT.
1431 (elf_i386_parse_gnu_properties): Support
1432 GNU_PROPERTY_X86_FEATURE_1_AND.
1433 (elf_i386_merge_gnu_properties): Support
1434 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1435 on GNU_PROPERTY_X86_FEATURE_1_IBT
1436 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1437 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1438 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1439 is set on all relocatable inputs.
1440 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1441 (elf_x32_lazy_ibt_plt_entry): Likewise.
1442 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1443 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1444 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1445 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1446 (elf_x86_64_lazy_ibt_plt): Likewise.
1447 (elf_x32_lazy_ibt_plt): Likewise.
1448 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1449 (elf_x32_non_lazy_ibt_plt): Likewise.
1450 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1451 (elf_x86_64_parse_gnu_properties): Support
1452 GNU_PROPERTY_X86_FEATURE_1_AND.
1453 (elf_x86_64_merge_gnu_properties): Support
1454 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1455 on GNU_PROPERTY_X86_FEATURE_1_IBT
1456 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1457 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1458 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1459 is set on all relocatable inputs.
1460
d19237d9
NC
14612017-06-22 Nick Clifton <nickc@redhat.com>
1462
1463 PR binutils/21649
1464 * som.c (setup_sections): NUL terminate the space_strings buffer.
1465 Check that the space.name field does not index beyond the end of
1466 the space_strings buffer.
1467
6879f5a9
NC
14682017-06-21 Nick Clifton <nickc@redhat.com>
1469
1470 PR binutils/21646
1471 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1472
7adc0a81
NC
14732017-06-21 Nick Clifton <nickc@redhat.com>
1474
1475 PR binutils/21639
1476 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1477 type of the size parameter.
1478 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1479 length of the counted string.
1480 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1481 (_bfd_vms_save_counted_string): Likewise.
1482 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1483 _bfd_vms_save_counted_string.
1484 (_bfd_vms_slurp_ehdr): Likewise.
1485 (_bfd_vms_slurp_egsd): Likewise.
1486 (Parse_module): Likewise.
1487
6e1816be
AM
14882017-06-21 Alan Modra <amodra@gmail.com>
1489
1490 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1491 calls before tocsave calls.
1492 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1493 following nop.
1494
20bd1b6b
NC
14952017-06-21 Nick Clifton <nickc@redhat.com>
1496
1497 PR binutils/21645
1498 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1499 bfd_get_full_section_contents returns no contents.
1500
3de58d95
NC
15012017-06-21 Nick Clifton <nickc@redhat.com>
1502
1503 PR binutils/21638
1504 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1505 record.
1506
cb06d03a
NC
15072017-06-21 Nick Clifton <nickc@redhat.com>
1508
1509 PR binutils/21637
1510 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1511 list.
1512 (image_set_ptr): Likewise.
1513 (alpha_vms_fix_sec_rel): Likewise.
1514 (alpha_vms_slurp_relocs): Likewise.
1515
c458d007
NC
15162017-06-21 Nick Clifton <nickc@redhat.com>
1517
1518 PR binutils/21633
1519 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1520 read_id.
1521 (ieee_archive_p): Likewise.
1522 (ieee_object_p): Likewise.
1523
ce497010
NC
15242017-06-21 Nick Clifton <nickc@redhat.com>
1525
1526 PR binutils/21640
1527 * elf.c (setup_group): Zero the group section pointer list after
1528 allocation so that loops can be caught. Check for NULL pointers
1529 when processing a group list.
1530
fd52715c
AK
15312017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1532
1533 * elf-s390.h: New file.
1534 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1535 field.
1536 (elf_s390_additional_program_headers): New function.
1537 (elf_s390_modify_segment_map): New function.
1538 (bfd_elf_s390_set_options): New function.
1539 (elf_backend_additional_program_headers)
1540 (elf_backend_modify_segment_map): Add macro definitions.
1541
abfa390d
L
15422017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1543
1544 PR ld/21626
1545 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1546 the DYNAMIC bit instead of bfd_count_sections.
1547
bc21b167
NC
15482017-06-19 Nick Clifton <nickc@redhat.com>
1549
1550 PR binutils/21618
1551 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1552 length.
1553 (evax_bfd_print_eeom): Likewise.
1554 (evax_bfd_print_egsd): Check for an overlarge record length.
1555 (evax_bfd_print_etir): Likewise.
1556
acb56a83
NC
15572017-06-19 Nick Clifton <nickc@redhat.com>
1558
1559 PR binutils/21612
1560 * libieee.h (struct common_header_type): Add end_p field.
1561 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1562 end_p.
1563 (read_id): Check for a length that exceeds the remaining bytes in
1564 the input buffer.
1565 (ieee_seek): Initialise end_p.
1566 (ieee_archive_p): Likewise.
1567 (ieee_object_p): Likewise.
1568
72e84f96
NC
15692017-06-19 Nick Clifton <nickc@redhat.com>
1570
80053e46
NC
1571 PR binutils/21611
1572 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1573 before reading the EIHS structure entries.
1574
15752017-06-19 Nick Clifton <nickc@redhat.com>
1576
1577 PR binutils/21615
72e84f96
NC
1578 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1579 gsd_size. Check that there are enough bytes remaining to read the
1580 type and size of the next egsd. Check that the size of the egsd
1581 does not exceed the size of the record.
1582
875ffa3e
AM
15832017-06-19 Alan Modra <amodra@gmail.com>
1584
1585 * config.bfd: Correct targ_underscore for cris.
1586
bdd32e03
AM
15872017-06-18 Alan Modra <amodra@gmail.com>
1588
1589 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1590 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1591
4b48e2f6
NC
15922017-06-16 Nick Clifton <nickc@redhat.com>
1593
1594 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1595 bucketlist is empty because there are no symbols to add to the
1596 list.
1597
7dba9362
AM
15982017-06-16 Alan Modra <amodra@gmail.com>
1599
1600 PR ld/20022
1601 PR ld/21557
1602 PR ld/21562
1603 PR ld/21571
1604 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1605 (BFD_JUMP_TABLE_LINK): Likewise.
1606 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1607 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1608 (bfd_elf_define_start_stop): New function.
1609 * linker.c (bfd_generic_define_start_stop): New function.
1610 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1611 new field.
1612 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1613 * aout-target.h (MY_bfd_define_start_stop): Define.
1614 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1615 * binary.c (binary_bfd_define_start_stop): Define.
1616 * bout.c (b_out_bfd_define_start_stop): Define.
1617 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1618 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1619 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1620 * coffcode.h (coff_bfd_define_start_stop): Define.
1621 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1622 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1623 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1624 * ieee.c (ieee_bfd_define_start_stop): Define.
1625 * ihex.c (ihex_bfd_define_start_stop): Define.
1626 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1627 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1628 * mmo.c (mmo_bfd_define_start_stop): Define.
1629 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1630 * oasys.c (oasys_bfd_define_start_stop): Define.
1631 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1632 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1633 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1634 * som.c (som_bfd_define_start_stop): Define.
1635 * srec.c (srec_bfd_define_start_stop): Define.
1636 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1637 * versados.c (versados_bfd_define_start_stop): Define.
1638 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1639 (alpha_vms_bfd_define_start_stop): Define.
1640 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1641 * bfd-in2.h: Regenerate.
1642 * libbfd.h: Regenerate.
1643
d68f1976
JW
16442017-06-16 Jiong Wang <jiong.wang@arm.com>
1645
1646 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1647 SYMBOL_REFERENCES_LOCAL.
1648
6353d82b
JW
16492017-06-15 Jiong Wang <jiong.wang@arm.com>
1650
1651 PR ld/21532
1652 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1653 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1654 runtime for if there needs copy relocation elimination.
1655 (need_copy_relocation_p): New function. Return true for symbol with
1656 pc-relative references and if it's against read-only sections.
1657 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1658 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1659 that are related with accessing external objects.
1660 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1661 in elfNN_aarch64_check_relocs.
1662
63634bb4
NC
16632017-06-15 Nick Clifton <nickc@redhat.com>
1664
1665 PR binutils/21582
1666 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1667 bugs.
62b76e4b
NC
1668 PR binutils/21581
1669 (ieee_archive_p): Likewise.
63634bb4 1670
76800cba
NC
16712017-06-15 Nick Clifton <nickc@redhat.com>
1672
1673 PR binutils/21579
1674 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1675
f7e16c2a
MF
16762017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1677
1678 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1679 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1680 keep both windowed and call0 ABI PLT definitions.
1681 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1682 elf_xtensa_*_plt_entry endex.
1683 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1684
f461bbd8
NC
16852017-06-14 Nick Clifton <nickc@redhat.com>
1686
1687 PR binutils/21578
1688 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1689 flag value.
1690
c53d2e6d
NC
16912017-06-14 Nick Clifton <nickc@redhat.com>
1692
1693 PR binutils/21589
1694 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1695 maximum value for the ascic pointer. Check that name processing
1696 does not read beyond this value.
1697 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1698 end of etir record.
1699
04f963fd
NC
17002017-06-14 Nick Clifton <nickc@redhat.com>
1701
1702 PR binutils/21591
1703 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1704 (process_otr): Check for an invalid offset in the otr structure.
1705
319c2dbe
SH
17062017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1707
1708 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1709
cbd0eecf
L
17102017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1711
1712 PR ld/20022
1713 PR ld/21557
1714 PR ld/21562
1715 PR ld/21571
1716 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1717 vtable field to a union.
1718 (_bfd_elf_is_start_stop): Removed.
1719 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1720 __start_SECNAME and __stop_SECNAME symbols.
1721 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1722 * elflink.c (_bfd_elf_is_start_stop): Removed.
1723 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1724 _bfd_elf_is_start_stop.
1725 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1726 __stop_SECNAME symbols. Updated.
1727 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1728 (bfd_elf_gc_record_vtinherit): Likewise.
1729 (bfd_elf_gc_record_vtentry): Likewise.
1730
10bbbc1d
NC
17312017-06-13 Nick Clifton <nickc@redhat.com>
1732
1733 PR ld/21524
1734 * elflink.c (elf_link_adjust_relocs): Generate an error when
1735 encountering a reloc against a symbol removed by garbage
1736 collection.
1737
5c3ce2bc
L
17382017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1739
1740 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1741 to merge_gnu_properties.
1742 * elf-properties.c (elf_merge_gnu_properties): Add struct
1743 bfd_link_info * and pass it to merge_gnu_properties.
1744 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1745 and pass it to elf_merge_gnu_properties.
1746 (_bfd_elf_link_setup_gnu_properties): Pass info to
1747 elf_merge_gnu_property_list.
1748 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1749 bfd_link_info *.
1750 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1751
9b97dfbf
AM
17522017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1753
1754 PR 21564
1755 * binary.c (binary_set_section_contents): Scale lma by octets
1756 per byte to set filepos.
1757
e3d1d408
CM
17582017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1759
1760 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1761 dynamic sections.
1762
64aa8e03
CM
17632017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1764
1765 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1766 require TEXTREL.
1767
a0abe743
CM
17682017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1769
1770 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1771 patched section contents for TLS IE reloc.
1772 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1773
f4e6805f
CM
17742017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1775
1776 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1777 RELOC_FOR_GLOBAL_SYMBOL macro.
1778
cd640291
CM
17792018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1780
1781 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1782 changes.
1783
7ef0acc1
VG
17842017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1785
1786 * config/tc-arc.c (md_undefined_symbol): Changed.
1787 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1788
cc89d0b3
CM
17892017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1790
1791 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1792 symbols.
1793
9d5c718b
CM
17942017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1795
1796 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1797 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1798
be9e3704
CM
17992017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1800
1801 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1802 object is created.
1803
4ec192e6
RE
18042017-06-08 Richard Earnshaw <rearnsha@arm.com>
1805
1806 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1807 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1808 is non-zero. Add clarifying comments.
1809
51fa2693
L
18102017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1811
1812 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1813 name. Use local IFUNC symbol name string to report unsupported
1814 non-PIC call to IFUNC function.
1815 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1816 when generating R_386_IRELATIVE relocation.
1817 (elf_i386_finish_dynamic_symbol): Likewise.
1818 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1819 IFUNC symbol name.
1820 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1821 when generating R_X86_64_IRELATIVE relocation.
1822 (elf_x86_64_finish_dynamic_symbol): Likewise.
1823
78e8a2ff
JM
18242017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1825
1826 * elf.c (setup_group): Make sure BFD sections are created for all
1827 group sections in the input file when processing SHF_GROUP
1828 sections.
1829 (bfd_section_from_shdr): Avoid duplicating logic already
1830 implemented in `setup_group'.
1831
9949827b
DBR
18322017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1833
1834 PR binutils/21546
1835 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1836 if the hint address is zero.
1837
0ee3a6db
JC
18382017-06-06 James Clarke <jrtc27@jrtc27.com>
1839
1840 PR ld/19579
1841 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1842 ELF_COMMON_DEF_P for common symbols.
1843
7bdf4127
AB
18442017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1845
1846 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1847 SEC_GROUP sections as SEC_EXCLUDE.
1848 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1849 (assign_section_numbers): Use resolve_section_groups flag instead
1850 of relocatable link type.
1851 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1852 flag instead of checking the final_link flag for part of the
1853 checks in here. Fix white space as a result.
1854 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1855 instead of relocatable link type.
1856 (bfd_elf_final_link): Likewise.
1857
458ad2b8
JM
18582017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1859
1860 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1861 variable `bed'.
1862 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1863 (s3_bfd_score_elf_check_relocs): Likewise.
1864 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1865 (score_elf_final_link_relocate): Likewise.
1866 (s7_bfd_score_elf_check_relocs): Likewise.
1867
fbebaf4a
JM
18682017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1869
1870 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1871 `bed'.
1872
056bafd4
MR
18732017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1874
1875 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1876 from `reloc_count' rather than decrementing it.
1877 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1878 `reloc_count' by `int_rels_per_ext_rel'.
1879 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1880 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1881 entry determination.
1882 (s3_bfd_score_elf_check_relocs): Likewise.
1883 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1884 (s7_bfd_score_elf_relocate_section): Likewise.
1885 (s7_bfd_score_elf_check_relocs): Likewise.
1886 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1887 prototype and function.
1888 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1889 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1890 triple rather than once the sum of REL and RELA relocation entry
1891 counts.
1892 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1893 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1894 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1895 storage allocation size determination.
1896 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1897 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1898 by `int_rels_per_ext_rel' for last relocation entry
1899 determination.
1900 (bfd_elf_final_link): Do not multiply `reloc_count' by
1901 `int_rels_per_ext_rel' for internal relocation storage
1902 allocation size determination.
1903 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1904 `int_rels_per_ext_rel' for last relocation entry determination.
1905 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1906 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1907 (_bfd_mips_elf_relocate_section): Likewise.
1908
af54f0eb
AM
19092017-06-05 Alan Modra <amodra@gmail.com>
1910
1911 PR 21529
1912 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1913
6cf3bf88 19142017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
1915
1916 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1917 determine structure sizes.
1918 (elfcore_grok_freebsd_prstatus): Likewise.
1919
f378ab09
AM
19202017-06-01 Alan Modra <amodra@gmail.com>
1921
1922 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1923 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1924 dynamic objects.
1925 (is_elfv2_localentry0): New function.
1926 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1927 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1928 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1929 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1930 optimized localentry:0 stubs.
1931 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1932 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1933 localentry:0 stubs.
1934 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1935 DT_PPC64_OPT.
1936 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1937
8c65b54f
CS
19382017-05-30 Casey Smith <clegg89@gmail.com>
1939
1940 PR ld/21523
1941 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1942 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1943
64984c22
AK
19442017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1945
1946 * cpu-arc.c (arc_compatible): New function.
1947
37cd3877
AK
19482017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1949
1950 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1951
8e2f54bc
L
19522017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1953
1954 PR binutils/21519
1955 * bfdio.c (bfd_get_file_size): New function.
1956 * bfd-in2.h: Regenerated.
1957
8e7f04f1 19582017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1959
1960 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1961 comments.
1962
25f94347
L
19632017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1964
1965 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1966 dynobj instead of htab->elf.dynobj.
1967
e5713223
MR
19682017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1969
1970 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1971 and function.
1972 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1973 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1974 actual number of internal relocations retrieved. Adjust
1975 function description.
1976 (bfd_elf64_canonicalize_reloc): Remove macro.
1977 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1978
64517994
JM
19792017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1980
1981 * archures.c (bfd_mach_sparc_v9m8): Define.
1982 (bfd_mach_sparc_v8plusm8): Likewise.
1983 (bfd_mach_sparc_v9_p): Adjust to M8.
1984 (bfd_mach_sparc_64bit_p): Likewise.
1985 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1986 bfd_mach_sparc_v8plusm8.
1987 * bfd-in2.h: Regenerated.
1988 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1989 sparc:v8plusm8.
1990 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1991 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1992 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1993 SHA3.
1994 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1995 bfd_mach_sparc_v8plusm8.
1996
eb026f09
AM
19972017-05-19 Alan Modra <amodra@gmail.com>
1998
1999 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2000 debug and special sections when no non-note alloc sections in an
2001 object are kept.
2002
535b785f
AM
20032017-05-18 Alan Modra <amodra@gmail.com>
2004
2005 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2006 * elf-m10300.c: Likewise.
2007 * elf.c: Likewise.
2008 * elf32-arc.c: Likewise.
2009 * elf32-bfin.c: Likewise.
2010 * elf32-m68k.c: Likewise.
2011 * elf32-nds32.c: Likewise.
2012 * elf32-tilepro.c: Likewise.
2013 * elflink.c: Likewise.
2014 * elfnn-aarch64.c: Likewise.
2015 * elfnn-riscv.c: Likewise.
2016 * elfxx-tilegx.c: Likewise.
2017 * mach-o.c: Likewise.
2018 * peXXigen.c: Likewise.
2019 * vms-alpha.c: Likewise.
2020 * vms-lib.c: Likewise.
2021
b7c871ed
L
20222017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2023
2024 PR ld/20882
2025 * elflink.c (elf_gc_mark_debug_section): New function.
2026 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2027 referenced by kept debug sections.
2028
bc4e12de
AM
20292017-05-16 Alan Modra <amodra@gmail.com>
2030
2031 * elf-m10300.c: Rename occurrences of non_ir_ref.
2032 * elf32-arm.c: Likewise.
2033 * elf32-bfin.c: Likewise.
2034 * elf32-cr16.c: Likewise.
2035 * elf32-cris.c: Likewise.
2036 * elf32-d10v.c: Likewise.
2037 * elf32-dlx.c: Likewise.
2038 * elf32-fr30.c: Likewise.
2039 * elf32-frv.c: Likewise.
2040 * elf32-hppa.c: Likewise.
2041 * elf32-i370.c: Likewise.
2042 * elf32-i386.c: Likewise.
2043 * elf32-iq2000.c: Likewise.
2044 * elf32-lm32.c: Likewise.
2045 * elf32-m32c.c: Likewise.
2046 * elf32-m32r.c: Likewise.
2047 * elf32-m68hc1x.c: Likewise.
2048 * elf32-m68k.c: Likewise.
2049 * elf32-mcore.c: Likewise.
2050 * elf32-metag.c: Likewise.
2051 * elf32-microblaze.c: Likewise.
2052 * elf32-moxie.c: Likewise.
2053 * elf32-msp430.c: Likewise.
2054 * elf32-mt.c: Likewise.
2055 * elf32-nios2.c: Likewise.
2056 * elf32-or1k.c: Likewise.
2057 * elf32-ppc.c: Likewise.
2058 * elf32-rl78.c: Likewise.
2059 * elf32-s390.c: Likewise.
2060 * elf32-score.c: Likewise.
2061 * elf32-score7.c: Likewise.
2062 * elf32-sh.c: Likewise.
2063 * elf32-tic6x.c: Likewise.
2064 * elf32-tilepro.c: Likewise.
2065 * elf32-v850.c: Likewise.
2066 * elf32-vax.c: Likewise.
2067 * elf32-xstormy16.c: Likewise.
2068 * elf32-xtensa.c: Likewise.
2069 * elf64-alpha.c: Likewise.
2070 * elf64-hppa.c: Likewise.
2071 * elf64-ia64-vms.c: Likewise.
2072 * elf64-mmix.c: Likewise.
2073 * elf64-ppc.c: Likewise.
2074 * elf64-s390.c: Likewise.
2075 * elf64-sh64.c: Likewise.
2076 * elf64-x86-64.c: Likewise.
2077 * elflink.c: Likewise.
2078 * elfnn-aarch64.c: Likewise.
2079 * elfnn-ia64.c: Likewise.
2080 * elfnn-riscv.c: Likewise.
2081 * elfxx-mips.c: Likewise.
2082 * elfxx-sparc.c: Likewise.
2083 * elfxx-tilegx.c: Likewise.
2084 * linker.c: Likewise.
2085
4070765b
AM
20862017-05-16 Alan Modra <amodra@gmail.com>
2087
2088 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2089 * elflink.c (elf_link_add_object_symbols): Update to use
2090 non_ir_ref_dynamic.
2091 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2092 non_ir_ref.
2093 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2094
25499ac7
MR
20952017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2096
2097 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2098
73caa85d
L
20992017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2100
2101 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2102 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2103 properties.
2104 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2105
f2c29a16
L
21062017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2107
2108 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2109 to plt_second.
2110 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2111 to plt_second/plt_second_eh_frame.
2112 (elf_x86_64_link_hash_newfunc): Updated.
2113 (elf_x86_64_allocate_dynrelocs): Likewise.
2114 (elf_x86_64_size_dynamic_sections): Likewise.
2115 (elf_x86_64_relocate_section): Likewise.
2116 (elf_x86_64_finish_dynamic_symbol): Likewise.
2117 (elf_x86_64_finish_dynamic_sections): Likewise.
2118 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2119 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2120 .plt.sec section.
2121 (elf_backend_setup_gnu_properties): Updated. Create the
2122 .plt.sec section instead of the .plt.sec section.
2123
dc2be3d2
L
21242017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2125
2126 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2127 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2128 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2129
db84b98a
JM
21302017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2131
2132 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2133 (bfd_elf64_set_reloc): Define.
2134 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2135
23186865
JM
21362017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2137
2138 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2139 (struct bfd_target): New field _bfd_set_reloc.
2140 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2141 * reloc.c (_bfd_generic_set_reloc): New function.
2142 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2143 * nlm-target.h (nlm_set_reloc): Likewise.
2144 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2145 * aout-tic30.c (MY_set_reloc): Likewise.
2146 * aout-target.h (MY_set_reloc): Likewise.
2147 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2148 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2149 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2150 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2151 * aout-adobe.c (aout_32_set_reloc): Likewise.
2152 * bout.c (b_out_set_reloc): Likewise.
2153 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2154 * i386os9k.c (aout_32_set_reloc): Likewise.
2155 * ieee.c (ieee_set_reloc): Likewise.
2156 * oasys.c (oasys_set_reloc): Likewise.
2157 * som.c (som_set_reloc): Likewise.
2158 * versados.c (versados_set_reloc): Likewise.
2159 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2160 _bfd_generic_set_reloc.
2161 (rs6000_xcoff64_aix_vec): LIkewise.
2162 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2163 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2164 * i386msdos.c (msdos_set_reloc): Define to
2165 _bfd_norelocs_set_reloc.
2166 * elfcode.h (elf_set_reloc): Define.
2167 * bfd-in2.h: Regenerated.
2168
aab82f4c
L
21692017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2170
2171 PR ld/21481
2172 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2173 for IFUNC function address.
2174
53a346d8
CZ
21752017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2176
2177 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2178 (CONFLICT_LIST): Likewise.
2179 (opcode/arc-attrs.h): Include.
2180 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2181 (arc_extract_features): New file.
2182 (arc_stralloc): Likewise.
2183 (arc_elf_merge_attributes): Likewise.
2184 (arc_elf_merge_private_bfd_data): Use object attributes.
2185 (bfd_arc_get_mach_from_attributes): New function.
2186 (arc_elf_object_p): Use object attributes.
2187 (arc_elf_final_write_processing): Likewise.
2188 (elf32_arc_obj_attrs_arg_type): New function.
2189 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2190 (elf32_arc_section_from_shdr): Likewise.
2191 (elf_backend_obj_attrs_vendor): Define.
2192 (elf_backend_obj_attrs_section): Likewise.
2193 (elf_backend_obj_attrs_arg_type): Likewise.
2194 (elf_backend_obj_attrs_section_type): Likewise.
2195 (elf_backend_obj_attrs_handle_unknown): Likewise.
2196 (elf_backend_section_from_shdr): Likewise.
2197
e645cf40
AG
21982017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2199
2200 PR ld/21458
2201 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2202 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2203 and the destination is a Thumb symbol.
2204
dd9e66ee
L
22052017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2206
2207 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2208 initializer to silence GCC 4.2.
2209 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2210
38b12349
L
22112017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2212
2213 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2214 (LAZY_PLT_ENTRY_SIZE): This.
2215 (NON_LAZY_PLT_ENTRY_SIZE): New.
2216 (elf_x86_64_plt0_entry): Renamed to ...
2217 (elf_x86_64_lazy_plt0_entry): This.
2218 (elf_x86_64_plt_entry): Renamed to ...
2219 (elf_x86_64_lazy_plt_entry): This.
2220 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2221 (elf_x86_64_lazy_bnd_plt0_entry): This.
2222 (elf_x86_64_legacy_plt_entry): Removed.
2223 (elf_x86_64_bnd_plt_entry): Renamed to ...
2224 (elf_x86_64_lazy_bnd_plt_entry): This.
2225 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2226 (elf_x86_64_non_lazy_plt_entry): This.
2227 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2228 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2229 (elf_x86_64_eh_frame_plt): Renamed to ...
2230 (elf_x86_64_eh_frame_lazy_plt): This.
2231 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2232 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2233 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2234 (elf_x86_64_eh_frame_non_lazy_plt): This.
2235 (elf_x86_64_lazy_plt_layout): New.
2236 (elf_x86_64_non_lazy_plt_layout): Likewise.
2237 (elf_x86_64_plt_layout): Likewise.
2238 (elf_x86_64_backend_data): Remove PLT layout information. Add
2239 os for target system.
2240 (GET_PLT_ENTRY_SIZE): Removed.
2241 (elf_x86_64_lazy_plt): New.
2242 (elf_x86_64_non_lazy_plt): Likewise.
2243 (elf_x86_64_lazy_bnd_plt): Likewise.
2244 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2245 (elf_x86-64_arch_bed): Updated.
2246 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2247 (elf_x86_64_create_dynamic_sections): Removed.
2248 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2249 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2250 (elf_x86-64_adjust_dynamic_symbol): Updated.
2251 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2252 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2253 size for PLT0 if there is no PLT0. Get plt_entry_size from
2254 non_lazy_plt for non-lazy PLT entries.
2255 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2256 from non_lazy_plt for non-lazy PLT entries.
2257 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2258 if there is no PLT0.
2259 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2260 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2261 entries with non-lazy PLT layout. Don't fill the second and third
2262 slots in the PLT entry if there is no PLT0.
2263 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2264 if there is no PLT0. Set sh_entsize on the .plt.got section.
2265 (compare_relocs): New.
2266 (elf_x86_64_plt_type): Likewise.
2267 (elf_x86_64_plt): Likewise.
2268 (elf_x86_64_nacl_plt): New. Forward declaration.
2269 (elf_x86_64_get_plt_sym_val): Removed.
2270 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2271 against all dynamic relocations.
2272 (elf_x86_64_link_setup_gnu_properties): New function.
2273 (elf_backend_create_dynamic_sections): Updated.
2274 (elf_backend_setup_gnu_properties): New.
2275 (elf_x86_64_nacl_plt): New.
2276 (elf_x86_64_nacl_arch_bed): Updated.
2277
f604c2a2
L
22782017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2279
2280 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2281 (LAZY_PLT_ENTRY_SIZE): This.
2282 (NON_LAZY_PLT_ENTRY_SIZE): New.
2283 (elf_i386_plt0_entry): Renamed to ...
2284 (elf_i386_lazy_plt0_entry): This.
2285 (elf_i386_plt_entry): Renamed to ...
2286 (elf_i386_lazy_plt_entry): This.
2287 (elf_i386_pic_plt0_entry): Renamed to ...
2288 (elf_i386_pic_lazy_plt0_entry): This.
2289 (elf_i386_pic_plt_entry): Renamed to ...
2290 (elf_i386_pic_lazy_plt_entry): This.
2291 (elf_i386_got_plt_entry): Renamed to ...
2292 (elf_i386_non_lazy_plt_entry): This.
2293 (elf_i386_pic_got_plt_entry): Renamed to ...
2294 (elf_i386_pic_non_lazy_plt_entry): This.
2295 (elf_i386_eh_frame_plt): Renamed to ...
2296 (elf_i386_eh_frame_lazy_plt): This.
2297 (elf_i386_eh_frame_plt_got): Renamed to ...
2298 (elf_i386_eh_frame_non_lazy_plt): This.
2299 (elf_i386_plt_layout): Renamed to ...
2300 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2301 eh_frame_plt_got_size.
2302 (elf_i386_non_lazy_plt_layout): New.
2303 (elf_i386_plt_layout): Likewise.
2304 (elf_i386_non_lazy_plt): Likewise.
2305 (GET_PLT_ENTRY_SIZE): Removed.
2306 (elf_i386_plt): Renamed to ...
2307 (elf_i386_lazy_plt): This.
2308 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2309 (elf_i386_arch_bed): Updated.
2310 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2311 (elf_i386_create_dynamic_sections): Removed.
2312 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2313 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2314 (elf_i386_adjust_dynamic_symbol): Updated.
2315 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2316 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2317 size for PLT0 if there is no PLT0.
2318 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2319 output section is discarded only if GOT isn't empty.
2320 (elf_i386_relocate_section): Updated. Properly get PLT index
2321 if there is no PLT0.
2322 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2323 second and third slots in the PLT entry if there is no PLT0.
2324 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2325 if there is no PLT0. Set sh_entsize on the .plt.got section.
2326 (elf_i386_nacl_plt): Forward declaration.
2327 (elf_i386_get_plt_sym_val): Removed.
2328 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2329 against all dynamic relocations.
2330 (elf_i386_link_setup_gnu_properties): New function.
2331 (elf_backend_create_dynamic_sections): Updated.
2332 (elf_backend_setup_gnu_properties): New.
2333 (elf_i386_nacl_plt): Updated.
2334 (elf_i386_nacl_arch_bed): Likewise.
2335 (elf_i386_vxworks_arch_bed): Likewise.
2336
046734ff
TP
23372017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2338
2339 * elflink.c (elf_output_implib): Remove executable flag from import
2340 library bfd.
2341 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2342 library is a relocatable object file.
2343
b660e9eb
SKS
23442017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2345
2346 PR ld/21404
2347 * elf32-avr.c (avr_should_move_sym): New function.
2348 (avr_should_reduce_sym_size): Likewise.
2349 (avr_should_increase_sym_size): Likewise.
2350 (elf32_avr_relax_delete_bytes): Adjust symbol values
2351 and sizes by calling new functions.
2352
763a5fa4
PD
23532017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2354
2355 * config.bfd (riscv32-*): Enable rv64.
2356
73ec947d
AM
23572017-05-02 Alan Modra <amodra@gmail.com>
2358
2359 PR 21384
2360 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2361 rather than h->root.type == bfd_link_hash_new.
2362 (bfd_elf_record_link_assignment): Similarly, call
2363 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2364
a941291c
AM
23652017-04-29 Alan Modra <amodra@gmail.com>
2366
2367 PR 21432
2368 * reloc.c (reloc_offset_in_range): New function.
2369 (bfd_perform_relocation, bfd_install_relocation): Use it.
2370 (_bfd_final_link_relocate): Likewise.
2371
750eaa47
L
23722017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2373
2374 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2375 before using .plt.got.
2376 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2377
5b66fac4
L
23782017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2379
2380 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2381 instead of "+=" to update 0.
2382
de9a3c42
L
23832017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2384
2385 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2386 .plt.got section here.
2387 (elf_i386_check_relocs): Don't create the .plt.got section.
2388 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2389 the .plt.got and .plt.bnd sections here.
2390 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2391 .plt.bnd sections.
2392
da3d25af
L
23932017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2394
2395 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2396 has_bnd_reloc.
2397 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2398 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2399 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2400 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2401 has_bnd_reloc.
2402
fba37edd
L
24032017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2404
2405 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2406 to return bfd *.
2407 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2408 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2409 the first relocatable ELF input with GNU properties.
2410
1f78f649
L
24112017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2412
2413 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2414 VxWorks for non-PIC.
2415
76c20d54
AM
24162017-04-27 Alan Modra <amodra@gmail.com>
2417
2418 * elf-bfd.h (struct elf_backend_data): Make asection param of
2419 elf_backend_eh_frame_address_size const.
2420 (_bfd_elf_eh_frame_address_size): Likewise.
2421 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2422 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2423 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2424 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2425 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2426 (next_cie_fde_offset): Constify params.
2427 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2428
d7153c4a
AM
24292017-04-27 Alan Modra <amodra@gmail.com>
2430
2431 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2432 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2433 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2434 aug_data_len.
2435 (offset_adjust): New function.
2436 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2437 (adjust_eh_frame_local_symbols): Likewise.
2438 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2439 after changing anything. Return true if anything changed.
2440 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2441 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2442
641338d8
AM
24432017-04-27 Alan Modra <amodra@gmail.com>
2444
2445 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2446 when force_local.
2447
21d68fcd
AM
24482017-04-27 Alan Modra <amodra@gmail.com>
2449
2450 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2451 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2452 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2453 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2454 for undef and undefweak dyn_relocs.
2455 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2456 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2457 (allocate_got, allocate_dynrelocs): Likewise.
2458 (ppc64_elf_relocate_section): Likewise.
2459
97d343d4
L
24602017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2461
2462 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2463 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2464 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2465 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2466
04b31182
NC
24672017-04-26 Nick Clifton <nickc@redhat.com>
2468
2469 PR binutils/21434
2470 * reloc.c (bfd_perform_relocation): Check for a negative address
2471 in the reloc.
2472
23ec1e32
MR
24732017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2474
2475 PR ld/21334
2476 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2477 member.
2478 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2479 (elf_backend_always_renumber_dynsyms): Define.
2480 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2481 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2482 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2483 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2484 it.
2485 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2486
c46cec3a
MR
24872017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2488
2489 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2490 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2491 sections have been created.
2492
e63d1232
NC
24932017-04-26 Nick Clifton <nickc@redhat.com>
2494
2495 PR binutils/21431
2496 * compress.c (bfd_init_section_compress_status): Check the return
2497 value from bfd_malloc.
2498
9e9821dd
L
24992017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2500
2501 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2502 no_finish_dynamic_symbol.
2503 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2504 0.
2505 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2506 weak symbol, don't make it dynamic.
2507 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2508 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2509 relocation for GOT reference.
2510 (elf_x86_64_finish_dynamic_symbol): Abort if
2511 no_finish_dynamic_symbol isn't 0.
2512
0dc9a308
L
25132017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2514
2515 PR ld/21402
2516 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2517 undefined weak symbol, don't make it dynamic.
2518 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2519 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2520 relocation for R_386_GOT32.
2521
1587442d
L
25222017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2523
2524 PR ld/21425
2525 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2526
7eacd66b
AM
25272017-04-23 Alan Modra <amodra@gmail.com>
2528
2529 PR 21414
2530 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2531 * elf.c (lcomm_sym): New.
2532 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2533 * bfd-in2.h: Regenerate.
2534
bce964aa
AM
25352017-04-23 Alan Modra <amodra@gmail.com>
2536
2537 PR 21412
2538 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2539 parameters and comment.
2540 (_bfd_elf_get_reloc_section): Delete.
2541 (_bfd_elf_plt_get_reloc_section): Declare.
2542 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2543 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2544 Extracted from..
2545 (_bfd_elf_get_reloc_section): ..here. Delete.
2546 (assign_section_numbers): Call elf_get_reloc_section.
2547 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2548 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2549
97e83a10
AM
25502017-04-23 Alan Modra <amodra@gmail.com>
2551
2552 PR 21409
2553 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2554 no symbols.
2555
e133d005
L
25562017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2557
2558 PR ld/21402
2559 * elf32-i386.c (elf_i386_link_hash_entry): Add
2560 no_finish_dynamic_symbol.
2561 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2562 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2563 symbol, don't make it dynamic in PIE.
2564 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2565 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2566 relocation for R_386_GOT32
2567 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2568 isn't 0.
2569
3c5fce9b
L
25702017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2571
2572 PR ld/19617
2573 PR ld/21086
2574 * elflink.c (elf_link_add_object_symbols): Require
2575 --no-dynamic-linker with -E/--dynamic-list when creating
2576 dynamic sections.
2577
0fad2956
MR
25782017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2579
2580 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2581 if forced local.
2582
64575f78
MR
25832017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2584
2585 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2586 dynamic symbol sorting.
2587
59fa66c5
L
25882017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2589
2590 PR ld/21382
2591 * elflink.c (elf_link_add_object_symbols): Preserve
2592 dynamic_ref_after_ir_def when restoring the symbol table for
2593 unneeded dynamic object.
2594
e492d2f8
L
25952017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2596
2597 PR ld/21401
2598 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2599 on on undefined IFUNC symbol in the second PLT.
2600
10169134
WAF
26012017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2602
2603 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2604
954b63d4
AM
26052017-04-19 Alan Modra <amodra@gmail.com>
2606
2607 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2608 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2609 * elf32-ppc.c:Formatting.
2610 (ensure_undefweak_dynamic): Don't make dynamic when
2611 info->dynamic_undefined_weak is zero.
2612 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2613 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2614 not default visibility. Discard undef and undefweak
2615 dyn_relocs earlier.
2616 (ppc_elf_relocate_section): Adjust to suit.
2617 * elf64-ppc.c: Formatting.
2618 (ensure_undefweak_dynamic): Don't make dynamic when
2619 info->dynamic_undefined_weak is zero.
2620 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2621 info->dynamic_undefined_weak. Discard them earlier.
2622
e6699019
L
26232017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2624
2625 PR ld/21389
2626 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2627 before generating the version definition section.
2628
c5d37467
AM
26292017-04-17 Alan Modra <amodra@gmail.com>
2630
2631 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2632 state when a regular object file defines a symbol with
2633 incompatible type to that defined by an earlier shared lib.
2634
63a5468a
AM
26352017-04-13 Alan Modra <amodra@gmail.com>
2636
2637 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2638 * elf.c: Likewise.
2639 * elf32-arm.c: Likewise.
2640 * elf32-i386.c: Likewise.
2641 * elf32-mep.c: Likewise.
2642 * elf64-ia64-vms.c: Likewise.
2643 * elf64-x86-64.c: Likewise.
2644 * elflink.c: Likewise.
2645 * elfnn-ia64.c: Likewise.
2646 * elfxx-mips.c: Likewise.
2647
dae82561
AM
26482017-04-13 Alan Modra <amodra@gmail.com>
2649
2650 * aoutx.h: Use %B and %A in error messages throughout file.
2651 * aout-cris.c: Likewise.
2652 * archive.c: Likewise.
2653 * binary.c: Likewise.
2654 * coff-rs6000.c: Likewise.
2655 * coff-tic4x.c: Likewise.
2656 * coffcode.h: Likewise.
2657 * coffgen.c: Likewise.
2658 * cofflink.c: Likewise.
2659 * coffswap.h: Likewise.
2660 * cpu-arm.c: Likewise.
2661 * elf-eh-frame.c: Likewise.
2662 * elf-m10300.c: Likewise.
2663 * elf.c: Likewise.
2664 * elf32-arc.c: Likewise.
2665 * elf32-arm.c: Likewise.
2666 * elf32-bfin.c: Likewise.
2667 * elf32-frv.c: Likewise.
2668 * elf32-iq2000.c: Likewise.
2669 * elf32-m32c.c: Likewise.
2670 * elf32-microblaze.c: Likewise.
2671 * elf32-nds32.c: Likewise.
2672 * elf32-rl78.c: Likewise.
2673 * elf32-rx.c: Likewise.
2674 * elf32-score.c: Likewise.
2675 * elf32-score7.c: Likewise.
2676 * elf32-sh64.c: Likewise.
2677 * elf32-v850.c: Likewise.
2678 * elf32-vax.c: Likewise.
2679 * elf32-visium.c: Likewise.
2680 * elf64-ia64-vms.c: Likewise.
2681 * elf64-mmix.c: Likewise.
2682 * elf64-sh64.c: Likewise.
2683 * elfcode.h: Likewise.
2684 * elfnn-aarch64.c: Likewise.
2685 * elfnn-ia64.c: Likewise.
2686 * elfxx-mips.c: Likewise.
2687 * hpux-core.c: Likewise.
2688 * ieee.c: Likewise.
2689 * ihex.c: Likewise.
2690 * linker.c: Likewise.
2691 * merge.c: Likewise.
2692 * mmo.c: Likewise.
2693 * oasys.c: Likewise.
2694 * pdp11.c: Likewise.
2695 * peXXigen.c: Likewise.
2696 * rs6000-core.c: Likewise.
2697 * vms-alpha.c: Likewise.
2698 * xcofflink.c: Likewise.
2699
c08bb8dd
AM
27002017-04-13 Alan Modra <amodra@gmail.com>
2701
2702 * bfd.c (PRINT_TYPE): Define.
2703 (_doprnt): New function.
2704 (error_handler_internal): Use _doprnt.
2705 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2706 calls in their natural order, throughout file.
2707 * coff-mcore.c: Likewise.
2708 * coff-ppc.c: Likewise.
2709 * coff-tic80.c: Likewise.
2710 * cofflink.c: Likewise.
2711 * elf-s390-common.c: Likewise.
2712 * elf.c: Likewise.
2713 * elf32-arm.c: Likewise.
2714 * elf32-i386.c: Likewise.
2715 * elf32-m32r.c: Likewise.
2716 * elf32-msp430.c: Likewise.
2717 * elf32-spu.c: Likewise.
2718 * elf64-ia64-vms.c: Likewise.
2719 * elf64-sparc.c: Likewise.
2720 * elf64-x86-64.c: Likewise.
2721 * elflink.c: Likewise.
2722 * elfnn-aarch64.c: Likewise.
2723 * elfnn-ia64.c: Likewise.
2724 * elfxx-mips.c: Likewise.
2725
10463f39
AM
27262017-04-13 Alan Modra <amodra@gmail.com>
2727
2728 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2729 branch veneers" error. Fix double space and format message.
2730 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2731 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2732
4af8774e
AM
27332017-04-13 Alan Modra <amodra@gmail.com>
2734
2735 * bfd-in2.h: Regenerate.
2736
e4097f5e
L
27372017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2738
2739 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2740 extra `\n' in warning/error messages.
2741 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2742 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2743
537616aa
L
27442017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2745
2746 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2747 processor-specific properties with generic ELF target vector.
2748
bb1dd176
QZ
27492017-04-10 Qing Zhao <qing.zhao@oracle.com>
2750
2751 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2752 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2753 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2754 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2755 has_non_got_reloc.
2756 (link_hash_newfunc): Initialize has_got_reloc and
2757 has_non_got_reloc.
2758 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2759 section.
2760 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2761 has_non_got_reloc.
2762 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2763 has_non_got_reloc.
2764 (_bfd_sparc_elf_fixup_symbol): New function.
2765 (allocate_dynrelocs): Don't allocate space for dynamic
2766 relocations and discard relocations against resolved undefined
2767 weak symbols in executable. Don't make resolved undefined weak
2768 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2769 relocation against undefined weak symbols in PIE.
2770 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2771 relocations against resolved undefined weak symbols in PIE
2772 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2773 without ynamic PLT/GOT relocations for resolved undefined weak
2774 symbols.
2775 Don't generate dynamic relocation against resolved undefined
2776 weak symbol in executable.
2777 (pie_finish_undefweak_symbol): New function.
2778 (_bfd_sparc_elf_finish_dynamic_sections): Call
2779 pie_finish_undefweak_symbol on all symbols in PIE.
2780 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2781 (_bfd_sparc_elf_fixup_symbol): New function.
2782
d236cfd4
NC
27832017-04-10 Nick Clifton <nickc@redhat.com>
2784
2785 * config.bfd: Remove ns32k from obsolete list.
2786
6f9dbcd4
AM
27872017-04-10 Alan Modra <amodra@gmail.com>
2788
2789 PR 21287
2790 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2791 (special_sections_i): Likewise for .init_array.
2792 (special_sections_p): Likewise for .preinit_array.
2793
8170f769
L
27942017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2795
2796 PR ld/19579
2797 PR ld/21306
2798 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2799 ELF_COMMON_DEF_P for common symbols.
2800 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2801 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2802 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2803 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2804 07492f668d2173da7a2bda3707ff0985e0f460b6.
2805
49f4617b
PA
28062017-04-07 Pedro Alves <palves@redhat.com>
2807
2808 * opncls.c (bfd_get_debug_link_info): Rename to...
2809 (bfd_get_debug_link_info_1): ... this. Change type of second
2810 parameter to void pointer. Adjust.
2811 (bfd_get_debug_link_info): Reimplement on top of
2812 bfd_get_debug_link_info_1.
2813 (separate_debug_file_exists, separate_alt_debug_file_exists):
2814 Change type of second parameter to void pointer. Adjust.
2815 (get_func_type, check_func_type): Change type of second parameter
2816 to void pointer.
2817 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2818 the callback functions instead of passing the address of a local.
2819 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2820 find_separate_debug_file.
2821 (get_alt_debug_link_info_shim): Change type of second parameter to
2822 void pointer. Adjust.
2823 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2824 find_separate_debug_file.
2825 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2826 of second parameter to void pointer. Adjust.
2827 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2828 pointer local to find_separate_debug_file.
2829
28302017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
2831
2832 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2833 external symbols with a definition.
2834 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2835
86abf93a
AM
28362017-04-07 Alan Modra <amodra@gmail.com>
2837
2838 * po/SRC-POTFILES.in: Regenerate.
2839
8dea77f0
AM
28402017-04-05 Alan Modra <amodra@gmail.com>
2841
2842 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2843 reference counting.
2844
477bdd39
JT
28452017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2846
2847 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2848 numbers for DataDirectory entry indicies passed to
2849 add_data_entry().
2850
a91e1603
L
28512017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2852
2853 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2854 each GNU_MBIND section and align GNU_MBIND section to page size.
2855 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2856 segment for each GNU_MBIND section.
2857 (_bfd_elf_init_private_section_data): Copy sh_info from input
2858 for GNU_MBIND section.
2859
b5292032
PD
28602017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2861
2862 * elfnn-riscv.c (GP_NAME): Delete.
2863 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2864 (_bfd_riscv_relax_lui): Likewise.
2865
ad32986f
NC
28662017-04-04 Nick Clifton <nickc@redhat.com>
2867
2868 PR binutils/21342
2869 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2870 dereference.
2871 (bfd_elf_final_link): Only initialize the extended symbol index
2872 section if there are extended symbol tables to list.
2873
46bed679
L
28742017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2875
2876 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2877 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2878 * configure.ac (elf): Add elf-properties.lo.
2879 * Makefile.in: Regenerated.
2880 * configure: Likewise.
2881 * elf-bfd.h (elf_property_kind): New.
2882 (elf_property): Likewise.
2883 (elf_property_list): Likewise.
2884 (elf_properties): Likewise.
2885 (_bfd_elf_parse_gnu_properties): Likewise.
2886 (_bfd_elf_get_property): Likewise.
2887 (_bfd_elf_link_setup_gnu_properties): Likewise.
2888 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2889 and setup_gnu_properties.
2890 (elf_obj_tdata): Add properties.
2891 * elf-properties.c: New file.
2892 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2893 (elf_i386_merge_gnu_properties): Likewise.
2894 (elf_backend_parse_gnu_properties): Likewise.
2895 (elf_backend_merge_gnu_properties): Likewise.
2896 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2897 (elf_x86_64_merge_gnu_properties): Likewise.
2898 (elf_backend_parse_gnu_properties): Likewise.
2899 (elf_backend_merge_gnu_properties): Likewise.
2900 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2901 (elf_backend_parse_gnu_properties): Likewise.
2902 (elf_backend_setup_gnu_properties): Likewise.
2903 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2904 elf_backend_merge_gnu_properties and
2905 elf_backend_setup_gnu_properties.
2906
f96bd6c2
PC
29072017-03-30 Pip Cet <pipcet@gmail.com>
2908
2909 * elf32-wasm32.c: Add relocation code, two relocs.
2910 * reloc.c: Add wasm32 relocations.
2911 * libbfd.h: Regenerate.
2912 * bfd-in2.h: Regenerate.
2913 * bfd/po/bfd.pot: Regenerate.
2914
e643cb45
NC
29152017-03-29 Nick Clifton <nickc@redhat.com>
2916
2917 PR binutils/18025
2918 * coff-bfd.h (struct coff_section_data): Add new fields:
2919 saved_bias and bias.
2920 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2921 computed for PE binaries.
2922 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2923 missing abbrev.
2924
086554e8
HPN
29252017-03-28 Hans-Peter Nilsson <hp@axis.com>
2926
2927 PR ld/16044
2928 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2929 to handle a local symbol with a hash-symbol-entry; without PLT.
2930 Add BFD_ASSERT for an incidental case with GOT entry present.
2931 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2932 isn't forced-or-set local.
2933
a6be0538
PC
29342017-03-27 Pip Cet <pipcet@gmail.com>
2935
2936 * wasm-module.c: New file to support WebAssembly modules.
2937 * wasm-module.h: New file to support WebAssembly modules.
2938 * doc/webassembly.texi: Start documenting wasm-module.c.
2939 * config.bfd: Add wasm_vec.
2940 * targets.c: Likewise.
2941 * configure.ac: Likewise.
2942 * Makefile.am: Add entries for wasm-module.c.
2943 * Makefile.in: Regenerate.
2944 * configure: Regenerate.
2945 * po/SRC-POTFILES.in: Regenerate.
2946
79b1d3cb
PC
29472017-03-27 Pip Cet <pipcet@gmail.com>
2948
2949 * cpu-wasm32.c: New file to support wasm32 architecture.
2950 * elf32-wasm32.c: New file to support wasm32 architecture.
2951 * Makefile.am: Add wasm32 architecture.
2952 * archures.c: Likewise.
2953 * config.bfd: Likewise.
2954 * configure.ac: Likewise.
2955 * targets.c: Likewise.
2956 * Makefile.in: Regenerate.
2957 * bfd-in2.h: Regenerate.
2958 * configure: Regenerate.
2959 * po/SRC-POTFILES.in: Regenerate.
2960
aaed6f5b
AM
29612017-03-20 Alan Modra <amodra@gmail.com>
2962
2963 PR 21266
2964 * elf64-ppc.c (compare_symbols): Stabilize sort.
2965
82e66161
AM
29662017-03-18 Alan Modra <amodra@gmail.com>
2967
2968 * elf64-ppc.c (struct ppc_link_hash_table): Add
2969 local_ifunc_resolver and maybe_local_ifunc_resolver.
2970 (ppc_build_one_stub): Set flags on emitting dynamic
2971 relocation to ifunc.
2972 (ppc64_elf_relocate_section): Likewise.
2973 (ppc64_elf_finish_dynamic_symbol): Likewise.
2974 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2975 local dynamic relocs to ifuncs.
2976 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2977 local_ifunc_resolver and maybe_local_ifunc_resolver.
2978 (ppc_elf_relocate_section): Set flag on emitting dynamic
2979 relocation to ifuncs.
2980 (ppc_elf_finish_dynamic_symbol): Likewise.
2981 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2982 dynamic relocs to ifuncs.
2983
f955cccf
NC
29842017-03-13 Nick Clifton <nickc@redhat.com>
2985
2986 PR binutils/21202
2987 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2988 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2989 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2990 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2991 * bfd-in2.h: Regenerate.
2992 * libbfd.h: Regenerate.
2993 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2994 names.
2995 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2996 (elfNN_aarch64_howto_table): Likewise.
2997 (aarch64_tls_transition_without_check): Likewise.
2998 (aarch64_reloc_got_type): Likewise.
2999 (elfNN_aarch64_final_link_relocate): Likewise.
3000 (elfNN_aarch64_tls_relax): Likewise.
3001 (elfNN_aarch64_relocate_section): Likewise.
3002 (elfNN_aarch64_gc_sweep_hook): Likewise.
3003 (elfNN_aarch64_check_relocs): Likewise.
3004 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3005 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3006
4aef7643
AM
30072017-03-11 Alan Modra <amodra@gmail.com>
3008
3009 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3010 parameter is in fact used. Whitespace fixes.
3011 * elf64-ppc.c: Likewise.
3012
f03265d9
ST
30132017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3014
3015 * rs6000-core.c (CORE_NEW): Simplify macro when
3016 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3017
b1b07054
AM
30182017-03-07 Alan Modra <amodra@gmail.com>
3019
3020 PR 21224
3021 PR 20519
3022 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3023 dyn_relocs check.
3024
2e0ce1c8
AM
30252017-03-05 Alan Modra <amodra@gmail.com>
3026
3027 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3028 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3029 (next_cie_fde_offset): New function.
3030 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3031 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3032 four bytes. Align CIEs to four or eight bytes depending on
3033 per_encoding_aligned8. Align FDEs according to their encoding.
3034 Pad last FDE to output section alignment.
3035 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3036 assertion.
3037 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3038 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3039 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3040
f98450c6
NC
30412017-03-02 Martin Bickel <binutils@ineranves.de>
3042
3043 PR ld/21212
3044 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 3045 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 3046
673cff9b
AM
30472017-03-02 Alan Modra <amodra@gmail.com>
3048
3049 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3050
3de43e7b
AM
30512017-02-28 Alan Modra <amodra@gmail.com>
3052
3053 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3054 (ppc64_elf_relocate_section): Likewise.
3055
4ef97a1b
AM
30562017-02-28 Alan Modra <amodra@gmail.com>
3057
3058 PR 20995
3059 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3060 rather than elf32_nios2_hash_table or elf_hash_table.
3061 (create_got_section): Likewise.
3062 (nios2_elf32_finish_dynamic_symbol): Likewise.
3063 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3064 (nios2_elf32_size_dynamic_sections): Likewise.
3065 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3066 vars. Use htab equivalents directly instead. Don't create
3067 all dynamic sections on needing just the GOT. Use a goto
3068 rather than a fall-through with reloc test. Ensure
3069 htab->dynobj is set when making dynamic sreloc section.
3070 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3071 equivalent directly instead. Don't segfault on looking for
3072 .dynamic when dynamic sections have not been created. Don't
3073 segfault on .got.plt being discarded.
3074 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3075 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3076 fixme and another not so relevant comment.
3077 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3078 already set, set hash table dynobj on creating .sbss.
3079
7ba71655
AM
30802017-02-28 Alan Modra <amodra@gmail.com>
3081
3082 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3083 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3084 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3085 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3086 (ppc64_elf_relocate_section): Likewise.
3087 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3088 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3089 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3090 * libbfd.h: Regenerate.
3091 * bfd-in2.h: Regenerate.
3092
afbf7e8e
AM
30932017-02-28 Alan Modra <amodra@gmail.com>
3094
3095 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3096 dynamic .data.rel.ro read-only.
3097 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3098 rather than section flags when deciding where copy reloc goes.
3099 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3100 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3101 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3102 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3103 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3104 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3105 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3106 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3107 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3108 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3109 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3110 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3111 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3112 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3113 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3114 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3115 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3116 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3117 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3118
0e392101
MR
31192017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3120
3121 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3122 `jalr $0, $25' instruction encoding.
3123
bd757ca7
NC
31242017-02-27 Nick Clifton <nickc@redhat.com>
3125
3126 PR ld/21180
3127 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3128 generating a seg-fault when encountering a symbol that has been
3129 deleted by garbage collection.
3130
034fed0b
AM
31312017-02-25 Alan Modra <amodra@gmail.com>
3132
3133 * elf32-arc.c (struct dynamic_sections): Delete.
3134 (enum dyn_section_types): Delete.
3135 (dyn_section_names): Delete.
3136 (arc_create_dynamic_sections): Delete.
3137 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3138 segfault on discarded .rela.plt section.
3139 (elf_arc_size_dynamic_sections): Formatting. Don't call
3140 arc_create_dynamic_sections. Don't allocate memory for sections
3141 handled by the generic linker. Correct code finding relocs in
3142 read-only sections. Set SEC_EXCLUDE on zero size .got,
3143 .got.plt, and .dynbss sections. Do set .interp for pies.
3144
d0f744f9
AW
31452017-02-24 Andrew Waterman <andrew@sifive.com>
3146
3147 * elfnn-riscv.c (GP_NAME): New macro.
3148 (riscv_global_pointer_value): Use it.
3149 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3150 output section, consider only that section's alignment.
3151
5d58c733
MR
31522017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3153
3154 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3155 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3156 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3157 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3158
c1556ecd
MR
31592017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3160
3161 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3162 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3163 or misaligned.
3164
5499c7c7
AM
31652017-02-23 Alan Modra <amodra@gmail.com>
3166
3167 PR 20744
3168 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3169 16D relocations.
3170 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3171 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3172 relocs.
3173
902e9fc7
MR
31742017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3175
3176 PR ld/20828
3177 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3178 processing ahead of the call to `elf_gc_sweep_symbol'.
3179
758d96d8
NC
31802017-02-22 Nick Clifton <nickc@redhat.com>
3181
3182 PR binutils/21193
3183 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3184 created section 4-byte alignment.
3185
6528b6eb
AM
31862017-02-22 Alan Modra <amodra@gmail.com>
3187
3188 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3189 on .got or .plt output section being discarded by script.
3190 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3191 vxworks splt temp.
3192
24f1a751
AM
31932017-02-21 Alan Modra <amodra@gmail.com>
3194
3195 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3196 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3197
64487780
AM
31982017-02-20 Alan Modra <amodra@gmail.com>
3199
3200 PR 21181
3201 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3202 if DT_RELSZ/DT_RELASZ is zero.
3203
6438d1be
NC
32042017-02-17 Nick Clifton <nickc@redhat.com>
3205
3206 * compress.c (bfd_get_full_section_contents): Remember to reduce
3207 compressed size by the sizeof the compression header when
3208 decompressing the contents.
3209
4bc26c69
PA
32102017-02-17 Pedro Alves <palves@redhat.com>
3211
3212 * srec.c (Chunk): Rename to ...
3213 (_bfd_srec_len): ... this.
3214 (S3Forced): Rename to ...
3215 (_bfd_srec_forceS3): ... this.
3216 * objcopy.c: Adjust all references.
3217
7ec22e0f
PA
32182017-02-17 Pedro Alves <palves@redhat.com>
3219
3220 * archive.c (bsd_write_armap): Rename to ...
3221 (_bfd_bsd_write_armap): ... this.
3222 (coff_write_armap): Rename to ...
3223 (_bfd_coff_write_armap): ... this.
3224 * libbfd-in.h (bsd_write_armap): Rename to ...
3225 (_bfd_bsd_write_armap): ... this.
3226 (coff_write_armap): Rename to ...
3227 (_bfd_coff_write_armap): ... this.
3228 * aout-target.h, aout-tic30.c: Adjust all users.
3229 * libbfd.h: Regenerate.
3230
8c8402cc
PA
32312017-02-17 Pedro Alves <palves@redhat.com>
3232
3233 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3234 (warn_deprecated): Rename to ...
3235 (_bfd_warn_deprecated): ... this.
3236 * libbfd.c (warn_deprecated): Rename to ...
3237 (_bfd_warn_deprecated): ... this.
3238 * bfd-in2.h: Regenerate.
3239
c7c3d11b
PA
32402017-02-17 Pedro Alves <palves@redhat.com>
3241
3242 * bfdio.c (real_ftell): Rename to ...
3243 (_bfd_real_ftell): ... this.
3244 (real_fseek): Rename to ...
3245 (_bfd_real_fseek): ... this.
3246 (real_fopen): Rename to ...
3247 (_bfd_real_fopen): ... this.
3248 * libbfd-in.h (real_ftell): Rename to ...
3249 (_bfd_real_ftell): ... this.
3250 (real_fseek): Rename to ...
3251 (_bfd_real_fseek): ... this.
3252 (real_fopen): Rename to ...
3253 (_bfd_real_fopen): ... this.
3254 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3255 * libbfd.h: Regenerate.
3256
4265548c
PA
32572017-02-17 Pedro Alves <palves@redhat.com>
3258
3259 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3260 * libbfd.c (read_unsigned_leb128): Rename to ...
3261 (_bfd_read_unsigned_leb128): ... this.
3262 (read_signed_leb128): Rename to ...
3263 (_bfd_read_signed_leb128): ... this.
3264 (safe_read_leb128): Rename to ...
3265 (_bfd_safe_read_leb128): ... this.
3266 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3267 (_bfd_read_unsigned_leb128): ... this.
3268 (read_signed_leb128): Rename to ...
3269 (_bfd_read_signed_leb128): ... this.
3270 (safe_read_leb128): Rename to ...
3271 (_bfd_safe_read_leb128): ... this.
3272 * libbfd.h: Renegerate.
3273
3239a423
AB
32742017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3275
3276 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3277 before trying to fine matching file and line information.
3278
90ed9b8b
AB
32792017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3280
3281 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3282 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3283 not match current bfd, then reload debug information. Record bfd
3284 we're loading debug info for in the stash. If we have debug
3285 informatin in the cache then perform section placement before
3286 returning.
3287
a8c75b76
AM
32882017-02-16 Alan Modra <amodra@gmail.com>
3289
3290 PR 21000
3291 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3292 * elfxx-target.h (elf_backend_no_page_alias): Define.
3293 (elfNN_bed): Init new field.
3294 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3295 ensure PT_LOAD segment starts on a new page.
3296 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3297
247d6c4c
AM
32982017-02-16 Alan Modra <amodra@gmail.com>
3299
3300 PR 21132
3301 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3302 if pic.
3303
90571206
JW
33042017-02-16 Jiong Wang <jiong.wang@arm.com>
3305
3306 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3307 * bfd-in2.h: Regenerated.
3308
2a568401
L
33092017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3310
3311 PR ld/21168
3312 * elf32-i386.c (elf_i386_relocate_section): Allow
3313 "lea foo@GOT, %reg" in PIC.
3314
a5def14f
L
33152017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3316
3317 PR ld/20244
3318 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3319 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3320 error against local IFUNC symbol without a base register for
3321 PIC.
3322
174d0a74
MR
33232017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3324
3325 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3326 `%P: %H:' with `info->callbacks->einfo'.
3327 (ppc_elf_relocate_section): Likewise.
3328 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3329 (ppc64_elf_edit_toc): Likewise.
3330 (ppc64_elf_relocate_section): Likewise.
3331
e278ae05
AM
33322017-02-14 Alan Modra <amodra@gmail.com>
3333
3334 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3335 --gc-keep-exported, and test versioned field of sym rather than
3336 looking for @ in name.
3337
10ddfe62
PD
33382017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3339
3340 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3341 __global_pointer$.
3342
d11135f5
NC
33432017-02-13 Nick Clifton <nickc@redhat.com>
3344
3345 PR binutils/21151
3346 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3347 unit length field.
3348
cc162427
AW
33492017-02-07 Andrew Waterman <andrew@sifive.com>
3350
3351 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3352 entry size if PLT header is written.
3353
3d044c0c
SL
33542017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3355
3356 Fix sparc64 dynamic relocation processing to use the dynamic
3357 symbol count.
3358 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3359 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3360 should be used.
3361
1b7e3d2f
NC
33622017-02-03 Nick Clifton <nickc@redhat.com>
3363
3364 PR 21096
3365 * coffcode.h (coff_write_object_contents): Enlarge size of
3366 s_name_buf in order to avoid compile time warning about possible
3367 integer truncation.
3368 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3369 32-bits of insn value before printing into buffer.
3370
e17b0c35
MR
33712017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3372
3373 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3374 `max_local_dynindx'.
3375 (mips_elf_sort_hash_table): Handle it.
3376 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3377 symbols bump up `max_local_dynindx' rather than
3378 `max_non_got_dynindx'.
3379
55f8b9d2
MR
33802017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3381
3382 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3383 `min_got_dynindx', `max_unref_got_dynindx' and
3384 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3385 (mips_elf_sort_hash_table): Adjust accordingly.
3386
0f8c4b60
MR
33872017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3388
3389 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3390 to access the hash table.
3391
17a80fa8
MR
33922017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3393
3394 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3395 non-NULL `htab' to the beginning.
3396
8f56d4fd
MR
33972017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3398
3399 * elflink.c (elf_gc_sweep): Wrap overlong line.
3400
8b10b0b3
MR
34012017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3402
3403 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3404 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3405 * elfxx-mips.c (mips_elf_link_hash_table): Add
3406 `ignore_branch_isa' member.
3407 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3408 in branch relocation calculation as an error if
3409 `ignore_branch_isa' has been set.
3410 (_bfd_mips_elf_insn32): Rename to...
3411 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3412 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3413 Handle the new parameter.
3414
1fbd05e1
HPN
34152017-01-27 Hans-Peter Nilsson <hp@axis.com>
3416
22d9a0de
HPN
3417 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3418 local variable dynobj.
3419
1fbd05e1
HPN
3420 PR ld/20995
3421 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3422 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3423 executable from read-only sections into sdynrelro.
3424 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3425 dynamic relocs in sdynrelro.
3426 (elf_backend_want_dynrelro): Define.
3427
4a7324e1
SH
34282017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3429
3430 * config.bfd (*-*-rtemsaout*): Mark as removed.
3431
c75b4ebd
SH
34322017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3433
3434 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3435 (arm-*-rtems*): Move to (arm*-*-eabi*).
3436 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3437 (m68-*-rtems*): Move to (m68*-*-elf*).
3438
850d84f6
SH
34392017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3440
3441 * config.bfd (*-*-rtemscoff*): Mark as removed.
3442
b531344c
MR
34432017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3444
3445 PR ld/20828
3446 * elflink.c (bfd_elf_record_link_assignment): Revert last
3447 change and don't ever clear `forced_local'. Set `mark'
3448 unconditionally.
3449 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3450 file.
3451 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3452 (bfd_elf_size_dynamic_sections): ... here.
3453 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3454 and set `mark' instead in `__tls_get_addr_opt' processing.
3455 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3456
f0158f44
AM
34572017-01-24 Alan Modra <amodra@gmail.com>
3458
3459 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3460 where dynamic relocs are preferable. Allow ifunc too.
3461 (ensure_undefweak_dynamic): New function.
3462 (allocate_dynrelocs): Use it here. Move plt handling last and
3463 don't make symbols dynamic, simplifying loop. Only make undef
3464 weak symbols with GOT entries dynamic. Correct condition
3465 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3466 comments. Remove goto.
3467 (ppc_elf_relocate_section): Correct test for using dynamic
3468 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3469 to suit. Set up explicit tls_index entries and implicit GOT
3470 tls_index entries resolvable at link time for
3471 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3472 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3473 (ensure_undefweak_dynamic): New function.
3474 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3475 with GOT entries dynamic. Remove unnecessary test of
3476 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3477 (ppc64_elf_relocate_section): Correct test for using dynamic
3478 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3479 to suit. Set up explicit tls_index entries and implicit GOT
3480 tls_index entries resolvable at link time for __tls_get_addr_opt.
3481 Simplify expression to clear mem for prelink.
3482
2d0ca824
YN
34832017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3484
3485 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3486
7f784814
JW
34872017-01-20 Jiong Wang <jiong.wang@arm.com>
3488
3489 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3490 (elf_backend_hash_symbol): Define.
3491
81ff47b3
MR
34922017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3493
3494 PR ld/20828
3495 * elflink.c (bfd_elf_record_link_assignment): Clear any
3496 `forced_local' marking for DSO symbols that are not being
3497 provided.
3498
640d6bfd
KLC
34992017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3500
3501 * elfnn-riscv.c (riscv_elf_object_p): New function.
3502
8361ed4d
L
35032017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3504
3505 PR ld/21038
3506 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3507 plt_bnd_eh_frame.
3508 (elf_x86_64_check_relocs): Create .eh_frame section for the
3509 .plt.bnd section.
3510 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3511 .eh_frame section for the .plt.bnd section.
3512 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3513 for the .plt.bnd section.
3514
2425a30e
NC
35152017-01-12 Nick Clifton <nickc@redhat.com>
3516
3517 PR binutils/20876
3518 * opncls.c (find_separate_debug_file): Add include_dirs
3519 parameter. Only include the directory part of the bfd's filename
3520 in search paths if include_dirs is true. Add a couple of extra
3521 locations for looking for debug files.
3522 ( bfd_follow_gnu_debuglink): Update invocation of
3523 find_separate_debug_file.
3524 (bfd_follow_gnu_debugaltlink): Likewise.
3525 (get_build_id): New function: Finds the build-id of the given bfd.
3526 (get_build_id_name): New function: Computes the name of the
3527 separate debug info file for a bfd, based upon its build-id.
3528 (check_build_id_file): New function: Checks to see if a separate
3529 debug info file exists at the given location, and that its
3530 build-id matches that of the original bfd.
3531 (bfd_follow_build_id_debuglink): New function: Finds a separate
3532 debug info file for a given bfd by using the build-id method.
3533 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3534 method of locating a separate debug info file before using the
3535 debuglink method.
3536 * bfd-in2.h: Regenerate.
3537
9e659176
L
35382017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3539
3540 PR ld/21038
3541 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3542 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3543 elf_x86_64_eh_frame_plt_got.
3544 (elf_x86_64_size_dynamic_sections): Get unwind info from
3545 elf_x86_64_bnd_arch_bed for the BND PLT.
3546
f2e2d2f5
JS
35472017-01-11 Jeremy Soller <jackpot51@gmail.com>
3548
3549 * config.bfd: Add entries for i686-redox and x86_64-redox.
3550
52b232b3
L
35512017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3552
3553 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3554 to 4 bytes.
3555 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3556 .eh_frame section to 4 bytes for x32.
3557 (elf_x86_64_check_relocs): Likewise.
3558
fff53dae
L
35592017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3560
3561 PR ld/20830
3562 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3563 (PLT_GOT_FDE_LENGTH): Likewise.
3564 (elf_i386_plt_layout): Add eh_frame_plt_got and
3565 eh_frame_plt_got_size.
3566 (elf_i386_plt): Updated.
3567 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3568 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3569 (elf_i386_size_dynamic_sections): Allocate and initialize
3570 .eh_frame section for .plt.got.
3571 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3572 .plt.got.
3573 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3574 eh_frame_plt_got_size.
3575 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3576 (PLT_GOT_FDE_LENGTH): Likewise.
3577 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3578 eh_frame_plt_got_size.
3579 (elf_x86_64_arch_bed): Updated.
3580 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3581 eh_frame_plt_got_size.
3582 (elf_x86_64_nacl_arch_bed): Likewise.
3583 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3584 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3585 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3586 .eh_frame section for .plt.got.
3587 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3588 for .plt.got.
3589
f129e49f
L
35902017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3591
3592 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3593 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3594
cd6581da
NC
35952017-01-09 Nick Clifton <nickc@redhat.com>
3596
3597 * dwarf2.c (lookup_address_in_function_table): Return early if
3598 there are no functions in the given comp unit, or if the high
3599 address of the last function in the comp unit is less than the
3600 desired address.
3601
98f02962
NC
36022017-01-09 Nick Clifton <nickc@redhat.com>
3603
3604 PR binutils/21013
3605 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3606 message if there are too many symbols to load.
3607
ae4fda66
JC
36082017-01-04 James Clarke <jrtc27@jrtc27.com>
3609
3610 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3611 if relocs are cached.
3612
de1010f4
RF
36132017-01-03 Rich Felker <bugdal@aerifal.cx>
3614
3615 PR ld/21017
3616 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3617 for R_MICROBLAZE_GOTOFF_64.
3618
09fe2662
NC
36192017-01-03 Nick Clifton <nickc@redhat.com>
3620
3621 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3622 warning about using a possibly uninitialised variable.
3623
595e0a47
AM
36242017-01-02 Alan Modra <amodra@gmail.com>
3625
3626 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3627 (allocate_plt_static, allocate_dynrelocs): Use it.
3628
7bd9df3b
AM
36292017-01-02 Alan Modra <amodra@gmail.com>
3630
3631 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3632 .PARISC.unwind section.
3633
5b86074c
AM
36342017-01-02 Alan Modra <amodra@gmail.com>
3635
3636 PR ld/20989
3637 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3638 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3639 indirect to GOT pointer relative code edit.
3640
2571583a
AM
36412017-01-02 Alan Modra <amodra@gmail.com>
3642
3643 Update year range in copyright notice of all files.
3644
5c1ad6b5 3645For older changes see ChangeLog-2016
3499769a 3646\f
5c1ad6b5 3647Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
3648
3649Copying and distribution of this file, with or without modification,
3650are permitted in any medium without royalty provided the copyright
3651notice and this notice are preserved.
3652
3653Local Variables:
3654mode: change-log
3655left-margin: 8
3656fill-column: 74
3657version-control: never
3658End:
This page took 0.265874 seconds and 4 git commands to generate.