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