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