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