]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
PR22300, Abort in elf32_hppa_relocate_section building polyml
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
c0e331c7
AM
12017-10-28 Alan Modra <amodra@gmail.com>
2
3 PR 22300
4 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
5 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
6 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
7 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
8
e601d38b
AM
92017-10-25 Alan Modra <amodra@gmail.com>
10
11 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
12 optionally prefixed with "_".
13 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
14
3342be5d
AW
152017-10-24 Andrew Waterman <andrew@sifive.com>
16
17 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
18 when rd is x0.
19
93f4de39
RL
202017-10-24 Renlin Li <renlin.li@arm.com>
21
22 PR ld/21703
23 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
24
66cae560
NC
252017-10-23 Nick Clifton <nickc@redhat.com>
26
27 PR 22319
28 * elflink.c (elf_link_output_extsym): Keep global undefined
29 symbols if they have been marked as needed.
30
defc8e2b
MR
312017-10-23 Maciej W. Rozycki <macro@imgtec.com>
32
33 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
34 function.
35 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
36 `_bfd_mips_elf_mkobject'.
37
56fbd041
HPN
382017-10-22 Hans-Peter Nilsson <hp@axis.com>
39
40 PR gas/22304
41 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
42
9d06997a
PD
432017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
44
45 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
46 (riscv_pcgp_lo_reloc): Likewise.
47 (riscv_pcgp_relocs): Likewise.
48 (riscv_init_pcgp_relocs): New function.
49 (riscv_free_pcgp_relocs): Likewise.
50 (riscv_record_pcgp_hi_reloc): Likewise.
51 (riscv_record_pcgp_lo_reloc): Likewise.
52 (riscv_delete_pcgp_hi_reloc): Likewise.
53 (riscv_use_pcgp_hi_reloc): Likewise.
54 (riscv_record_pcgp_lo_reloc): Likewise.
55 (riscv_find_pcgp_lo_reloc): Likewise.
56 (riscv_delete_pcgp_lo_reloc): Likewise.
57 (_bfd_riscv_relax_pc): Likewise.
58 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
59 via the new functions above.
60
ff6f4d9b
PD
612017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
62
63 * elfnn-riscv.c (R_RISCV_DELETE): New define.
64 (_bfd_riscv_relax_delete): New function.
65 (perform_relocation): Handle R_RISCV_DELETE.
66 (_bfd_riscv_relax_section): Likewise.
67
28095894
L
682017-10-19 H.J. Lu <hongjiu.lu@intel.com>
69
70 PR ld/22263
71 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
72 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
73 bfd_link_executable for TLS check.
74 (tilegx_elf_check_relocs): Likewise.
75 (allocate_dynrelocs): Likewise.
76 (tilegx_elf_relocate_section): Likewise.
77
1ba1f393
L
782017-10-19 H.J. Lu <hongjiu.lu@intel.com>
79
80 PR ld/22263
81 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
82 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
83 bfd_link_executable for TLS check.
84 (tilepro_elf_check_relocs): Likewise.
85 (allocate_dynrelocs): Likewise.
86 (tilepro_elf_relocate_section): Likewise.
87
882017-10-19 H.J. Lu <hongjiu.lu@intel.com>
0fb7012e
L
89
90 PR ld/22263
91 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
92 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
93 bfd_link_executable for TLS check.
94 (_bfd_sparc_elf_check_relocs): Likewise.
95 (allocate_dynrelocs): Likewise.
96 (_bfd_sparc_elf_relocate_section): Likewise.
97
8e354058
L
982017-10-18 H.J. Lu <hongjiu.lu@intel.com>
99
100 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
101 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
102 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
103
b7213666
L
1042017-10-17 H.J. Lu <hongjiu.lu@intel.com>
105
106 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
107 indirect and warning symbols.
108
cf54ebff
AM
1092017-10-17 Alan Modra <amodra@gmail.com>
110
111 PR 22307
112 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
113 against size left rather than comparing pointers. Reorganise loop.
114
0301ce14
AM
1152017-10-17 Alan Modra <amodra@gmail.com>
116
117 PR 22306
118 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
119 and error for any other size that doesn't cover the header word.
120
5c3261b0
L
1212017-10-16 H.J. Lu <hongjiu.lu@intel.com>
122
123 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
124 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
125 (elf_backend_gc_sweep_hook): Likewise.
126 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
127 (bfinfdpic_gc_sweep_hook): Likewise.
128 (elf_backend_gc_sweep_hook): Likewise.
129 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
130 (elf_backend_gc_sweep_hook): Likewise.
131 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
132 (elf_backend_gc_sweep_hook): Likewise.
133 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
134 (elf_backend_gc_sweep_hook): Likewise.
135 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
136 (elf_backend_gc_sweep_hook): Likewise.
137 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
138 (elf_backend_gc_sweep_hook): Likewise.
139 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
140 from comments.
141 (elf_m68k_remove_got_entry_type): Removed.
142 (elf_m68k_find_got_entry_ptr): Likewise.
143 (elf_m68k_remove_got_entry): Likewise.
144 (elf_m68k_gc_sweep_hook): Likewise.
145 (elf_backend_gc_sweep_hook): Likewise.
146 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
147 (elf_backend_gc_sweep_hook): Likewise.
148 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
149 (elf_backend_gc_sweep_hook): Likewise.
150 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
151 (elf_backend_gc_sweep_hook): Likewise.
152 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
153 (elf_backend_gc_sweep_hook): Likewise.
154 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
155 (elf_backend_gc_sweep_hook): Likewise.
156 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
157 (elf_backend_gc_sweep_hook): Likewise.
158 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
159 (elf_backend_gc_sweep_hook): Likewise.
160 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
161 (elf_backend_gc_sweep_hook): Likewise.
162 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
163 (elf_backend_gc_sweep_hook): Likewise.
164 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
165 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
166 (elf_backend_gc_sweep_hook): Likewise.
167 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
168 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
169 (elf_backend_gc_sweep_hook): Likewise.
170 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
171 (elf_backend_gc_sweep_hook): Likewise.
172 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
173 (elf_backend_gc_sweep_hook): Likewise.
174 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
175 (elf_backend_gc_sweep_hook): Likewise.
176 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
177 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
178 (elf_backend_gc_sweep_hook): Likewise.
179 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
180 (ppc64_elf_gc_sweep_hook): Likewise.
181 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
182 (elf_backend_gc_sweep_hook): Likewise.
183 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
184 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
185 * elflink.c (elf_link_add_object_symbols): Don't call
186 _bfd_elf_link_check_relocs here.
187 (gc_sweep_hook_fn): Removed.
188 (elf_gc_sweep): Remove gc_sweep_hook.
189 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
190 (elf_backend_gc_sweep_hook): Likewise.
191 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
192 (elf_backend_gc_sweep_hook): Likewise.
193 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
194 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
195 (elf_backend_gc_sweep_hook): Likewise.
196 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
197 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
198 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
199 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
200 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
201 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
202
851b6fa1
L
2032017-10-14 H.J. Lu <hongjiu.lu@intel.com>
204
205 * elf32-i386.c (elf_i386_backend_data): Removed.
206 (get_elf_i386_backend_data): Likewise.
207 (elf_i386_arch_bed): Replace elf_i386_backend_data with
208 elf_x86_backend_data.
209 (elf_i386_get_synthetic_symtab): Likewise.
210 (elf_i386_nacl_arch_bed): Likewise.
211 (elf_i386_vxworks_arch_bed): Likewise.
212 (elf_i386_relocate_section): Check target_os instead of
213 is_vxworks.
214 (elf_i386_finish_dynamic_symbol): Likewise.
215 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
216 Check target_os instead of is_vxworks.
217 (elf_i386_link_setup_gnu_properties): Remove normal_target and
218 is_vxworks. Initialize plt0_pad_byte.
219 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
220 (get_elf_x86_64_arch_data): Likewise.
221 (get_elf_x86_64_backend_data): Likewise.
222 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
223 elf_x86_backend_data.
224 (elf_x86_64_get_synthetic_symtab): Likewise.
225 (elf_x86_64_nacl_arch_bed): Likewise.
226 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
227 normal_target. Initialize plt0_pad_byte.
228 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
229 instead of is_vxworks.
230 (_bfd_x86_elf_size_dynamic_sections): Likewise.
231 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
232 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
233 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
234 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
235 Update normal_target. Set up plt0_pad_byte. Check target_os
236 instead of is_vxworks.
237 * elfxx-x86.h (elf_x86_target_os): New.
238 (elf_x86_backend_data): Likewise.
239 (get_elf_x86_backend_data): Likewise.
240 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
241 and target_os.
242 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
243 plt0_pad_byte.
244
9577f60b
L
2452017-10-14 H.J. Lu <hongjiu.lu@intel.com>
246
247 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
248 _bfd_x86_elf_finish_dynamic_sections.
249 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
250 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
251 function.
252 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
253 prototype.
254
5d84490b
L
2552017-10-14 H.J. Lu <hongjiu.lu@intel.com>
256
257 PR ld/21384
258 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
259 hide symbol which was forced to be dynamic.
260
e01c16a8
L
2612017-10-14 H.J. Lu <hongjiu.lu@intel.com>
262
263 PR ld/22269
264 * elf32-cris.c (cris_elf_relocate_section): Don't generate
265 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
266 (cris_elf_check_relocs): Don't allocate dynamic relocation
267 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
268
6ee6e05a
L
2692017-10-14 H.J. Lu <hongjiu.lu@intel.com>
270
271 PR ld/22269
272 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
273 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
274 (sh_elf_relocate_section): Don't generate dynamic relocation if
275 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
276
b27bb18f
L
2772017-10-14 H.J. Lu <hongjiu.lu@intel.com>
278
279 PR ld/22269
280 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
281 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
282 (elf_s390_relocate_section): Don't generate dynamic relocation
283 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
284 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
285 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
286 (elf_s390_relocate_section): Don't generate dynamic relocation
287 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
288
31a53da5
L
2892017-10-14 H.J. Lu <hongjiu.lu@intel.com>
290
291 PR ld/22269
292 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
293 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
294 (allocate_dynrelocs): Discard dynamic relocations if
295 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
296
112fef40
L
2972017-10-14 H.J. Lu <hongjiu.lu@intel.com>
298
299 PR ld/22269
300 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
301 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
302 true.
303 (allocate_dynrelocs): Discard dynamic relocations if
304 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
305
5056ba1d
L
3062017-10-14 H.J. Lu <hongjiu.lu@intel.com>
307
308 PR ld/22269
309 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
310 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
311 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
312 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
313 (elf_m68k_relocate_section): Don't generate dynamic relocation
314 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
315
60c1b909
L
3162017-10-14 H.J. Lu <hongjiu.lu@intel.com>
317
318 PR ld/22269
319 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
320 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
321 (allocate_dynrelocs): Discard dynamic relocations if
322 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
323 (elf32_hppa_relocate_section): Don't generate dynamic
324 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
325
db41f6eb
L
3262017-10-14 H.J. Lu <hongjiu.lu@intel.com>
327
328 PR ld/22269
329 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
330 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
331 (allocate_fptr): Don't allocate function pointer if
332 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
333 (allocate_dynrel_entries): Don't allocate dynamic relocation
334 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
335 (set_got_entry): Don't set GOT entry if
336 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
337 (set_pltoff_entry): Don't set PLTOFF entry if
338 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
339 (elfNN_ia64_relocate_section): Don't install dynamic relocation
340 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
341
ad951203
L
3422017-10-14 H.J. Lu <hongjiu.lu@intel.com>
343
344 PR ld/22269
345 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
346 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
347 (allocate_dynrelocs): Don't allocate dynamic relocations if
348 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
349
95b03e4a
L
3502017-10-14 H.J. Lu <hongjiu.lu@intel.com>
351
352 PR ld/22269
353 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
354 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
355 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
356 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
357
a3cd202a
L
3582017-10-14 H.J. Lu <hongjiu.lu@intel.com>
359
360 PR ld/22269
361 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
362 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
363 (tilepro_elf_relocate_section): Don't generate dynamic
364 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
365 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
366 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
367 (tilegx_elf_relocate_section): Don't generate dynamic
368 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
369
ddb7fd0f
L
3702017-10-14 H.J. Lu <hongjiu.lu@intel.com>
371
372 PR ld/22269
373 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
374 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
375 true.
376 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
377 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
378
62cd30f1
L
3792017-10-14 H.J. Lu <hongjiu.lu@intel.com>
380
381 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
382 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
383 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
384
3b4b0a62
JB
3852017-10-12 James Bowman <james.bowman@ftdichip.com>
386
387 * bfd-in2.h: Regenerate.
388 * libbfd.h: Regenerate.
389 * elf32-ft32.c: Add HOWTO R_FT32_15.
390 * reloc.c: Add BFD_RELOC_FT32_15.
391
1d75a8e2
NC
3922017-10-12 Nick Clifton <nickc@redhat.com>
393
394 * reloc.c (enum bfd_reloc_status): Start values at 2.
395 * bfd-in2.h: Regenerate.
396 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
397 that a TRUE return indicates success. Compare the result of
398 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
399 (build_one_stub): Change sense of tests against aarch64_relocate
400 return value.
401 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
402 than FALSE, when an error is detected.
403 (elfNN_aarch64_final_link_relocate): Likewise.
404
9f857535
L
4052017-10-12 H.J. Lu <hongjiu.lu@intel.com>
406
407 * elf32-i386.c (elf_backend_hide_symbol): New.
408 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
409 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
410 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
411
559192d8
AM
4122017-10-12 Alan Modra <amodra@gmail.com>
413
414 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
415 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
416 (bfd_elf_define_start_stop): Likewise.
417
f5233a16
AM
4182017-10-12 Alan Modra <amodra@gmail.com>
419
420 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
421 when executable rather than non-PIC.
422 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
423 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
424
3c9a7b0d
MR
4252017-10-11 Maciej W. Rozycki <macro@imgtec.com>
426
427 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
428 member.
429 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
430 (elf_external_linux_prpsinfo64_ugid32): ... this.
431 (swap_linux_prpsinfo32_out): Rename to...
432 (swap_linux_prpsinfo32_ugid32_out): ... this.
433 (elf_external_linux_prpsinfo64_ugid16): New structure.
434 (swap_linux_prpsinfo64_ugid16_out): New function.
435 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
436 (elf_backend_linux_prpsinfo64_ugid16): Define.
437 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
438 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
439 of the 64-bit Linux core PRPSINFO note.
440 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
441
a2f63b2e
MR
4422017-10-11 Maciej W. Rozycki <macro@imgtec.com>
443
444 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
445 member.
446 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
447 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
448 (elf_external_ppc_linux_prpsinfo32)
449 (swap_ppc_linux_prpsinfo32_out): Move to...
450 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
451 (swap_linux_prpsinfo32_ugid32_out): ... these.
452 (elf_external_linux_prpsinfo32): Rename to...
453 (elf_external_linux_prpsinfo32_ugid16): ... this.
454 (swap_linux_prpsinfo32_out): Rename to...
455 (swap_linux_prpsinfo32_ugid16_out): ... this.
456 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
457 (elf_backend_linux_prpsinfo32_ugid16): Define.
458 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
459 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
460 of the 32-bit Linux core PRPSINFO note.
461 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
462 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
463 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
464 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
465 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
466 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
467 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
468 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
469 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
470 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
471
72bc1bb9
MR
4722017-10-11 Maciej W. Rozycki <macro@imgtec.com>
473
474 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
475 `gap' member ahead of `pr_flag'.
476
8f314ad5
PA
4772017-10-11 Pedro Alves <palves@redhat.com>
478
479 * bfd.c (_doprnt): Rename to ...
480 (_bfd_doprnt): ... this.
481 (error_handler_internal): Adjust.
482
0f09b4d8
L
4832017-10-10 H.J. Lu <hongjiu.lu@intel.com>
484
485 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
486 instead of incrementing it.
487 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
488
6c699715
RL
4892017-10-10 Renlin Li <renlin.li@arm.com>
490
491 PR ld/21402
492 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
493 symbols into dynamic.
494
fc3c5343
L
4952017-10-09 H.J. Lu <hongjiu.lu@intel.com>
496
497 PR ld/22274
498 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
499 (riscv_elf_link_hash_table_create): Initialize max_alignment to
500 (bfd_vma) -1.
501 (_bfd_riscv_relax_section): Cache the max alignment of output
502 sections if possible.
503
b9399fcf
AM
5042017-10-10 Alan Modra <amodra@gmail.com>
505
506 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
507 .opd whenever .opd is present and non-zero size. Move code
508 setting abiversion to/from output file earlier. Only set
509 u.opd.func_sec when --gc-sections. Read relocs and set up
510 u.opd.func_sec values here..
511 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
512 section tests.
513 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
514
478c006f
L
5152017-10-09 H.J. Lu <hongjiu.lu@intel.com>
516
517 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
518 isymbuf.
519
9d45a7de
L
5202017-10-09 H.J. Lu <hongjiu.lu@intel.com>
521
522 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
523 .interp section with "ld --no-dynamic-linker".
524
b55ec8b6
AM
5252017-10-09 Alan Modra <amodra@gmail.com>
526
527 PR 22212
528 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
529 funcinfo_hash_table and varinfo_hash_table.
530
a72f95f7
L
5312017-10-08 H.J. Lu <hongjiu.lu@intel.com>
532
533 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
534 in read-only section with minfo.
535 (sh_elf_size_dynamic_sections): Likewise.
536
f9799aae
L
5372017-10-08 H.J. Lu <hongjiu.lu@intel.com>
538
539 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
540 a strayed comment.
541
4c7236d3
L
5422017-10-08 H.J. Lu <hongjiu.lu@intel.com>
543
544 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
545 this_hdr.sh_entsize only if section size > 0.
546
70090aa5
L
5472017-10-08 H.J. Lu <hongjiu.lu@intel.com>
548
549 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
550
f0f07ad1
L
5512017-10-07 H.J. Lu <hongjiu.lu@intel.com>
552
553 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
554 in read-only section with minfo.
555 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
556
99180bcc
L
5572017-10-06 H.J. Lu <hongjiu.lu@intel.com>
558
559 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
560 comments.
561
544c67cd
JB
5622017-10-06 John Baldwin <jhb@FreeBSD.org>
563
564 * elf-bfd.h (struct elf_backend_data): Add
565 `elf_backend_grok_freebsd_prstatus'.
566 * elf.c (elfcore_grok_freebsd_note): Call
567 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
568 present.
569 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
570 function.
571 (elf_backend_grok_freebsd_prstatus): Define.
572 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
573 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
574
98b273dc
L
5752017-10-06 H.J. Lu <hongjiu.lu@intel.com>
576
577 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
578 and has_non_got_reloc with zero_undefweak.
579 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
580 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
581 zero_undefweak to 1.
582 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
583 has_non_got_reloc with zero_undefweak.
584 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
585 has_got_reloc and has_non_got_reloc with zero_undefweak.
586 (elf_x86_link_hash_entry): Likewise.
587
e0d8f431
L
5882017-10-06 H.J. Lu <hongjiu.lu@intel.com>
589
590 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
591 (VERIFY_COPY_RELOC): Likewise.
592
ff38b4cc
L
5932017-10-06 H.J. Lu <hongjiu.lu@intel.com>
594
595 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
596 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
597 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
598
f3180fa9
L
5992017-10-06 H.J. Lu <hongjiu.lu@intel.com>
600
601 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
602 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
603 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
604
e74399c4
L
6052017-10-06 H.J. Lu <hongjiu.lu@intel.com>
606
607 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
608 * elf32-i386.c (elf_i386_relocate_section): Use it.
609 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
610
aebcc8ff
L
6112017-10-06 H.J. Lu <hongjiu.lu@intel.com>
612
613 * elf32-i386.c (X86_SIZE_TYPE_P): New.
614 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
615 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
616 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
617 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
618
cf1070f1
L
6192017-10-06 H.J. Lu <hongjiu.lu@intel.com>
620
621 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
622 (PLT_LOCAL_IFUNC_P): Likewise.
623 * elf32-i386.c (elf_i386_relocate_section): Use them.
624 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
625
f70656b2
L
6262017-10-06 H.J. Lu <hongjiu.lu@intel.com>
627
628 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
629 * elf32-i386.c (elf_i386_relocate_section): Use it.
630 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
631
1f92404c
L
6322017-10-06 H.J. Lu <hongjiu.lu@intel.com>
633
634 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
635 * elf32-i386.c (elf_i386_relocate_section): Use it.
636 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
637
daf1c414
L
6382017-10-06 H.J. Lu <hongjiu.lu@intel.com>
639
640 * elf32-i386.c (X86_PCREL_TYPE_P): New.
641 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
642 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
643 (X86_PCREL_TYPE_P): This.
644 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
645 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
646 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
647 X86_PCREL_TYPE_P.
648 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
649
51537393
L
6502017-10-06 H.J. Lu <hongjiu.lu@intel.com>
651
652 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
653 * elf32-i386.c (elf_i386_tls_transition): Use it.
654 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
655
0caf6c82
L
6562017-10-05 H.J. Lu <hongjiu.lu@intel.com>
657
658 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
659 Dump dynamic relocation in read-only section with minfo if
660 needed.
661 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
662 (maybe_set_textrel): Likewise.
663 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
664 read-only section with minfo.
665
6d5be5d6
JB
6662017-10-05 John Baldwin <jhb@FreeBSD.org>
667
668 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
669
007873f5
L
6702017-10-05 H.J. Lu <hongjiu.lu@intel.com>
671
672 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
673 in read-only section with minfo.
674 (tilepro_elf_size_dynamic_sections): Likewise.
675 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
676 (tilegx_elf_size_dynamic_sections): Likewise.
677
2ca7de37
PA
6782017-10-05 Pedro Alves <palves@redhat.com>
679
680 PR 22245
681 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
682 ellipsis parameter. Split out bfd_error_on_input code to..
683 (bfd_set_input_error): .. New function.
684 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
685 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
686 * bfd-in2.h: Regenerate.
687
8c6716e5
AM
6882017-10-05 Alan Modra <amodra@gmail.com>
689
690 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
691 fini_array error value.
692
db4677b8
AM
6932017-10-05 Alan Modra <amodra@gmail.com>
694
695 PR 21167
696 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
697 groups.
698 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
699 flag from section.
700 (elf_fake_sections): Adjust calls. Exit immediately on failure.
701 (bfd_elf_set_group_contents): Add associated reloc section indices
702 to group contents.
703
a5259595
AM
7042017-10-04 Alan Modra <amodra@gmail.com>
705
706 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
707 classify symbols for ELFv2.
708
9ba5f27c
PK
7092017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
710
711 PR 22245
712 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
713 undergoes default promotion.
714 * bfd-in2.h: Regenerate.
715
dcd2b8a0
AM
7162017-10-02 Alan Modra <amodra@gmail.com>
717
718 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
719 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
720
20230942
AM
7212017-10-01 Alan Modra <amodra@gmail.com>
722
723 PR 21957
724 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
725 (add_line_info): Always put end_sequence last.
726
4b04bba2
AM
7272017-10-01 Alan Modra <amodra@gmail.com>
728
729 PR 22047
730 * dwarf2.c (read_section): Allocate buffer with extra byte for
731 bfd_simple_get_relocated_section_contents rather than copying
732 afterwards.
733
f6ac8c52
AM
7342017-09-29 Alan Modra <amodra@gmail.com>
735
736 * merge.c (merge_strings): Return FALSE on malloc failure.
737 (_bfd_merge_sections): Return failures from record_section and
738 merge_strings.
739
1a3b5c34
AM
7402017-09-28 Alan Modra <amodra@gmail.com>
741
742 PR 22220
743 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
744 a case where plugin_notice isn't called.
745
cd28e7aa
KLC
7462017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
747
748 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
749 comparison.
750
ac69a0d7
L
7512017-09-26 H.J. Lu <hongjiu.lu@intel.com>
752
753 PR ld/22199
754 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
755 output_bfd to info->callbacks->minfo.
756
262c0a87
NC
7572017-09-26 Nick Clifton <nickc@redhat.com>
758
759 PR 22172
760 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
761 assertion failure if elf_x86_64_rtype_to_howto has already issued
762 an error message.
763
33e0a9a0
AM
7642017-09-26 Alan Modra <amodra@gmail.com>
765
766 PR 22210
767 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
768 read data.
769
30d0157a
NC
7702017-09-26 Nick Clifton <nickc@redhat.com>
771
772 PR 22210
773 * dwarf2.c (read_formatted_entries): Fail early if we know that
774 the loop parsing data entries will overflow the end of the
775 section.
776
1b86808a
AM
7772017-09-26 Alan Modra <amodra@gmail.com>
778
779 PR 22209
780 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
781 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
782 to stash->info_ptr_memory, and check die_ref is within that memory.
783 Set info_ptr_end correctly when another CU is refd. Check die_ref
784 for DW_FORM_ref4 etc. is within CU.
785
a54018b7
AM
7862017-09-26 Alan Modra <amodra@gmail.com>
787
788 PR 22205
789 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
790 (read_formatted_entries): Init "fe".
791 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
792
e338894d
AM
7932017-09-26 Alan Modra <amodra@gmail.com>
794
795 PR 22204
796 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
797 bounds in inner loop.
798
1da5c9a4
AM
7992017-09-25 Alan Modra <amodra@gmail.com>
800
801 PR 22202
802 * dwarf1.c (parse_die): Sanity check pointer against section limit
803 before dereferencing.
804 (parse_line_table): Likewise.
805
11855d8a
AM
8062017-09-25 Alan Modra <amodra@gmail.com>
807
808 PR 22201
809 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
810 has string form.
811 (parse_comp_unit): Likewise.
812
c361faae
AM
8132017-09-25 Alan Modra <amodra@gmail.com>
814
815 PR 22200
816 * dwarf2.c (read_formatted_entries): Error on format_count zero.
817
52b36c51
AM
8182017-09-24 Alan Modra <amodra@gmail.com>
819
820 PR 22197
821 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
822 within section bounds.
823
a26a013f
AM
8242017-09-24 Alan Modra <amodra@gmail.com>
825
826 PR 22191
827 * dwarf2.c (decode_line_info): Properly free line sequences on error.
828
52a93b95
AM
8292017-09-24 Alan Modra <amodra@gmail.com>
830
831 PR 22187
832 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
833 pname param. Return status. Make name const. Don't abort,
834 return an error. Formatting. Exit if current info_ptr matches
835 orig_info_ptr. Update callers.
836 (scan_unit_for_symbols): Start at nesting_level of zero. Make
837 nested_funcs an array of structs for extensibility. Formatting.
838
d8010d3e
AM
8392017-09-24 Alan Modra <amodra@gmail.com>
840
841 PR 22186
842 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
843 rather than dividing by zero.
844
515f23e6
AM
8452017-09-24 Alan Modra <amodra@gmail.com>
846
847 PR 22169
848 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
849
0d76029f
AM
8502017-09-24 Alan Modra <amodra@gmail.com>
851
852 PR 22167
853 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
854
bd61e135
AM
8552017-09-24 Alan Modra <amodra@gmail.com>
856
857 PR 22166
858 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
859 SHT_GNU_verneed section for sanity. Don't zalloc memory for
860 verref.
861
61e3bf5f
L
8622017-09-22 H.J. Lu <hongjiu.lu@intel.com>
863
864 PR binutils/22170
865 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
866 corrupted PLT.
867
b69e9267
L
8682017-09-22 H.J. Lu <hongjiu.lu@intel.com>
869
59ca4c1b 870 PR binutils/22163
b69e9267
L
871 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
872 -1 if bfd_canonicalize_dynamic_reloc returns 0.
873
b877d21f
PA
8742017-09-22 Pedro Alves <palves@redhat.com>
875 Alan Modra <amodra@gmail.com>
876
877 * version.h: Add comment.
878
8fe09d74
AA
8792017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
880
881 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
882 NT_S390_GS_BC, correct the previously swapped invocations of
883 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
884
25516cc5
AM
8852017-09-19 Alan Modra <amodra@gmail.com>
886
887 PR 21441
888 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
889 size.
890
3d13f3e9
AM
8912017-09-19 Alan Modra <amodra@gmail.com>
892
893 PR 22150
894 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
895 symbols before calculating verrefs. Don't renumber dynsyms
896 after gc. Exclude .gnu.version when zero or one dynsym.
897 Localize some vars and reindent.
898
94670f6c
L
8992017-09-18 H.J. Lu <hongjiu.lu@intel.com>
900
901 PR ld/22148
902 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
903 return from bfd_canonicalize_dynamic_reloc.
904
21d0a606
AM
9052017-09-15 Alan Modra <amodra@gmail.com>
906
907 PR 22116
908 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
909 overflows bfd_size_type.
910
5e5e02ae
L
9112017-09-14 H.J. Lu <hongjiu.lu@intel.com>
912
913 PR ld/22135
914 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
915 to indicate if conversion is performed.
916 (elf_i386_check_relocs): Cache section contents and relocations
917 if conversion is performed.
918 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
919 contents and relocations if conversion is performed.
920
4d465c68
NC
9212017-09-14 Nick Clifton <nickc@redhat.com>
922
923 PR binutils/22113
924 * peXXigen.c (pe_print_idata): Extend check for HintName vector
925 entries.
926
f47432d4
L
9272017-09-13 H.J. Lu <hongjiu.lu@intel.com>
928
929 * elfxx-x86.h: Fix a typo in comments.
930
4ec521f2
KLC
9312017-09-09 Kamil Rytarowski <n54@gmx.com>
932
933 * elf32-nds32.c: Rename __BIT() to N32_BIT().
934
2420fff6
AM
9352017-09-09 Alan Modra <amodra@gmail.com>
936
937 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
938 plt_stub_align.
939
c5bce5c6
L
9402017-09-09 H.J. Lu <hongjiu.lu@intel.com>
941
942 * elf32-i386.c (elf_i386_relocate_section): Update usage of
943 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
944 (elf_i386_finish_dynamic_symbol): Likewise.
945 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
946 (elf_x86_64_finish_dynamic_symbol): Likewise.
947 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
948 (_bfd_x86_elf_fixup_symbol): Likewise.
949
8fbf0ba1
L
9502017-09-09 H.J. Lu <hongjiu.lu@intel.com>
951
952 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
953 check has_non_got_reloc.
954
0a27fed7
L
9552017-09-09 H.J. Lu <hongjiu.lu@intel.com>
956
957 PR ld/22115
958 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
959 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
960 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
961 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
962 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
963 and linker_def on __ehdr_start if it is referenced and not
964 defined.
965 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
966 and return TRUE when building executable, if a symbol has
967 non-GOT/non-PLT relocations in text section or there is no
968 dynamic linker.
969 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
970
c7df954f
L
9712017-09-08 H.J. Lu <hongjiu.lu@intel.com>
972
973 * elfxx-x86.h: Update comments.
974
1de031c8
L
9752017-09-08 H.J. Lu <hongjiu.lu@intel.com>
976
977 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
978 elf_x86_plt_layout_table with elf_x86_init_table.
979 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
980 Likewise.
981 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
982 Likewise.
983 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
984 (elf_x86_init_table): This.
985 (_bfd_x86_elf_link_setup_gnu_properties): Replace
986 elf_x86_plt_layout_table with elf_x86_init_table.
987
7a382c1c
L
9882017-09-07 H.J. Lu <hongjiu.lu@intel.com>
989
990 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
991 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
992 * configure: Regenerated.
993 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
994 and r_sym fields of plt_layout.
995 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
996 Likewise.
997 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
998 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
999 r_info nor r_sym fields.
1000 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1001 fields of htab.
1002 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1003
9eb7b0ac
PD
10042017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1005
1006 * (_bfd_riscv_relax_align): Call bfd_set_error and
1007 print an error message when unable to relax a .align directive.
1008
b1308d2c
PD
10092017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1010
1011 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1012 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1013 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1014 R_RISCV_PCREL_HI20 relocs, and pass the result to
1015 riscv_record_pcrel_hi_reloc.
1016
6999821f
L
10172017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1018
1019 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1020 r_type_p. Remove the converted argument. Replace
1021 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1022 the new relocation type via r_type_p.
1023 (elf_i386_relocate_section): Likewise.
1024 (elf_i386_finish_dynamic_symbol): Likewise.
1025 (need_convert_load): Removed.
1026 (check_relocs_failed): Updated.
1027 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1028 instead of setting need_convert_load.
1029 (_bfd_i386_elf_convert_load): Removed.
1030 * elf64-x86-64.c (need_convert_load): Removed.
1031 (check_relocs_failed): Updated.
1032 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1033 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1034 Return the new relocation type via r_type_p.
1035 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1036 instead of setting need_convert_load.
1037 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1038 been converted.
1039 (_bfd_x86_64_elf_convert_load): Removed.
1040 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1041 with SYMBOL_REFERENCES_LOCAL_P.
1042 (elf_x86_64_finish_dynamic_symbol): Likewise.
1043 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1044 set convert_load.
1045 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1046 (_bfd_x86_elf_link_symbol_references_local): New function.
1047 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1048 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1049 SYMBOL_REFERENCES_LOCAL_P.
1050 (elf_x86_link_hash_entry): Add local_ref.
1051 (elf_x86_link_hash_table): Remove convert_load.
1052 (_bfd_i386_elf_convert_load): Removed.
1053 (_bfd_x86_64_elf_convert_load): Likewise.
1054 (_bfd_x86_elf_link_symbol_references_local): New.
1055
78984959
L
10562017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1057
1058 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1059 (elf_x86_64_info_to_howto): Get the real relocation type by
1060 masking out R_X86_64_converted_reloc_bit.
1061 (elf_x86_64_check_tls_transition): Get the real relocation type
1062 by masking out R_X86_64_converted_reloc_bit.
1063 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1064 instead of setting converted_reloc.
1065 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1066 instead of converted_reloc. Get the real relocation type by
1067 masking out R_X86_64_converted_reloc_bit.
1068 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1069 R_X86_64_converted_reloc_bit is valid.
1070 * elfxx-x86.h (converted_reloc): Removed.
1071
419414ea
L
10722017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1073
1074 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1075 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1076 to get the relocation type again.
1077 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1078 r_type when calling elf_x86_64_tls_transition. Don't use
1079 ELF32_R_TYPE to get the relocation type again.
1080
dc089072
L
10812017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1082
1083 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1084 converted_reloc.
1085
8b43e456
L
10862017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1087
1088 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1089 argument. Don't check relocation overflow. Avoid relocation
1090 overflow if --no-relax is used. Set converted_reloc on symbol
1091 if a GOTPCREL relocation is converted.
1092 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1093 --no-relax if GOTPCREL relocation conversion leads to relocation
1094 overflow.
1095 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1096
83eef883
AFB
10972017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1098 Edmar Wienskoski <edmar.wienskoski@nxp.com
1099
1100 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1101 (ppc_elf_check_relocs): Handle it.
1102 (ppc_elf_vle_split20): New function.
1103 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1104
0e30d991
L
11052017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1106
1107 PR ld/22071
1108 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1109 for x86-64 if GOT_TLS_GDESC_P is true.
1110
1cf58434
AM
11112017-09-03 Alan Modra <amodra@gmail.com>
1112
1113 PR 22067
1114 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1115
f04bdfa7
L
11162017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1117
1118 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1119 tls_get_addr for x86-64 in one place.
1120
2ac3a7f5
L
11212017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1122
1123 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1124 with elfxx-x86.lo for 64-bit BFD.
1125 * configure: Regenerated.
1126
d47a8026
L
11272017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1128
1129 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1130 (_bfd_i386_elf_convert_load): This. Remove static.
1131 (elf_i386_size_dynamic_sections): Removed.
1132 (elf_backend_size_dynamic_sections): Likewise.
1133 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1134 (_bfd_x86_64_elf_convert_load): This. Remove static.
1135 (elf_x86_64_size_dynamic_sections): Removed.
1136 (elf_backend_size_dynamic_sections): Likewise.
1137 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1138 (elf_x86_allocate_dynrelocs): This. Make it static.
1139 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1140 (elf_x86_allocate_local_dynreloc): This. Make it static.
1141 (elf_i386_is_reloc_section): New function.
1142 (elf_x86_64_is_reloc_section): Likewise.
1143 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1144 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1145 Rearrange got_entry_size initialization.
1146 (_bfd_x86_elf_size_dynamic_sections): New function.
1147 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1148 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1149 (_bfd_i386_elf_convert_load): New.
1150 (_bfd_x86_64_elf_convert_load): Likewise.
1151 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1152 (elf_backend_size_dynamic_sections): Likewise.
1153 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1154 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1155
2926eb2c
L
11562017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1157
1158 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1159 update comments.
1160
92c10f5f
L
11612017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1162
1163 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1164 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1165
aa595247
L
11662017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1167
1168 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1169 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1170 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1171 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1172 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1173 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1174
b9ce864c
L
11752017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1176
1177 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1178 (elf_i386_allocate_local_dynrelocs): Likewise.
1179 (elf_i386_size_dynamic_sections): Replace
1180 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1181 with _bfd_x86_elf_allocate_dynrelocs and
1182 _bfd_x86_elf_allocate_local_dynrelocs.
1183 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1184 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1185 (elf_x86_64_size_dynamic_sections): Replace
1186 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1187 with _bfd_x86_elf_allocate_dynrelocs and
1188 _bfd_x86_elf_allocate_local_dynrelocs.
1189 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1190 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1191 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1192 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1193
fe53b4a4
L
11942017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1195
1196 * elf32-i386.c (is_i386_elf): Removed.
1197 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1198 (elf_i386_size_dynamic_sections): Likewise.
1199 (elf_i386_relocate_section): Likewise.
1200 * elf64-x86-64.c (is_x86_64_elf): Removed.
1201 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1202 is_x86_elf.
1203 (elf_x86_64_size_dynamic_sections): Likewise.
1204 (elf_x86_64_relocate_section): Likewise.
1205 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1206 target_id.
1207 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1208 (is_x86_elf): New.
1209
9ff114ca
L
12102017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1211
1212 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1213 (elf_i386_allocate_dynrelocs): Replace
1214 elf_i386_compute_jump_table_size with
1215 elf_x86_compute_jump_table_size.
1216 (elf_i386_size_dynamic_sections): Likewise.
1217 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1218 (elf_x86_64_allocate_dynrelocs): Replace
1219 elf_x86_64_compute_jump_table_size with
1220 elf_x86_compute_jump_table_size.
1221 (elf_x86_64_size_dynamic_sections): Likewise.
1222 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1223 got_entry_size.
1224 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1225 (elf_x86_compute_jump_table_size): New.
1226
503294e7
L
12272017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1228
1229 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1230 sizeof_reloc.
1231 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1232 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1233
9a742a90
L
12342017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1235
1236 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1237 with htab->is_vxworks.
1238 (elf_i386_size_dynamic_sections): Likewise.
1239 (elf_i386_relocate_section): Likewise.
1240 (elf_i386_finish_dynamic_symbol): Likewise.
1241 (elf_i386_finish_dynamic_sections): Likewise.
1242
6b9553e2
L
12432017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1244
1245 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1246 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1247 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1248 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1249 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1250 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1251 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1252 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1253
ad71ce8d
L
12542017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1255
1256 PR ld/22064
1257 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1258 ELF_COMMON_DEF_P for common symbols.
1259
96d01d93
AM
12602017-09-02 Alan Modra <amodra@gmail.com>
1261
1262 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1263 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1264 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1265
4f501a24
L
12662017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1267
1268 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1269 (elf_backend_gc_mark_hook): Likewise.
1270 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1271 (elf_backend_gc_mark_hook): Likewise.
1272 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1273 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1274 (elf_backend_gc_mark_hook): Likewise.
1275
eeb2f20a
L
12762017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1277
1278 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1279 (elf_backend_adjust_dynamic_symbol): Likewise.
1280 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1281 (elf_backend_adjust_dynamic_symbol): Likewise.
1282 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1283 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1284 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1285 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1286 (elf_backend_adjust_dynamic_symbol): Likewise.
1287
c6295c22
L
12882017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1289
1290 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1291 comments.
1292
39946cc2
L
12932017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1294
1295 * elf32-i386.c (elf_i386_mkobject): Removed.
1296 (bfd_elf32_mkobject): Likewise.
1297 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1298 (bfd_elf64_mkobject): Likewise.
1299 (bfd_elf32_mkobject): Likewise.
1300 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
18da07cd 1301 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
39946cc2
L
1302 (bfd_elf64_mkobject): Likewise.
1303 (bfd_elf32_mkobject): Likewise.
1304
a6798bab
L
13052017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1306
1307 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1308 Call _bfd_x86_elf_link_setup_gnu_properties.
1309 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1310 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1311 entries.
1312 (elf_x86_64_non_lazy_plt): Likewise.
1313 (elf_x86_64_lazy_bnd_plt): Likewise.
1314 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1315 (elf_x86_64_lazy_ibt_plt): Likewise.
1316 (elf_x32_lazy_ibt_plt): Likewise.
1317 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1318 (elf_x32_non_lazy_ibt_plt): Likewise.
1319 (elf_x86_64_nacl_plt): Likewise.
1320 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1321 _bfd_x86_elf_link_setup_gnu_properties.
1322 * elfxx-x86.c: Include elf-vxworks.h".
1323 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1324 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1325 comments for pic_plt0_entry and pic_plt_entry.
1326 (elf_x86_non_lazy_plt_layout): Likewise.
1327 (elf_x86_plt_layout_table): New.
1328 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1329
e10c9c62
L
13302017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1331
1332 PR ld/22061
1333 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1334 .eh_frame section for the second PLT.
1335 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1336 alignment of .eh_frame section for the second PLT.
1337
7e8b6008
NC
13382017-09-01 Nick Clifton <nickc@redhat.com>
1339
1340 PR 22059
1341 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1342 structure.
1343
2a143b99
NC
13442017-09-01 Nick Clifton <nickc@redhat.com>
1345
1346 PR 22058
1347 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1348 attribute buffer is NUL terminated.
1349
e4f27230
NC
13502017-08-31 Nick Clifton <nickc@redhat.com>
1351
1352 PR 22047
1353 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1354 to dwarf string sections.
1355
686335cd
AM
13562017-08-31 Alan Modra <amodra@gmail.com>
1357
1358 * po/SRC-POTFILES.in: Regenerate.
1359
9866ffe2
AM
13602017-08-31 Alan Modra <amodra@gmail.com>
1361
1362 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1363 for a section containing just a terminator. Allow multiple
1364 terminators at end of section.
1365 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1366 sections when not adding alignment. Assert on terminator in
1367 the middle of FDEs.
1368
af471f82
AM
13692017-08-31 Alan Modra <amodra@gmail.com>
1370
1371 PR 21441
1372 PR 22048
1373 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1374 terminators.
1375
3321e42b
L
13762017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1377
1378 * configure.ac (bfd_backends): Add elf64.lo together with
1379 elfxx-x86.lo for 64-bit BFD.
1380 * configure: Regenerated.
1381
ef32532f
JB
13822017-08-31 James Bowman <james.bowman@ftdichip.com>
1383
1384 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1385 for R_FT32_18.
1386
e234de6b
AM
13872017-08-31 Alan Modra <amodra@gmail.com>
1388
1389 PR binutils/22032
1390 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1391 before _close_and_cleanup. Call iovec->bclose after.
1392 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1393
f493882d
L
13942017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1395
1396 * elf32-i386.c (elf_i386_plt_type): Removed.
1397 (elf_i386_plt): Likewise.
1398 (elf_i386_get_synthetic_symtab): Updated. Call
1399 _bfd_x86_elf_get_synthetic_symtab.
1400 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1401 (elf_x86_64_plt): Likewise.
1402 (elf_x86_64_get_synthetic_symtab): Updated. Call
1403 _bfd_x86_elf_get_synthetic_symtab.
1404 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1405 (elf_x86_64_get_plt_got_vma): Likewise.
1406 (elf_i386_valid_plt_reloc_p): Likewise.
1407 (elf_x86_64_valid_plt_reloc_p): Likewise.
1408 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1409 * elfxx-x86.h (elf_x86_plt_type): New.
1410 (elf_x86_plt): Likewise.
1411 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1412
5b86dbf4
L
14132017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1414
1415 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1416 target_id instead of elf_machine_code.
1417
765e526c
L
14182017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1419
1420 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1421 (elf_i386_lazy_plt_layout): Likewise.
1422 (elf_i386_non_lazy_plt_layout): Likewise.
1423 (elf_i386_plt_layout): Likewise.
1424 (elf_i386_link_hash_table): Likewise.
1425 (elf_i386_next_tls_desc_index): Likewise.
1426 (elf_i386_srelplt2): Likewise.
1427 (elf_i386_plt): Likewise.
1428 (elf_i386_lazy_plt): Likewise.
1429 (elf_i386_non_lazy_plt): Likewise.
1430 (elf_i386_link_hash_table_create): Likewise.
1431 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1432 (elf_i386_lazy_plt): Updated.
1433 (elf_i386_non_lazy_plt): Likewise.
1434 (elf_i386_lazy_ibt_plt): Likewise.
1435 (elf_i386_non_lazy_ibt_plt): Likewise.
1436 (elf_i386_allocate_dynrelocs): Likewise.
1437 (elf_i386_size_dynamic_sections): Likewise.
1438 (elf_i386_relocate_section): Likewise.
1439 (elf_i386_finish_dynamic_symbol): Likewise.
1440 (elf_i386_finish_dynamic_sections): Likewise.
1441 (elf_i386_get_synthetic_symtab): Likewise.
1442 (elf_i386_link_setup_gnu_properties): Likewise.
1443 (elf_i386_nacl_plt): Likewise.
1444 * elf64-x86-64.c (ABI_64_P): Removed.
1445 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1446 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1447 (elf_x86_64_lazy_plt_layout): Likewise.
1448 (elf_x86_64_non_lazy_plt_layout): Likewise.
1449 (elf_x86_64_plt_layout): Likewise.
1450 (elf_x86_64_link_hash_table): Likewise.
1451 (elf_x86_64_plt): Likewise.
1452 (elf_x86_64_lazy_plt): Likewise.
1453 (elf_x86_64_non_lazy_plt): Likewise.
1454 (elf_x86_64_link_hash_table_create): Likewise.
1455 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1456 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1457 (elf_x86_64_lazy_plt): Updated.
1458 (elf_x86_64_non_lazy_plt): Likewise.
1459 (elf_x86_64_lazy_bnd_plt): Likewise.
1460 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1461 (elf_x86_64_lazy_ibt_plt): Likewise.
1462 (elf_x32_lazy_ibt_plt): Likewise.
1463 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1464 (elf_x32_non_lazy_ibt_plt): Likewise.
1465 (elf_x86_64_allocate_dynrelocs): Likewise.
1466 (elf_x86_64_size_dynamic_sections): Likewise.
1467 (elf_x86_64_relocate_section): Likewise.
1468 (elf_x86_64_finish_dynamic_symbol): Likewise.
1469 (elf_x86_64_finish_dynamic_sections): Likewise.
1470 (elf_x86_64_get_synthetic_symtab): Likewise.
1471 (elf_x86_64_link_setup_gnu_properties): Likewise.
1472 (elf_x86_64_nacl_plt): Likewise.
1473 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1474 "elf/x86-64.h".
1475 (ELF32_DYNAMIC_INTERPRETER): New.
1476 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1477 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1478 (_bfd_x86_elf_link_hash_table_create): Likewise.
1479 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1480 (elf_x86_link_hash_table_free): This. Make it static.
1481 * elfxx-x86.h: Don't include "objalloc.h".
1482 (ABI_64_P): New.
1483 (elf_x86_lazy_plt_layout): Likewise.
1484 (elf_x86_non_lazy_plt_layout): Likewise.
1485 (elf_x86_plt_layout): Likewise.
1486 (_bfd_x86_elf_link_hash_table_create): Likewise.
1487 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1488 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1489 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1490 srelplt2 and next_tls_desc_index.
1491 (_bfd_x86_elf_link_hash_table_free): Removed.
1492
70e65ca8
MR
14932017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1494
1495 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1496 branch offset interpretation.
1497
7c0ed396
L
14982017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1499
1500 PR binutils/22032
1501 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1502
0f2425c4
L
15032017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1504
1505 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1506 (elf_x86_64_srelplt2): Likewise.
1507
9a23f96e
AM
15082017-08-30 Alan Modra <amodra@gmail.com>
1509
1510 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1511 (ppc64_elf_tls_optimize): Set it.
1512 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1513 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1514 addis would add zero.
1515 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1516 (ppc_elf_tls_optimize): Set it.
1517 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1518 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1519
b9f04fe0
AM
15202017-08-30 Alan Modra <amodra@gmail.com>
1521
1522 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1523 __tls_get_addr call sequences to LE, don't move the addi down
1524 to the nop. Replace the bl with addi and leave the nop alone.
1525
5f0f0847
L
15262017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1527
1528 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1529 Re-indent.
1530 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1531 Likewise.
1532 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1533
443701f5
L
15342017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1535
1536 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1537 (BFD64_BACKENDS): Likewise.
1538 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1539 (BFD64_BACKENDS_CFILES): Likewise.
1540 * Makefile.in: Regenerated.
1541 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1542 elf32-i386.lo and elf64-x86-64.lo.
1543 * configure: Regenerated.
1544 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1545 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1546 "objalloc.h" and "hashtab.h".
1547 (ELIMINATE_COPY_RELOCS): Removed.
1548 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1549 (SYMBOL_NO_COPYRELOC): Likewise.
1550 (elf_i386_link_hash_entry): Likewise.
1551 (GOT_UNKNOWN): Likewise.
1552 (GOT_NORMAL): Likewise.
1553 (GOT_TLS_GD): Likewise.
1554 (elf_i386_hash_entry): Likewise.
1555 (elf_i386_obj_tdata): Likewise.
1556 (elf_i386_tdata): Likewise.
1557 (elf_i386_local_got_tls_type): Likewise.
1558 (elf_i386_local_tlsdesc_gotent): Likewise.
1559 (elf_i386_hash_table): Likewise.
1560 (elf_i386_link_hash_newfunc): Likewise.
1561 (elf_i386_local_htab_hash): Likewise.
1562 (elf_i386_local_htab_eq): Likewise.
1563 (elf_i386_get_local_sym_hash): Likewise.
1564 (elf_i386_link_hash_table_free): Likewise.
1565 (elf_i386_copy_indirect_symbol): Likewise.
1566 (elf_i386_fixup_symbol): Likewise.
1567 (elf_i386_readonly_dynrelocs): Likewise.
1568 (elf_i386_always_size_sections): Likewise.
1569 (elf_i386_set_tls_module_base): Likewise.
1570 (elf_i386_dtpoff_base): Likewise.
1571 (compare_relocs): Likewise.
1572 (elf_i386_hash_symbol): Likewise.
1573 (elf_i386_parse_gnu_properties): Likewise.
1574 (elf_i386_merge_gnu_properties): Likewise.
1575 (elf_i386_link_check_relocs): Likewise.
1576 (elf_i386_merge_symbol_attribute): Likewise.
1577 (bfd_elf32_bfd_link_check_relocs): Likewise.
1578 (elf_backend_copy_indirect_symbol): Likewise.
1579 (elf_backend_always_size_sections): Likewise.
1580 (elf_backend_omit_section_dynsym): Likewise.
1581 (elf_backend_hash_symbol): Likewise.
1582 (elf_backend_fixup_symbol): Likewise.
1583 (elf_backend_parse_gnu_properties): Likewise.
1584 (elf_backend_merge_gnu_properties): Likewise.
1585 (elf_backend_merge_symbol_attribute): Likewise.
1586 (elf_i386_mkobject): Updated.
1587 (elf_i386_link_hash_table_create): Likewise.
1588 (elf_i386_check_tls_transition): Likewise.
1589 (elf_i386_tls_transition): Likewise.
1590 (elf_i386_convert_load_reloc): Likewise.
1591 (elf_i386_check_relocs): Likewise.
1592 (elf_i386_adjust_dynamic_symbol): Likewise.
1593 (elf_i386_allocate_dynrelocs): Likewise.
1594 (elf_i386_convert_load): Likewise.
1595 (elf_i386_size_dynamic_sections): Likewise.
1596 (elf_i386_relocate_section): Likewise.
1597 (elf_i386_finish_dynamic_symbol ): Likewise.
1598 (elf_i386_finish_dynamic_sections): Likewise.
1599 (elf_i386_output_arch_local_syms): Likewise.
1600 (elf_i386_get_synthetic_symtab): Likewise.
1601 (elf_i386_link_setup_gnu_properties): Likewise.
1602 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1603 of elf_link_hash_table, as base.
1604 (elf_i386_next_tls_desc_index): New.
1605 (elf_i386_srelplt2): Likewise.
1606 (elf_i386_plt): Likewise.
1607 (elf_i386_lazy_plt): Likewise.
1608 (elf_i386_non_lazy_plt): Likewise.
1609 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1610 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1611 "objalloc.h" and "hashtab.h".
1612 (ELIMINATE_COPY_RELOCS): Removed.
1613 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1614 (SYMBOL_NO_COPYRELOC): Likewise.
1615 (elf_x86_64_link_hash_entry): Likewise.
1616 (GOT_UNKNOWN): Likewise.
1617 (GOT_NORMAL): Likewise.
1618 (GOT_TLS_GD): Likewise.
1619 (elf_x86_64_hash_entry): Likewise.
1620 (elf_x86_64_obj_tdata): Likewise.
1621 (elf_x86_64_tdata): Likewise.
1622 (elf_x86_64_local_got_tls_type): Likewise.
1623 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1624 (elf_x86_64_hash_table): Likewise.
1625 (elf_x86_64_link_hash_newfunc): Likewise.
1626 (elf_x86_64_local_htab_hash): Likewise.
1627 (elf_x86_64_local_htab_eq): Likewise.
1628 (elf_x86_64_get_local_sym_hash): Likewise.
1629 (elf_x86_64_link_hash_table_free): Likewise.
1630 (elf_x86_64_copy_indirect_symbol): Likewise.
1631 (elf_x86_64_fixup_symbol): Likewise.
1632 (elf_x86_64_readonly_dynrelocs): Likewise.
1633 (elf_x86_64_always_size_sections): Likewise.
1634 (elf_x86_64_set_tls_module_base): Likewise.
1635 (elf_x86_64_dtpoff_base): Likewise.
1636 (compare_relocs): Likewise.
1637 (elf_x86_64_merge_symbol_attribute): Likewise.
1638 (elf_x86_64_hash_symbol): Likewise.
1639 (elf_x86_64_parse_gnu_properties): Likewise.
1640 (elf_x86_64_merge_gnu_properties): Likewise.
1641 (elf_x86_64_link_check_relocs): Likewise.
1642 (elf_backend_copy_indirect_symbol): Likewise.
1643 (elf_backend_always_size_sections): Likewise.
1644 (bfd_elf64_bfd_link_check_relocs): Likewise.
1645 (elf_backend_merge_symbol_attribute): Likewise.
1646 (elf_backend_hash_symbol): Likewise.
1647 (elf_backend_omit_section_dynsym): Likewise.
1648 (elf_backend_fixup_symbol): Likewise.
1649 (elf_backend_parse_gnu_properties): Likewise.
1650 (elf_backend_merge_gnu_properties): Likewise.
1651 (bfd_elf32_bfd_link_check_relocs): Likewise.
1652 (elf_x86_64_mkobject): Updated.
1653 (elf_x86_64_link_hash_table_create): Likewise.
1654 (elf_x86_64_check_tls_transition): Likewise.
1655 (elf_x86_64_tls_transition): Likewise.
1656 (elf_x86_64_convert_load_reloc): Likewise.
1657 (elf_x86_64_check_relocs): Likewise.
1658 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1659 (elf_x86_64_allocate_dynrelocs): Likewise.
1660 (elf_x86_64_convert_load): Likewise.
1661 (elf_x86_64_size_dynamic_sections): Likewise.
1662 (elf_x86_64_relocate_section): Likewise.
1663 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1664 (elf_x86_64_finish_dynamic_sections): Likewise.
1665 (elf_x86_64_output_arch_local_syms): Likewise.
1666 (elf_x86_64_get_synthetic_symtab): Likewise.
1667 (elf_x86_64_link_setup_gnu_properties): Likewise.
1668 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1669 instead of elf_link_hash_table, as base.
1670 (elf_x86_64_next_tls_desc_index): New.
1671 (elf_x86_64_srelplt2): Likewise.
1672 (elf_x86_64_plt): Likewise.
1673 (elf_x86_64_lazy_plt): Likewise.
1674 (elf_x86_64_non_lazy_plt): Likewise.
1675 * elfxx-x86.c: New file.
1676 * elfxx-x86.h: Likewise.
1677
823cb067
L
16782017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1679
1680 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1681 return.
1682 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1683
37c0b6ee
L
16842017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1685
1686 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1687 sections before checking dynamic relocations and free invalid
1688 PLT section contents.
1689 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1690
0fb0a767
L
16912017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1692
1693 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1694 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1695
90efb642
L
16962017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1697
1698 PR binutils/22018
1699 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1700 PLT section size.
1701 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1702
596dc58f
L
17032017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1704
1705 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1706 def_protected.
1707 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1708
a5b4ee94
L
17092017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1710
1711 PR ld/21997
1712 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1713 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1714 Add a has_no_copy_on_protected bitfield.
1715 (elf_has_no_copy_on_protected): New.
1716 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1717 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1718 (elf_merge_gnu_property_list): Likewise.
1719 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1720 to FALSE for elf_has_no_copy_on_protected.
1721 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1722 (elf_i386_link_hash_entry): Add def_protected.
1723 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1724 when checking info->nocopyreloc.
1725 (elf_i386_link_setup_gnu_properties): Don't set
1726 extern_protected_data here.
1727 (elf_i386_merge_symbol_attribute): New function.
1728 (elf_backend_merge_symbol_attribute): New.
1729 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1730 (elf_x86_64_link_hash_entry): Add def_protected.
1731 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1732 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1733 when checking info->nocopyreloc.
1734 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1735 relocation run-time overflow and unresolvable R_X86_64_32S
1736 relocation against protected data symbol defined in shared object
1737 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1738 (elf_x86_64_link_setup_gnu_properties): Don't set
1739 extern_protected_data here.
1740 (elf_x86_64_merge_symbol_attribute): New function.
1741 (elf_backend_merge_symbol_attribute): New.
1742
7c8bbca5
AM
17432017-08-26 Alan Modra <amodra@gmail.com>
1744
1745 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1746 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1747 (ppc_elf_relocate_section): Comment fix.
1748 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1749 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1750 Support dynamic relocs for TPREL16 when non-pic too.
1751 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1752 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1753 when non-pic too.
1754
5fdda9d6
L
17552017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1756
1757 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1758 "symbol" in comments.
1759 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1760
7073b5b9
L
17612017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1762
1763 PR ld/22001
1764 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1765 R_X86_64_PC32 relocation run-time overflow and unresolvable
1766 R_X86_64_32S relocation with -z nocopyreloc.
1767
34bb2571
L
17682017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1769
1770 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1771 Undefined symbols may not have a type.
1772 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1773
aab921ad
L
17742017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1775
1776 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1777 bfd_link_info. Report shared, PIE or PDE object based on
1778 bfd_link_info.
1779 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1780 (elf_x86_64_relocate_section): Likewise.
1781
b1bb697e
L
17822017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1783
1784 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1785 for function symbols.
1786 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1787
73784fa5
L
17882017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1789
1790 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1791 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1792 is set on any input relocatable file.
1793 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1794
46434633
AM
17952017-08-23 Alan Modra <amodra@gmail.com>
1796
1797 PR 21988
1798 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1799 ensure_undefweak_dynamic. Handle undefined too.
1800 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1801 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1802 (allocate_dynrelocs): Discard undefined non-default visibility
1803 relocs first. Make undefined syms dynamic. Tidy goto.
1804
487b6440
AM
18052017-08-21 Alan Modra <amodra@gmail.com>
1806 H.J. Lu <hongjiu.lu@intel.com>
1807
1808 PR ld/21964
1809 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1810 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1811
284d826d
HPN
18122017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1813
1814 PR ld/20125
1815 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1816 undefined weak symbols.
1817
de259397
NC
18182017-08-18 Nick Clifton <nickc@redhat.com>
1819
1820 PR binutils/21962
1821 * tekhex.c (getsym): Fix check for source pointer walking off the
1822 end of the input buffer.
1823
545bc2b3
SN
18242017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1825
1826 PR ld/18808
1827 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1828 relocations in debug sections, change abort to _bfd_error_handler.
1829
0c54f692
NC
18302017-08-14 Nick Clifton <nickc@redhat.com>
1831
1832 PR 21957
1833 * elf.c (setup_group): Check for an empty or very small group
1834 section.
1835 * po/bfd.pot: Regenerate.
1836
79a94a2a
AM
18372017-08-14 Alan Modra <amodra@gmail.com>
1838
1839 PR 21441
1840 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1841 alignment padding here.
1842 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1843 in a reverse pass over sections.
1844
98c5dfc9
L
18452017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1846
1847 PR binutils/21943
1848 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1849 for @plt suffixes first.
1850 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1851
24d3e51b
NC
18522017-08-08 Nick Clifton <nickc@redhat.com>
1853
1854 PR 21916
1855 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1856 small section lengths.
1857 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1858 table.
1859 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1860 there is enough data present in the note.
1861
206c9c79
AM
18622017-08-08 Alan Modra <amodra@gmail.com>
1863
1864 PR 21017
1865 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1866 got.refcount for GOTOFF relocs, just create .got section.
1867
2980ccad
L
18682017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1869
1870 * elflink.c (elf_link_add_object_symbols): Move common symbol
1871 check after bed->common_definition.
1872
b3293efa
AM
18732017-08-07 Alan Modra <amodra@gmail.com>
1874
1875 PR 21910
1876 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1877 needed to define various dynamic tags have been discarded.
1878
b7a18930
NC
18792017-08-07 Nick Clifton <nickc@redhat.com>
1880
1881 PR 21884
1882 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1883 has not been set then use the bfd returned by
1884 _bfd_elf_link_setup_gnu_properties. If that is null then search
1885 through all the input bfds selecting the first normal, ELF format
1886 one.
1887 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1888
1d4af308
L
18892017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1890
1891 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1892 to 1 bit.
1893 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1894 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1895 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1896 (elf_i386_link_check_relocs): New function.
1897 (bfd_elf32_bfd_link_check_relocs): New.
1898 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1899 to 1 bit.
1900 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1901 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1902 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1903 (elf_x86_64_link_check_relocs): New function.
1904 (bfd_elf64_bfd_link_check_relocs): New.
1905 (bfd_elf32_bfd_link_check_relocs): Likewise.
1906
a4819f54
L
19072017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1908
1909 PR ld/21903:
1910 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1911 as undefined for --no-define-common.
1912
55ef6584
AM
19132017-08-05 Alan Modra <amodra@gmail.com>
1914
1915 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1916 hppa_link_hash_table.
1917
d84ed528
MF
19182017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1919
1920 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1921 entries for sysregs with negative indices.
1922
1ef692ea
AK
19232017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1924
1925 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1926 isn't the S/390 specific elf data.
1927 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1928
57593436
KLC
19292017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1930
1931 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1932 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1933 [R_RISCV_ADD16]: Likewise.
1934 [R_RISCV_ADD32]: Likewise.
1935 [R_RISCV_ADD64]: Likewise.
1936 [R_RISCV_SUB6]: Likewise.
1937 [R_RISCV_SUB8]: Likewise.
1938 [R_RISCV_SUB16]: Likewise.
1939 [R_RISCV_SUB32]: Likewise.
1940 [R_RISCV_SUB64]: Likewise.
1941
d44c746a
AM
19422017-07-31 Alan Modra <amodra@gmail.com>
1943
1944 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1945 without ld.so checks.
1946
8b5f1ed8
AM
19472017-07-29 Alan Modra <amodra@gmail.com>
1948
1949 PR 21847
1950 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1951 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1952 (is_elfv2_localentry0): Test non_zero_localentry.
1953 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1954
894dde0b
AK
19552017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1956
1957 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1958 pointer check for htab->elf.irelplt.
1959 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1960
8bdf0be1
NC
19612017-07-27 Nick Clifton <nickc@redhat.com>
1962
1963 PR 21840
1964 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1965 size is -1.
1966 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1967 with error return.
1968 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1969 are NULL.
1970 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1971 of end pointer.
1972 (evax_bfd_print_emh): Check for invalid string lengths.
1973
c26bb067
NC
19742017-07-25 Nick Clifton <nickc@redhat.com>
1975
1976 * po/fr.po: Updated French translation.
1977
cfe7b9bd
BG
19782017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1979
1980 PR 21824
1981 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1982 16-bit absolute branches into 10-bit pc-relative branches on the
1983 MSP430 as well as the MSP430X.
1984
d4aaa2a0
AM
19852017-07-25 Alan Modra <amodra@gmail.com>
1986
1987 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1988 (stub_eh_frame_size): New function.
1989 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1990 (group_sections): Init group tls_get_addr_opt_bctrl.
1991 (ppc64_elf_size_stubs): Update sizing and initialization of
1992 .eh_frame. Iteration over stubs via group list.
1993 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1994 (ppc64_elf_finish_dynamic_sections): Update finalization of
1995 .eh_frame.
1996
ca4cf9b9
NC
19972017-07-24 Nick Clifton <nickc@redhat.com>
1998
1999 PR 21813
2000 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2001 of the relocs to the canonicalize_one_reloc routine.
2002 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2003 for the _bfd_mach_o_canonicalize_one_reloc field.
2004 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2005 res_base parameter. Use to check for corrupt pair relocs.
2006 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2007 Likewise.
2008 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2009 Likewise.
2010 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2011 Likewise.
2012
2013 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2014 enough data in the record before attempting to parse it.
2015 (_bfd_vms_slurp_eeom): Likewise.
2016
2017 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2018 (image_set_ptr): Likewise.
2019 (alpha_vms_slurp_relocs): Likewise.
2020
8a2df5e2
NC
2021 (alpha_vms_object_p): Check for a truncated record.
2022
47aeb64c
NC
20232017-07-24 Nick Clifton <nickc@redhat.com>
2024
2025 PR 21803
2026 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2027 an unrecognized reloc and sets the bfd_error value.
2028 * libbfd.h: Regenerate.
2029 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2030 function.
2031 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2032 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2033 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2034 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2035 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2036
15a3a14f
AM
20372017-07-23 Alan Modra <amodra@gmail.com>
2038
2039 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2040 restore of LR.
2041
f2e6a843
SN
20422017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2043
2044 PR ld/18841
2045 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2046 reloc_class_ifunc for ifunc symbols.
2047
909e4e71
NC
20482017-07-19 Nick Clifton <nickc@redhat.com>
2049
2050 PR 21787
2051 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2052 correct magic bytes at the start, set the error to wrong format
2053 and clear the format selector before returning NULL.
2054
29866fa1
NC
20552017-07-19 Nick Clifton <nickc@redhat.com>
2056
2057 PR 21786
2058 * coff-rs6000.c (_bfd_strntol): New function.
2059 (_bfd_strntoll): New function.
2060 (GET_VALUE_IN_FIELD): New macro.
2061 (EQ_VALUE_IN_FIELD): new macro.
2062 (_bfd_xcoff_slurp_armap): Use new macros.
2063 (_bfd_xcoff_archive_p): Likewise.
2064 (_bfd_xcoff_read_ar_hdr): Likewise.
2065 (_bfd_xcoff_openr_next_archived_file): Likewise.
2066 (_bfd_xcoff_stat_arch_elt): Likewise.
6c4e7b6b
NC
2067 * coff64-rs6000.c (_bfd_strntol): New function.
2068 (_bfd_strntoll): New function.
2069 (GET_VALUE_IN_FIELD): New macro.
2070 (xcoff64_slurp_armap): Use new macros.
29866fa1 2071
684d5a10
JEM
20722017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2073 John Eric Martin <John.Martin@emmicro-us.com>
2074
2075 * bfd-in2.h: Regenerate.
2076 * libbfd.h: Regenerate.
2077 * elf32-arc.c (JLI): Define.
2078 * reloc.c: Add JLI relocations.
2079
de194d85
YC
20802017-07-18 Nick Clifton <nickc@redhat.com>
2081
2082 PR 21775
2083 * coff-sh.c: Fix spelling typos.
2084 * compress.c: Likewise.
2085 * cpu-pdp11.c: Likewise.
2086 * ecofflink.c: Likewise.
2087 * elf-m10300.c: Likewise.
2088 * elf.c: Likewise.
2089 * elf32-arm.c: Likewise.
2090 * elf32-m68k.c: Likewise.
2091 * elf32-nds32.c: Likewise.
2092 * elf32-ppc.c: Likewise.
2093 * elf32-sh.c: Likewise.
2094 * elf32-v850.c: Likewise.
2095 * elf64-ppc.c: Likewise.
2096 * elf64-x86-64.c: Likewise.
2097 * elflink.c: Likewise.
2098 * elfnn-aarch64.c: Likewise.
2099 * elfxx-mips.c: Likewise.
2100 * som.c: Likewise.
2101 * sunos.c: Likewise.
2102 * vms-alpha.c: Likewise.
2103 * xcofflink.c: Likewise.
2104
e4e21d9e
NC
21052017-07-18 Nick Clifton <nickc@redhat.com>
2106
2107 PR binutils/21781
2108 * coffcode.h (handle_COMDAT): Replace abort with an error message
2109 and return.
2110
8e85f840
L
21112017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2112
2113 PR ld/21782
2114 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2115 to shared library.
2116
dd57c19c
L
21172017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2118
2119 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2120
676ee2b5
AM
21212017-07-16 Alan Modra <amodra@gmail.com>
2122
2123 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2124 __tls_index GOT entries when using __tls_get_addr_opt stub.
2125 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2126
429d795d
AM
21272017-07-12 Alan Modra <amodra@gmail.com>
2128
2129 * po/es.po: Update from translationproject.org/latest/bfd/.
2130 * po/fi.po: Likewise.
2131 * po/fr.po: Likewise.
2132 * po/id.po: Likewise.
2133 * po/ja.po: Likewise.
2134 * po/ro.po: Likewise.
2135 * po/ru.po: Likewise.
2136 * po/sr.po: Likewise.
2137 * po/sv.po: Likewise.
2138 * po/tr.po: Likewise.
2139 * po/uk.po: Likewise.
2140 * po/vi.po: Likewise.
2141 * po/zh_CN.po: Likewise.
2142 * po/hr.po: New file from translationproject.org.
2143 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2144 * configure: Regenerate.
2145
0bae9e9e
NC
21462017-07-12 Nick Clifton <nickc@redhat.com>
2147
2148 Fix compile time warnings using gcc 7.1.1.
2149 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2150 plt_name buffer.
2151 (elf_xtensa_get_gotplt_section): Increase length of got_name
2152 buffer.
2153 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2154 default return of FALSE.
2155 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2156 default return of FALSE.
2157
d42c267e
AM
21582017-07-12 Alan Modra <amodra@gmail.com>
2159
2160 * binary.c (binary_set_section_contents): Don't print filepos in
2161 error message.
2162 (coff_write_object_contents): Cast size_t for error message.
2163 (coff_slurp_line_table): Don't use bfd_vma symndx.
2164 (coff_slurp_reloc_table): Remove unneeded cast.
2165 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2166 error message.
2167 (find_abstract_instance_name): Likewise.
2168 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2169 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2170 (elf32_arm_check_relocs): Make r_symndx an int.
2171 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2172 format string.
2173 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2174 message arg.
2175 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2176 error message.
2177 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2178 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2179 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2180 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2181 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2182 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2183 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2184 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2185 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2186 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2187 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2188 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2189 and use %lu for error message.
2190 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2191 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2192 error message.
2193
2194 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2195 in error message.
2196 (elf32_arm_final_link_relocate): Likewise.
2197 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2198 * coffcode.h (styp_to_sec_flags): Likewise.
2199 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2200 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2201 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2202 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2203 (elf32_bfin_merge_private_bfd_data): Likewise.
2204 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2205 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2206 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2207 (i370_elf_relocate_section): Likewise.
2208 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2209 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2210 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2211 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2212 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2213 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2214 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2215 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2216 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2217 * ieee.c (ieee_write_id, read_id): Likewise.
2218 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2219 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2220 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2221 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2222 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2223 * stabs.c (_bfd_link_section_stabs): Likewise.
2224
2225 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2226 format.
2227 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2228 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2229 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2230 * coff-sh.c (sh_relax_section): Likewise.
2231 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2232 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2233 * coffcode.h (coff_slurp_reloc_table): Likewise.
2234 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2235 (_bfd_coff_read_string_table): Likewise.
2236 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2237 * compress.c (bfd_get_full_section_contents): Likewise.
2238 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2239 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2240 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2241 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2242 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2243 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2244 (elf32_arm_write_section): Likewise.
2245 * elf32-bfin.c (bfin_relocate_section): Likewise.
2246 (bfinfdpic_relocate_section): Likewise.
2247 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2248 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2249 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2250 (elf_i386_relocate_section): Likewise.
2251 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2252 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2253 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2254 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2255 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2256 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2257 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2258 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2259 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2260 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2261 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2262 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2263 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2264 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2265 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2266 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2267 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2268 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2269 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2270 * elf32-sh.c (sh_elf_relax_section): Likewise.
2271 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2272 (sh_elf_relocate_section): Likewise.
2273 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2274 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2275 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2276 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2277 * elf32-v850.c (v850_elf_relax_section): Likewise.
2278 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2279 (elf_vax_relocate_section): Likewise.
2280 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2281 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2282 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2283 (do_fix_for_relocatable_link): Likewise.
2284 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2285 (elf64_alpha_relax_with_lituse): Likewise.
2286 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2287 (elf_hppa_final_link_relocate): Likewise.
2288 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2289 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2290 (elf64_vms_link_add_object_symbols): Likewise.
2291 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2292 (mmix_final_link_relocate): Likewise.
2293 * elf64-s390.c (invalid_tls_insn): Likewise.
2294 (elf_s390_relocate_section): Likewise.
2295 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2296 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2297 (elf_x86_64_relocate_section): Likewise.
2298 * elfcode.h (elf_slurp_symbol_table): Likewise.
2299 * elfcore.h (elf_core_file_p): Likewise.
2300 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2301 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2302 (elfNN_aarch64_relocate_section): Likewise.
2303 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2304 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2305 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2306 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2307 (_bfd_mips_elf_relocate_section): Likewise.
2308 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2309 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2310 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2311 * ieee.c (ieee_slurp_external_symbols): Likewise.
2312 * ihex.c (ihex_write_object_content): Likewise.
2313 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2314 * merge.c (_bfd_merged_section_offset): Likewise.
2315 * mmo.c (mmo_write_loc_chunk): Likewise.
2316 (mmo_write_object_contents): Likewise.
2317 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2318 * stabs.c (_bfd_link_section_stabs): Likewise.
2319 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2320
e3fbc3da
AM
23212017-07-11 Alan Modra <amodra@gmail.com>
2322
2323 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2324
2c4d9cbe
AM
23252017-07-11 Alan Modra <amodra@gmail.com>
2326
2327 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2328 instruction" error using _bfd_error_handler, not einfo.
2329
adce5b39
NC
23302017-07-10 Nick Clifton <nickc@redhat.com>
2331
2332 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2333 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2334
e6f3b9c3
JB
23352017-07-07 John Baldwin <jhb@FreeBSD.org>
2336
2337 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2338
532cc313
AM
23392017-07-07 Alan Modra <amodra@gmail.com>
2340
2341 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2342
1cf9552b
AM
23432017-07-07 Alan Modra <amodra@gmail.com>
2344
2345 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2346 as long long. Move code replacing "ll" with "I64", and simplify.
2347
a0b7b105
L
23482017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2349
2350 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2351 to 1.
2352
1d827a72
L
23532017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2354
2355 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2356 xtime.
2357 (line_info_add_file_name): Likewise.
2358 (decode_line_info): Likewise.
2359
0d702cfe
TG
23602017-07-04 Tristan Gingold <gingold@adacore.com>
2361
2362 * version.m4: Bump version to 2.29.51
2363 * configure: Regenerate.
2364
564e46b7
JW
23652017-07-04 Jiong Wang <jiong.wang@arm.com>
2366
2367 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2368 sanity check at the head of this function.
2369
0041f7df
JK
23702017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2371
2372 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2373 dwarf_line_str_size.
2374 (struct attr_abbrev): Add field implicit_const.
2375 (dwarf_debug_sections): Add .debug_line_str.
2376 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2377 (dwarf_debug_section_assert): Add static assertion.
2378 (read_indirect_line_string): New.
2379 (read_abbrevs): Support DW_FORM_implicit_const.
2380 (is_str_attr): Support DW_FORM_line_strp.
2381 (read_attribute_value): Support DW_FORM_line_strp and
2382 DW_FORM_implicit_const.
2383 (read_attribute): Support DW_FORM_implicit_const.
2384 (line_info_add_include_dir, line_info_add_include_dir_stub):
2385 (line_info_add_file_name, read_formatted_entries): New.
2386 (decode_line_info, parse_comp_unit): Support DWARF 5.
2387 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2388
d8cd8c1f
EB
23892017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2390
2391 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2392 abort statement that was put for symbols that are not dynamic.
2393
15e6ed8c
TG
23942017-07-03 Tristan Gingold <gingold@adacore.com>
2395
2396 * po/bfd.pot: Regenerate
2397
76cfced5
AM
23982017-07-03 Alan Modra <amodra@gmail.com>
2399
2400 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2401 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2402 * elf.c (setup_group): Use "Lx" to print sh_size.
2403 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2404 unknown section type in hex.
2405 (copy_special_section_fields): Style fix.
2406 (bfd_section_from_shdr): Correct format for sh_link. Use a
2407 common error message for all the variants of unrecognized
2408 section types.
2409 (assign_file_positions_for_load_sections): Use "Lx" for lma
2410 adjust error message.
2411 (assign_file_positions_for_non_load_sections): Formatting.
2412 (rewrite_elf_program_header): Formatting. Use "Lx" for
2413 bfd_vma values in error messages.
2414 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2415 ELF_R_SYM value to type expected by format.
2416 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2417 in error messages.
2418 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2419 (elf_link_input_bfd): Use "Lx" for r_info.
2420 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2421
ce9116fd
AM
24222017-07-03 Alan Modra <amodra@gmail.com>
2423
2424 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2425 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2426 Microsoft C library variant of long long format specifier.
2427 (PRINT20): Cast value to bfd_uint64_t not long long.
2428 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2429 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2430 long long. Don't cast to bfd_vma.
2431 * elf32-score.c (score3_bfd_getl48): Likewise.
2432 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2433
cd9af601
AM
24342017-07-03 Alan Modra <amodra@gmail.com>
2435
2436 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2437 print d_tag.
2438 (bfd_elf_print_symbol): Don't cast symbol->flags.
2439 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2440 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2441 _bfd_error_handler argument order.
2442 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2443
33c734b2
AM
24442017-07-03 Alan Modra <amodra@gmail.com>
2445
2446 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2447 AC_TYPE_LONG_DOUBLE.
2448 * configure: Regenerate.
2449 * config.in: Regenerate.
2450
3df5cd13
AW
24512017-06-29 Andrew Waterman <andrew@sifive.com>
2452
2453 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2454 relocs.
2455
ec1acaba
EB
24562017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2457
2458 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2459 unless it is undefined weak.
2460 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2461 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2462 relocation.
2463 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2464 is not dynamic in PIC, abort.
2465
ff07562f
JW
24662017-06-29 Jiong Wang <jiong.wang@arm.com>
2467
2468 PR ld/21402
2469 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2470 undefined weak symbols into dynamic.
2471 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2472 relocation for non-dynamic symbols.
2473 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2474
2aff25ba
JW
24752017-06-29 Jiong Wang <jiong.wang@arm.com>
2476
2477 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2478 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2479 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2480 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2481 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2482 support for them.
2483
88ab90e8
AA
24842017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2485
2486 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2487 (elfcore_write_s390_gs_bc): Likewise.
2488 * elf.c (elfcore_grok_s390_gs_cb): New function.
2489 (elfcore_grok_s390_gs_bc): New function.
2490 (elfcore_grok_note): Call them.
2491 (elfcore_write_s390_gs_cb): New function.
2492 (elfcore_write_s390_gs_bc): New function.
2493 (elfcore_write_register_note): Call them.
2494
328ce951
L
24952017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2496
2497 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2498 bfd_get_file_size. Check archive element size.
2499 (_bfd_generic_get_section_contents_in_window): Likewise.
2500
47fdcf63
L
25012017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2502
2503 * bfd-in2.h: Regenerated.
2504 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2505 (bfd_get_file_size): Likewise.
2506
38bf472a
MR
25072017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2508 Matthew Fortune <matthew.fortune@imgtec.com>
2509
2510 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2511 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2512 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2513 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2514 case.
2515 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2516 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2517 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2518 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2519 `bfd_mach_mips_interaptiv_mr2' entries.
2520 * bfd-in2.h: Regenerate.
2521
2d68166e
NC
25222017-06-27 Nick Clifton <nickc@redhat.com>
2523
2524 * tekhex.c (pass_over): Revert accidental conversion of a local
2525 array to a static array.
2526
68063779
SKS
25272017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2528
2529 PR ld/13402
2530 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2531 reloc addend if necessary. Adjust diff only if
2532 shrinked_insn_address < end_address.
2533
ea9aafc4
AM
25342017-06-27 Alan Modra <amodra@gmail.com>
2535
2536 PR binutils/21665
2537 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2538 (_bfd_generic_get_section_contents_in_window): Likewise.
2539
a6cbf936
KLC
25402017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2541
2542 * elfnn-riscv.c (perform_relocation): Support the new
2543 R_RISCV_32_PCREL relocation.
2544 (riscv_elf_relocate_section): Likewise.
2545 * elfxx-riscv.c (howto_table): Likewise.
2546 (riscv_reloc_map): Likewise.
2547 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2548 * libbfd.h: Regenerate.
2549
7211ae50
AM
25502017-06-27 Alan Modra <amodra@gmail.com>
2551
2552 PR binutils/21665
2553 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2554 Use unsigned file pointer type, and remove cast.
2555 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2556 Add "count", not "sz".
2557
ab27f80c
PA
25582017-06-26 Pedro Alves <palves@redhat.com>
2559
2560 PR binutils/21665
2561 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2562 "sz".
2563
1f473e3d
L
25642017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2565
2566 PR binutils/21665
2567 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2568 a missing line.
2569
b417536f
MR
25702017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2571
2572 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2573 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2574 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2575 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2576 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2577
0630b49c
L
25782017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2579
2580 PR binutils/21665
2581 * compress.c (bfd_get_full_section_contents): Don't check the
2582 file size here.
2583 * libbfd.c (_bfd_generic_get_section_contents): Check for and
ea9aafc4 2584 reject a section whose size + offset is greater than the size
0630b49c
L
2585 of the entire file.
2586 (_bfd_generic_get_section_contents_in_window): Likewise.
515a4464 2587
04e15b4a
NC
25882017-06-26 Nick Clifton <nickc@redhat.com>
2589
2590 PR binutils/21670
2591 * tekhex.c (getvalue): Check for the source pointer exceeding the
2592 end pointer before the first byte is read.
2593
cfd14a50
NC
25942017-06-26 Nick Clifton <nickc@redhat.com>
2595
2596 PR binutils/21665
ea9aafc4 2597 * opncls.c (get_build_id): Check that the section is big enough
cfd14a50
NC
2598 to contain the whole note.
2599 * compress.c (bfd_get_full_section_contents): Check for and reject
ea9aafc4 2600 a section whose size is greater than the size of the entire file.
cfd14a50
NC
2601 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2602 contain a notes section.
2603
93ec5e23
AK
26042017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2605
2606 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2607 pointer checks.
2608 (elf_s390_modify_segment_map): Likewise.
2609 (bfd_elf_s390_set_options): Lisewise.
2610
57963c05
AM
26112017-06-26 Alan Modra <amodra@gmail.com>
2612
2613 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2614 a --just-syms bfd.
2615 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2616 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2617 .preinit_array on --just-syms bfds.
2618 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2619 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2620 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2621
5cc4ca83
ST
26222017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2623
2624 * elf.c (find_link): Bounds check "hint".
2625
bff0500d
TP
26262017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2627
2628 * elf32-arm.c (using_thumb_only): Update list of architectures in
2629 BFD_ASSERT for which the logic is valid.
2630 (using_thumb2_bl): Likewise.
2631 (using_thumb2): Likewise and return true for ARMv8-R.
2632 (arch_has_arm_nop): Likewise.
2633 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2634 merging logic. Update commentis for value 15 of v8m_baseline,
2635 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2636 merging of value 15 of Tag_CPU_arch.
2637
4aa57d6a
JW
26382017-06-23 Jiong Wang <jiong.wang@arm.com>
2639
2640 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2641 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2642 * bfd-in2.h: Regenerate.
2643
5d8763a3
L
26442017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2645
2646 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2647 the error_alignment label forward. Properly align program
2648 property note section.
2649
e652757b
EC
26502017-06-22 Eric Christopher <echristo@gmail.com>
2651
2652 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2653 abs to fix a truncation warning.
2654
84da4cf8
L
26552017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2656
2657 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2658 local undefined weak symbol to 0.
2659 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2660
48580982
L
26612017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2662
2663 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2664 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2665 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2666 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2667 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2668 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2669 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2670 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2671
ee2fdd6f
L
26722017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2673
2674 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2675 (elf_i386_lazy_ibt_plt_entry): Likewise.
2676 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2677 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2678 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2679 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2680 (elf_i386_lazy_plt_layout): Likewise.
2681 (elf_i386_non_lazy_plt_layout): Likewise.
2682 (elf_i386_link_hash_entry): Add plt_second.
2683 (elf_i386_link_hash_table): Add plt_second and
2684 plt_second_eh_frame.
2685 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2686 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2687 the second PLT. Check the second PLT.
2688 (elf_i386_relocate_section): Use the second PLT to resolve
2689 PLT reference if needed.
2690 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2691 needed.
2692 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2693 second PLT. Generate unwind info for the second PLT.
2694 (elf_i386_plt_type): Add plt_second.
2695 (elf_i386_get_synthetic_symtab): Support the second PLT.
2696 (elf_i386_parse_gnu_properties): Support
2697 GNU_PROPERTY_X86_FEATURE_1_AND.
2698 (elf_i386_merge_gnu_properties): Support
2699 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2700 on GNU_PROPERTY_X86_FEATURE_1_IBT
2701 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2702 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2703 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2704 is set on all relocatable inputs.
2705 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2706 (elf_x32_lazy_ibt_plt_entry): Likewise.
2707 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2708 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2709 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2710 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2711 (elf_x86_64_lazy_ibt_plt): Likewise.
2712 (elf_x32_lazy_ibt_plt): Likewise.
2713 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2714 (elf_x32_non_lazy_ibt_plt): Likewise.
2715 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2716 (elf_x86_64_parse_gnu_properties): Support
2717 GNU_PROPERTY_X86_FEATURE_1_AND.
2718 (elf_x86_64_merge_gnu_properties): Support
2719 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2720 on GNU_PROPERTY_X86_FEATURE_1_IBT
2721 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2722 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2723 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2724 is set on all relocatable inputs.
2725
d19237d9
NC
27262017-06-22 Nick Clifton <nickc@redhat.com>
2727
2728 PR binutils/21649
2729 * som.c (setup_sections): NUL terminate the space_strings buffer.
2730 Check that the space.name field does not index beyond the end of
2731 the space_strings buffer.
2732
6879f5a9
NC
27332017-06-21 Nick Clifton <nickc@redhat.com>
2734
2735 PR binutils/21646
2736 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2737
7adc0a81
NC
27382017-06-21 Nick Clifton <nickc@redhat.com>
2739
2740 PR binutils/21639
2741 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2742 type of the size parameter.
2743 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2744 length of the counted string.
2745 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2746 (_bfd_vms_save_counted_string): Likewise.
2747 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2748 _bfd_vms_save_counted_string.
2749 (_bfd_vms_slurp_ehdr): Likewise.
2750 (_bfd_vms_slurp_egsd): Likewise.
2751 (Parse_module): Likewise.
2752
6e1816be
AM
27532017-06-21 Alan Modra <amodra@gmail.com>
2754
2755 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2756 calls before tocsave calls.
2757 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2758 following nop.
2759
20bd1b6b
NC
27602017-06-21 Nick Clifton <nickc@redhat.com>
2761
2762 PR binutils/21645
2763 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2764 bfd_get_full_section_contents returns no contents.
2765
3de58d95
NC
27662017-06-21 Nick Clifton <nickc@redhat.com>
2767
2768 PR binutils/21638
2769 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2770 record.
2771
cb06d03a
NC
27722017-06-21 Nick Clifton <nickc@redhat.com>
2773
2774 PR binutils/21637
2775 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2776 list.
2777 (image_set_ptr): Likewise.
2778 (alpha_vms_fix_sec_rel): Likewise.
2779 (alpha_vms_slurp_relocs): Likewise.
2780
c458d007
NC
27812017-06-21 Nick Clifton <nickc@redhat.com>
2782
2783 PR binutils/21633
2784 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2785 read_id.
2786 (ieee_archive_p): Likewise.
2787 (ieee_object_p): Likewise.
2788
ce497010
NC
27892017-06-21 Nick Clifton <nickc@redhat.com>
2790
2791 PR binutils/21640
2792 * elf.c (setup_group): Zero the group section pointer list after
2793 allocation so that loops can be caught. Check for NULL pointers
2794 when processing a group list.
2795
fd52715c
AK
27962017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2797
2798 * elf-s390.h: New file.
2799 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2800 field.
2801 (elf_s390_additional_program_headers): New function.
2802 (elf_s390_modify_segment_map): New function.
2803 (bfd_elf_s390_set_options): New function.
2804 (elf_backend_additional_program_headers)
2805 (elf_backend_modify_segment_map): Add macro definitions.
2806
abfa390d
L
28072017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2808
2809 PR ld/21626
2810 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2811 the DYNAMIC bit instead of bfd_count_sections.
2812
bc21b167
NC
28132017-06-19 Nick Clifton <nickc@redhat.com>
2814
2815 PR binutils/21618
2816 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2817 length.
2818 (evax_bfd_print_eeom): Likewise.
2819 (evax_bfd_print_egsd): Check for an overlarge record length.
2820 (evax_bfd_print_etir): Likewise.
2821
acb56a83
NC
28222017-06-19 Nick Clifton <nickc@redhat.com>
2823
2824 PR binutils/21612
2825 * libieee.h (struct common_header_type): Add end_p field.
2826 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2827 end_p.
2828 (read_id): Check for a length that exceeds the remaining bytes in
2829 the input buffer.
2830 (ieee_seek): Initialise end_p.
2831 (ieee_archive_p): Likewise.
2832 (ieee_object_p): Likewise.
2833
72e84f96
NC
28342017-06-19 Nick Clifton <nickc@redhat.com>
2835
80053e46
NC
2836 PR binutils/21611
2837 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2838 before reading the EIHS structure entries.
2839
28402017-06-19 Nick Clifton <nickc@redhat.com>
2841
2842 PR binutils/21615
72e84f96
NC
2843 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2844 gsd_size. Check that there are enough bytes remaining to read the
2845 type and size of the next egsd. Check that the size of the egsd
2846 does not exceed the size of the record.
2847
875ffa3e
AM
28482017-06-19 Alan Modra <amodra@gmail.com>
2849
2850 * config.bfd: Correct targ_underscore for cris.
2851
bdd32e03
AM
28522017-06-18 Alan Modra <amodra@gmail.com>
2853
2854 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2855 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2856
4b48e2f6
NC
28572017-06-16 Nick Clifton <nickc@redhat.com>
2858
2859 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2860 bucketlist is empty because there are no symbols to add to the
2861 list.
2862
7dba9362
AM
28632017-06-16 Alan Modra <amodra@gmail.com>
2864
2865 PR ld/20022
2866 PR ld/21557
2867 PR ld/21562
2868 PR ld/21571
2869 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2870 (BFD_JUMP_TABLE_LINK): Likewise.
2871 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2872 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2873 (bfd_elf_define_start_stop): New function.
2874 * linker.c (bfd_generic_define_start_stop): New function.
2875 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2876 new field.
2877 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2878 * aout-target.h (MY_bfd_define_start_stop): Define.
2879 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2880 * binary.c (binary_bfd_define_start_stop): Define.
2881 * bout.c (b_out_bfd_define_start_stop): Define.
2882 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2883 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2884 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2885 * coffcode.h (coff_bfd_define_start_stop): Define.
2886 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2887 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2888 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2889 * ieee.c (ieee_bfd_define_start_stop): Define.
2890 * ihex.c (ihex_bfd_define_start_stop): Define.
2891 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2892 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2893 * mmo.c (mmo_bfd_define_start_stop): Define.
2894 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2895 * oasys.c (oasys_bfd_define_start_stop): Define.
2896 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2897 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2898 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2899 * som.c (som_bfd_define_start_stop): Define.
2900 * srec.c (srec_bfd_define_start_stop): Define.
2901 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2902 * versados.c (versados_bfd_define_start_stop): Define.
2903 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2904 (alpha_vms_bfd_define_start_stop): Define.
2905 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2906 * bfd-in2.h: Regenerate.
2907 * libbfd.h: Regenerate.
2908
d68f1976
JW
29092017-06-16 Jiong Wang <jiong.wang@arm.com>
2910
2911 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2912 SYMBOL_REFERENCES_LOCAL.
2913
6353d82b
JW
29142017-06-15 Jiong Wang <jiong.wang@arm.com>
2915
2916 PR ld/21532
2917 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2918 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2919 runtime for if there needs copy relocation elimination.
2920 (need_copy_relocation_p): New function. Return true for symbol with
2921 pc-relative references and if it's against read-only sections.
2922 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2923 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2924 that are related with accessing external objects.
2925 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2926 in elfNN_aarch64_check_relocs.
2927
63634bb4
NC
29282017-06-15 Nick Clifton <nickc@redhat.com>
2929
2930 PR binutils/21582
2931 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2932 bugs.
62b76e4b
NC
2933 PR binutils/21581
2934 (ieee_archive_p): Likewise.
63634bb4 2935
76800cba
NC
29362017-06-15 Nick Clifton <nickc@redhat.com>
2937
2938 PR binutils/21579
2939 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2940
f7e16c2a
MF
29412017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2942
2943 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2944 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2945 keep both windowed and call0 ABI PLT definitions.
2946 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2947 elf_xtensa_*_plt_entry endex.
2948 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2949
f461bbd8
NC
29502017-06-14 Nick Clifton <nickc@redhat.com>
2951
2952 PR binutils/21578
2953 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2954 flag value.
2955
c53d2e6d
NC
29562017-06-14 Nick Clifton <nickc@redhat.com>
2957
2958 PR binutils/21589
2959 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2960 maximum value for the ascic pointer. Check that name processing
2961 does not read beyond this value.
2962 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2963 end of etir record.
2964
04f963fd
NC
29652017-06-14 Nick Clifton <nickc@redhat.com>
2966
2967 PR binutils/21591
2968 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2969 (process_otr): Check for an invalid offset in the otr structure.
2970
319c2dbe
SH
29712017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2972
2973 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2974
cbd0eecf
L
29752017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2976
2977 PR ld/20022
2978 PR ld/21557
2979 PR ld/21562
2980 PR ld/21571
2981 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2982 vtable field to a union.
2983 (_bfd_elf_is_start_stop): Removed.
2984 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2985 __start_SECNAME and __stop_SECNAME symbols.
2986 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2987 * elflink.c (_bfd_elf_is_start_stop): Removed.
2988 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2989 _bfd_elf_is_start_stop.
2990 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2991 __stop_SECNAME symbols. Updated.
2992 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2993 (bfd_elf_gc_record_vtinherit): Likewise.
2994 (bfd_elf_gc_record_vtentry): Likewise.
2995
10bbbc1d
NC
29962017-06-13 Nick Clifton <nickc@redhat.com>
2997
2998 PR ld/21524
2999 * elflink.c (elf_link_adjust_relocs): Generate an error when
3000 encountering a reloc against a symbol removed by garbage
3001 collection.
3002
5c3ce2bc
L
30032017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3004
3005 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3006 to merge_gnu_properties.
3007 * elf-properties.c (elf_merge_gnu_properties): Add struct
3008 bfd_link_info * and pass it to merge_gnu_properties.
3009 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3010 and pass it to elf_merge_gnu_properties.
3011 (_bfd_elf_link_setup_gnu_properties): Pass info to
3012 elf_merge_gnu_property_list.
3013 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3014 bfd_link_info *.
3015 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3016
9b97dfbf
AM
30172017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3018
3019 PR 21564
3020 * binary.c (binary_set_section_contents): Scale lma by octets
3021 per byte to set filepos.
3022
e3d1d408
CM
30232017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3024
3025 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3026 dynamic sections.
3027
64aa8e03
CM
30282017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3029
3030 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3031 require TEXTREL.
3032
a0abe743
CM
30332017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3034
3035 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3036 patched section contents for TLS IE reloc.
3037 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3038
f4e6805f
CM
30392017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3040
3041 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3042 RELOC_FOR_GLOBAL_SYMBOL macro.
3043
cd640291
CM
30442018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3045
3046 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3047 changes.
3048
7ef0acc1
VG
30492017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3050
3051 * config/tc-arc.c (md_undefined_symbol): Changed.
3052 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3053
cc89d0b3
CM
30542017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3055
3056 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3057 symbols.
3058
9d5c718b
CM
30592017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3060
3061 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3062 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3063
be9e3704
CM
30642017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3065
3066 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3067 object is created.
3068
4ec192e6
RE
30692017-06-08 Richard Earnshaw <rearnsha@arm.com>
3070
3071 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3072 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3073 is non-zero. Add clarifying comments.
3074
51fa2693
L
30752017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3076
3077 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3078 name. Use local IFUNC symbol name string to report unsupported
3079 non-PIC call to IFUNC function.
3080 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3081 when generating R_386_IRELATIVE relocation.
3082 (elf_i386_finish_dynamic_symbol): Likewise.
3083 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3084 IFUNC symbol name.
3085 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3086 when generating R_X86_64_IRELATIVE relocation.
3087 (elf_x86_64_finish_dynamic_symbol): Likewise.
3088
78e8a2ff
JM
30892017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3090
3091 * elf.c (setup_group): Make sure BFD sections are created for all
3092 group sections in the input file when processing SHF_GROUP
3093 sections.
3094 (bfd_section_from_shdr): Avoid duplicating logic already
3095 implemented in `setup_group'.
3096
9949827b
DBR
30972017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3098
3099 PR binutils/21546
3100 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3101 if the hint address is zero.
3102
0ee3a6db
JC
31032017-06-06 James Clarke <jrtc27@jrtc27.com>
3104
3105 PR ld/19579
3106 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3107 ELF_COMMON_DEF_P for common symbols.
3108
7bdf4127
AB
31092017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3110
3111 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3112 SEC_GROUP sections as SEC_EXCLUDE.
3113 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3114 (assign_section_numbers): Use resolve_section_groups flag instead
3115 of relocatable link type.
3116 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3117 flag instead of checking the final_link flag for part of the
3118 checks in here. Fix white space as a result.
3119 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3120 instead of relocatable link type.
3121 (bfd_elf_final_link): Likewise.
3122
458ad2b8
JM
31232017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3124
3125 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3126 variable `bed'.
3127 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3128 (s3_bfd_score_elf_check_relocs): Likewise.
3129 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3130 (score_elf_final_link_relocate): Likewise.
3131 (s7_bfd_score_elf_check_relocs): Likewise.
3132
fbebaf4a
JM
31332017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3134
3135 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3136 `bed'.
3137
056bafd4
MR
31382017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3139
3140 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3141 from `reloc_count' rather than decrementing it.
3142 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3143 `reloc_count' by `int_rels_per_ext_rel'.
3144 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3145 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3146 entry determination.
3147 (s3_bfd_score_elf_check_relocs): Likewise.
3148 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3149 (s7_bfd_score_elf_relocate_section): Likewise.
3150 (s7_bfd_score_elf_check_relocs): Likewise.
3151 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3152 prototype and function.
3153 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3154 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3155 triple rather than once the sum of REL and RELA relocation entry
3156 counts.
3157 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3158 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3159 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3160 storage allocation size determination.
3161 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3162 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3163 by `int_rels_per_ext_rel' for last relocation entry
3164 determination.
3165 (bfd_elf_final_link): Do not multiply `reloc_count' by
3166 `int_rels_per_ext_rel' for internal relocation storage
3167 allocation size determination.
3168 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3169 `int_rels_per_ext_rel' for last relocation entry determination.
3170 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3171 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3172 (_bfd_mips_elf_relocate_section): Likewise.
3173
af54f0eb
AM
31742017-06-05 Alan Modra <amodra@gmail.com>
3175
3176 PR 21529
3177 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3178
6cf3bf88 31792017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
3180
3181 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3182 determine structure sizes.
3183 (elfcore_grok_freebsd_prstatus): Likewise.
3184
f378ab09
AM
31852017-06-01 Alan Modra <amodra@gmail.com>
3186
3187 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3188 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3189 dynamic objects.
3190 (is_elfv2_localentry0): New function.
3191 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3192 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3193 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3194 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3195 optimized localentry:0 stubs.
3196 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3197 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3198 localentry:0 stubs.
3199 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3200 DT_PPC64_OPT.
3201 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3202
8c65b54f
CS
32032017-05-30 Casey Smith <clegg89@gmail.com>
3204
3205 PR ld/21523
3206 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3207 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3208
64984c22
AK
32092017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3210
3211 * cpu-arc.c (arc_compatible): New function.
3212
37cd3877
AK
32132017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3214
3215 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3216
8e2f54bc
L
32172017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3218
3219 PR binutils/21519
3220 * bfdio.c (bfd_get_file_size): New function.
3221 * bfd-in2.h: Regenerated.
3222
8e7f04f1 32232017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3224
3225 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3226 comments.
3227
25f94347
L
32282017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3229
3230 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3231 dynobj instead of htab->elf.dynobj.
3232
e5713223
MR
32332017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3234
3235 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3236 and function.
3237 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3238 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3239 actual number of internal relocations retrieved. Adjust
3240 function description.
3241 (bfd_elf64_canonicalize_reloc): Remove macro.
3242 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3243
64517994
JM
32442017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3245
3246 * archures.c (bfd_mach_sparc_v9m8): Define.
3247 (bfd_mach_sparc_v8plusm8): Likewise.
3248 (bfd_mach_sparc_v9_p): Adjust to M8.
3249 (bfd_mach_sparc_64bit_p): Likewise.
3250 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3251 bfd_mach_sparc_v8plusm8.
3252 * bfd-in2.h: Regenerated.
3253 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3254 sparc:v8plusm8.
3255 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3256 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3257 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3258 SHA3.
3259 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3260 bfd_mach_sparc_v8plusm8.
3261
eb026f09
AM
32622017-05-19 Alan Modra <amodra@gmail.com>
3263
3264 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3265 debug and special sections when no non-note alloc sections in an
3266 object are kept.
3267
535b785f
AM
32682017-05-18 Alan Modra <amodra@gmail.com>
3269
3270 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3271 * elf-m10300.c: Likewise.
3272 * elf.c: Likewise.
3273 * elf32-arc.c: Likewise.
3274 * elf32-bfin.c: Likewise.
3275 * elf32-m68k.c: Likewise.
3276 * elf32-nds32.c: Likewise.
3277 * elf32-tilepro.c: Likewise.
3278 * elflink.c: Likewise.
3279 * elfnn-aarch64.c: Likewise.
3280 * elfnn-riscv.c: Likewise.
3281 * elfxx-tilegx.c: Likewise.
3282 * mach-o.c: Likewise.
3283 * peXXigen.c: Likewise.
3284 * vms-alpha.c: Likewise.
3285 * vms-lib.c: Likewise.
3286
b7c871ed
L
32872017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3288
3289 PR ld/20882
3290 * elflink.c (elf_gc_mark_debug_section): New function.
3291 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3292 referenced by kept debug sections.
3293
bc4e12de
AM
32942017-05-16 Alan Modra <amodra@gmail.com>
3295
3296 * elf-m10300.c: Rename occurrences of non_ir_ref.
3297 * elf32-arm.c: Likewise.
3298 * elf32-bfin.c: Likewise.
3299 * elf32-cr16.c: Likewise.
3300 * elf32-cris.c: Likewise.
3301 * elf32-d10v.c: Likewise.
3302 * elf32-dlx.c: Likewise.
3303 * elf32-fr30.c: Likewise.
3304 * elf32-frv.c: Likewise.
3305 * elf32-hppa.c: Likewise.
3306 * elf32-i370.c: Likewise.
3307 * elf32-i386.c: Likewise.
3308 * elf32-iq2000.c: Likewise.
3309 * elf32-lm32.c: Likewise.
3310 * elf32-m32c.c: Likewise.
3311 * elf32-m32r.c: Likewise.
3312 * elf32-m68hc1x.c: Likewise.
3313 * elf32-m68k.c: Likewise.
3314 * elf32-mcore.c: Likewise.
3315 * elf32-metag.c: Likewise.
3316 * elf32-microblaze.c: Likewise.
3317 * elf32-moxie.c: Likewise.
3318 * elf32-msp430.c: Likewise.
3319 * elf32-mt.c: Likewise.
3320 * elf32-nios2.c: Likewise.
3321 * elf32-or1k.c: Likewise.
3322 * elf32-ppc.c: Likewise.
3323 * elf32-rl78.c: Likewise.
3324 * elf32-s390.c: Likewise.
3325 * elf32-score.c: Likewise.
3326 * elf32-score7.c: Likewise.
3327 * elf32-sh.c: Likewise.
3328 * elf32-tic6x.c: Likewise.
3329 * elf32-tilepro.c: Likewise.
3330 * elf32-v850.c: Likewise.
3331 * elf32-vax.c: Likewise.
3332 * elf32-xstormy16.c: Likewise.
3333 * elf32-xtensa.c: Likewise.
3334 * elf64-alpha.c: Likewise.
3335 * elf64-hppa.c: Likewise.
3336 * elf64-ia64-vms.c: Likewise.
3337 * elf64-mmix.c: Likewise.
3338 * elf64-ppc.c: Likewise.
3339 * elf64-s390.c: Likewise.
3340 * elf64-sh64.c: Likewise.
3341 * elf64-x86-64.c: Likewise.
3342 * elflink.c: Likewise.
3343 * elfnn-aarch64.c: Likewise.
3344 * elfnn-ia64.c: Likewise.
3345 * elfnn-riscv.c: Likewise.
3346 * elfxx-mips.c: Likewise.
3347 * elfxx-sparc.c: Likewise.
3348 * elfxx-tilegx.c: Likewise.
3349 * linker.c: Likewise.
3350
4070765b
AM
33512017-05-16 Alan Modra <amodra@gmail.com>
3352
3353 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3354 * elflink.c (elf_link_add_object_symbols): Update to use
3355 non_ir_ref_dynamic.
3356 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3357 non_ir_ref.
3358 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3359
25499ac7
MR
33602017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3361
3362 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3363
73caa85d
L
33642017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3365
3366 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3367 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3368 properties.
3369 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3370
f2c29a16
L
33712017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3372
3373 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3374 to plt_second.
3375 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3376 to plt_second/plt_second_eh_frame.
3377 (elf_x86_64_link_hash_newfunc): Updated.
3378 (elf_x86_64_allocate_dynrelocs): Likewise.
3379 (elf_x86_64_size_dynamic_sections): Likewise.
3380 (elf_x86_64_relocate_section): Likewise.
3381 (elf_x86_64_finish_dynamic_symbol): Likewise.
3382 (elf_x86_64_finish_dynamic_sections): Likewise.
3383 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3384 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3385 .plt.sec section.
3386 (elf_backend_setup_gnu_properties): Updated. Create the
3387 .plt.sec section instead of the .plt.sec section.
3388
dc2be3d2
L
33892017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3390
3391 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3392 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3393 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3394
db84b98a
JM
33952017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3396
3397 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3398 (bfd_elf64_set_reloc): Define.
3399 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3400
23186865
JM
34012017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3402
3403 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3404 (struct bfd_target): New field _bfd_set_reloc.
3405 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3406 * reloc.c (_bfd_generic_set_reloc): New function.
3407 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3408 * nlm-target.h (nlm_set_reloc): Likewise.
3409 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3410 * aout-tic30.c (MY_set_reloc): Likewise.
3411 * aout-target.h (MY_set_reloc): Likewise.
3412 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3413 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3414 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3415 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3416 * aout-adobe.c (aout_32_set_reloc): Likewise.
3417 * bout.c (b_out_set_reloc): Likewise.
3418 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3419 * i386os9k.c (aout_32_set_reloc): Likewise.
3420 * ieee.c (ieee_set_reloc): Likewise.
3421 * oasys.c (oasys_set_reloc): Likewise.
3422 * som.c (som_set_reloc): Likewise.
3423 * versados.c (versados_set_reloc): Likewise.
3424 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3425 _bfd_generic_set_reloc.
3426 (rs6000_xcoff64_aix_vec): LIkewise.
3427 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3428 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3429 * i386msdos.c (msdos_set_reloc): Define to
3430 _bfd_norelocs_set_reloc.
3431 * elfcode.h (elf_set_reloc): Define.
3432 * bfd-in2.h: Regenerated.
3433
aab82f4c
L
34342017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3435
3436 PR ld/21481
3437 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3438 for IFUNC function address.
3439
53a346d8
CZ
34402017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3441
3442 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3443 (CONFLICT_LIST): Likewise.
3444 (opcode/arc-attrs.h): Include.
3445 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3446 (arc_extract_features): New file.
3447 (arc_stralloc): Likewise.
3448 (arc_elf_merge_attributes): Likewise.
3449 (arc_elf_merge_private_bfd_data): Use object attributes.
3450 (bfd_arc_get_mach_from_attributes): New function.
3451 (arc_elf_object_p): Use object attributes.
3452 (arc_elf_final_write_processing): Likewise.
3453 (elf32_arc_obj_attrs_arg_type): New function.
3454 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3455 (elf32_arc_section_from_shdr): Likewise.
3456 (elf_backend_obj_attrs_vendor): Define.
3457 (elf_backend_obj_attrs_section): Likewise.
3458 (elf_backend_obj_attrs_arg_type): Likewise.
3459 (elf_backend_obj_attrs_section_type): Likewise.
3460 (elf_backend_obj_attrs_handle_unknown): Likewise.
3461 (elf_backend_section_from_shdr): Likewise.
3462
e645cf40
AG
34632017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3464
3465 PR ld/21458
3466 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3467 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3468 and the destination is a Thumb symbol.
3469
dd9e66ee
L
34702017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3471
3472 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3473 initializer to silence GCC 4.2.
3474 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3475
38b12349
L
34762017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3477
3478 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3479 (LAZY_PLT_ENTRY_SIZE): This.
3480 (NON_LAZY_PLT_ENTRY_SIZE): New.
3481 (elf_x86_64_plt0_entry): Renamed to ...
3482 (elf_x86_64_lazy_plt0_entry): This.
3483 (elf_x86_64_plt_entry): Renamed to ...
3484 (elf_x86_64_lazy_plt_entry): This.
3485 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3486 (elf_x86_64_lazy_bnd_plt0_entry): This.
3487 (elf_x86_64_legacy_plt_entry): Removed.
3488 (elf_x86_64_bnd_plt_entry): Renamed to ...
3489 (elf_x86_64_lazy_bnd_plt_entry): This.
3490 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3491 (elf_x86_64_non_lazy_plt_entry): This.
3492 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3493 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3494 (elf_x86_64_eh_frame_plt): Renamed to ...
3495 (elf_x86_64_eh_frame_lazy_plt): This.
3496 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3497 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3498 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3499 (elf_x86_64_eh_frame_non_lazy_plt): This.
3500 (elf_x86_64_lazy_plt_layout): New.
3501 (elf_x86_64_non_lazy_plt_layout): Likewise.
3502 (elf_x86_64_plt_layout): Likewise.
3503 (elf_x86_64_backend_data): Remove PLT layout information. Add
3504 os for target system.
3505 (GET_PLT_ENTRY_SIZE): Removed.
3506 (elf_x86_64_lazy_plt): New.
3507 (elf_x86_64_non_lazy_plt): Likewise.
3508 (elf_x86_64_lazy_bnd_plt): Likewise.
3509 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3510 (elf_x86-64_arch_bed): Updated.
3511 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3512 (elf_x86_64_create_dynamic_sections): Removed.
3513 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3514 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3515 (elf_x86-64_adjust_dynamic_symbol): Updated.
3516 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3517 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3518 size for PLT0 if there is no PLT0. Get plt_entry_size from
3519 non_lazy_plt for non-lazy PLT entries.
3520 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3521 from non_lazy_plt for non-lazy PLT entries.
3522 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3523 if there is no PLT0.
3524 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3525 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3526 entries with non-lazy PLT layout. Don't fill the second and third
3527 slots in the PLT entry if there is no PLT0.
3528 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3529 if there is no PLT0. Set sh_entsize on the .plt.got section.
3530 (compare_relocs): New.
3531 (elf_x86_64_plt_type): Likewise.
3532 (elf_x86_64_plt): Likewise.
3533 (elf_x86_64_nacl_plt): New. Forward declaration.
3534 (elf_x86_64_get_plt_sym_val): Removed.
3535 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3536 against all dynamic relocations.
3537 (elf_x86_64_link_setup_gnu_properties): New function.
3538 (elf_backend_create_dynamic_sections): Updated.
3539 (elf_backend_setup_gnu_properties): New.
3540 (elf_x86_64_nacl_plt): New.
3541 (elf_x86_64_nacl_arch_bed): Updated.
3542
f604c2a2
L
35432017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3544
3545 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3546 (LAZY_PLT_ENTRY_SIZE): This.
3547 (NON_LAZY_PLT_ENTRY_SIZE): New.
3548 (elf_i386_plt0_entry): Renamed to ...
3549 (elf_i386_lazy_plt0_entry): This.
3550 (elf_i386_plt_entry): Renamed to ...
3551 (elf_i386_lazy_plt_entry): This.
3552 (elf_i386_pic_plt0_entry): Renamed to ...
3553 (elf_i386_pic_lazy_plt0_entry): This.
3554 (elf_i386_pic_plt_entry): Renamed to ...
3555 (elf_i386_pic_lazy_plt_entry): This.
3556 (elf_i386_got_plt_entry): Renamed to ...
3557 (elf_i386_non_lazy_plt_entry): This.
3558 (elf_i386_pic_got_plt_entry): Renamed to ...
3559 (elf_i386_pic_non_lazy_plt_entry): This.
3560 (elf_i386_eh_frame_plt): Renamed to ...
3561 (elf_i386_eh_frame_lazy_plt): This.
3562 (elf_i386_eh_frame_plt_got): Renamed to ...
3563 (elf_i386_eh_frame_non_lazy_plt): This.
3564 (elf_i386_plt_layout): Renamed to ...
3565 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3566 eh_frame_plt_got_size.
3567 (elf_i386_non_lazy_plt_layout): New.
3568 (elf_i386_plt_layout): Likewise.
3569 (elf_i386_non_lazy_plt): Likewise.
3570 (GET_PLT_ENTRY_SIZE): Removed.
3571 (elf_i386_plt): Renamed to ...
3572 (elf_i386_lazy_plt): This.
3573 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3574 (elf_i386_arch_bed): Updated.
3575 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3576 (elf_i386_create_dynamic_sections): Removed.
3577 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3578 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3579 (elf_i386_adjust_dynamic_symbol): Updated.
3580 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3581 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3582 size for PLT0 if there is no PLT0.
3583 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3584 output section is discarded only if GOT isn't empty.
3585 (elf_i386_relocate_section): Updated. Properly get PLT index
3586 if there is no PLT0.
3587 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3588 second and third slots in the PLT entry if there is no PLT0.
3589 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3590 if there is no PLT0. Set sh_entsize on the .plt.got section.
3591 (elf_i386_nacl_plt): Forward declaration.
3592 (elf_i386_get_plt_sym_val): Removed.
3593 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3594 against all dynamic relocations.
3595 (elf_i386_link_setup_gnu_properties): New function.
3596 (elf_backend_create_dynamic_sections): Updated.
3597 (elf_backend_setup_gnu_properties): New.
3598 (elf_i386_nacl_plt): Updated.
3599 (elf_i386_nacl_arch_bed): Likewise.
3600 (elf_i386_vxworks_arch_bed): Likewise.
3601
046734ff
TP
36022017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3603
3604 * elflink.c (elf_output_implib): Remove executable flag from import
3605 library bfd.
3606 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3607 library is a relocatable object file.
3608
b660e9eb
SKS
36092017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3610
3611 PR ld/21404
3612 * elf32-avr.c (avr_should_move_sym): New function.
3613 (avr_should_reduce_sym_size): Likewise.
3614 (avr_should_increase_sym_size): Likewise.
3615 (elf32_avr_relax_delete_bytes): Adjust symbol values
3616 and sizes by calling new functions.
3617
763a5fa4
PD
36182017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3619
3620 * config.bfd (riscv32-*): Enable rv64.
3621
73ec947d
AM
36222017-05-02 Alan Modra <amodra@gmail.com>
3623
3624 PR 21384
3625 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3626 rather than h->root.type == bfd_link_hash_new.
3627 (bfd_elf_record_link_assignment): Similarly, call
3628 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3629
a941291c
AM
36302017-04-29 Alan Modra <amodra@gmail.com>
3631
3632 PR 21432
3633 * reloc.c (reloc_offset_in_range): New function.
3634 (bfd_perform_relocation, bfd_install_relocation): Use it.
3635 (_bfd_final_link_relocate): Likewise.
3636
750eaa47
L
36372017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3638
3639 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3640 before using .plt.got.
3641 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3642
5b66fac4
L
36432017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3644
3645 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3646 instead of "+=" to update 0.
3647
de9a3c42
L
36482017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3649
3650 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3651 .plt.got section here.
3652 (elf_i386_check_relocs): Don't create the .plt.got section.
3653 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3654 the .plt.got and .plt.bnd sections here.
3655 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3656 .plt.bnd sections.
3657
da3d25af
L
36582017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3659
3660 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3661 has_bnd_reloc.
3662 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3663 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3664 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3665 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3666 has_bnd_reloc.
3667
fba37edd
L
36682017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3669
3670 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3671 to return bfd *.
3672 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3673 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3674 the first relocatable ELF input with GNU properties.
3675
1f78f649
L
36762017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3677
3678 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3679 VxWorks for non-PIC.
3680
76c20d54
AM
36812017-04-27 Alan Modra <amodra@gmail.com>
3682
3683 * elf-bfd.h (struct elf_backend_data): Make asection param of
3684 elf_backend_eh_frame_address_size const.
3685 (_bfd_elf_eh_frame_address_size): Likewise.
3686 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3687 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3688 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3689 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3690 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3691 (next_cie_fde_offset): Constify params.
3692 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3693
d7153c4a
AM
36942017-04-27 Alan Modra <amodra@gmail.com>
3695
3696 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3697 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3698 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3699 aug_data_len.
3700 (offset_adjust): New function.
3701 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3702 (adjust_eh_frame_local_symbols): Likewise.
3703 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3704 after changing anything. Return true if anything changed.
3705 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3706 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3707
641338d8
AM
37082017-04-27 Alan Modra <amodra@gmail.com>
3709
3710 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3711 when force_local.
3712
21d68fcd
AM
37132017-04-27 Alan Modra <amodra@gmail.com>
3714
3715 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3716 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3717 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3718 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3719 for undef and undefweak dyn_relocs.
3720 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3721 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3722 (allocate_got, allocate_dynrelocs): Likewise.
3723 (ppc64_elf_relocate_section): Likewise.
3724
97d343d4
L
37252017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3726
3727 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3728 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3729 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3730 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3731
04b31182
NC
37322017-04-26 Nick Clifton <nickc@redhat.com>
3733
3734 PR binutils/21434
3735 * reloc.c (bfd_perform_relocation): Check for a negative address
3736 in the reloc.
3737
23ec1e32
MR
37382017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3739
3740 PR ld/21334
3741 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3742 member.
3743 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3744 (elf_backend_always_renumber_dynsyms): Define.
3745 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3746 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3747 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3748 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3749 it.
3750 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3751
c46cec3a
MR
37522017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3753
3754 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3755 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3756 sections have been created.
3757
e63d1232
NC
37582017-04-26 Nick Clifton <nickc@redhat.com>
3759
3760 PR binutils/21431
3761 * compress.c (bfd_init_section_compress_status): Check the return
3762 value from bfd_malloc.
3763
9e9821dd
L
37642017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3765
3766 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3767 no_finish_dynamic_symbol.
3768 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3769 0.
3770 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3771 weak symbol, don't make it dynamic.
3772 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3773 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3774 relocation for GOT reference.
3775 (elf_x86_64_finish_dynamic_symbol): Abort if
3776 no_finish_dynamic_symbol isn't 0.
3777
0dc9a308
L
37782017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3779
3780 PR ld/21402
3781 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3782 undefined weak symbol, don't make it dynamic.
3783 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3784 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3785 relocation for R_386_GOT32.
3786
1587442d
L
37872017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3788
3789 PR ld/21425
3790 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3791
7eacd66b
AM
37922017-04-23 Alan Modra <amodra@gmail.com>
3793
3794 PR 21414
3795 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3796 * elf.c (lcomm_sym): New.
3797 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3798 * bfd-in2.h: Regenerate.
3799
bce964aa
AM
38002017-04-23 Alan Modra <amodra@gmail.com>
3801
3802 PR 21412
3803 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3804 parameters and comment.
3805 (_bfd_elf_get_reloc_section): Delete.
3806 (_bfd_elf_plt_get_reloc_section): Declare.
3807 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3808 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3809 Extracted from..
3810 (_bfd_elf_get_reloc_section): ..here. Delete.
3811 (assign_section_numbers): Call elf_get_reloc_section.
3812 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3813 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3814
97e83a10
AM
38152017-04-23 Alan Modra <amodra@gmail.com>
3816
3817 PR 21409
3818 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3819 no symbols.
3820
e133d005
L
38212017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3822
3823 PR ld/21402
3824 * elf32-i386.c (elf_i386_link_hash_entry): Add
3825 no_finish_dynamic_symbol.
3826 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3827 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3828 symbol, don't make it dynamic in PIE.
3829 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3830 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3831 relocation for R_386_GOT32
3832 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3833 isn't 0.
3834
3c5fce9b
L
38352017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3836
3837 PR ld/19617
3838 PR ld/21086
3839 * elflink.c (elf_link_add_object_symbols): Require
3840 --no-dynamic-linker with -E/--dynamic-list when creating
3841 dynamic sections.
3842
0fad2956
MR
38432017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3844
3845 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3846 if forced local.
3847
64575f78
MR
38482017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3849
3850 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3851 dynamic symbol sorting.
3852
59fa66c5
L
38532017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3854
3855 PR ld/21382
3856 * elflink.c (elf_link_add_object_symbols): Preserve
3857 dynamic_ref_after_ir_def when restoring the symbol table for
3858 unneeded dynamic object.
3859
e492d2f8
L
38602017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3861
3862 PR ld/21401
3863 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3864 on on undefined IFUNC symbol in the second PLT.
3865
10169134
WAF
38662017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3867
3868 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3869
954b63d4
AM
38702017-04-19 Alan Modra <amodra@gmail.com>
3871
3872 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3873 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3874 * elf32-ppc.c:Formatting.
3875 (ensure_undefweak_dynamic): Don't make dynamic when
3876 info->dynamic_undefined_weak is zero.
3877 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3878 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3879 not default visibility. Discard undef and undefweak
3880 dyn_relocs earlier.
3881 (ppc_elf_relocate_section): Adjust to suit.
3882 * elf64-ppc.c: Formatting.
3883 (ensure_undefweak_dynamic): Don't make dynamic when
3884 info->dynamic_undefined_weak is zero.
3885 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3886 info->dynamic_undefined_weak. Discard them earlier.
3887
e6699019
L
38882017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3889
3890 PR ld/21389
3891 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3892 before generating the version definition section.
3893
c5d37467
AM
38942017-04-17 Alan Modra <amodra@gmail.com>
3895
3896 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3897 state when a regular object file defines a symbol with
3898 incompatible type to that defined by an earlier shared lib.
3899
63a5468a
AM
39002017-04-13 Alan Modra <amodra@gmail.com>
3901
3902 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3903 * elf.c: Likewise.
3904 * elf32-arm.c: Likewise.
3905 * elf32-i386.c: Likewise.
3906 * elf32-mep.c: Likewise.
3907 * elf64-ia64-vms.c: Likewise.
3908 * elf64-x86-64.c: Likewise.
3909 * elflink.c: Likewise.
3910 * elfnn-ia64.c: Likewise.
3911 * elfxx-mips.c: Likewise.
3912
dae82561
AM
39132017-04-13 Alan Modra <amodra@gmail.com>
3914
3915 * aoutx.h: Use %B and %A in error messages throughout file.
3916 * aout-cris.c: Likewise.
3917 * archive.c: Likewise.
3918 * binary.c: Likewise.
3919 * coff-rs6000.c: Likewise.
3920 * coff-tic4x.c: Likewise.
3921 * coffcode.h: Likewise.
3922 * coffgen.c: Likewise.
3923 * cofflink.c: Likewise.
3924 * coffswap.h: Likewise.
3925 * cpu-arm.c: Likewise.
3926 * elf-eh-frame.c: Likewise.
3927 * elf-m10300.c: Likewise.
3928 * elf.c: Likewise.
3929 * elf32-arc.c: Likewise.
3930 * elf32-arm.c: Likewise.
3931 * elf32-bfin.c: Likewise.
3932 * elf32-frv.c: Likewise.
3933 * elf32-iq2000.c: Likewise.
3934 * elf32-m32c.c: Likewise.
3935 * elf32-microblaze.c: Likewise.
3936 * elf32-nds32.c: Likewise.
3937 * elf32-rl78.c: Likewise.
3938 * elf32-rx.c: Likewise.
3939 * elf32-score.c: Likewise.
3940 * elf32-score7.c: Likewise.
3941 * elf32-sh64.c: Likewise.
3942 * elf32-v850.c: Likewise.
3943 * elf32-vax.c: Likewise.
3944 * elf32-visium.c: Likewise.
3945 * elf64-ia64-vms.c: Likewise.
3946 * elf64-mmix.c: Likewise.
3947 * elf64-sh64.c: Likewise.
3948 * elfcode.h: Likewise.
3949 * elfnn-aarch64.c: Likewise.
3950 * elfnn-ia64.c: Likewise.
3951 * elfxx-mips.c: Likewise.
3952 * hpux-core.c: Likewise.
3953 * ieee.c: Likewise.
3954 * ihex.c: Likewise.
3955 * linker.c: Likewise.
3956 * merge.c: Likewise.
3957 * mmo.c: Likewise.
3958 * oasys.c: Likewise.
3959 * pdp11.c: Likewise.
3960 * peXXigen.c: Likewise.
3961 * rs6000-core.c: Likewise.
3962 * vms-alpha.c: Likewise.
3963 * xcofflink.c: Likewise.
3964
c08bb8dd
AM
39652017-04-13 Alan Modra <amodra@gmail.com>
3966
3967 * bfd.c (PRINT_TYPE): Define.
3968 (_doprnt): New function.
3969 (error_handler_internal): Use _doprnt.
3970 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3971 calls in their natural order, throughout file.
3972 * coff-mcore.c: Likewise.
3973 * coff-ppc.c: Likewise.
3974 * coff-tic80.c: Likewise.
3975 * cofflink.c: Likewise.
3976 * elf-s390-common.c: Likewise.
3977 * elf.c: Likewise.
3978 * elf32-arm.c: Likewise.
3979 * elf32-i386.c: Likewise.
3980 * elf32-m32r.c: Likewise.
3981 * elf32-msp430.c: Likewise.
3982 * elf32-spu.c: Likewise.
3983 * elf64-ia64-vms.c: Likewise.
3984 * elf64-sparc.c: Likewise.
3985 * elf64-x86-64.c: Likewise.
3986 * elflink.c: Likewise.
3987 * elfnn-aarch64.c: Likewise.
3988 * elfnn-ia64.c: Likewise.
3989 * elfxx-mips.c: Likewise.
3990
10463f39
AM
39912017-04-13 Alan Modra <amodra@gmail.com>
3992
3993 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3994 branch veneers" error. Fix double space and format message.
3995 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3996 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3997
4af8774e
AM
39982017-04-13 Alan Modra <amodra@gmail.com>
3999
4000 * bfd-in2.h: Regenerate.
4001
e4097f5e
L
40022017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4003
4004 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4005 extra `\n' in warning/error messages.
4006 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4007 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4008
537616aa
L
40092017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4010
4011 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4012 processor-specific properties with generic ELF target vector.
4013
bb1dd176
QZ
40142017-04-10 Qing Zhao <qing.zhao@oracle.com>
4015
4016 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4017 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4018 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4019 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4020 has_non_got_reloc.
4021 (link_hash_newfunc): Initialize has_got_reloc and
4022 has_non_got_reloc.
4023 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4024 section.
4025 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4026 has_non_got_reloc.
4027 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4028 has_non_got_reloc.
4029 (_bfd_sparc_elf_fixup_symbol): New function.
4030 (allocate_dynrelocs): Don't allocate space for dynamic
4031 relocations and discard relocations against resolved undefined
4032 weak symbols in executable. Don't make resolved undefined weak
4033 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4034 relocation against undefined weak symbols in PIE.
4035 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4036 relocations against resolved undefined weak symbols in PIE
4037 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4038 without ynamic PLT/GOT relocations for resolved undefined weak
4039 symbols.
4040 Don't generate dynamic relocation against resolved undefined
4041 weak symbol in executable.
4042 (pie_finish_undefweak_symbol): New function.
4043 (_bfd_sparc_elf_finish_dynamic_sections): Call
4044 pie_finish_undefweak_symbol on all symbols in PIE.
4045 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4046 (_bfd_sparc_elf_fixup_symbol): New function.
4047
d236cfd4
NC
40482017-04-10 Nick Clifton <nickc@redhat.com>
4049
4050 * config.bfd: Remove ns32k from obsolete list.
4051
6f9dbcd4
AM
40522017-04-10 Alan Modra <amodra@gmail.com>
4053
4054 PR 21287
4055 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4056 (special_sections_i): Likewise for .init_array.
4057 (special_sections_p): Likewise for .preinit_array.
4058
8170f769
L
40592017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4060
4061 PR ld/19579
4062 PR ld/21306
4063 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4064 ELF_COMMON_DEF_P for common symbols.
4065 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4066 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4067 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4068 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4069 07492f668d2173da7a2bda3707ff0985e0f460b6.
4070
49f4617b
PA
40712017-04-07 Pedro Alves <palves@redhat.com>
4072
4073 * opncls.c (bfd_get_debug_link_info): Rename to...
4074 (bfd_get_debug_link_info_1): ... this. Change type of second
4075 parameter to void pointer. Adjust.
4076 (bfd_get_debug_link_info): Reimplement on top of
4077 bfd_get_debug_link_info_1.
4078 (separate_debug_file_exists, separate_alt_debug_file_exists):
4079 Change type of second parameter to void pointer. Adjust.
4080 (get_func_type, check_func_type): Change type of second parameter
4081 to void pointer.
4082 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4083 the callback functions instead of passing the address of a local.
4084 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4085 find_separate_debug_file.
4086 (get_alt_debug_link_info_shim): Change type of second parameter to
4087 void pointer. Adjust.
4088 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4089 find_separate_debug_file.
4090 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4091 of second parameter to void pointer. Adjust.
4092 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4093 pointer local to find_separate_debug_file.
4094
40952017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
4096
4097 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4098 external symbols with a definition.
4099 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4100
86abf93a
AM
41012017-04-07 Alan Modra <amodra@gmail.com>
4102
4103 * po/SRC-POTFILES.in: Regenerate.
4104
8dea77f0
AM
41052017-04-05 Alan Modra <amodra@gmail.com>
4106
4107 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4108 reference counting.
4109
477bdd39
JT
41102017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4111
4112 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4113 numbers for DataDirectory entry indicies passed to
4114 add_data_entry().
4115
a91e1603
L
41162017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4117
4118 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4119 each GNU_MBIND section and align GNU_MBIND section to page size.
4120 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4121 segment for each GNU_MBIND section.
4122 (_bfd_elf_init_private_section_data): Copy sh_info from input
4123 for GNU_MBIND section.
4124
b5292032
PD
41252017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4126
4127 * elfnn-riscv.c (GP_NAME): Delete.
4128 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4129 (_bfd_riscv_relax_lui): Likewise.
4130
ad32986f
NC
41312017-04-04 Nick Clifton <nickc@redhat.com>
4132
4133 PR binutils/21342
4134 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4135 dereference.
4136 (bfd_elf_final_link): Only initialize the extended symbol index
4137 section if there are extended symbol tables to list.
4138
46bed679
L
41392017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4140
4141 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4142 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4143 * configure.ac (elf): Add elf-properties.lo.
4144 * Makefile.in: Regenerated.
4145 * configure: Likewise.
4146 * elf-bfd.h (elf_property_kind): New.
4147 (elf_property): Likewise.
4148 (elf_property_list): Likewise.
4149 (elf_properties): Likewise.
4150 (_bfd_elf_parse_gnu_properties): Likewise.
4151 (_bfd_elf_get_property): Likewise.
4152 (_bfd_elf_link_setup_gnu_properties): Likewise.
4153 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4154 and setup_gnu_properties.
4155 (elf_obj_tdata): Add properties.
4156 * elf-properties.c: New file.
4157 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4158 (elf_i386_merge_gnu_properties): Likewise.
4159 (elf_backend_parse_gnu_properties): Likewise.
4160 (elf_backend_merge_gnu_properties): Likewise.
4161 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4162 (elf_x86_64_merge_gnu_properties): Likewise.
4163 (elf_backend_parse_gnu_properties): Likewise.
4164 (elf_backend_merge_gnu_properties): Likewise.
4165 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4166 (elf_backend_parse_gnu_properties): Likewise.
4167 (elf_backend_setup_gnu_properties): Likewise.
4168 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4169 elf_backend_merge_gnu_properties and
4170 elf_backend_setup_gnu_properties.
4171
f96bd6c2
PC
41722017-03-30 Pip Cet <pipcet@gmail.com>
4173
4174 * elf32-wasm32.c: Add relocation code, two relocs.
4175 * reloc.c: Add wasm32 relocations.
4176 * libbfd.h: Regenerate.
4177 * bfd-in2.h: Regenerate.
4178 * bfd/po/bfd.pot: Regenerate.
4179
e643cb45
NC
41802017-03-29 Nick Clifton <nickc@redhat.com>
4181
4182 PR binutils/18025
4183 * coff-bfd.h (struct coff_section_data): Add new fields:
4184 saved_bias and bias.
4185 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4186 computed for PE binaries.
4187 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4188 missing abbrev.
4189
086554e8
HPN
41902017-03-28 Hans-Peter Nilsson <hp@axis.com>
4191
4192 PR ld/16044
4193 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4194 to handle a local symbol with a hash-symbol-entry; without PLT.
4195 Add BFD_ASSERT for an incidental case with GOT entry present.
4196 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4197 isn't forced-or-set local.
4198
a6be0538
PC
41992017-03-27 Pip Cet <pipcet@gmail.com>
4200
4201 * wasm-module.c: New file to support WebAssembly modules.
4202 * wasm-module.h: New file to support WebAssembly modules.
4203 * doc/webassembly.texi: Start documenting wasm-module.c.
4204 * config.bfd: Add wasm_vec.
4205 * targets.c: Likewise.
4206 * configure.ac: Likewise.
4207 * Makefile.am: Add entries for wasm-module.c.
4208 * Makefile.in: Regenerate.
4209 * configure: Regenerate.
4210 * po/SRC-POTFILES.in: Regenerate.
4211
79b1d3cb
PC
42122017-03-27 Pip Cet <pipcet@gmail.com>
4213
4214 * cpu-wasm32.c: New file to support wasm32 architecture.
4215 * elf32-wasm32.c: New file to support wasm32 architecture.
4216 * Makefile.am: Add wasm32 architecture.
4217 * archures.c: Likewise.
4218 * config.bfd: Likewise.
4219 * configure.ac: Likewise.
4220 * targets.c: Likewise.
4221 * Makefile.in: Regenerate.
4222 * bfd-in2.h: Regenerate.
4223 * configure: Regenerate.
4224 * po/SRC-POTFILES.in: Regenerate.
4225
aaed6f5b
AM
42262017-03-20 Alan Modra <amodra@gmail.com>
4227
4228 PR 21266
4229 * elf64-ppc.c (compare_symbols): Stabilize sort.
4230
82e66161
AM
42312017-03-18 Alan Modra <amodra@gmail.com>
4232
4233 * elf64-ppc.c (struct ppc_link_hash_table): Add
4234 local_ifunc_resolver and maybe_local_ifunc_resolver.
4235 (ppc_build_one_stub): Set flags on emitting dynamic
4236 relocation to ifunc.
4237 (ppc64_elf_relocate_section): Likewise.
4238 (ppc64_elf_finish_dynamic_symbol): Likewise.
4239 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4240 local dynamic relocs to ifuncs.
4241 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4242 local_ifunc_resolver and maybe_local_ifunc_resolver.
4243 (ppc_elf_relocate_section): Set flag on emitting dynamic
4244 relocation to ifuncs.
4245 (ppc_elf_finish_dynamic_symbol): Likewise.
4246 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4247 dynamic relocs to ifuncs.
4248
f955cccf
NC
42492017-03-13 Nick Clifton <nickc@redhat.com>
4250
4251 PR binutils/21202
4252 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4253 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4254 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4255 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4256 * bfd-in2.h: Regenerate.
4257 * libbfd.h: Regenerate.
4258 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4259 names.
4260 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4261 (elfNN_aarch64_howto_table): Likewise.
4262 (aarch64_tls_transition_without_check): Likewise.
4263 (aarch64_reloc_got_type): Likewise.
4264 (elfNN_aarch64_final_link_relocate): Likewise.
4265 (elfNN_aarch64_tls_relax): Likewise.
4266 (elfNN_aarch64_relocate_section): Likewise.
4267 (elfNN_aarch64_gc_sweep_hook): Likewise.
4268 (elfNN_aarch64_check_relocs): Likewise.
4269 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4270 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4271
4aef7643
AM
42722017-03-11 Alan Modra <amodra@gmail.com>
4273
4274 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4275 parameter is in fact used. Whitespace fixes.
4276 * elf64-ppc.c: Likewise.
4277
f03265d9
ST
42782017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4279
4280 * rs6000-core.c (CORE_NEW): Simplify macro when
4281 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4282
b1b07054
AM
42832017-03-07 Alan Modra <amodra@gmail.com>
4284
4285 PR 21224
4286 PR 20519
4287 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4288 dyn_relocs check.
4289
2e0ce1c8
AM
42902017-03-05 Alan Modra <amodra@gmail.com>
4291
4292 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4293 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4294 (next_cie_fde_offset): New function.
4295 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4296 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4297 four bytes. Align CIEs to four or eight bytes depending on
4298 per_encoding_aligned8. Align FDEs according to their encoding.
4299 Pad last FDE to output section alignment.
4300 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4301 assertion.
4302 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4303 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4304 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4305
f98450c6
NC
43062017-03-02 Martin Bickel <binutils@ineranves.de>
4307
4308 PR ld/21212
4309 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 4310 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 4311
673cff9b
AM
43122017-03-02 Alan Modra <amodra@gmail.com>
4313
4314 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4315
3de43e7b
AM
43162017-02-28 Alan Modra <amodra@gmail.com>
4317
4318 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4319 (ppc64_elf_relocate_section): Likewise.
4320
4ef97a1b
AM
43212017-02-28 Alan Modra <amodra@gmail.com>
4322
4323 PR 20995
4324 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4325 rather than elf32_nios2_hash_table or elf_hash_table.
4326 (create_got_section): Likewise.
4327 (nios2_elf32_finish_dynamic_symbol): Likewise.
4328 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4329 (nios2_elf32_size_dynamic_sections): Likewise.
4330 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4331 vars. Use htab equivalents directly instead. Don't create
4332 all dynamic sections on needing just the GOT. Use a goto
4333 rather than a fall-through with reloc test. Ensure
4334 htab->dynobj is set when making dynamic sreloc section.
4335 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4336 equivalent directly instead. Don't segfault on looking for
4337 .dynamic when dynamic sections have not been created. Don't
4338 segfault on .got.plt being discarded.
4339 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4340 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4341 fixme and another not so relevant comment.
4342 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4343 already set, set hash table dynobj on creating .sbss.
4344
7ba71655
AM
43452017-02-28 Alan Modra <amodra@gmail.com>
4346
4347 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4348 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4349 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4350 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4351 (ppc64_elf_relocate_section): Likewise.
4352 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4353 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4354 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4355 * libbfd.h: Regenerate.
4356 * bfd-in2.h: Regenerate.
4357
afbf7e8e
AM
43582017-02-28 Alan Modra <amodra@gmail.com>
4359
4360 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4361 dynamic .data.rel.ro read-only.
4362 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4363 rather than section flags when deciding where copy reloc goes.
4364 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4365 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4366 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4367 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4368 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4369 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4370 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4371 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4372 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4373 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4374 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4375 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4376 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4377 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4378 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4379 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4380 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4381 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4382 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4383
0e392101
MR
43842017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4385
4386 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4387 `jalr $0, $25' instruction encoding.
4388
bd757ca7
NC
43892017-02-27 Nick Clifton <nickc@redhat.com>
4390
4391 PR ld/21180
4392 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4393 generating a seg-fault when encountering a symbol that has been
4394 deleted by garbage collection.
4395
034fed0b
AM
43962017-02-25 Alan Modra <amodra@gmail.com>
4397
4398 * elf32-arc.c (struct dynamic_sections): Delete.
4399 (enum dyn_section_types): Delete.
4400 (dyn_section_names): Delete.
4401 (arc_create_dynamic_sections): Delete.
4402 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4403 segfault on discarded .rela.plt section.
4404 (elf_arc_size_dynamic_sections): Formatting. Don't call
4405 arc_create_dynamic_sections. Don't allocate memory for sections
4406 handled by the generic linker. Correct code finding relocs in
4407 read-only sections. Set SEC_EXCLUDE on zero size .got,
4408 .got.plt, and .dynbss sections. Do set .interp for pies.
4409
d0f744f9
AW
44102017-02-24 Andrew Waterman <andrew@sifive.com>
4411
4412 * elfnn-riscv.c (GP_NAME): New macro.
4413 (riscv_global_pointer_value): Use it.
4414 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4415 output section, consider only that section's alignment.
4416
5d58c733
MR
44172017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4418
4419 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4420 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4421 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4422 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4423
c1556ecd
MR
44242017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4425
4426 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4427 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4428 or misaligned.
4429
5499c7c7
AM
44302017-02-23 Alan Modra <amodra@gmail.com>
4431
4432 PR 20744
4433 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4434 16D relocations.
4435 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4436 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4437 relocs.
4438
902e9fc7
MR
44392017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4440
4441 PR ld/20828
4442 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4443 processing ahead of the call to `elf_gc_sweep_symbol'.
4444
758d96d8
NC
44452017-02-22 Nick Clifton <nickc@redhat.com>
4446
4447 PR binutils/21193
4448 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4449 created section 4-byte alignment.
4450
6528b6eb
AM
44512017-02-22 Alan Modra <amodra@gmail.com>
4452
4453 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4454 on .got or .plt output section being discarded by script.
4455 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4456 vxworks splt temp.
4457
24f1a751
AM
44582017-02-21 Alan Modra <amodra@gmail.com>
4459
4460 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4461 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4462
64487780
AM
44632017-02-20 Alan Modra <amodra@gmail.com>
4464
4465 PR 21181
4466 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4467 if DT_RELSZ/DT_RELASZ is zero.
4468
6438d1be
NC
44692017-02-17 Nick Clifton <nickc@redhat.com>
4470
4471 * compress.c (bfd_get_full_section_contents): Remember to reduce
4472 compressed size by the sizeof the compression header when
4473 decompressing the contents.
4474
4bc26c69
PA
44752017-02-17 Pedro Alves <palves@redhat.com>
4476
4477 * srec.c (Chunk): Rename to ...
4478 (_bfd_srec_len): ... this.
4479 (S3Forced): Rename to ...
4480 (_bfd_srec_forceS3): ... this.
4481 * objcopy.c: Adjust all references.
4482
7ec22e0f
PA
44832017-02-17 Pedro Alves <palves@redhat.com>
4484
4485 * archive.c (bsd_write_armap): Rename to ...
4486 (_bfd_bsd_write_armap): ... this.
4487 (coff_write_armap): Rename to ...
4488 (_bfd_coff_write_armap): ... this.
4489 * libbfd-in.h (bsd_write_armap): Rename to ...
4490 (_bfd_bsd_write_armap): ... this.
4491 (coff_write_armap): Rename to ...
4492 (_bfd_coff_write_armap): ... this.
4493 * aout-target.h, aout-tic30.c: Adjust all users.
4494 * libbfd.h: Regenerate.
4495
8c8402cc
PA
44962017-02-17 Pedro Alves <palves@redhat.com>
4497
4498 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4499 (warn_deprecated): Rename to ...
4500 (_bfd_warn_deprecated): ... this.
4501 * libbfd.c (warn_deprecated): Rename to ...
4502 (_bfd_warn_deprecated): ... this.
4503 * bfd-in2.h: Regenerate.
4504
c7c3d11b
PA
45052017-02-17 Pedro Alves <palves@redhat.com>
4506
4507 * bfdio.c (real_ftell): Rename to ...
4508 (_bfd_real_ftell): ... this.
4509 (real_fseek): Rename to ...
4510 (_bfd_real_fseek): ... this.
4511 (real_fopen): Rename to ...
4512 (_bfd_real_fopen): ... this.
4513 * libbfd-in.h (real_ftell): Rename to ...
4514 (_bfd_real_ftell): ... this.
4515 (real_fseek): Rename to ...
4516 (_bfd_real_fseek): ... this.
4517 (real_fopen): Rename to ...
4518 (_bfd_real_fopen): ... this.
4519 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4520 * libbfd.h: Regenerate.
4521
4265548c
PA
45222017-02-17 Pedro Alves <palves@redhat.com>
4523
4524 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4525 * libbfd.c (read_unsigned_leb128): Rename to ...
4526 (_bfd_read_unsigned_leb128): ... this.
4527 (read_signed_leb128): Rename to ...
4528 (_bfd_read_signed_leb128): ... this.
4529 (safe_read_leb128): Rename to ...
4530 (_bfd_safe_read_leb128): ... this.
4531 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4532 (_bfd_read_unsigned_leb128): ... this.
4533 (read_signed_leb128): Rename to ...
4534 (_bfd_read_signed_leb128): ... this.
4535 (safe_read_leb128): Rename to ...
4536 (_bfd_safe_read_leb128): ... this.
4537 * libbfd.h: Renegerate.
4538
3239a423
AB
45392017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4540
4541 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4542 before trying to fine matching file and line information.
4543
90ed9b8b
AB
45442017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4545
4546 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4547 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4548 not match current bfd, then reload debug information. Record bfd
4549 we're loading debug info for in the stash. If we have debug
4550 informatin in the cache then perform section placement before
4551 returning.
4552
a8c75b76
AM
45532017-02-16 Alan Modra <amodra@gmail.com>
4554
4555 PR 21000
4556 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4557 * elfxx-target.h (elf_backend_no_page_alias): Define.
4558 (elfNN_bed): Init new field.
4559 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4560 ensure PT_LOAD segment starts on a new page.
4561 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4562
247d6c4c
AM
45632017-02-16 Alan Modra <amodra@gmail.com>
4564
4565 PR 21132
4566 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4567 if pic.
4568
90571206
JW
45692017-02-16 Jiong Wang <jiong.wang@arm.com>
4570
4571 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4572 * bfd-in2.h: Regenerated.
4573
2a568401
L
45742017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4575
4576 PR ld/21168
4577 * elf32-i386.c (elf_i386_relocate_section): Allow
4578 "lea foo@GOT, %reg" in PIC.
4579
a5def14f
L
45802017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4581
4582 PR ld/20244
4583 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4584 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4585 error against local IFUNC symbol without a base register for
4586 PIC.
4587
174d0a74
MR
45882017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4589
4590 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4591 `%P: %H:' with `info->callbacks->einfo'.
4592 (ppc_elf_relocate_section): Likewise.
4593 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4594 (ppc64_elf_edit_toc): Likewise.
4595 (ppc64_elf_relocate_section): Likewise.
4596
e278ae05
AM
45972017-02-14 Alan Modra <amodra@gmail.com>
4598
4599 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4600 --gc-keep-exported, and test versioned field of sym rather than
4601 looking for @ in name.
4602
10ddfe62
PD
46032017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4604
4605 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4606 __global_pointer$.
4607
d11135f5
NC
46082017-02-13 Nick Clifton <nickc@redhat.com>
4609
4610 PR binutils/21151
4611 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4612 unit length field.
4613
cc162427
AW
46142017-02-07 Andrew Waterman <andrew@sifive.com>
4615
4616 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4617 entry size if PLT header is written.
4618
3d044c0c
SL
46192017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4620
4621 Fix sparc64 dynamic relocation processing to use the dynamic
4622 symbol count.
4623 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4624 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4625 should be used.
4626
1b7e3d2f
NC
46272017-02-03 Nick Clifton <nickc@redhat.com>
4628
4629 PR 21096
4630 * coffcode.h (coff_write_object_contents): Enlarge size of
4631 s_name_buf in order to avoid compile time warning about possible
4632 integer truncation.
4633 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4634 32-bits of insn value before printing into buffer.
4635
e17b0c35
MR
46362017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4637
4638 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4639 `max_local_dynindx'.
4640 (mips_elf_sort_hash_table): Handle it.
4641 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4642 symbols bump up `max_local_dynindx' rather than
4643 `max_non_got_dynindx'.
4644
55f8b9d2
MR
46452017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4646
4647 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4648 `min_got_dynindx', `max_unref_got_dynindx' and
4649 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4650 (mips_elf_sort_hash_table): Adjust accordingly.
4651
0f8c4b60
MR
46522017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4653
4654 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4655 to access the hash table.
4656
17a80fa8
MR
46572017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4658
4659 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4660 non-NULL `htab' to the beginning.
4661
8f56d4fd
MR
46622017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4663
4664 * elflink.c (elf_gc_sweep): Wrap overlong line.
4665
8b10b0b3
MR
46662017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4667
4668 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4669 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4670 * elfxx-mips.c (mips_elf_link_hash_table): Add
4671 `ignore_branch_isa' member.
4672 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4673 in branch relocation calculation as an error if
4674 `ignore_branch_isa' has been set.
4675 (_bfd_mips_elf_insn32): Rename to...
4676 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4677 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4678 Handle the new parameter.
4679
1fbd05e1
HPN
46802017-01-27 Hans-Peter Nilsson <hp@axis.com>
4681
22d9a0de
HPN
4682 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4683 local variable dynobj.
4684
1fbd05e1
HPN
4685 PR ld/20995
4686 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4687 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4688 executable from read-only sections into sdynrelro.
4689 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4690 dynamic relocs in sdynrelro.
4691 (elf_backend_want_dynrelro): Define.
4692
4a7324e1
SH
46932017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4694
4695 * config.bfd (*-*-rtemsaout*): Mark as removed.
4696
c75b4ebd
SH
46972017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4698
4699 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4700 (arm-*-rtems*): Move to (arm*-*-eabi*).
4701 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4702 (m68-*-rtems*): Move to (m68*-*-elf*).
4703
850d84f6
SH
47042017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4705
4706 * config.bfd (*-*-rtemscoff*): Mark as removed.
4707
b531344c
MR
47082017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4709
4710 PR ld/20828
4711 * elflink.c (bfd_elf_record_link_assignment): Revert last
4712 change and don't ever clear `forced_local'. Set `mark'
4713 unconditionally.
4714 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4715 file.
4716 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4717 (bfd_elf_size_dynamic_sections): ... here.
4718 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4719 and set `mark' instead in `__tls_get_addr_opt' processing.
4720 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4721
f0158f44
AM
47222017-01-24 Alan Modra <amodra@gmail.com>
4723
4724 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4725 where dynamic relocs are preferable. Allow ifunc too.
4726 (ensure_undefweak_dynamic): New function.
4727 (allocate_dynrelocs): Use it here. Move plt handling last and
4728 don't make symbols dynamic, simplifying loop. Only make undef
4729 weak symbols with GOT entries dynamic. Correct condition
4730 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4731 comments. Remove goto.
4732 (ppc_elf_relocate_section): Correct test for using dynamic
4733 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4734 to suit. Set up explicit tls_index entries and implicit GOT
4735 tls_index entries resolvable at link time for
4736 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4737 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4738 (ensure_undefweak_dynamic): New function.
4739 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4740 with GOT entries dynamic. Remove unnecessary test of
4741 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4742 (ppc64_elf_relocate_section): Correct test for using dynamic
4743 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4744 to suit. Set up explicit tls_index entries and implicit GOT
4745 tls_index entries resolvable at link time for __tls_get_addr_opt.
4746 Simplify expression to clear mem for prelink.
4747
2d0ca824
YN
47482017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4749
4750 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4751
7f784814
JW
47522017-01-20 Jiong Wang <jiong.wang@arm.com>
4753
4754 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4755 (elf_backend_hash_symbol): Define.
4756
81ff47b3
MR
47572017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4758
4759 PR ld/20828
4760 * elflink.c (bfd_elf_record_link_assignment): Clear any
4761 `forced_local' marking for DSO symbols that are not being
4762 provided.
4763
640d6bfd
KLC
47642017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4765
4766 * elfnn-riscv.c (riscv_elf_object_p): New function.
4767
8361ed4d
L
47682017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4769
4770 PR ld/21038
4771 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4772 plt_bnd_eh_frame.
4773 (elf_x86_64_check_relocs): Create .eh_frame section for the
4774 .plt.bnd section.
4775 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4776 .eh_frame section for the .plt.bnd section.
4777 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4778 for the .plt.bnd section.
4779
2425a30e
NC
47802017-01-12 Nick Clifton <nickc@redhat.com>
4781
4782 PR binutils/20876
4783 * opncls.c (find_separate_debug_file): Add include_dirs
4784 parameter. Only include the directory part of the bfd's filename
4785 in search paths if include_dirs is true. Add a couple of extra
4786 locations for looking for debug files.
4787 ( bfd_follow_gnu_debuglink): Update invocation of
4788 find_separate_debug_file.
4789 (bfd_follow_gnu_debugaltlink): Likewise.
4790 (get_build_id): New function: Finds the build-id of the given bfd.
4791 (get_build_id_name): New function: Computes the name of the
4792 separate debug info file for a bfd, based upon its build-id.
4793 (check_build_id_file): New function: Checks to see if a separate
4794 debug info file exists at the given location, and that its
4795 build-id matches that of the original bfd.
4796 (bfd_follow_build_id_debuglink): New function: Finds a separate
4797 debug info file for a given bfd by using the build-id method.
4798 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4799 method of locating a separate debug info file before using the
4800 debuglink method.
4801 * bfd-in2.h: Regenerate.
4802
9e659176
L
48032017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4804
4805 PR ld/21038
4806 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4807 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4808 elf_x86_64_eh_frame_plt_got.
4809 (elf_x86_64_size_dynamic_sections): Get unwind info from
4810 elf_x86_64_bnd_arch_bed for the BND PLT.
4811
f2e2d2f5
JS
48122017-01-11 Jeremy Soller <jackpot51@gmail.com>
4813
4814 * config.bfd: Add entries for i686-redox and x86_64-redox.
4815
52b232b3
L
48162017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4817
4818 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4819 to 4 bytes.
4820 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4821 .eh_frame section to 4 bytes for x32.
4822 (elf_x86_64_check_relocs): Likewise.
4823
fff53dae
L
48242017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4825
4826 PR ld/20830
4827 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4828 (PLT_GOT_FDE_LENGTH): Likewise.
4829 (elf_i386_plt_layout): Add eh_frame_plt_got and
4830 eh_frame_plt_got_size.
4831 (elf_i386_plt): Updated.
4832 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4833 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4834 (elf_i386_size_dynamic_sections): Allocate and initialize
4835 .eh_frame section for .plt.got.
4836 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4837 .plt.got.
4838 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4839 eh_frame_plt_got_size.
4840 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4841 (PLT_GOT_FDE_LENGTH): Likewise.
4842 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4843 eh_frame_plt_got_size.
4844 (elf_x86_64_arch_bed): Updated.
4845 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4846 eh_frame_plt_got_size.
4847 (elf_x86_64_nacl_arch_bed): Likewise.
4848 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4849 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4850 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4851 .eh_frame section for .plt.got.
4852 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4853 for .plt.got.
4854
f129e49f
L
48552017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4856
4857 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4858 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4859
cd6581da
NC
48602017-01-09 Nick Clifton <nickc@redhat.com>
4861
4862 * dwarf2.c (lookup_address_in_function_table): Return early if
4863 there are no functions in the given comp unit, or if the high
4864 address of the last function in the comp unit is less than the
4865 desired address.
4866
98f02962
NC
48672017-01-09 Nick Clifton <nickc@redhat.com>
4868
4869 PR binutils/21013
4870 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4871 message if there are too many symbols to load.
4872
ae4fda66
JC
48732017-01-04 James Clarke <jrtc27@jrtc27.com>
4874
4875 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4876 if relocs are cached.
4877
de1010f4
RF
48782017-01-03 Rich Felker <bugdal@aerifal.cx>
4879
4880 PR ld/21017
4881 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4882 for R_MICROBLAZE_GOTOFF_64.
4883
09fe2662
NC
48842017-01-03 Nick Clifton <nickc@redhat.com>
4885
4886 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4887 warning about using a possibly uninitialised variable.
4888
595e0a47
AM
48892017-01-02 Alan Modra <amodra@gmail.com>
4890
4891 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4892 (allocate_plt_static, allocate_dynrelocs): Use it.
4893
7bd9df3b
AM
48942017-01-02 Alan Modra <amodra@gmail.com>
4895
4896 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4897 .PARISC.unwind section.
4898
5b86074c
AM
48992017-01-02 Alan Modra <amodra@gmail.com>
4900
4901 PR ld/20989
4902 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4903 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4904 indirect to GOT pointer relative code edit.
4905
2571583a
AM
49062017-01-02 Alan Modra <amodra@gmail.com>
4907
4908 Update year range in copyright notice of all files.
4909
5c1ad6b5 4910For older changes see ChangeLog-2016
3499769a 4911\f
5c1ad6b5 4912Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
4913
4914Copying and distribution of this file, with or without modification,
4915are permitted in any medium without royalty provided the copyright
4916notice and this notice are preserved.
4917
4918Local Variables:
4919mode: change-log
4920left-margin: 8
4921fill-column: 74
4922version-control: never
4923End: