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